Example #1
0
 public function guardarNotas()
 {
     try {
         if ($this->verificarSession()) {
             $arreglo = isset($_POST['notas']) ? $_POST['notas'] : NULL;
             $idMateria = isset($_POST['idMateria']) ? $_POST['idMateria'] : NULL;
             $notas = json_decode($arreglo);
             $docente = new Docente();
             foreach ($notas as $nota) {
                 $docente->actualizarNota($nota[0], $idMateria, $nota[1], $nota[2], $nota[3], $nota[4]);
             }
             echo json_encode(1);
         }
     } catch (Exception $exc) {
         echo $exc->getTraceAsString();
     }
 }