Ejemplo n.º 1
0
 /**
  * imprime formulario de configuracion de usuario
  * @return type
  */
 public function configuracionUsuario()
 {
     try {
         if ($this->verificarSession()) {
             $this->vista->set('titulo', 'configuracion de Usuario');
             $idPersona = $_SESSION['idUsuario'];
             $pers = new Persona();
             $user = new Usuario();
             $persona = $pers->leerPorId($idPersona);
             $usuario = $user->leerPorId($idPersona);
             $this->vista->set('usuario', $usuario);
             $this->vista->set('persona', $persona);
             return $this->vista->imprimir();
         }
     } catch (Exception $exc) {
         echo 'Error de aplicacion: ' . $exc->getMessage();
     }
 }
Ejemplo n.º 2
0
 public function cambiarClave($string)
 {
     try {
         $key = "colegio";
         $id = $this->decrypt($string, $key);
         $persona = new Persona();
         $per = $persona->leerPorId($id);
         $usuario = new Usuario();
         $user = $usuario->leerPorId($id);
         $this->vista->set('persona', $per);
         $this->vista->set('usuario', $user);
         $this->vista->set('titulo', 'Cambiar contraseña');
         return $this->vista->imprimir();
     } catch (Exception $exc) {
         echo $exc->getMessage();
         return $this->vista->imprimir();
     }
 }
Ejemplo n.º 3
0
 public function consultaGeneralPersona()
 {
     try {
         $idPersona = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL;
         $pers = new Persona();
         $rolPersona = new Rol();
         $roles = $rolPersona->leerRoles($idPersona);
         foreach ($roles as $ro) {
             if ($ro->getIdRol() == 'D') {
                 $rol = $ro->getIdRol();
             } elseif ($ro->getIdRol() == 'E') {
                 $rol = $ro->getIdRol();
             }
         }
         $persona = $pers->leerPorId($idPersona);
         $this->vista->set('idPersona', $idPersona);
         $this->vista->set('persona', $persona);
         $this->vista->set('rol', $rol);
         return $this->vista->imprimir();
     } catch (Exception $exc) {
         $this->setVista('mensaje');
         $msj = "ERROR... La consulta no se pudo ejecutar.. !";
         $this->vista->set('msj', $msj);
         return $this->vista->imprimir();
     }
 }
Ejemplo n.º 4
0
 public function informeFinalGalois($idPersona, $anio)
 {
     $pdf = new FPDF('P', 'cm', 'Legal');
     $matricula = new Matricula();
     $matr = $matricula->leerMatriculaPorIdyAnio($idPersona, $anio);
     $salon = new Salon();
     $sal = $salon->leerSalonePorId($matr->getIdSalon());
     $grado = new Grado();
     $grad = $grado->leerGradoPorId($sal->getIdGrado());
     $persona = new Persona();
     $estudiante = $persona->leerPorId($idPersona);
     $vec = array();
     if ($grad->getIdGrado() == 'p1' || $grad->getIdGrado() == 'p2' || $grad->getIdGrado() == 'p3') {
         $seccion = 'PREESCOLAR';
         $vec = ["PMAT", "PLEC", "ING", "PCN", "PCS", "ER", "EV", "ART", "EF", "COM"];
     } else {
         if ($grad->getIdGrado() == '1' || $grad->getIdGrado() == '2' || $grad->getIdGrado() == '3' || $grad->getIdGrado() == '4' || $grad->getIdGrado() == '5') {
             $seccion = 'BASICA PRIMARIA';
             $vec = ["MAT", "ING", "LC", "CN", "CS", "ER", "INF", "EF", "ART", "EV", "COM"];
         } else {
             if ($grad->getIdGrado() == '6' || $grad->getIdGrado() == '7' || $grad->getIdGrado() == '8' || $grad->getIdGrado() == '9' || $grad->getIdGrado() == '10' || $grad->getIdGrado() == '11') {
                 $seccion = 'BASICA SECUNDARIA';
                 if ($grad->getIdGrado() == '6' || $grad->getIdGrado() == '7' || $grad->getIdGrado() == '8') {
                     $vec = ["AYG", "EST", "ING", "LC", "CN", "GEO", "HIS", "CONS", "ER", "INF", "EF", "ART", "EV", "COM"];
                 } else {
                     if ($grad->getIdGrado() == '9') {
                         $vec = ["ALYG", "EST", "ING", "LC", "CN", "GEO", "HIS", "CONS", "ER", "INF", "EF", "ART", "EV", "COM"];
                     } else {
                         if ($grad->getIdGrado() == '10') {
                             $vec = ["TRI", "EST", "ING", "LC", "QUI", "FIS", "FIL", "CS", "ER", "INF", "EF", "ART", "EV", "COM"];
                         } else {
                             if ($grad->getIdGrado() == '11') {
                                 $vec = ["CALC", "EST", "ING", "LC", "QUI", "FIS", "FIL", "CS", "ER", "INF", "EF", "ART", "EV", "COM"];
                             }
                         }
                     }
                 }
             }
         }
     }
     $pdf->AddPage();
     $pdf->SetFont("Arial", "B", 16);
     $pdf->SetXY(1, 1);
     $pdf->cell(19, 1, "LICEO GALOIS", 0, 0, "C");
     $pdf->ln();
     $pdf->cell(4, 4, "", 0);
     $pdf->Image('utiles/imagenes/colegio/escudo_liceo_galois.png', 1, 1.5, 4);
     $pdf->SetFont("Arial", "B", 11);
     //CAbecera
     $pdf->SetXY(1, 2);
     $pdf->Cell(19, 1, utf8_decode("APROBADO SEGÚN RES. No. 1561 DE OCT. 22 DE 2001"), 0, 1, "C");
     $pdf->SetX(5);
     $pdf->Cell(11, 1, "NIT. 77171933-1  DANE 320001068479", 0, 1, "C");
     $pdf->SetX(5);
     $pdf->Cell(11, 1, "VALLEDUPAR - CESAR", 0, 1, "C");
     $pdf->SetXY(16, 2);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(4, 1, "Bajo: 0 - 29 ", 0, 0, "C");
     $pdf->SetXY(16, 2.5);
     $pdf->Cell(4, 1, "Basico: 30 - 39  ", 0, 0, "C");
     $pdf->SetXY(16, 3);
     $pdf->Cell(4, 1, "Alto: 40 - 45 ", 0, 0, "C");
     $pdf->SetXY(16, 3.5);
     $pdf->Cell(4, 1, "Superior : 46 - 50", 0, 0, "C");
     $pdf->SetXY(16, 2);
     $pdf->Cell(4, 3, "", 1, 0, "C");
     $pdf->SetXY(1, 5.5);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(19, 0.5, utf8_decode(strtoupper($estudiante->getPApellido() . " " . $estudiante->getSApellido() . " " . $estudiante->getNombres())), 1, 0, "C");
     $pdf->SetXY(1, 6);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(4, 0.5, $grad->getNombre(), 1, 0, "C");
     $pdf->SetXY(5, 6);
     $pdf->Cell(3, 0.5, "GRUPO: 01", 1, 0, "C");
     $pdf->SetXY(8, 6);
     $pdf->Cell(12, 0.5, utf8_decode("JORNADA: " . $matr->getJornada() . "     AÑO LECTIVO: " . $matr->getAnoLectivo() . "   INFORME FINAL"), 1, 0, "C");
     $pdf->SetXY(1, 6.5);
     $pdf->Cell(4, 0.5, $seccion, 1, 0, "C");
     $pdf->SetXY(5, 6.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY(6, 6.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY(7, 6.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY(8, 6.5);
     $pdf->Cell(12, 0.5, "MODALIDAD: ACADEMICA", 1, 0, "C");
     $pdf->SetFont("Arial", "B", 10);
     $pdf->SetXY(1, 7);
     $pdf->Cell(4, 0.5, "AREAS/ASIGNATURAS", 1, 0, "C");
     $pdf->SetXY(5, 7);
     $pdf->Cell(1, 0.5, "IH", 1, 0, "C");
     $pdf->SetXY(6, 7);
     $pdf->Cell(1, 0.5, "Fallas", 1, 0, "C");
     $pdf->SetXY(7, 7);
     $pdf->Cell(1, 0.5, "Val.", 1, 0, "C");
     $pdf->SetXY(8, 7);
     $pdf->Cell(12, 0.5, "FORTALEZAS/ DEBILIDADES/ RECOMENDACIONES", 1, 0, "C");
     $pdf->SetFont("Arial", "", 9);
     $y = 7.5;
     $x = 1;
     $suma = 0;
     $cont = 0;
     foreach ($vec as $v) {
         $mate = new Materia();
         $materias = $mate->leerMateriaPorId($v);
         foreach ($materias as $materia) {
             $nombreMateria = $materia->getNombreMateria();
             $horas = $materia->getHoras();
         }
         $nota = new Historial();
         $not = $nota->leerNotaEstudiante($anio, $estudiante->getIdPersona(), $v);
         $logro = new Logro();
         $log = $logro->leerLogro("CUARTO", $grad->getIdGrado(), $v);
         $desempeño = "";
         $cadena = "";
         $pdf->SetXY($x, $y);
         if (strlen($nombreMateria) > 20) {
             $pdf->SetFont("Arial", "", 8);
             $pdf->Cell(4, 1.5, $nombreMateria, 1, 0, "C");
             $pdf->SetFont("Arial", "", 9);
         } else {
             $pdf->Cell(4, 1.5, $nombreMateria, 1, 0, "C");
         }
         $x = $x + 4;
         $pdf->SetXY($x, $y);
         $pdf->Cell(1, 1.5, $horas, 1, 0, "C");
         $x = $x + 1;
         $pdf->SetXY($x, $y);
         $pdf->Cell(1, 1.5, "", 1, 0, "C");
         $pdf->Cell(1, 1.5, "", 1, 0, "C");
         $x = $x + 1;
         $pdf->SetXY($x, $y);
         $x = $x + 1;
         if ($log != NULL) {
             $pdf->Cell(1, 1.5, $not->getDefinitiva(), 1, 0, "C");
             $suma = $suma + $not->getDefinitiva();
             if ($not->getDefinitiva() < 30) {
                 $cadena = $log->getBajo();
                 $desempeño = " BAJO";
             }
             if ($not->getDefinitiva() < 40 && $not->getDefinitiva() >= 30) {
                 $cadena = $log->getBasico();
                 $desempeño = " BASICO";
             }
             if ($not->getDefinitiva() < 46 && $not->getDefinitiva() >= 40) {
                 $cadena = $log->getAlto();
                 $desempeño = " ALTO";
             }
             if ($not->getDefinitiva() > 45) {
                 $cadena = $log->getSuperior();
                 $desempeño = " SUPERIOR";
             }
         }
         $cont = $cont + 1;
         $pdf->SetXY($x, $y);
         $pdf->MultiCell(12, 1.5, "", 1);
         $pdf->SetFont("Arial", "", 7.5);
         $pdf->SetXY($x, $y + 0.5);
         $pdf->SetMargins($x + 0.1, 1, 1);
         $pdf->MultiCell(12, 0.3, utf8_decode(strtoupper($cadena)), 0);
         $pdf->Text($x + 0.1, $y + 0.35, utf8_decode("DESEMPEÑO") . $desempeño);
         $pdf->SetFont("Arial", "", 9);
         $y = $y + 1.5;
         $x = 1;
     }
     $prom = $suma / $cont;
     $pdf->SetFont("Arial", "B", 9);
     $pdf->SetXY($x, $y);
     $pdf->Cell(6, 0.5, "Promedio Alumno:", 0, 0, "R");
     $pdf->SetXY(7, $y);
     $pdf->Cell(1, 0.5, round($prom, 2), 0, 0, "R");
     $y = $y + 1;
     $pdf->SetFont("Arial", "", 9);
     $pdf->SetXY(1, $y);
     $pdf->Cell(4, 0.5, "OBSERVACIONES:", 0, 0);
     $pdf->SetXY(4, $y);
     $pdf->Cell(16, 0.5, "", "B", 0, "R");
     $y = $y + 0.5;
     $pdf->SetXY(1, $y);
     $pdf->Cell(19, 0.5, "", "B", 0, "R");
     $y = $y + 1;
     $pdf->SetXY(2, $y);
     $pdf->Cell(6, 0.5, "", "B", 0, "R");
     $pdf->SetXY(12, $y);
     $pdf->Cell(6, 0.5, "", "B", 0, "R");
     $y = $y + 0.5;
     $pdf->SetXY(2, $y);
     $pdf->Cell(5, 0.5, "RECTOR", 0, 0, "C");
     $pdf->SetXY(12, $y);
     $pdf->Cell(6, 0.5, "DIRECTOR(A) DE GRUPO", 0, 0, "C");
     $pdf->Output("Boletin ", "I");
 }