public function actualizarLogrosMovil() { try { $this->vista->set('titulo', 'ingreso de Logros'); $idDocente = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL; $carga = new Carga(); $Cargas = $carga->leerCargasPorDocente($idDocente); $salones = array(); foreach ($Cargas as $carga) { $salon = new Salon(); $sal = $salon->leerSalonePorId($carga->getIdSalon()); $salones[$sal->getIdSalon()] = $sal; } $grados = array(); $i = 0; foreach ($salones as $salon) { $grados[$i] = $salon->getIdGrado(); $i++; } $grads = array_unique($grados); $gradosNetos = array(); for ($i = 0; $i < count($grads); $i++) { $gra = new Grado(); $gradosNetos[$grads[$i]] = $gra->leerGradoPorId($grads[$i]); } $this->vista->set('grados', $gradosNetos); return $this->vista->imprimir(); } catch (Exception $exc) { echo $exc->getTraceAsString(); } }
private function getParametros(Salon $salon) { $parametros = array(':idSalon' => $salon->getIdSalon(), ':idGrado' => $salon->getIdGrado(), ':grupo' => $salon->getGrupo()); return $parametros; }