4require_once 
'./Modules/Test/classes/inc.AssessmentConstants.php';
 
    5require_once 
'./Modules/Test/classes/class.ilTestPlayerCommands.php';
 
    6require_once 
'./Modules/Test/classes/class.ilTestServiceGUI.php';
 
    7require_once 
'./Modules/TestQuestionPool/classes/class.assQuestion.php';
 
    8require_once 
'./Services/UIComponent/Button/classes/class.ilSubmitButton.php';
 
    9require_once 
'Modules/Test/classes/class.ilTestPlayerNavButton.php';
 
   70        $this->ref_id = 
$_GET[
"ref_id"];
 
   73        $rbacsystem = 
$DIC[
'rbacsystem'];
 
   76        require_once 
'Modules/Test/classes/class.ilTestPasswordChecker.php';
 
   79        $this->processLocker = 
null;
 
   80        $this->testSession = 
null;
 
   81        $this->assSettings = 
null;
 
   87        $rbacsystem = 
$DIC[
'rbacsystem'];
 
   89        if (!$rbacsystem->checkAccess(
"read", $this->object->getRefId())) {
 
   91            $this->
ilias->raiseError($this->lng->txt(
"cannot_execute_test"), $this->ilias->error_obj->MESSAGE);
 
   97        $executable = $this->
object->isExecutable($this->testSession, $this->testSession->getUserId());
 
   99        if (!$executable[
'executable']) {
 
  101            $this->ctrl->redirectByClass(
"ilobjtestgui", 
"infoScreen");
 
  110            throw new ilTestException(
'active id given does not relate to current user!');
 
  141        require_once 
'Modules/Test/classes/class.ilTestProcessLockerFactory.php';
 
  143        $this->processLocker = $processLockerFactory->withContextId((
int) $activeId)->getLocker();
 
  154        include_once(
"./Services/Tagging/classes/class.ilTaggingGUI.php");
 
  156        $tagging_gui->setObject($this->object->getId(), $this->object->getType());
 
  157        $tagging_gui->saveInput();
 
  158        $this->ctrl->redirectByClass(
"ilobjtestgui", 
"infoScreen");
 
  167            $this->
object->updateWorkingTime(
$_SESSION[
"active_time_id"]);
 
  170        $_SESSION[
"active_time_id"] = $this->
object->startWorkingTime(
 
  171            $this->testSession->getActiveId(),
 
  172            $this->testSession->getPass()
 
  186            $this->testSession->getActiveId(),
 
  187            $this->testSession->getPass()
 
  201        $this->ctrl->redirectByClass(
"ilobjtestgui", 
"infoScreen");
 
  215        $active_id = $this->testSession->getActiveId();
 
  216        $starting_time = $this->
object->getStartingTimeOfUser($active_id);
 
  217        if ($starting_time === 
false) {
 
  220            return $this->
object->isMaxProcessingTimeReached($starting_time, $active_id);
 
  226        $show_question_inline_score = 
false;
 
  227        if ($this->object->getAnswerFeedbackPoints()) {
 
  228            $show_question_inline_score = 
true;
 
  229            return $show_question_inline_score;
 
  231        return $show_question_inline_score;
 
  236        $this->tpl->setCurrentBlock(
'test_nav_toolbar');
 
  237        $this->tpl->setVariable(
'TEST_NAV_TOOLBAR', $toolbarGUI->getHTML());
 
  238        $this->tpl->parseCurrentBlock();
 
  267        $button->setId(
'bottomnextbutton');
 
  269        $this->tpl->setCurrentBlock(
"next_bottom");
 
  270        $this->tpl->setVariable(
"BTN_NEXT_BOTTOM", $button->render());
 
  271        $this->tpl->parseCurrentBlock();
 
  277        $button->setId(
'nextbutton');
 
  279        $this->tpl->setCurrentBlock(
"next");
 
  280        $this->tpl->setVariable(
"BTN_NEXT", $button->render());
 
  281        $this->tpl->parseCurrentBlock();
 
  287        $button->setId(
'bottomprevbutton');
 
  289        $this->tpl->setCurrentBlock(
"prev_bottom");
 
  290        $this->tpl->setVariable(
"BTN_PREV_BOTTOM", $button->render());
 
  291        $this->tpl->parseCurrentBlock();
 
  297        $button->setId(
'prevbutton');
 
  299        $this->tpl->setCurrentBlock(
"prev");
 
  300        $this->tpl->setVariable(
"BTN_PREV", $button->render());
 
  301        $this->tpl->parseCurrentBlock();
 
  313        $button->setPrimary($primaryNext);
 
  314        $button->setRightGlyph(
'glyphicon glyphicon-arrow-right');
 
  318        $button->setCaption(
'next_question');
 
  319        $button->addCSSClass(
'ilTstNavElem');
 
  332        $button->setLeftGlyph(
'glyphicon glyphicon-arrow-left');
 
  336        $button->setCaption(
'previous_question');
 
  337        $button->addCSSClass(
'ilTstNavElem');
 
  347        $solutionValues = $question_gui->object->getSolutionValues(
 
  348            $this->testSession->getActiveId(),
 
  353            $question_gui->object->fetchIndexedValuesFromValuePairs($solutionValues)
 
  356        if (!empty($feedback)) {
 
  357            $this->tpl->setCurrentBlock(
"specific_feedback");
 
  358            $this->tpl->setVariable(
"SPECIFIC_FEEDBACK", $feedback);
 
  359            $this->tpl->parseCurrentBlock();
 
  371        $feedback = $question_gui->
getGenericFeedbackOutput($this->testSession->getActiveId(), $this->testSession->getPass());
 
  373        if (strlen($feedback)) {
 
  379            $this->tpl->setCurrentBlock(
"answer_feedback");
 
  380            $this->tpl->setVariable(
"ANSWER_FEEDBACK", $feedback);
 
  381            $this->tpl->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
 
  382            $this->tpl->parseCurrentBlock();
 
  390        $scoreInformation = sprintf(
 
  391            $this->lng->txt(
"you_received_a_of_b_points"),
 
  396        $this->tpl->setCurrentBlock(
"received_points_information");
 
  397        $this->tpl->setVariable(
"RECEIVED_POINTS_INFORMATION", $scoreInformation);
 
  398        $this->tpl->parseCurrentBlock();
 
  403        if (strlen($solutionoutput)) {
 
  404            $this->tpl->setCurrentBlock(
"solution_output");
 
  405            $this->tpl->setVariable(
"CORRECT_SOLUTION", $this->lng->txt(
"tst_best_solution_is"));
 
  406            $this->tpl->setVariable(
"QUESTION_FEEDBACK", $solutionoutput);
 
  407            $this->tpl->parseCurrentBlock();
 
  413        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  414        $this->tpl->setVariable(
 
  415            "LOCATION_SYNTAX_STYLESHEET",
 
  418        $this->tpl->parseCurrentBlock();
 
  423        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  424        $this->tpl->setCurrentBlock(
"ContentStyle");
 
  425        $this->tpl->setVariable(
 
  426            "LOCATION_CONTENT_STYLESHEET",
 
  429        $this->tpl->parseCurrentBlock();
 
  439        if ($this->testSession->isAnonymousUser()) {
 
  440            $this->testSession->setAccessCodeToSession(
$_POST[
'anonymous_id']);
 
  443        $this->ctrl->redirectByClass(
"ilobjtestgui", 
"infoScreen");
 
  455        $isFirstTestStartRequest = 
false;
 
  457        $this->processLocker->executeTestStartLockOperation(
function () use ($testStartLock, &$isFirstTestStartRequest) {
 
  458            if ($this->testSession->lookupTestStartLock() != $testStartLock) {
 
  459                $this->testSession->persistTestStartLock($testStartLock);
 
  460                $isFirstTestStartRequest = true;
 
  464        if ($isFirstTestStartRequest) {
 
  469        $this->ctrl->setParameterByClass(
'ilObjTestGUI', 
'lock', $testStartLock);
 
  470        $this->ctrl->redirectByClass(
"ilobjtestgui", 
"redirectToInfoScreen");
 
  477        } elseif (isset(
$_GET[
'lock']) && strlen(
$_GET[
'lock'])) {
 
  478            return $_GET[
'lock'];
 
  494        if ($this->object->checkMaximumAllowedUsers() == 
false) {
 
  498        if ($this->testSession->isAnonymousUser()
 
  499            && !$this->testSession->doesAccessCodeInSessionExists()) {
 
  500            $accessCode = $this->testSession->createNewAccessCode();
 
  502            $this->testSession->setAccessCodeToSession($accessCode);
 
  503            $this->testSession->setAnonymousId($accessCode);
 
  504            $this->testSession->saveToDb();
 
  509        if (!$this->testSession->isAnonymousUser()) {
 
  510            $this->testSession->unsetAccessCodeInSession();
 
  517        $this->tpl->addBlockFile($this->
getContentBlockName(), 
"adm_content", 
"tpl.il_as_tst_anonymous_code_presentation.html", 
"Modules/Test");
 
  518        $this->tpl->setCurrentBlock(
"adm_content");
 
  519        $this->tpl->setVariable(
"TEXT_ANONYMOUS_CODE_CREATED", $this->lng->txt(
"tst_access_code_created"));
 
  520        $this->tpl->setVariable(
"TEXT_ANONYMOUS_CODE", $this->testSession->getAccessCodeFromSession());
 
  521        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  523        $this->tpl->setVariable(
"TXT_CONFIRM", $this->lng->txt(
"continue_work"));
 
  524        $this->tpl->parseCurrentBlock();
 
  540        if (
$_POST[
"chb_javascript"]) {
 
  541            $ilUser->writePref(
"tst_javascript", 1);
 
  543            $ilUser->writePref(
"tst_javascript", 0);
 
  547        if ($this->object->getNrOfTries() != 1) {
 
  548            if ($this->object->getUsePreviousAnswers() == 1) {
 
  549                if (
$_POST[
"chb_use_previous_answers"]) {
 
  550                    $ilUser->writePref(
"tst_use_previous_answers", 1);
 
  552                    $ilUser->writePref(
"tst_use_previous_answers", 0);
 
  564        $active_id = $this->testSession->getActiveId();
 
  569        $this->testSession->setLastFinishedPass($this->testSession->getPass());
 
  570        $this->testSession->increaseTestPass();
 
  574        $this->tpl->addBlockFile($this->
getContentBlockName(), 
"adm_content", 
"tpl.il_as_tst_redirect_autosave.html", 
"Modules/Test");
 
  575        $this->tpl->setVariable(
"TEXT_REDIRECT", $this->lng->txt(
"redirectAfterSave"));
 
  576        $this->tpl->setVariable(
"URL", 
$url);
 
  581        $active_id = $this->testSession->getActiveId();
 
  586        $this->testSession->setLastFinishedPass($this->testSession->getPass());
 
  587        $this->testSession->increaseTestPass();
 
  591        $this->tpl->addBlockFile($this->
getContentBlockName(), 
"adm_content", 
"tpl.il_as_tst_redirect_autosave.html", 
"Modules/Test");
 
  592        $this->tpl->setVariable(
"TEXT_REDIRECT", $this->lng->txt(
"redirectAfterSave"));
 
  593        $this->tpl->setVariable(
"URL", 
$url);
 
  616                    $res = is_int($db_res);
 
  619                    $result = $this->lng->txt(
"autosave_success");
 
  621                    $result = $this->lng->txt(
"autosave_failed");
 
  653            $this->testSession->getActiveId(),
 
  654            $this->testSession->getPass()
 
  657        $result[
'isAnswered'] = $state[
'authorized'];
 
  658        $result[
'isAnswerChanged'] = $state[
'intermediate'];
 
  682        $show_side_list = 
$ilUser->getPref(
'side_list_of_questions');
 
  683        $ilUser->writePref(
'side_list_of_questions', !$show_side_list);
 
  700        $questionId = $this->testSequence->getQuestionForSequence(
 
  704        $this->
object->setQuestionSetSolved(1, $questionId, $this->testSession->getUserId());
 
  722        $questionId = $this->testSequence->getQuestionForSequence(
 
  726        $this->
object->setQuestionSetSolved(0, $questionId, $this->testSession->getUserId());
 
  742    protected function confirmFinishTestCmd()
 
  750        require_once 
'Services/Utilities/classes/class.ilConfirmationGUI.php';
 
  752        $confirmation->setFormAction($this->ctrl->getFormAction($this, 
'confirmFinish'));
 
  753        $confirmation->setHeaderText($this->lng->txt(
"tst_finish_confirmation_question"));
 
  754        $confirmation->setConfirm($this->lng->txt(
"tst_finish_confirm_button"), 
'confirmFinish');
 
  764        $active_id = $this->testSession->getActiveId();
 
  782        if ($this->object->areObligationsEnabled() && !$allObligationsAnswered) {
 
  783            if ($this->object->getListOfQuestions()) {
 
  793        if ($this->object->getEnableExamview() && !isset(
$_GET[
'reviewed']) && $requires_confirmation) {
 
  794            $this->ctrl->redirectByClass(
'ilTestSubmissionReviewGUI', 
"show");
 
  799        if (($requires_confirmation) && ($actualpass == $this->object->getNrOfTries() - 1)) {
 
  801            return $this->confirmFinishTestCmd();
 
  805        if (($actualpass == $this->object->getNrOfTries() - 1) && (!$requires_confirmation)) {
 
  807            #$ilAuth->setIdle(ilSession::getIdleValue(), false); 
  808            #$ilAuth->setExpire(0); 
  809            switch ($this->object->getMailNotification()) {
 
  811                    $this->
object->sendSimpleNotification($active_id);
 
  814                    $this->
object->sendAdvancedNotification($active_id);
 
  824            if ($this->object->getMailNotificationType() == 1) {
 
  825                switch ($this->object->getMailNotification()) {
 
  827                        $this->
object->sendSimpleNotification($active_id);
 
  830                        $this->
object->sendAdvancedNotification($active_id);
 
  845        require_once 
'Modules/Test/classes/class.ilTestPassFinishTasks.php';
 
  848        $finishTasks->performFinishTasks($this->processLocker);
 
  853        $activeId = $this->testSession->getActiveId();
 
  854        $lastFinishedPass = $this->testSession->getLastFinishedPass();
 
  858            $this->ctrl->redirectByClass(
'ilTestSignatureGUI', 
'invokeSignaturePlugin');
 
  862        if (!
$_GET[
'skipfinalstatement']) {
 
  863            if ($this->object->getShowFinalStatement()) {
 
  869        $redirection_mode = $this->
object->getRedirectionMode();
 
  870        $redirection_url = $this->
object->getRedirectionUrl();
 
  871        if ($redirection_url && $redirection_mode) {
 
  873                if ($this->object->getKioskMode()) {
 
  887        if (!$this->object->getSignSubmission()) {
 
  891        if (!is_null(
ilSession::get(
"signed_{$activeId}_{$lastFinishedPass}"))) {
 
  896        $ilPluginAdmin = 
$DIC[
'ilPluginAdmin'];
 
  898        $activePlugins = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_MODULE, 
'Test', 
'tsig');
 
  900        if (!count($activePlugins)) {
 
  915        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
  917        require_once 
'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
 
  920        $objectivesList = 
null;
 
  923            $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
 
  927            require_once 
'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
 
  931            $objectivesList->loadObjectivesTitles();
 
  933            $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
 
  934            $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
 
  935            $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
 
  936            $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
 
  937            $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
 
  940        $results = $this->
object->getTestResult(
 
  947        require_once 
'class.ilTestEvaluationGUI.php';
 
  949        $results_output = $testevaluationgui->getPassListOfAnswers(
 
  959            $testResultHeaderLabelBuilder
 
  962        require_once 
'./Modules/Test/classes/class.ilTestArchiver.php';
 
  969        if (!is_dir($path)) {
 
  972        $filename = realpath($path) . 
'/exam_N' . $inst_id . 
'-' . $this->
object->getId()
 
  973                    . 
'-' . $active . 
'-' . 
$pass . 
'.pdf';
 
  978        $archiver->handInParticipantSubmission($active, 
$pass, 
$filename, $results_output);
 
  984        $questions = $this->
object->getQuestions();
 
  985        foreach ($questions as $question_id) {
 
  986            $question_object = $this->
object->getQuestionDataset($question_id);
 
  987            if ($question_object->type_tag == 
'assFileUpload') {
 
 1006                $handle = opendir($candidate_path);
 
 1007                while ($handle !== 
false && ($file = readdir($handle)) !== 
false) {
 
 1008                    if ($file != 
null) {
 
 1009                        $filename_start = 
'file_' . $active . 
'_' . 
$pass . 
'_';
 
 1011                        if (strpos($file, $filename_start) === 0) {
 
 1012                            $archiver->handInParticipantQuestionMaterial($active, 
$pass, $question_id, $file, $file);
 
 1018        $passdata = $this->
object->getTestResult(
 
 1024        $overview = $testevaluationgui->getPassListOfAnswers(
 
 1034            $testResultHeaderLabelBuilder
 
 1046        require_once 
'Modules/Test/classes/class.ilTestPassesSelector.php';
 
 1048        $testPassesSelector->setActiveId($this->testSession->getActiveId());
 
 1049        $testPassesSelector->setLastFinishedPass($this->testSession->getLastFinishedPass());
 
 1051        if (count($testPassesSelector->getReportablePasses())) {
 
 1053                $this->ctrl->redirectByClass(array(
'ilTestResultsGUI', 
'ilTestEvalObjectiveOrientedGUI'));
 
 1056            $this->ctrl->redirectByClass(array(
'ilTestResultsGUI', 
'ilMyTestResultsGUI', 
'ilTestEvaluationGUI'));
 
 1064        $this->ctrl->redirectByClass(
'ilObjTestGUI', 
'redirectToInfoScreen');
 
 1072        $template = 
new ilTemplate(
"tpl.il_as_tst_final_statement.html", 
true, 
true, 
"Modules/Test");
 
 1073        $this->ctrl->setParameter($this, 
"skipfinalstatement", 1);
 
 1075        $template->setVariable(
"FINALSTATEMENT", $this->object->prepareTextareaOutput($this->object->getFinalStatement(), 
true));
 
 1076        $template->setVariable(
"BUTTON_CONTINUE", $this->lng->txt(
"btn_next"));
 
 1087        $this->tpl->addCSS(
'Modules/Test/templates/default/test_kiosk_header.css');
 
 1090        $template = 
new ilTemplate(
'tpl.il_as_tst_kiosk_head.html', 
true, 
true, 
'Modules/Test');
 
 1091        if ($this->object->getShowKioskModeTitle()) {
 
 1092            $template->setCurrentBlock(
"kiosk_show_title");
 
 1093            $template->setVariable(
"TEST_TITLE", $this->object->getTitle());
 
 1094            $template->parseCurrentBlock();
 
 1096        if ($this->object->getShowKioskModeParticipant()) {
 
 1097            $template->setCurrentBlock(
"kiosk_show_participant");
 
 1098            $template->setVariable(
"PARTICIPANT_NAME_TXT", $this->lng->txt(
"login_as"));
 
 1099            $template->setVariable(
"PARTICIPANT_NAME", 
$ilUser->getFullname());
 
 1100            $template->setVariable(
"PARTICIPANT_LOGIN", 
$ilUser->getLogin());
 
 1101            $template->setVariable(
"PARTICIPANT_MATRICULATION", 
$ilUser->getMatriculation());
 
 1102            $template->setVariable(
"PARTICIPANT_EMAIL", 
$ilUser->getEmail());
 
 1103            $template->parseCurrentBlock();
 
 1105        if ($this->object->isShowExamIdInTestPassEnabled()) {
 
 1107                $this->testSession->getActiveId(),
 
 1108                $this->testSession->getPass(),
 
 1109                $this->object->getId()
 
 1112            $template->setCurrentBlock(
"kiosk_show_exam_id");
 
 1113            $template->setVariable(
"EXAM_ID_TXT", $this->lng->txt(
"exam_id"));
 
 1114            $template->setVariable(
"EXAM_ID", $exam_id);
 
 1115            $template->parseCurrentBlock();
 
 1117        return $template->get();
 
 1127        $ilNavigationHistory = 
$DIC[
'ilNavigationHistory'];
 
 1129        $ilNavigationHistory->addItem(
 
 1130            $this->testSession->getRefId(),
 
 1144        if ($this->object->endingTimeReached()) {
 
 1150            $this->ctrl->setParameter($this, 
"sequence", $sequenceElement);
 
 1155        if ($this->object->getKioskMode()) {
 
 1159        $this->tpl->setVariable(
"TEST_ID", $this->object->getTestId());
 
 1160        $this->tpl->setVariable(
"LOGIN", 
$ilUser->getLogin());
 
 1161        $this->tpl->setVariable(
"SEQ_ID", $sequenceElement);
 
 1162        $this->tpl->setVariable(
"QUEST_ID", $questionId);
 
 1164        if ($this->object->getEnableProcessingTime()) {
 
 1168        $this->tpl->setVariable(
"PAGETITLE", 
"- " . $this->object->getTitle());
 
 1170        if ($this->object->isShowExamIdInTestPassEnabled() && !$this->object->getKioskMode()) {
 
 1171            $this->tpl->setCurrentBlock(
'exam_id_footer');
 
 1173                $this->testSession->getActiveId(),
 
 1174                $this->testSession->getPass(),
 
 1175                $this->object->getId()
 
 1177            $this->tpl->setVariable(
'EXAM_ID_TXT', $this->lng->txt(
'exam_id'));
 
 1178            $this->tpl->parseCurrentBlock();
 
 1181        if ($this->object->getListOfQuestions()) {
 
 1182            $this->
showSideList($presentationMode, $sequenceElement);
 
 1193        $questionNavigationGUI->setQuestionWorkedThrough($isQuestionWorkedThrough);
 
 1200        $answerFeedbackEnabled = (
 
 1201            $instantResponse && $this->
object->getSpecificAnswerFeedback()
 
 1205            $this->testSession->getActiveId(),  #active_id
 
 1206            $this->testSession->getPass(),              #pass
 
 1207            false,                                                              #graphical_output
 
 1208            false,                                                              #result_output
 
 1209            true,                                                               #show_question_only
 
 1210            $answerFeedbackEnabled,                             #show_feedback
 
 1211            false,                                                              #show_correct_solution
 
 1212            false,                                                              #show_manual_scoring
 
 1213            true                                                                #show_question_text
 
 1219            $this->testSession->getActiveId(),
 
 1226        $f = 
$DIC->ui()->factory();
 
 1227        $renderer = 
$DIC->ui()->renderer();
 
 1229        $this->tpl->setVariable(
 
 1230            'LOCKSTATE_INFOBOX',
 
 1231            $renderer->render(
$f->messageBox()->info($this->lng->txt(
"tst_player_answer_saved_and_locked")))
 
 1234        $this->tpl->parseCurrentBlock();
 
 1236        $this->tpl->setVariable(
'QUESTION_OUTPUT', $pageoutput);
 
 1238        $this->tpl->setVariable(
"FORMACTION", $formAction);
 
 1239        $this->tpl->setVariable(
"ENCTYPE", 
'enctype="' . $questionGui->
getFormEncodingType() . 
'"');
 
 1240        $this->tpl->setVariable(
"FORM_TIMESTAMP", time());
 
 1246            $questionGui->object->getId(),
 
 1247            $this->populateCharSelectorIfRequired()
 
 1249        if ($isQuestionWorkedThrough) {
 
 1250            $questionNavigationGUI->setDiscardSolutionButtonEnabled(
true);
 
 1254        } elseif ($this->object->isPostponingEnabled()) {
 
 1255            $questionNavigationGUI->setSkipQuestionLinkTarget(
 
 1263        $answerFeedbackEnabled = (
 
 1264            $instantResponse && $this->
object->getSpecificAnswerFeedback()
 
 1267        if (isset(
$_GET[
'save_error']) && 
$_GET[
'save_error'] == 1 && isset(
$_SESSION[
'previouspost'])) {
 
 1268            $userPostSolution = 
$_SESSION[
'previouspost'];
 
 1271            $userPostSolution = 
false;
 
 1279        $qstConfig = $questionGui->object->getTestPresentationConfig();
 
 1282            $qstConfig->setWorkedThrough($isQuestionWorkedThrough);
 
 1283            $qstConfig->setIsUnchangedAnswerPossible($this->object->getMCScoring());
 
 1286        if ($qstConfig->isPreviousPassSolutionReuseAllowed()) {
 
 1288            if ($passIndex < $this->testSession->getPass()) { 
 
 1289                $qstConfig->setSolutionInitiallyPrefilled(
true);
 
 1292            $passIndex = $this->testSession->getPass();
 
 1299            $formAction,                                                        #form_action
 
 1300            $this->testSession->getActiveId(),          #active_id
 
 1304            $isPostponed,                                                       #is_postponed
 
 1305            $userPostSolution,                                          #user_post_solution
 
 1306            $answerFeedbackEnabled                                      #answer_feedback == inline_specific_feedback
 
 1317        $this->populateQuestionEditControl($questionGui);
 
 1324        require_once 
'./Modules/Test/classes/class.ilObjTest.php';
 
 1327            $currentSolutionAvailable = $questionGui->object->authorizedOrIntermediateSolutionExists(
 
 1328                $this->testSession->getActiveId(),
 
 1329                $this->testSession->getPass()
 
 1332            if (!$currentSolutionAvailable) {
 
 1333                $previousPass = $questionGui->object->getSolutionMaxPass(
 
 1334                    $this->testSession->getActiveId()
 
 1337                $previousSolutionAvailable = $questionGui->object->authorizedSolutionExists(
 
 1338                    $this->testSession->getActiveId(),
 
 1342                if ($previousSolutionAvailable) {
 
 1343                    return $previousPass;
 
 1348        return $this->testSession->getPass();
 
 1363        $this->ctrl->saveParameter($this, 
'sequence');
 
 1386        $user = $this->
object->getInvitedUsers(
$ilUser->getId());
 
 1387        if (!is_array($user) || count($user) != 1) {
 
 1389            $this->ctrl->redirectByClass(
"ilobjtestgui", 
"backToRepository");
 
 1392        $user = array_pop($user);
 
 1394        if (strcmp($user[
"clientip"], 
"") != 0 && strcmp($user[
"clientip"], 
$_SERVER[
"REMOTE_ADDR"]) != 0) {
 
 1396            $this->ctrl->redirectByClass(
"ilobjtestgui", 
"backToRepository");
 
 1408                and $this->
object->startingTimeReached()
 
 1409                and !$this->
object->endingTimeReached();
 
 1417        return $this->
object->hasNrOfTriesRestriction() && $this->
object->isNrOfTriesReached($this->testSession->getPass());
 
 1428        $this->testSession->increasePass();
 
 1429        $this->testSession->setLastSequence(0);
 
 1430        $this->testSession->saveToDb();
 
 1454        $this->tpl->addBlockFile($this->
getContentBlockName(), 
"adm_content", 
"tpl.il_as_tst_submit_answers_confirm.html", 
"Modules/Test");
 
 1455        $this->tpl->setCurrentBlock(
"adm_content");
 
 1456        if ($this->object->isTestFinished($this->testSession->getActiveId())) {
 
 1457            $this->tpl->setCurrentBlock(
"not_submit_allowed");
 
 1458            $this->tpl->setVariable(
"TEXT_ALREADY_SUBMITTED", $this->lng->txt(
"tst_already_submitted"));
 
 1459            $this->tpl->setVariable(
"BTN_OK", $this->lng->txt(
"tst_show_answer_sheet"));
 
 1461            $this->tpl->setCurrentBlock(
"submit_allowed");
 
 1462            $this->tpl->setVariable(
"TEXT_CONFIRM_SUBMIT_RESULTS", $this->lng->txt(
"tst_confirm_submit_answers"));
 
 1463            $this->tpl->setVariable(
"BTN_OK", $this->lng->txt(
"tst_submit_results"));
 
 1465        $this->tpl->setVariable(
"BTN_BACK", $this->lng->txt(
"back"));
 
 1466        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this, 
"finalSubmission"));
 
 1467        $this->tpl->parseCurrentBlock();
 
 1475        $starting_time = $this->
object->getStartingTimeOfUser($active_id);
 
 1476        $processing_time = $this->
object->getProcessingTimeInSeconds($active_id);
 
 1477        $processing_time_minutes = floor($processing_time / 60);
 
 1478        $processing_time_seconds = $processing_time - $processing_time_minutes * 60;
 
 1479        $str_processing_time = 
"";
 
 1480        if ($processing_time_minutes > 0) {
 
 1481            $str_processing_time = $processing_time_minutes . 
" " . ($processing_time_minutes == 1 ? $this->lng->txt(
"minute") : $this->lng->txt(
"minutes"));
 
 1483        if ($processing_time_seconds > 0) {
 
 1484            if (strlen($str_processing_time) > 0) {
 
 1485                $str_processing_time .= 
" " . $this->lng->txt(
"and") . 
" ";
 
 1487            $str_processing_time .= $processing_time_seconds . 
" " . ($processing_time_seconds == 1 ? $this->lng->txt(
"second") : $this->lng->txt(
"seconds"));
 
 1489        $time_left = $starting_time + $processing_time - time();
 
 1490        $time_left_minutes = floor($time_left / 60);
 
 1491        $time_left_seconds = $time_left - $time_left_minutes * 60;
 
 1492        $str_time_left = 
"";
 
 1493        if ($time_left_minutes > 0) {
 
 1494            $str_time_left = $time_left_minutes . 
" " . ($time_left_minutes == 1 ? $this->lng->txt(
"minute") : $this->lng->txt(
"minutes"));
 
 1496        if ($time_left < 300) {
 
 1497            if ($time_left_seconds > 0) {
 
 1498                if (strlen($str_time_left) > 0) {
 
 1499                    $str_time_left .= 
" " . $this->lng->txt(
"and") . 
" ";
 
 1501                $str_time_left .= $time_left_seconds . 
" " . ($time_left_seconds == 1 ? $this->lng->txt(
"second") : $this->lng->txt(
"seconds"));
 
 1504        $date = getdate($starting_time);
 
 1506        $datenow = getdate();
 
 1507        $this->tpl->setCurrentBlock(
"enableprocessingtime");
 
 1508        $this->tpl->setVariable(
 
 1509            "USER_WORKING_TIME",
 
 1511                $this->lng->txt(
"tst_time_already_spent"),
 
 1512                $formattedStartingTime,
 
 1513                $str_processing_time
 
 1516        $this->tpl->setVariable(
"USER_REMAINING_TIME", sprintf($this->lng->txt(
"tst_time_already_spent_left"), $str_time_left));
 
 1517        $this->tpl->parseCurrentBlock();
 
 1520        require_once 
"./Services/jQuery/classes/class.iljQueryUtil.php";
 
 1522        $template = 
new ilTemplate(
"tpl.workingtime.js", 
true, 
true, 
'Modules/Test');
 
 1523        $template->setVariable(
"STRING_MINUTE", $this->lng->txt(
"minute"));
 
 1524        $template->setVariable(
"STRING_MINUTES", $this->lng->txt(
"minutes"));
 
 1525        $template->setVariable(
"STRING_SECOND", $this->lng->txt(
"second"));
 
 1526        $template->setVariable(
"STRING_SECONDS", $this->lng->txt(
"seconds"));
 
 1527        $template->setVariable(
"STRING_TIMELEFT", $this->lng->txt(
"tst_time_already_spent_left"));
 
 1528        $template->setVariable(
"AND", strtolower($this->lng->txt(
"and")));
 
 1529        $template->setVariable(
"YEAR", $date[
"year"]);
 
 1530        $template->setVariable(
"MONTH", $date[
"mon"] - 1);
 
 1531        $template->setVariable(
"DAY", $date[
"mday"]);
 
 1532        $template->setVariable(
"HOUR", $date[
"hours"]);
 
 1533        $template->setVariable(
"MINUTE", $date[
"minutes"]);
 
 1534        $template->setVariable(
"SECOND", $date[
"seconds"]);
 
 1535        if ($this->object->isEndingTimeEnabled()) {
 
 1537            preg_match(
"/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $date_time->get(
IL_CAL_TIMESTAMP), $matches);
 
 1538            if (!empty($matches)) {
 
 1539                $template->setVariable(
"ENDYEAR", $matches[1]);
 
 1540                $template->setVariable(
"ENDMONTH", $matches[2] - 1);
 
 1541                $template->setVariable(
"ENDDAY", $matches[3]);
 
 1542                $template->setVariable(
"ENDHOUR", $matches[4]);
 
 1543                $template->setVariable(
"ENDMINUTE", $matches[5]);
 
 1544                $template->setVariable(
"ENDSECOND", $matches[6]);
 
 1547        $template->setVariable(
"YEARNOW", $datenow[
"year"]);
 
 1548        $template->setVariable(
"MONTHNOW", $datenow[
"mon"] - 1);
 
 1549        $template->setVariable(
"DAYNOW", $datenow[
"mday"]);
 
 1550        $template->setVariable(
"HOURNOW", $datenow[
"hours"]);
 
 1551        $template->setVariable(
"MINUTENOW", $datenow[
"minutes"]);
 
 1552        $template->setVariable(
"SECONDNOW", $datenow[
"seconds"]);
 
 1553        $template->setVariable(
"PTIME_M", $processing_time_minutes);
 
 1554        $template->setVariable(
"PTIME_S", $processing_time_seconds);
 
 1555        if ($this->ctrl->getCmd() == 
'outQuestionSummary') {
 
 1556            $template->setVariable(
"REDIRECT_URL", $this->ctrl->getFormAction($this, 
'redirectAfterDashboard'));
 
 1558            $template->setVariable(
"REDIRECT_URL", 
"");
 
 1560        $template->setVariable(
"CHECK_URL", $this->ctrl->getLinkTarget($this, 
'checkWorkingTime', 
'', 
true));
 
 1561        $this->tpl->addOnLoadCode($template->get());
 
 1573        $active_id = $this->testSession->getActiveId();
 
 1574        echo (
string) $this->
object->getProcessingTimeInSeconds($active_id);
 
 1578    protected function showSideList($presentationMode, $currentSequenceElement)
 
 1583        $sideListActive = 
$ilUser->getPref(
'side_list_of_questions');
 
 1585        if ($sideListActive) {
 
 1586            $questionSummaryData = $this->service->getQuestionSummaryData($this->testSequence, 
false);
 
 1588            require_once 
'Modules/Test/classes/class.ilTestQuestionSideListGUI.php';
 
 1590            $questionSideListGUI->setTargetGUI($this);
 
 1591            $questionSideListGUI->setQuestionSummaryData($questionSummaryData);
 
 1592            $questionSideListGUI->setCurrentSequenceElement($currentSequenceElement);
 
 1595            $questionSideListGUI->setDisabled(
false);
 
 1599            $this->tpl->setVariable(
'LIST_OF_QUESTIONS', $questionSideListGUI->getHTML());
 
 1608    public function outQuestionSummaryCmd($fullpage = 
true, $contextFinishTest = 
false, $obligationsInfo = 
false, $obligationsFilter = 
false)
 
 1611        $help = 
$DIC->help();
 
 1613        $help->setScreenIdComponent(
"tst");
 
 1614        $help->setScreenId(
"assessment");
 
 1615        $help->setSubScreenId(
"question_summary");
 
 1618            $this->tpl->addBlockFile($this->
getContentBlockName(), 
"adm_content", 
"tpl.il_as_tst_question_summary.html", 
"Modules/Test");
 
 1622            $this->object->getId(),
 
 1623            $this->testSession->getActiveId(),
 
 1624            $this->testSession->getPass()
 
 1627        if ($obligationsInfo && $this->object->areObligationsEnabled() && !$obligationsFulfilled) {
 
 1631        if ($this->object->getKioskMode() && $fullpage) {
 
 1633            if (strlen($head)) {
 
 1634                $this->tpl->setCurrentBlock(
"kiosk_options");
 
 1635                $this->tpl->setVariable(
"KIOSK_HEAD", $head);
 
 1636                $this->tpl->parseCurrentBlock();
 
 1641        $active_id = $this->testSession->getActiveId();
 
 1642        $questionSummaryData = $this->service->getQuestionSummaryData($this->testSequence, $obligationsFilter);
 
 1644        $this->ctrl->setParameter($this, 
"sequence", 
$_GET[
"sequence"]);
 
 1647            include_once 
"./Modules/Test/classes/tables/class.ilListOfQuestionsTableGUI.php";
 
 1650            $table_gui->setShowPointsEnabled(!$this->object->getTitleOutput());
 
 1651            $table_gui->setShowMarkerEnabled($this->object->getShowMarker());
 
 1652            $table_gui->setObligationsNotAnswered(!$obligationsFulfilled);
 
 1653            $table_gui->setShowObligationsEnabled($this->object->areObligationsEnabled());
 
 1654            $table_gui->setObligationsFilterEnabled($obligationsFilter);
 
 1659            $table_gui->setData($questionSummaryData);
 
 1661            $this->tpl->setVariable(
'TABLE_LIST_OF_QUESTIONS', $table_gui->getHTML());
 
 1663            if ($this->object->getEnableProcessingTime()) {
 
 1667            if ($this->object->isShowExamIdInTestPassEnabled()) {
 
 1668                $this->tpl->setCurrentBlock(
'exam_id_footer');
 
 1670                    $this->testSession->getActiveId(),
 
 1671                    $this->testSession->getPass(),
 
 1672                    $this->object->getId()
 
 1674                $this->tpl->setVariable(
'EXAM_ID_TXT', $this->lng->txt(
'exam_id'));
 
 1675                $this->tpl->parseCurrentBlock();
 
 1692        $this->tpl->addBlockFile($this->
getContentBlockName(), 
"adm_content", 
"tpl.il_as_tst_max_allowed_users_reached.html", 
"Modules/Test");
 
 1693        $this->tpl->setCurrentBlock(
"adm_content");
 
 1694        $this->tpl->setVariable(
"MAX_ALLOWED_USERS_MESSAGE", sprintf($this->lng->txt(
"tst_max_allowed_users_message"), $this->object->getAllowedUsersTimeGap()));
 
 1695        $this->tpl->setVariable(
"MAX_ALLOWED_USERS_HEADING", sprintf($this->lng->txt(
"tst_max_allowed_users_heading"), $this->object->getAllowedUsersTimeGap()));
 
 1697        $this->tpl->setVariable(
"TXT_BACK_TO_INFOSCREEN", $this->lng->txt(
"tst_results_back_introduction"));
 
 1698        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 1699        $this->tpl->parseCurrentBlock();
 
 1714        $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.il_as_tst_correct_solution.html", 
"Modules/Test");
 
 1716        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 1717        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 1719        $this->tpl->parseCurrentBlock();
 
 1721        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
 1723        $this->tpl->parseCurrentBlock();
 
 1726        if ($this->object->getShowSolutionAnswersOnly()) {
 
 1730        $this->tpl->setCurrentBlock(
"adm_content");
 
 1732        $this->tpl->setVariable(
"OUTPUT_SOLUTION", $solution);
 
 1733        $this->tpl->setVariable(
"TEXT_BACK", $this->lng->txt(
"back"));
 
 1734        $this->ctrl->saveParameter($this, 
"pass");
 
 1735        $this->ctrl->saveParameter($this, 
"active_id");
 
 1736        $this->tpl->setVariable(
"URL_BACK", $this->ctrl->getLinkTarget($this, 
"outUserResultsOverview"));
 
 1737        $this->tpl->parseCurrentBlock();
 
 1754        $this->tpl->addBlockFile($this->
getContentBlockName(), 
"adm_content", 
"tpl.il_as_tst_finish_list_of_answers.html", 
"Modules/Test");
 
 1756        $result_array = &$this->
object->getTestResult(
 
 1765        foreach ($result_array as $question_data) {
 
 1766            $question = $question_data[
"qid"];
 
 1767            if (is_numeric($question)) {
 
 1768                $this->tpl->setCurrentBlock(
"printview_question");
 
 1769                $question_gui = $this->
object->createQuestionGUI(
"", $question);
 
 1770                $template = 
new ilTemplate(
"tpl.il_as_qpl_question_printview.html", 
true, 
true, 
"Modules/TestQuestionPool");
 
 1771                $template->setVariable(
"COUNTER_QUESTION", $counter . 
". ");
 
 1772                $template->setVariable(
"QUESTION_TITLE", $question_gui->object->getTitle());
 
 1774                $show_question_only = ($this->
object->getShowSolutionAnswersOnly()) ? 
true : 
false;
 
 1775                $result_output = $question_gui->getSolutionOutput($active_id, 
$pass, 
false, 
false, $show_question_only, $this->object->getShowSolutionFeedback());
 
 1776                $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
 
 1777                $this->tpl->setVariable(
"QUESTION_OUTPUT", $template->get());
 
 1778                $this->tpl->parseCurrentBlock();
 
 1784        if ($this->object->getShowSolutionAnswersOnly()) {
 
 1787        if (strlen($top_data)) {
 
 1788            $this->tpl->setCurrentBlock(
"top_data");
 
 1789            $this->tpl->setVariable(
"TOP_DATA", $top_data);
 
 1790            $this->tpl->parseCurrentBlock();
 
 1793        if (strlen($bottom_data)) {
 
 1794            $this->tpl->setCurrentBlock(
"bottom_data");
 
 1795            $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 1796            $this->tpl->setVariable(
"BOTTOM_DATA", $bottom_data);
 
 1797            $this->tpl->parseCurrentBlock();
 
 1800        $this->tpl->setCurrentBlock(
"adm_content");
 
 1801        $this->tpl->setVariable(
"TXT_ANSWER_SHEET", $this->lng->txt(
"tst_list_of_answers"));
 
 1804        $this->tpl->setVariable(
"USER_DETAILS", $user_data);
 
 1805        $this->tpl->setVariable(
"SIGNATURE", $signature);
 
 1806        $this->tpl->setVariable(
"TITLE", $this->object->getTitle());
 
 1807        $this->tpl->setVariable(
"TXT_TEST_PROLOG", $this->lng->txt(
"tst_your_answers"));
 
 1808        $invited_user = &$this->
object->getInvitedUsers(
$ilUser->getId());
 
 1809        $pagetitle = $this->
object->getTitle() . 
" - " . $this->lng->txt(
"clientip") .
 
 1810            ": " . $invited_user[
$ilUser->getId()][
"clientip"] . 
" - " .
 
 1811            $this->lng->txt(
"matriculation") . 
": " .
 
 1812            $invited_user[
$ilUser->getId()][
"matriculation"];
 
 1813        $this->tpl->setVariable(
"PAGETITLE", $pagetitle);
 
 1814        $this->tpl->parseCurrentBlock();
 
 1824        return "ADM_CONTENT";
 
 1826        if ($this->object->getKioskMode()) {
 
 1827            $this->tpl->setBodyClass(
"kiosk");
 
 1828            $this->tpl->hideFooter();
 
 1831            return "ADM_CONTENT";
 
 1837        $this->ctrl->redirectByClass(
 
 1838            array(
'ilRepositoryGUI', 
'ilObjTestGUI', 
'ilTestEvaluationGUI'),
 
 1839            "outUserResultsOverview" 
 1852        $this->ctrl->setParameter($this, 
'pmode', self::PRESENTATION_MODE_EDIT);
 
 1854        require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
 
 1867        $this->ctrl->setParameter($this, 
'pmode', self::PRESENTATION_MODE_EDIT);
 
 1869        require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
 
 1888        $this->tpl->addBlockFile(
 
 1891            'tpl.il_as_tst_question_summary.html',
 
 1895        if ($this->object->getKioskMode()) {
 
 1902        $this->tpl->addBlockFile(
 
 1905            'tpl.il_as_tst_output.html',
 
 1914        if (strlen($head)) {
 
 1915            $this->tpl->setCurrentBlock(
"kiosk_options");
 
 1916            $this->tpl->setVariable(
"KIOSK_HEAD", $head);
 
 1917            $this->tpl->parseCurrentBlock();
 
 1929        if ($this->testSession->isPasswordChecked() === 
true) {
 
 1933        if ($this->ctrl->getNextClass() == 
'iltestpasswordprotectiongui') {
 
 1937        if (!$this->passwordChecker->isPasswordProtectionPageRedirectRequired()) {
 
 1938            $this->testSession->setPasswordChecked(
true);
 
 1944        $nextCommand = $this->ctrl->getCmdClass() . 
'::' . $this->ctrl->getCmd();
 
 1945        $this->ctrl->setParameterByClass(
'ilTestPasswordProtectionGUI', 
'nextCommand', $nextCommand);
 
 1946        $this->ctrl->redirectByClass(
'ilTestPasswordProtectionGUI', 
'showPasswordForm');
 
 1951        if ($this->object->isInstantFeedbackAnswerFixationEnabled() && $this->testSequence->isQuestionChecked($questionId)) {
 
 1955        if ($this->object->isFollowupQuestionAnswerFixationEnabled() && $this->testSequence->isNextQuestionPresented($questionId)) {
 
 1967        return $this->lng->txt(
"save_introduction");
 
 1972        $this->assSettings = 
new ilSetting(
'assessment');
 
 1981        $questionList->load();
 
 1985        require_once 
'Modules/Test/classes/class.ilTestSkillEvaluation.php';
 
 1986        $skillEvaluation = 
new ilTestSkillEvaluation($this->db, $this->object->getTestId(), $this->object->getRefId());
 
 1988        $skillEvaluation->setUserId(
$testSession->getUserId());
 
 1989        $skillEvaluation->setActiveId(
$testSession->getActiveId());
 
 1992        $skillEvaluation->setNumRequiredBookingsForSkillTriggering($this->assSettings->get(
 
 1993            'ass_skl_trig_num_answ_barrier',
 
 1998        $skillEvaluation->init($questionList);
 
 1999        $skillEvaluation->evaluate($testResults);
 
 2001        $skillEvaluation->handleSkillTriggering();
 
 2008        require_once 
'Modules/Test/classes/confirmations/class.ilTestAnswerOptionalQuestionsConfirmationGUI.php';
 
 2011        $confirmation->setFormAction($this->ctrl->getFormAction($this));
 
 2012        $confirmation->setCancelCmd(
'cancelAnswerOptionalQuestions');
 
 2013        $confirmation->setConfirmCmd(
'confirmAnswerOptionalQuestions');
 
 2015        $confirmation->build($this->object->isFixedTest());
 
 2022        $this->testSequence->setAnsweringOptionalQuestionsConfirmed(
true);
 
 2023        $this->testSequence->saveToDb();
 
 2025        $this->ctrl->setParameter($this, 
'activecommand', 
'gotoquestion');
 
 2026        $this->ctrl->redirect($this, 
'redirectQuestion');
 
 2031        if ($this->object->getListOfQuestions()) {
 
 2032            $this->ctrl->setParameter($this, 
'activecommand', 
'summary');
 
 2034            $this->ctrl->setParameter($this, 
'activecommand', 
'previous');
 
 2037        $this->ctrl->redirect($this, 
'redirectQuestion');
 
 2045        if ($this->object->getKioskMode()) {
 
 2047            $this->tpl->hideFooter();
 
 2048            $this->tpl->addBlockfile(
'CONTENT', 
'adm_content', 
"tpl.il_as_tst_kiosk_mode_content.html", 
"Modules/Test");
 
 2049            $this->tpl->setContent($this->ctrl->getHTML($helperGui));
 
 2063        if (
$ilSetting->get(
'char_selector_availability') > 0) {
 
 2064            require_once 
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
 
 2067                $char_selector->addToPage();
 
 2068                $this->tpl->setCurrentBlock(
'char_selector');
 
 2069                $this->tpl->setVariable(
"CHAR_SELECTOR_TEMPLATE", $char_selector->getSelectorHtml());
 
 2070                $this->tpl->parseCurrentBlock();
 
 2084        require_once 
'Modules/Test/classes/class.ilTestNavigationToolbarGUI.php';
 
 2087        $navigationToolbarGUI->setSuspendTestButtonEnabled($this->object->getShowCancel());
 
 2088        $navigationToolbarGUI->setQuestionTreeButtonEnabled($this->object->getListOfQuestions());
 
 2089        $navigationToolbarGUI->setQuestionTreeVisible(
$ilUser->getPref(
'side_list_of_questions'));
 
 2090        $navigationToolbarGUI->setQuestionListButtonEnabled($this->object->getListOfQuestions());
 
 2093        return $navigationToolbarGUI;
 
 2098        require_once 
'Modules/Test/classes/class.ilTestQuestionNavigationGUI.php';
 
 2105        if ($this->object->getShowMarker()) {
 
 2106            include_once 
"./Modules/Test/classes/class.ilObjTest.php";
 
 2110            if (count($solved_array) > 0) {
 
 2111                $solved = array_pop($solved_array);
 
 2112                $solved = $solved[
"solved"];
 
 2117                $navigationGUI->setQuestionMarked(
true);
 
 2120                $navigationGUI->setQuestionMarked(
false);
 
 2125        return $navigationGUI;
 
 2130        require_once 
'Modules/Test/classes/class.ilTestQuestionNavigationGUI.php';
 
 2133        if ($this->object->isForceInstantFeedbackEnabled()) {
 
 2148            case $this->
object->getSpecificAnswerFeedback():
 
 2149            case $this->
object->getGenericAnswerFeedback():
 
 2150            case $this->
object->getAnswerFeedbackPoints():
 
 2151            case $this->
object->getInstantFeedbackSolution():
 
 2153                $navigationGUI->setAnswerFreezingEnabled($this->object->isInstantFeedbackAnswerFixationEnabled());
 
 2155                if ($this->object->isForceInstantFeedbackEnabled()) {
 
 2156                    $navigationGUI->setForceInstantResponseEnabled(
true);
 
 2164        if ($this->object->isOfferingQuestionHintsEnabled()) {
 
 2165            $activeId = $this->testSession->getActiveId();
 
 2166            $pass = $this->testSession->getPass();
 
 2168            require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
 
 2171            if ($questionHintTracking->requestsPossible()) {
 
 2175            if ($questionHintTracking->requestsExist()) {
 
 2180        $navigationGUI->setCharSelectorEnabled($charSelectorAvailable);
 
 2182        if ($this->object->getShowMarker()) {
 
 2183            include_once 
"./Modules/Test/classes/class.ilObjTest.php";
 
 2187            if (count($solved_array) > 0) {
 
 2188                $solved = array_pop($solved_array);
 
 2189                $solved = $solved[
"solved"];
 
 2195                $navigationGUI->setQuestionMarked(
true);
 
 2198                $navigationGUI->setQuestionMarked(
false);
 
 2202        return $navigationGUI;
 
 2210        if (!$this->object->getListOfQuestionsEnd()) {
 
 2211            return 'finishTest';
 
 2214        if ($this->object->areObligationsEnabled()) {
 
 2216                $this->testSession->getTestId(),
 
 2217                $this->testSession->getActiveId(),
 
 2218                $this->testSession->getPass()
 
 2221            if (!$allObligationsAnswered) {
 
 2222                return 'outQuestionSummaryWithObligationsInfo';
 
 2226        return 'outQuestionSummary';
 
 2258        $answerFeedbackEnabled = $this->
object->getSpecificAnswerFeedback();
 
 2261            $this->testSession->getActiveId(),  #active_id
 
 2262            $this->testSession->getPass(),              #pass
 
 2263            false,                                                              #graphical_output
 
 2264            false,                                                              #result_output
 
 2265            true,                                                               #show_question_only
 
 2266            $answerFeedbackEnabled,                             #show_feedback
 
 2267            false,                                                              #show_correct_solution
 
 2268            false,                                                              #show_manual_scoring
 
 2269            true                                                                #show_question_text
 
 2275            $this->testSession->getActiveId(),
 
 2279        $tpl = 
new ilTemplate(
'tpl.tst_player_response_modal.html', 
true, 
true, 
'Modules/Test');
 
 2285        $this->tpl = $saved_tpl;
 
 2287        $tpl->setVariable(
'QUESTION_OUTPUT', $pageoutput);
 
 2290        $button->setId(
'tst_confirm_feedback');
 
 2291        $button->setUrl($navUrl);
 
 2292        $button->setCaption(
'proceed');
 
 2293        $button->setPrimary(
true);
 
 2294        $tpl->setVariable(
'BUTTON', $button->render());
 
 2297        require_once(
'Services/UIComponent/Modal/classes/class.ilModalGUI.php');
 
 2300        $modal->setId(
'tst_question_feedback_modal');
 
 2301        $modal->setHeading($this->lng->txt(
'tst_instant_feedback'));
 
 2302        $modal->setBody(
$tpl->get());
 
 2304        $this->tpl->addOnLoadCode(
"$('#tst_question_feedback_modal').modal('show');");
 
 2305        $this->tpl->setVariable(
'INSTANT_RESPONSE_MODAL', $modal->getHTML());
 
 2314        $response_available = 
false;
 
 2315        $jump_to_response = 
false;
 
 2319        if ($this->object->getInstantFeedbackSolution()) {
 
 2324                $this->testSession->getActiveId(),    #active_id
 
 2326                false,                                                #graphical_output
 
 2327                $show_question_inline_score,                        #result_output
 
 2328                true,                                                #show_question_only
 
 2329                false,                                                #show_feedback
 
 2330                true,                                                #show_correct_solution
 
 2331                false,                                                #show_manual_scoring
 
 2332                false                                                #show_question_text
 
 2334            $solutionoutput = str_replace(
'<h1 class="ilc_page_title_PageTitle"></h1>', 
'', $solutionoutput);
 
 2336            $response_available = 
true;
 
 2337            $jump_to_response = 
true;
 
 2340        $reachedPoints = $questionGui->object->getAdjustedReachedPoints(
 
 2341            $this->testSession->getActiveId(),
 
 2346        $maxPoints = $questionGui->object->getMaximumPoints();
 
 2348        $solutionCorrect = ($reachedPoints == $maxPoints);
 
 2352        if ($this->object->getAnswerFeedbackPoints()) {
 
 2354            $response_available = 
true;
 
 2355            $jump_to_response = 
true;
 
 2360        if ($this->object->getGenericAnswerFeedback()) {
 
 2362                $response_available = 
true;
 
 2363                $jump_to_response = 
true;
 
 2369        if ($this->object->getSpecificAnswerFeedback()) {
 
 2372                $jump_to_response = 
false;
 
 2374                $response_available = 
true;
 
 2375                $jump_to_response = 
true;
 
 2380        if (!$response_available) {
 
 2391        if ($withFocusAnchor) {
 
 2392            $this->tpl->setCurrentBlock(
'inst_resp_id');
 
 2393            $this->tpl->setVariable(
'INSTANT_RESPONSE_FOCUS_ID', 
'focus');
 
 2394            $this->tpl->parseCurrentBlock();
 
 2397        $this->tpl->setCurrentBlock(
'instant_response_header');
 
 2398        $this->tpl->setVariable(
'INSTANT_RESPONSE_HEADER', $this->lng->txt(
'tst_feedback'));
 
 2399        $this->tpl->parseCurrentBlock();
 
 2404        $this->tpl->setCurrentBlock(
'instant_response_message');
 
 2405        $this->tpl->setVariable(
'INSTANT_RESPONSE_MESSAGE', $a_message);
 
 2406        $this->tpl->parseCurrentBlock();
 
 2416        return $this->testSession->getLastSequence();
 
 2421        unset(
$_GET[
'sequence']);
 
 2422        $this->ctrl->setParameter($this, 
'sequence', 
null);
 
 2427        if (isset(
$_GET[
'sequence'])) {
 
 2428            return $_GET[
'sequence'];
 
 2436        if (isset(
$_GET[
'pmode'])) {
 
 2437            return $_GET[
'pmode'];
 
 2445        if (isset(
$_GET[
'instresp'])) {
 
 2446            return $_GET[
'instresp'];
 
 2454        if (isset(
$_POST[
'nextcmd']) && strlen(
$_POST[
'nextcmd'])) {
 
 2455            return $_POST[
'nextcmd'];
 
 2463        if (isset(
$_POST[
'nextseq']) && is_numeric(
$_POST[
'nextseq'])) {
 
 2464            return (
int) 
$_POST[
'nextseq'];
 
 2473        if (isset(
$_POST[
'test_player_navigation_url'])) {
 
 2474            $navigation_url = 
$_POST[
'test_player_navigation_url'];
 
 2476            $navigation_url_parts = parse_url($navigation_url);
 
 2479            if (!isset($navigation_url_parts[
'host']) || ($ilias_url_parts[
'host'] === $navigation_url_parts[
'host'])) {
 
 2480                return $navigation_url;
 
 2496        return !empty(
$_GET[
'test_answer_changed']);
 
 2505        $this->ctrl->setParameter($this, 
'test_answer_changed', 
$changed ? 
'1' : 
'0');
 
 2531        if (!empty(
$_POST[
'save_on_navigation_prevent_confirmation'])) {
 
 2532            $_SESSION[
'save_on_navigation_prevent_confirmation'] = 
true;
 
 2535        if (!empty(
$_POST[self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM])) {
 
 2556        if (!$fromCache || !isset($this->cachedQuestionGuis[$question_id])) {
 
 2557            $questionGui = $this->
object->createQuestionGUI(
"", $question_id);
 
 2558            $questionGui->setTargetGui($this);
 
 2560            $questionGui->object->setObligationsToBeConsidered($this->object->areObligationsEnabled());
 
 2561            $questionGui->populateJavascriptFilesRequiredForWorkForm(
$tpl);
 
 2563            $questionGui->object->setShuffler($this->
buildQuestionAnswerShuffler((
string) $question_id, (
string) $this->testSession->getActiveId(), (
string) $this->testSession->getPass()));
 
 2569            $this->cachedQuestionGuis[$question_id] = $questionGui;
 
 2572        return $this->cachedQuestionGuis[$question_id];
 
 2590        if (!$fromCache || !isset($this->cachedQuestionObjects[$questionId])) {
 
 2594            require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionProcessLockerFactory.php';
 
 2596            $processLockerFactory->setQuestionId($questionOBJ->getId());
 
 2597            $processLockerFactory->setUserId(
$ilUser->getId());
 
 2598            include_once(
"./Modules/Test/classes/class.ilObjAssessmentFolder.php");
 
 2600            $questionOBJ->setProcessLocker($processLockerFactory->getLocker());
 
 2602            $questionOBJ->setObligationsToBeConsidered($this->object->areObligationsEnabled());
 
 2609            $this->cachedQuestionObjects[$questionId] = $questionOBJ;
 
 2612        return $this->cachedQuestionObjects[$questionId];
 
 2619            $this->object->isPreviousSolutionReuseEnabled($this->testSession->getActiveId())
 
 2631        $ilLog = 
$DIC[
'ilLog'];
 
 2635            . 
"active={$this->testSession->getActiveId()} " 
 2636            . 
"qId=$questionId seq=$sequenceElement " 
 2637            . serialize($this->testSequence)
 
 2640        $ilLog->logStack(
'INV SEQ');
 
 2642        $this->ctrl->setParameter($this, 
'sequence', $this->testSequence->getFirstSequence());
 
 2651        if ($this->object->getKioskMode()) {
 
 2652            $this->tpl->addBlockfile($this->
getContentBlockName(), 
'content', 
"tpl.il_as_tst_kiosk_mode_content.html", 
"Modules/Test");
 
 2653            $this->tpl->setContent($contentHTML);
 
 2661        require_once 
'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
 
 2662        require_once 
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
 
 2663        require_once 
'Services/UIComponent/Modal/classes/class.ilModalGUI.php';
 
 2670        if ($this->object->isFollowupQuestionAnswerFixationEnabled()) {
 
 2679        $tpl = 
new ilTemplate(
'tpl.tst_player_confirmation_modal.html', 
true, 
true, 
'Modules/Test');
 
 2681        $tpl->setVariable(
'CONFIRMATION_TEXT', $this->lng->txt(
'discard_answer_confirmation'));
 
 2685        $button->setCaption(
'discard_answer');
 
 2686        $tpl->setCurrentBlock(
'buttons');
 
 2687        $tpl->setVariable(
'BUTTON', $button->render());
 
 2688        $tpl->parseCurrentBlock();
 
 2691        $button->setId(
'tst_cancel_discard_button');
 
 2692        $button->setCaption(
'cancel');
 
 2693        $button->setPrimary(
true);
 
 2694        $tpl->setCurrentBlock(
'buttons');
 
 2695        $tpl->setVariable(
'BUTTON', $button->render());
 
 2696        $tpl->parseCurrentBlock();
 
 2699        $modal->setId(
'tst_discard_solution_modal');
 
 2700        $modal->setHeading($this->lng->txt(
'discard_answer'));
 
 2701        $modal->setBody(
$tpl->get());
 
 2703        $this->tpl->setCurrentBlock(
'discard_solution_modal');
 
 2704        $this->tpl->setVariable(
'DISCARD_SOLUTION_MODAL', $modal->getHTML());
 
 2705        $this->tpl->parseCurrentBlock();
 
 2774        if (!empty(
$_SESSION[
'save_on_navigation_prevent_confirmation'])) {
 
 2778        $tpl = 
new ilTemplate(
'tpl.tst_player_confirmation_modal.html', 
true, 
true, 
'Modules/Test');
 
 2780        if ($this->object->isInstantFeedbackAnswerFixationEnabled() && $this->object->isForceInstantFeedbackEnabled()) {
 
 2781            $text = $this->lng->txt(
'save_on_navigation_locked_confirmation');
 
 2783            $text = $this->lng->txt(
'save_on_navigation_confirmation');
 
 2785        if ($this->object->isForceInstantFeedbackEnabled()) {
 
 2786            $text .= 
" " . $this->lng->txt(
'save_on_navigation_forced_feedback_hint');
 
 2788        $tpl->setVariable(
'CONFIRMATION_TEXT', $text);
 
 2792        $button->setId(
'tst_save_on_navigation_button');
 
 2793        $button->setUrl(
'#');
 
 2794        $button->setCaption(
'tst_save_and_proceed');
 
 2795        $button->setPrimary(
true);
 
 2796        $tpl->setCurrentBlock(
'buttons');
 
 2797        $tpl->setVariable(
'BUTTON', $button->render());
 
 2798        $tpl->parseCurrentBlock();
 
 2801        $button->setId(
'tst_cancel_on_navigation_button');
 
 2802        $button->setUrl(
'#');
 
 2803        $button->setCaption(
'cancel');
 
 2804        $button->setPrimary(
false);
 
 2805        $tpl->setCurrentBlock(
'buttons');
 
 2806        $tpl->setVariable(
'BUTTON', $button->render());
 
 2807        $tpl->parseCurrentBlock();
 
 2809        $tpl->setCurrentBlock(
'checkbox');
 
 2810        $tpl->setVariable(
'CONFIRMATION_CHECKBOX_NAME', 
'save_on_navigation_prevent_confirmation');
 
 2811        $tpl->setVariable(
'CONFIRMATION_CHECKBOX_LABEL', $this->lng->txt(
'tst_dont_show_msg_again_in_current_session'));
 
 2812        $tpl->parseCurrentBlock();
 
 2815        $modal->setId(
'tst_save_on_navigation_modal');
 
 2816        $modal->setHeading($this->lng->txt(
'save_on_navigation'));
 
 2817        $modal->setBody(
$tpl->get());
 
 2819        $this->tpl->setCurrentBlock(
'nav_while_edit_modal');
 
 2820        $this->tpl->setVariable(
'NAV_WHILE_EDIT_MODAL', $modal->getHTML());
 
 2821        $this->tpl->parseCurrentBlock();
 
 2827        require_once 
'Modules/Test/classes/class.ilTestPlayerConfirmationModal.php';
 
 2829        $modal->setModalId(
'tst_next_locks_unchanged_modal');
 
 2831        $modal->setHeaderText($this->lng->txt(
'tst_nav_next_locks_empty_answer_header'));
 
 2832        $modal->setConfirmationText($this->lng->txt(
'tst_nav_next_locks_empty_answer_confirm'));
 
 2834        $button = $modal->buildModalButtonInstance(
'tst_nav_next_empty_answer_button');
 
 2835        $button->setCaption(
'tst_proceed');
 
 2836        $button->setPrimary(
false);
 
 2837        $modal->addButton($button);
 
 2839        $button = $modal->buildModalButtonInstance(
'tst_cancel_next_empty_answer_button');
 
 2840        $button->setCaption(
'cancel');
 
 2841        $button->setPrimary(
true);
 
 2842        $modal->addButton($button);
 
 2844        $this->tpl->setCurrentBlock(
'next_locks_unchanged_modal');
 
 2845        $this->tpl->setVariable(
'NEXT_LOCKS_UNCHANGED_MODAL', $modal->getHTML());
 
 2846        $this->tpl->parseCurrentBlock();
 
 2855        require_once 
'Modules/Test/classes/class.ilTestPlayerConfirmationModal.php';
 
 2857        $modal->setModalId(
'tst_next_locks_changed_modal');
 
 2859        $modal->setHeaderText($this->lng->txt(
'tst_nav_next_locks_current_answer_header'));
 
 2860        $modal->setConfirmationText($this->lng->txt(
'tst_nav_next_locks_current_answer_confirm'));
 
 2862        $modal->setConfirmationCheckboxName(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM);
 
 2863        $modal->setConfirmationCheckboxLabel($this->lng->txt(
'tst_dont_show_msg_again_in_current_session'));
 
 2865        $button = $modal->buildModalButtonInstance(
'tst_nav_next_changed_answer_button');
 
 2866        $button->setCaption(
'tst_save_and_proceed');
 
 2867        $button->setPrimary(
true);
 
 2868        $modal->addButton($button);
 
 2870        $button = $modal->buildModalButtonInstance(
'tst_cancel_next_changed_answer_button');
 
 2871        $button->setCaption(
'cancel');
 
 2872        $button->setPrimary(
false);
 
 2873        $modal->addButton($button);
 
 2875        $this->tpl->setCurrentBlock(
'next_locks_changed_modal');
 
 2876        $this->tpl->setVariable(
'NEXT_LOCKS_CHANGED_MODAL', $modal->getHTML());
 
 2877        $this->tpl->parseCurrentBlock();
 
 2889        if (!isset(
$_SESSION[self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM])) {
 
 2902    protected function populateQuestionEditControl($questionGUI)
 
 2908        $state = $questionGUI->object->lookupForExistingSolutions($this->testSession->getActiveId(), $this->testSession->getPass());
 
 2909        $config[
'isAnswered'] = $state[
'authorized'];
 
 2919        if ($questionGUI->isAutosaveable() && $this->object->getAutosave()) {
 
 2921            $config[
'autosaveInterval'] = $this->
object->getAutosaveIval();
 
 2924            $config[
'autosaveInterval'] = 0;
 
 2929        $questionConfig = $questionGUI->object->getTestPresentationConfig();
 
 2933        $config[
'withFormChangeDetection'] = $questionConfig->isFormChangeDetectionEnabled();
 
 2936        $config[
'withBackgroundChangeDetection'] = $questionConfig->isBackgroundChangeDetectionEnabled();
 
 2940        $config[
'forcedInstantFeedback'] = $this->
object->isForceInstantFeedbackEnabled();
 
 2941        $config[
'nextQuestionLocks'] = $this->
object->isFollowupQuestionAnswerFixationEnabled();
 
 2943        $this->tpl->addJavascript(
'./Modules/Test/js/ilTestPlayerQuestionEditControl.js');
 
 2944        $this->tpl->addOnLoadCode(
'il.TestPlayerQuestionEditControl.init(' . json_encode(
$config) . 
')');
 
 2957        if (!isset(
$_SESSION[
'forced_feedback_navigation_url'])) {
 
 2958            $_SESSION[
'forced_feedback_navigation_url'] = array();
 
 2961        $_SESSION[
'forced_feedback_navigation_url'][$this->testSession->getActiveId()] = $forcedFeedbackNavUrl;
 
 2966        if (!isset(
$_SESSION[
'forced_feedback_navigation_url'])) {
 
 2970        if (!isset(
$_SESSION[
'forced_feedback_navigation_url'][$this->testSession->getActiveId()])) {
 
 2974        return $_SESSION[
'forced_feedback_navigation_url'][$this->testSession->getActiveId()];
 
 2984        if (isset(
$_SESSION[
'forced_feedback_navigation_url'][$this->testSession->getActiveId()])) {
 
 2985            unset(
$_SESSION[
'forced_feedback_navigation_url'][$this->testSession->getActiveId()]);
 
An exception for terminatinating execution or to throw for unit testing.
Multiple choice question GUI representation.
Basic GUI class for assessment questions.
getSolutionOutput( $active_id, $pass=null, $graphicalOutput=false, $result_output=false, $show_question_only=true, $show_feedback=false, $show_correct_solution=false, $show_manual_scoring=false, $show_question_text=true)
const PRESENTATION_CONTEXT_TEST
setNavigationGUI($navigationGUI)
outQuestionForTest( $formaction, $active_id, $pass, $is_question_postponed=false, $user_post_solutions=false, $show_specific_inline_feedback=false)
getQuestionHeaderBlockBuilder()
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
output question page
getSpecificFeedbackOutput($userSolution)
Returns the answer specific feedback for the question.
hasInlineFeedback()
this method can be overwritten per question type
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
Abstract basic class which is to be extended by the concrete assessment question type classes.
static _instantiateQuestion($question_id)
getTestPresentationConfig()
Get the test question configuration (initialised once)
const CSS_CLASS_FEEDBACK_WRONG
const CSS_CLASS_FEEDBACK_CORRECT
const CMD_CONFIRM_REQUEST
const CMD_SHOW_LIST
command constants
static _getCurrentGUI(ilObjTest $a_test_obj=null)
Get the GUI that is used for the currently available selector (other GUI instances may exist for conf...
Confirmation screen class.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static getInstance(ilTestSession $a_test_session)
static getInstance()
Get instance.
const DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
static _enabledAssessmentLogging()
check wether assessment logging is enabled or not
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static lookupExamId($active_id, $pass)
static _getUsePreviousAnswers($active_id, $user_active_user_setting=false)
Returns if the previous results should be hidden for a learner.
static allObligationsAnswered($test_id, $active_id, $pass)
checks wether all questions marked as obligatory were answered within the test pass with given testId...
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
static buildExamId($active_id, $pass, $test_obj_id=null)
static _getSolvedQuestions($active_id, $question_fi=null)
get solved questions
static get($a_var)
Get a value.
special template class to simplify handling of ITX/PEAR
Output class for assessment test evaluation.
Base Exception for all Exceptions relating to Modules/Test.
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
Class ilTestPassFinishTasks.
Output class for assessment test execution.
handleSkillTriggering(ilTestSession $testSession)
populateContentStyleBlock()
checkTestSessionUser(ilTestSession $testSession)
populateNextButtons($disabled, $primaryNext)
populateDiscardSolutionModal()
redirectAfterAutosaveCmd()
Redirect the user after an automatic save when the time limit is reached.
isShowingPostponeStatusReguired($questionId)
populateMessageContent($contentHTML)
saveTagsCmd()
Save tags for tagging gui.
initTestQuestionConfig(assQuestion $questionOBJ)
populateNextLocksChangedModal()
checkWorkingTimeCmd()
This is asynchronously called by tpl.workingtime.js to check for changes in the user's processing tim...
confirmHintRequestCmd()
Go to hint request confirmation.
__construct($a_object)
ilTestOutputGUI constructor
getNextCommandParameter()
removeIntermediateSolution()
remove an auto-saved solution of the current question
populateNextLocksUnchangedModal()
populateFeedbackBlockMessage(string $a_message)
autosaveOnTimeLimitCmd()
Automatically save a user answer when the limited duration of a test run is reached (called by synchr...
setAnswerChangedParameter($changed=true)
Set the 'answer changed' url parameter for generated links.
confirmFinishCmd()
The final submission of a test was confirmed.
isQuestionSummaryFinishTestButtonRequired()
getPresentationModeParameter()
buildEditableStateQuestionNavigationGUI($questionId, $charSelectorAvailable)
startPlayerCmd()
Start a test for the first time.
populateSolutionBlock($solutionoutput)
buildPreviousButtonInstance($disabled)
initProcessLocker($activeId)
prepareTestPage($presentationMode, $sequenceElement, $questionId)
isOptionalQuestionAnsweringConfirmationRequired($sequenceElement)
submitIntermediateSolutionCmd()
handleTearsAndAngerQuestionIsNull($questionId, $sequenceElement)
isNrOfTriesReached()
nr of tries exceeded
outObligationsOnlySummaryCmd()
const PRESENTATION_MODE_EDIT
populateLowerPreviousButtonBlock($disabled)
cancelAnswerOptionalQuestionsCmd()
handleQuestionActionCmd()
getQuestionInstance($questionId, $fromCache=true)
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
handlePasswordProtectionRedirect()
isFirstQuestionInSequence($sequenceElement)
populateGenericFeedbackBlock(assQuestionGUI $question_gui, $solutionCorrect)
getRegisteredForcedFeedbackNavUrl()
populateUpperPreviousButtonBlock($disabled)
getQuestionGuiInstance($question_id, $fromCache=true)
unmarkQuestionCmd()
Set a question unsolved.
showSideList($presentationMode, $currentSequenceElement)
const FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM
markQuestionAndSaveIntermediateCmd()
getCurrentSequenceElement()
populateSyntaxStyleBlock()
showMaximumAllowedUsersReachedMessage()
populateUpperNextButtonBlock($disabled, $primaryNext)
initTestCmd()
Start a test for the first time after a redirect.
populateInstantResponseModal(assQuestionGUI $questionGui, $navUrl)
endingTimeReached()
handle endingTimeReached
outQuestionSummaryCmd($fullpage=true, $contextFinishTest=false, $obligationsInfo=false, $obligationsFilter=false)
Output of a summary of all test questions for test participants.
maxProcessingTimeReached()
Outputs a message when the maximum processing time is reached.
showQuestionEditable(assQuestionGUI $questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse)
getInstantResponseParameter()
resumePlayerCmd()
Resume a test at the last position.
$maxProcessingTimeReached
unmarkQuestionAndSaveIntermediateCmd()
handleIntermediateSubmit()
Check the 'answer changed' parameter when a question form is intermediately submitted.
getIntroductionPageButtonLabel()
confirmSubmitAnswers()
confirm submit results if confirm then results are submitted and the screen will be redirected to the...
autosaveCmd()
Automatically save a user answer while working on the test (called repeatedly by asynchronous posts i...
getSequenceElementParameter()
performTestPassFinishedTasks($finishedPass)
ensureExistingTestSession(ilTestSession $testSession)
redirectAfterDashboardCmd()
determineInlineScoreDisplay()
populateScoreBlock($reachedPoints, $maxPoints)
updateWorkingTime()
updates working time and stores state saveresult to see if question has to be stored or not
populateHelperGuiContent($helperGui)
handleUserSettings()
Handles some form parameters on starting and resuming a test.
populateInstantResponseBlocks(assQuestionGUI $questionGui, $authorizedSolution)
getQuestionsDefaultPresentationMode($isQuestionWorkedThrough)
outCorrectSolution()
Creates an output of the solution of an answer compared to the correct solution.
showAnswerOptionalQuestionsConfirmation()
detectChangesCmd()
Detect changes sent in the background to the server This is called by ajax from ilTestPlayerQuestionE...
populateLowerNextButtonBlock($disabled, $primaryNext)
finishTestCmd($requires_confirmation=true)
getTestNavigationToolbarGUI()
markQuestionCmd()
Set a question solved.
populatePreviousButtons($disabled)
populateTestNavigationToolbar(ilTestNavigationToolbarGUI $toolbarGUI)
const PRESENTATION_MODE_VIEW
getNavigationUrlParameter()
setFollowUpQuestionLocksConfirmationPrevented()
isTestSignRedirectRequired($activeId, $lastFinishedPass)
populateFeedbackBlockHeader($withFocusAnchor)
populateNavWhenChangedModal()
confirmAnswerOptionalQuestionsCmd()
getAnswerChangedParameter()
Get the 'answer changed' status from the current request It may be set by ilTestPlayerNavigationContr...
determineSolutionPassIndex(assQuestionGUI $questionGui)
archiveParticipantSubmission($active, $pass)
populateCharSelectorIfRequired()
buildTestPassQuestionList()
isParticipantsAnswerFixed($questionId)
populateSpecificFeedbackBlock(assQuestionGUI $question_gui)
unregisterForcedFeedbackNavUrl()
showRequestedHintListCmd()
Go to requested hint list.
afterTestPassFinishedCmd()
isFollowUpQuestionLocksConfirmationPrevented()
outProcessingTime($active_id)
isMaxProcessingTimeReached()
Checks wheather the maximum processing time is reached or not.
resetSequenceElementParameter()
buildReadOnlyStateQuestionNavigationGUI($questionId)
setAnonymousIdCmd()
Sets a session variable with the test access code for an anonymous test user.
saveNavigationPreventConfirmation()
Save the save the switch to prevent the navigation confirmation.
outQuestionSummaryWithObligationsInfoCmd()
registerForcedFeedbackNavUrl($forcedFeedbackNavUrl)
isLastQuestionInSequence($sequenceElement)
checkOnlineTestAccess()
check access restrictions like client ip, partipating user etc.
populateQuestionNavigation($sequenceElement, $disabled, $primaryNext)
buildNextButtonInstance($disabled, $primaryNext)
toggleSideListCmd()
Toggle side list.
getNextSequenceParameter()
isTestAccessible()
test accessible returns true if the user can perform the test
showQuestionViewable(assQuestionGUI $questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse)
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting)
showListOfAnswers($active_id, $pass=null, $top_data="", $bottom_data="")
Creates an output of the list of answers for a test participant during the test (only the actual pass...
isForcedFeedbackNavUrlRegistered()
outUserResultsOverviewCmd()
const REDIRECT_ON_TIME_LIMIT
const AUTO_SAVE_ON_TIME_LIMIT
const SHOW_INSTANT_RESPONSE
const QUESTION_SUMMARY_INC_OBLIGATIONS
const BACK_TO_INFO_SCREEN
const AFTER_TEST_PASS_FINISHED
const SHOW_FINAL_STATMENT
const ACCESS_CODE_CONFIRMED
const CONFIRM_HINT_REQUEST
const DISPLAY_ACCESS_CODE
const UNMARK_QUESTION_SAVE
const SHOW_REQUESTED_HINTS_LIST
const BACK_FROM_FINISHING
const QUESTION_SUMMARY_OBLIGATIONS_ONLY
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCorrectSolutionOutput($question_id, $active_id, $pass, ilTestQuestionRelatedObjectivesList $objectivesList=null)
Returns an output of the solution to an answer compared to the correct solution.
getObjectiveOrientedContainer()
getResultsSignature()
Returns HTML code for a signature field.
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, $overwrite_anonymity=false)
Returns the user data for a test results output.
buildQuestionAnswerShuffler(string $question_id, string $active_id, string $active_pass)
static getWebspaceDir($mode="filesystem")
get webspace directory
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)
foreach($_POST as $key=> $value) $res