public function executeCreateExaminationSubjects($request) { $examination = ExaminationPeer::retrieveByPK($request->getParameter('id')); $year = $request->getParameter('year'); $examination->createExaminationSubjectsForYear($year); $examination->save(); $this->redirect("@examination_subject"); }
public function areAllExaminationsClosed() { if (count(ExaminationPeer::retrieveForSchoolYearAndExaminationNumber($this, SchoolBehaviourFactory::getEvaluatorInstance()->getFebruaryExaminationNumber())) == 0) { return false; } foreach ($this->getExaminations() as $examination) { if (!$examination->isClosed()) { return false; } } return true; }
/** * Redefines parent::getPager because we need to add a custom parameter: career * used by _list_header partial * * @return sfPropelPager */ public function getPager() { $examination = ExaminationPeer::retrieveByPK($this->getUser()->getReferenceFor('manual_examination')); /* @var $pager sfPropelPager */ $pager = parent::getPager(); $pager->setParameter('manual_examination', $examination); return $pager; }