public function handleCancelApplication($exam_id, $popup = true) { $exam_id = (int) $exam_id; $this->exam_id = $exam_id; $this->template->exam_id = $exam_id; $this->template->show_popup = $popup; $examStudentList = ExamStudentListManager::getList($exam_id); $examStudentList->removeStudent($this->student->id); $this->template->isStudentOnList = $examStudentList->isStudentOnList($this->student->id); if (!$this->isAjax()) { $this->redirect('this', array('do' => 'showDetail', 'exam_id' => $exam_id)); } else { $terms = ExamManager::getExamsList($this->course_id, $this->student->id); $this->template->terms = $terms; if ($popup == true) { $this->invalidateControl('popup'); } $this->invalidateControl('terms'); $this->flashMessage('You have canceled your application.', 'success'); $this->invalidateControl('flash'); } }
public function actionTermDetail($term_id) { $this->exam_id = (int) $term_id; $exam = ExamManager::getExam($term_id); $this->template->exam = $exam; }