private function resetCurrentQuestion()
 {
     $this->testSession->setCurrentQuestionId(null);
     $this->testSequence->saveToDb();
     $this->testSession->saveToDb();
     $this->ctrl->setParameter($this, 'sequence', $this->testSession->getCurrentQuestionId());
 }
 public function cleanupQuestions(ilTestSessionDynamicQuestionSet $testSession)
 {
     switch (true) {
         case !$this->questionSet->questionExists($testSession->getCurrentQuestionId()):
         case !$this->isFilteredQuestion($testSession->getCurrentQuestionId()):
             $testSession->setCurrentQuestionId(null);
     }
     foreach ($this->postponedQuestions as $questionId) {
         if (!$this->questionSet->questionExists($questionId)) {
             unset($this->postponedQuestions[$questionId]);
         }
     }
     foreach ($this->wrongAnsweredQuestions as $questionId) {
         if (!$this->questionSet->questionExists($questionId)) {
             unset($this->wrongAnsweredQuestions[$questionId]);
         }
     }
     foreach ($this->correctAnsweredQuestions as $questionId) {
         if (!$this->questionSet->questionExists($questionId)) {
             unset($this->correctAnsweredQuestions[$questionId]);
         }
     }
 }