Пример #1
0
 function setRAlumno($idRespuesta)
 {
     $respuesta = RespuestaExamen::findOne($idRespuesta);
     foreach ($this->rAlumno as $r) {
         if ($r->idRespuesta->id_pregunta == $respuesta->id_pregunta) {
             unset($r);
         }
     }
     //falta obtener el id de la persona
     $this->rAlumno[] = $this->rAlumno = $respuesta;
 }
Пример #2
0
 /**
  * Finds the RespuestaExamen model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return RespuestaExamen the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = RespuestaExamen::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }