$dmc = array_shift($docentemateriacurso->mostrar($coddocentemateriacurso)); $cur = array_shift($curso->mostrar($dmc['codcurso'])); $al = $alumno->mostrarTodo("codcurso=" . $dmc['codcurso'], "paterno,materno,nombres"); $i = 0; foreach ($al as $a) { $i++; $d[$i]['codalumno'] = $a['codalumno']; $d[$i]['paterno'] = capitalizar($a['paterno']); $d[$i]['materno'] = capitalizar($a['materno']); $d[$i]['nombres'] = capitalizar($a['nombres']); $d[$i]['curso'] = $cur['nombre']; $d[$i]['sexo'] = $a['sexo'] ? 'Masculino' : 'Femenino'; $d[$i]['rude'] = $a['rude']; $d[$i]['telefonocasa'] = $a['telefonocasa']; $d[$i]['celular'] = $a['celular']; $n = array_shift($notas->mostrarTodo("coddocentemateriacurso=" . $coddocentemateriacurso . " and codalumno=" . $a['codalumno'])); $d[$i]['bimestre1'] = '<input type="hidden" name="n[' . $i . '][codnotas]" value="' . $n['codnotas'] . '"><input type="number" name="n[' . $i . '][bimestre1]" value="' . $n['bimestre1'] . '" required max="100" min="0" style="width:55px;" class="der notas n' . $n['codnotas'] . '" rel="' . $n['codnotas'] . '" ' . ($bimestre != 1 ? 'readonly' : '') . '>'; $d[$i]['bimestre2'] = '<input type="number" name="n[' . $i . '][bimestre2]" value="' . $n['bimestre2'] . '" required max="100" min="0" style="width:55px;" class="der notas n' . $n['codnotas'] . '" rel="' . $n['codnotas'] . '" ' . ($bimestre != 2 ? 'readonly' : '') . '>'; $d[$i]['bimestre3'] = '<input type="number" name="n[' . $i . '][bimestre3]" value="' . $n['bimestre3'] . '" required max="100" min="0" style="width:55px;" class="der notas n' . $n['codnotas'] . '" rel="' . $n['codnotas'] . '" ' . ($bimestre != 3 ? 'readonly' : '') . '>'; $d[$i]['bimestre4'] = '<input type="number" name="n[' . $i . '][bimestre4]" value="' . $n['bimestre4'] . '" required max="100" min="0" style="width:55px;" class="der notas n' . $n['codnotas'] . '" rel="' . $n['codnotas'] . '" ' . ($bimestre != 4 ? 'readonly' : '') . '>'; $d[$i]['notafinal'] = '<input type="number" name="n[' . $i . '][notafinal]" value="' . $n['notafinal'] . '" required max="100" min="0" style="width:55px;" readonly class="der total t' . $n['codnotas'] . ' ' . ($n['notafinal'] < 51 ? 'rojo' : '') . '">'; } $titulo = array("paterno" => "Paterno", "materno" => "Materno", "nombres" => "Nombres", "bimestre1" => "1º Bimestre", "bimestre2" => "2º Bimestre", "bimestre3" => "3º Bimestre", "bimestre4" => "4º Bimestre", "notafinal" => "Nota Final"); ?> <form action="actualizar.php" method="post"> <strong>Curso: <?php echo $cur['nombre']; ?> </strong> <br>
$this->Ln(); $this->CuadroCabecera(25, "Nombre:", 60, capitalizar($a['paterno'] . " " . $a['materno'] . " " . $a['nombres']), 0); $this->CuadroCabecera(25, "Curso:", 50, capitalizar($cur['nombre']), 0); $this->Ln(); $this->Ln(); $this->TituloCabecera(10, "N"); $this->TituloCabecera(50, "Materia"); for ($j = 1; $j <= 4; $j++) { $this->TituloCabecera(10, "Nota" . $j); $this->TituloCabecera(10, "DPS" . $j); $this->TituloCabecera(10, "NF" . $j); } } } $pdf = new PDF("P", "mm", "letter"); $pdf->AddPage(); $i = 0; foreach ($docentemateriacurso->mostrarTodo("codcurso=" . $a['codcurso']) as $dmc) { $i++; $mat = array_shift($materia->mostrar($dmc['codmateria'])); $pdf->CuadroCuerpo(10, $i, "", "R", 1); $pdf->CuadroCuerpo(50, $mat['nombre'], "", "", 1); for ($j = 1; $j <= 4; $j++) { $n = array_shift($notas->mostrarTodo("coddocentemateriacurso=" . $dmc['coddocentemateriacurso'] . " and trimestre=" . $j . " and codalumno=" . $id)); $pdf->CuadroCuerpo(10, $n['nota'], "", "R", 1); $pdf->CuadroCuerpo(10, $n['dps'], "", "R", 1); $pdf->CuadroCuerpo(10, $n['notafinal'], "", "R", 1); } $pdf->Ln(); } $pdf->Output();
include_once '../../class/curso.php'; include_once '../../class/notas.php'; extract($_POST); $docentemateriacurso = new docentemateriacurso(); $curso = new curso(); $notas = new notas(); if ($codcurso == "") { echo "Seleccione un Curso Por favor"; exit; } if ($codmateria == "") { echo "Seleccione una Materia Por favor"; exit; } $dmc = array_shift($docentemateriacurso->mostrarTodo("codcurso={$codcurso} and codmateria={$codmateria}")); $total = count($notas->mostrarTodo("coddocentemateriacurso=" . $dmc['coddocentemateriacurso'] . " and trimestre={$trimestre}")); $aprobados = count($notas->mostrarTodo("coddocentemateriacurso=" . $dmc['coddocentemateriacurso'] . " and trimestre={$trimestre} and notafinal>=36")); $reprobados = count($notas->mostrarTodo("coddocentemateriacurso=" . $dmc['coddocentemateriacurso'] . " and trimestre={$trimestre} and notafinal<36")); } ?> <a href="#" class="botoninfo corner-all imprimir noimprimir">Imprimir</a> <div id="container"></div> <script type="text/javascript"> $(document).ready(function(e) { $(".imprimir").click(function(e) { window.print() ; }); }); $(function () { var chart; $(document).ready(function() {