/**
  * Получение категорий вопросов для указанной дисциплины
  */
 public function actionGetCategories()
 {
     $speciality = $_GET['speciality'];
     $course = $_GET['course'];
     $year = $_GET['year'];
     $discipline = $_GET['discipline'];
     $res = array();
     foreach (CExamManager::getAllQuestions()->getItems() as $q) {
         if ($q->speciality_id == $speciality) {
             if ($q->course == $course) {
                 if ($q->year_id == $year) {
                     if ($q->discipline_id == $discipline) {
                         $res[$q->category_id] = $q->category->getValue();
                     }
                 }
             }
         }
     }
     echo json_encode($res);
 }
 /**
  * Удаление группы билетов
  */
 public function actionDelete()
 {
     foreach (CExamManager::getTicketsBySession(CRequest::getInt("id"))->getItems() as $ticket) {
         foreach ($ticket->ticketQuestions->getItems() as $q) {
             $q->remove();
         }
         $ticket->remove();
     }
     $this->redirect("?action=my");
 }
 public function actionDelete()
 {
     $object = CExamManager::getQuestion(CRequest::getInt("id"));
     $plan = $object->plan_id;
     $type = $object->type;
     $object->remove();
     $this->redirect("workplanexamquestions.php?action=index&plan_id=" . $plan . "&type=" . $type);
 }
 /**
  * Кэш записей из связанной таблицы
  *
  * @return CArrayList|null
  */
 private static function getCacheTicketQuestions()
 {
     if (is_null(self::$_cacheTicketQuestions)) {
         self::$_cacheTicketQuestions = new CArrayList();
     }
     return self::$_cacheTicketQuestions;
 }