protected function getPreparedInsertResultRecordStatement()
 {
     if (self::$preparedInsertResultRecordStatement === null) {
         $query = "\n\t\t\t\tINSERT INTO tst_test_result (\n\t\t\t\t\ttest_result_id, active_fi, question_fi, pass, tstamp,\n\t\t\t\t\tpoints, manual, hint_count, hint_points, answered\n\t\t\t\t) VALUES (\n\t\t\t\t\t?, ?, ?, ?, ?, ?, ?, ?, ?, ?\n\t\t\t\t)\n\t\t\t";
         self::$preparedInsertResultRecordStatement = $this->db->prepareManip($query, array('integer', 'integer', 'integer', 'integer', 'integer', 'integer', 'integer', 'integer', 'integer', 'integer'));
     }
     return self::$preparedInsertResultRecordStatement;
 }
Ejemplo n.º 2
0
 protected function adoptUserSolutionsFromPreviousPass()
 {
     global $ilDB, $ilUser;
     $assSettings = new ilSetting('assessment');
     include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php";
     $isAssessmentLogEnabled = ilObjAssessmentFolder::_enabledAssessmentLogging();
     require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionUserSolutionAdopter.php';
     $userSolutionAdopter = new ilAssQuestionUserSolutionAdopter($ilDB, $assSettings, $isAssessmentLogEnabled);
     $userSolutionAdopter->setUserId($ilUser->getId());
     $userSolutionAdopter->setActiveId($this->testSession->getActiveId());
     $userSolutionAdopter->setTargetPass($this->testSequence->getPass());
     $userSolutionAdopter->setQuestionIds($this->testSequence->getOptionalQuestions());
     $userSolutionAdopter->perform();
 }