コード例 #1
0
 /**
  * Hide questions
  * @param ilTestSequence $seq
  */
 protected function hideQuestions(ilTestSequence $seq)
 {
     // first unhide all questions
     $seq->clearHiddenQuestions();
     foreach ($seq->getQuestionIds() as $qid) {
         if (!$this->isInRun($qid)) {
             $seq->hideQuestion($qid);
         }
     }
 }
コード例 #2
0
 /**
  * Update questions for separate tests
  * @param ilTestSession $session
  * @param ilTestSequence $seq
  */
 protected function updateSeparateTestQuestions(ilTestSession $session, ilTestSequence $seq)
 {
     foreach ($this->run as $tst_run) {
         $tst_run->clearQuestions();
         $points = 0;
         foreach ($seq->getQuestionIds() as $idx => $qst_id) {
             $tst_run->addQuestion($qst_id);
             include_once './Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
             $points += ilCourseObjectiveQuestion::_lookupMaximumPointsOfQuestion($qst_id);
         }
         $tst_run->setMaxPoints($points);
     }
 }