eaiovnaovbqoebvqoeavibavo Image('assets/img/fondo_boleta2022.jpg','0','0','216','280','JPG'); //datos del alumno $consultas=new Boleta2022(); $datosAlumno=$consultas->buscarAlumno($carnet); $this->SetFont('Arial','',12); $this->SetTextColor(20); $this->setXY(34,50); $this->Cell(45,10,$carnet); $this->Cell(50,10," ".utf8_decode(utf8_decode($datosAlumno[0]['apellidos'])).', '.utf8_decode(utf8_decode($datosAlumno[0]['nombres']))); $this->Ln(); $this->setXY(34,58); $this->setFontSize(10); $this->Cell(40,10,$datosAlumno[0]['nombre_corto']); // Colores, ancho de línea y fuente en negrita $this->SetFont('Arial','',11); $this->SetFillColor(149,242,215); $this->SetTextColor(255); $this->SetTextColor(20); $this->SetDrawColor(191, 191, 201); $this->SetLineWidth(.1); $this->SetFont('','B'); $this->setXY(22,80); // Cabecera $w = array(80, 18, 18, 18,18,18); $header = array('Curso', '1a', '2a', '3a','4a','Total'); for($i=0;$iCell($w[$i],8,utf8_decode($header[$i]),1,0,'C',true); $this->Ln(); // Restauración de colores y fuentes $this->SetDrawColor(191, 191, 201); $this->SetFillColor(225, 228, 242); $this->SetTextColor(0); $this->SetFont('Arial','',10); $this->SetX(22); $notasAlumno=$consultas->buscarNotasAlumno($carnet); $notasAlumnoIngles=$consultas->buscarNotasAlumnoIngles($carnet); //inicio de colocación de notas $contadorSalto=0; $contadorCurso=0; $total=0; $bim1=0; $bim2=0; $bim3=0; $bim4=0; $bandera=false; $bandera_graduando=false; foreach($notasAlumno as $Fnota){ if (strpos($Fnota['nombreCurso'], "Laboratorio") !== false) { }else{ if($Fnota['nombreCurso']!="APRESTAMIENTO/GRAFOMOTRICIDAD" && utf8_decode($Fnota['nombreCurso'])!="CALIGRAFÍA Y APRESTAMIENTO"){ if($contadorSalto==0){ if((utf8_decode($Fnota['nombreCurso'])=="Artes Plásticas" && $Fnota['punteo']==0) || (utf8_decode($Fnota['nombreCurso'])=="Danza y Expresión Corporal" && $Fnota['punteo']==0) || (utf8_decode($Fnota['nombreCurso'])=="Formación Musical" && $Fnota['punteo']==0) || (utf8_decode($Fnota['nombreCurso'])=="ÁLGEBRA" && $Fnota['punteo']==0) || (utf8_decode($Fnota['nombreCurso'])=="Práctica Supervisada Final" && $Fnota['punteo']==0)){ $bandera=true; }else{ $bandera=false; } } if($contadorSalto==0 && $bandera==false){ $this->SetX(22); $this->SetTextColor(0); $nombreAux=self::arreglar($Fnota['nombreCurso']); $this->Cell($w[$contadorSalto],6,' '.utf8_decode(utf8_decode($nombreAux)),1,0,'L',false); $contadorSalto++; } if($contadorSalto==1 && $bandera==false){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ if($Fnota['nombreCurso']=="Seminario"){ $this->SetTextColor(0); $bandera_graduando=true; }else{ $this->SetTextColor(252, 3, 3); } }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } if($Fnota['nombreCurso']!="Práctica Supervisada Final"){ $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); } $total+=intval($Fnota['punteo']); if($Fnota['nombreCurso']!="Seminario" && $Fnota['nombreCurso']!="Práctica Supervisada Final"){ $bim1+=$nota; } if($Fnota['nombreCurso']=="Práctica Supervisada Final"){ $this->Cell($w[$contadorSalto],6,"",1,0,'C',false); $this->Cell($w[$contadorSalto],6,"",1,0,'C',false); $this->Cell($w[$contadorSalto],6,"",1,0,'C',false); $this->Cell($w[$contadorSalto],6,"",1,0,'C',false); $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); $this->Ln(); } } if($contadorSalto==2 && $bandera==false){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ if($Fnota['nombreCurso']=="Seminario"){ $this->SetTextColor(0); }else{ $this->SetTextColor(252, 3, 3); } }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } //$this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); $total+=intval($Fnota['punteo']); if($Fnota['nombreCurso']!="Seminario" && $Fnota['nombreCurso']!="Práctica Supervisada Final"){ $bim2+=$nota; } $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); } if($contadorSalto==3 && $bandera==false){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ if($Fnota['nombreCurso']=="Seminario"){ $this->SetTextColor(0); }else{ $this->SetTextColor(252, 3, 3); } }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } /*if($Fnota['nombreCurso']=="Seminario"){ $this->Cell($w[$contadorSalto],6,"",1,0,'C',false); }else{ $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); }*/ $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); $total+=intval($Fnota['punteo']); if($Fnota['nombreCurso']!="Seminario" && $Fnota['nombreCurso']!="Práctica Supervisada Final"){ $bim3+=$nota; } /*$this->SetTextColor(0); $this->Cell($w[$contadorSalto],6,0,1,0,'C',false);*/ } if($contadorSalto==4 && $bandera==false){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ if($Fnota['nombreCurso']=="Seminario"){ $this->SetTextColor(0); }else{ $this->SetTextColor(252, 3, 3); } }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } if($Fnota['nombreCurso']=="Seminario"){ $this->Cell($w[$contadorSalto],6,"",1,0,'C',false); }else{ $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); } $total+=intval($Fnota['punteo']); if($Fnota['nombreCurso']!="Seminario" && $Fnota['nombreCurso']!="Práctica Supervisada Final"){ $bim4+=$nota; $contadorCurso++; } /********************/ /*$this->SetTextColor(0); if($Fnota['nombreCurso']=="Seminario"){ $this->Cell($w[$contadorSalto],6,"",1,0,'C',false); }else{ $this->Cell($w[$contadorSalto],6,0,1,0,'C',false); }*/ /********************/ $this->SetTextColor(0); if($Fnota['nombreCurso']=="Seminario"){ $promedio=$total; }else{ $promedio=round($total/4,0); } $this->Cell($w[$contadorSalto],6,$promedio,1,0,'C',false); $contadorSalto=-1; $total=0; $this->Ln(); } if($contadorSalto==3 && $bandera==true){ $contadorSalto=-1; $bandera=false; } $contadorSalto++; } } } /**PARA INGLES */ $contadorSalto=0; $total=0; foreach($notasAlumnoIngles as $Fnota){ if($contadorSalto==0){ $this->SetX(22); $this->SetTextColor(0); $this->Cell($w[$contadorSalto],6,' '.utf8_decode($Fnota['nombreCurso']),1,0,'L',false); $contadorSalto++; } if($contadorSalto==1){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ $this->SetTextColor(252, 3, 3); }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); $total+=intval($Fnota['punteo']); $bim1+=$nota; } if($contadorSalto==2){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ $this->SetTextColor(252, 3, 3); }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); $total+=intval($Fnota['punteo']); $bim2+=$nota; } if($contadorSalto==3){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ $this->SetTextColor(252, 3, 3); }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } $this->SetTextColor(0); $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); $total+=intval($Fnota['punteo']); $bim3+=$nota; } if($contadorSalto==4){ $nota=0; if($Fnota['punteo']!=0 || $Fnota['punteo']!=""){ $nota=$Fnota['punteo']; } if($nota==0){ $this->SetTextColor(0); }elseif($nota<60){ $this->SetTextColor(252, 3, 3); }elseif($nota<70){ $this->SetTextColor(119, 3, 252); }else{ $this->SetTextColor(0); } $this->SetTextColor(0); $this->Cell($w[$contadorSalto],6,$nota,1,0,'C',false); $total+=intval($Fnota['punteo']); $bim4+=$nota; $this->SetTextColor(0); $promedio=round($total/4,0); $this->Cell($w[$contadorSalto],6,$promedio,1,0,'C',false); $contadorSalto=-1; $total=0; $contadorCurso++; $this->Ln(); } $contadorSalto++; } //pie de página $this->SetX(22); $this->SetFont('Arial','B',10); $this->Cell($w[0],6,' '.'Promedio',1,0,'L',false); $this->Cell($w[1],6,round($bim1/$contadorCurso,0),1,0,'C',false); $this->Cell($w[2],6,round($bim2/$contadorCurso,0),1,0,'C',false); $this->Cell($w[3],6,round($bim3/$contadorCurso,0),1,0,'C',false); $this->Cell($w[4],6,round($bim4/$contadorCurso,0),1,0,'C',false); $this->Cell($w[4],6,round((round($bim1/$contadorCurso)+round($bim2/$contadorCurso)+round($bim3/$contadorCurso)+round($bim4/$contadorCurso))/4,0),1,0,'C',false); /*if($bandera_graduando){ $this->Ln(); $this->Ln(); $this->Ln(); $this->SetX(22); $this->Cell(40,10,utf8_decode("La nota final de seminario será publicada en el 4to. Bimestre, no afecta el promedio general")); }*/ } function GenerarCuadroLab($carnet){ //FONDO $this->Image('assets/img/fondo_lab2022.jpg','0','0','216','280','JPG'); //datos del alumno $consultas=new Boleta2022(); $datosAlumno=$consultas->buscarAlumno($carnet); $this->SetFont('Arial','',12); $this->SetTextColor(20); $this->setXY(34,50); $this->Cell(45,10,$carnet); $this->Cell(50,10," ".utf8_decode(utf8_decode($datosAlumno[0]['apellidos'])).', '.utf8_decode(utf8_decode($datosAlumno[0]['nombres']))); $this->Ln(); $this->setXY(34,58); $this->setFontSize(10); $this->Cell(40,10,$datosAlumno[0]['nombre_corto']); $this->SetFont('Arial','B',12); $this->setXY(85,73); $this->Cell(50,10,"Primer Laboratorio"); // Colores, ancho de línea y fuente en negrita $this->SetFont('Arial','',11); $this->SetFillColor(149,242,215); $this->SetTextColor(255); $this->SetTextColor(20); $this->SetDrawColor(191, 191, 201); $this->SetLineWidth(.1); $this->SetFont('','B'); $this->setXY(40,85); $this->Cell(120,8," ".utf8_decode("Laboratorio"),1,0,'L',true); $this->Cell(15,8," ".utf8_decode("Nota"),1,0,'L',true); $datosLaboratorio=$consultas->buscarNotasLab($carnet); $this->Ln(); $promedioLab=0; foreach($datosLaboratorio as $datosL){ if($datosL['bimestre']=="1"){ $this->SetX(40); $this->SetTextColor(59, 58, 58); $this->SetFontSize(8); $this->Cell(120,7," ".utf8_decode($datosL['nombre']),1,0,'L',false); $this->SetFontSize(9); if($datosL['punteo']<60 && $datosL['punteo']>0){ $this->SetTextColor(204, 4, 41); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); }elseif($datosL['punteo']>=60 && $datosL['punteo']<70){ $this->SetTextColor(177, 4, 204); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); }else{ $this->SetTextColor(59, 58, 58); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); } $promedioLab+=intval($datosL['punteo']); $this->Ln(); } } $this->SetXY(85,105); $this->SetFont('Arial','B',12); $this->Cell(50,50,"Segundo Laboratorio"); $this->SetXY(40,135); $this->Cell(120,8," ".utf8_decode("Laboratorio"),1,0,'L',true); $this->Cell(15,8," ".utf8_decode("Nota"),1,0,'L',true); $this->SetXY(40,143); foreach($datosLaboratorio as $datosL){ if($datosL['bimestre']=="2"){ $this->SetX(40); $this->SetTextColor(59, 58, 58); $this->SetFontSize(8); $this->Cell(120,7," ".utf8_decode($datosL['nombre']),1,0,'L',false); $this->SetFontSize(9); if($datosL['punteo']<60 && $datosL['punteo']>0){ $this->SetTextColor(204, 4, 41); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); }elseif($datosL['punteo']>=60 && $datosL['punteo']<70){ $this->SetTextColor(177, 4, 204); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); }else{ $this->SetTextColor(59, 58, 58); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); } $promedioLab+=intval($datosL['punteo']); $this->Ln(); } } $this->SetXY(85,150); $this->SetFont('Arial','B',12); $this->Cell(50,50,"Tercer Laboratorio"); $this->SetXY(40,180); $this->Cell(120,8," ".utf8_decode("Laboratorio"),1,0,'L',true); $this->Cell(15,8," ".utf8_decode("Nota"),1,0,'L',true); $this->SetXY(40,188); foreach($datosLaboratorio as $datosL){ if($datosL['bimestre']=="3"){ $this->SetX(40); $this->SetTextColor(59, 58, 58); $this->SetFontSize(8); $this->Cell(120,7," ".utf8_decode($datosL['nombre']),1,0,'L',false); $this->SetFontSize(9); if($datosL['punteo']<60 && $datosL['punteo']>0){ $this->SetTextColor(204, 4, 41); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); }elseif($datosL['punteo']>=60 && $datosL['punteo']<70){ $this->SetTextColor(177, 4, 204); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); }else{ $this->SetTextColor(59, 58, 58); $this->Cell(15,7,$datosL['punteo'],1,0,'C',false); } $promedioLab+=intval($datosL['punteo']); $this->Ln(); } } $promedioLab=round($promedioLab/12,0); $this->SetFont('Arial','B',12); $this->SetXY(40,225); $this->Cell(135,8," ".utf8_decode("Promedio final"),1,0,'L',true);$this->Ln(); $this->SetX(40);$this->Cell(135,8,$promedioLab,1,0,'C',false); } public function arreglar($cadena){ //Para E $cadena = str_replace( array('É'), array(utf8_encode('É')), $cadena ); $cadena = str_replace( array('Ó'), array(utf8_encode('Ó')), $cadena ); return $cadena; } } ?>