Beispiel #1
0
 public function executeDelete(sfWebRequest $request)
 {
     $request->checkCSRFProtection();
     $this->forward404Unless($Test = TestsPeer::retrieveByPk($request->getParameter('id')), sprintf('Object Test does not exist (%s).', $request->getParameter('id')));
     $Test->delete();
     $this->redirect('tests/index');
 }
Beispiel #2
0
 public function executeAgregarTest(sfWebRequest $request)
 {
     $this->forward404Unless($Evaluacion = EvaluacionesPeer::retrieveByPk($request->getParameter('id')), sprintf('Object Evaluacion does not exist (%s).', $request->getParameter('id')));
     $this->forward404Unless($Test = TestsPeer::retrieveByPk($request->getParameter('tests_id')), sprintf('Object Test does not exist (%s).', $request->getParameter('tests_id')));
     $Prueba = new Pruebas();
     $Prueba->setEvaluaciones($Evaluacion);
     $Prueba->setTests($Test);
     $Prueba->setEstadopruebasId(sfConfig::get('app_prueba_inicializada'));
     // Estado Inicializado
     $Prueba->save();
     $this->redirect(url_for('evaluaciones/testList?id=' . $Evaluacion->getId()));
 }
Beispiel #3
0
 /**
  * Get the associated Tests object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Tests The associated Tests object.
  * @throws     PropelException
  */
 public function getTests(PropelPDO $con = null)
 {
     if ($this->aTests === null && $this->tests_id !== null) {
         $this->aTests = TestsPeer::retrieveByPk($this->tests_id);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aTests->addPruebass($this);
         		 */
     }
     return $this->aTests;
 }