19require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
82 $this->ref_id = $this->testrequest->getRefId();
85 $rbacsystem =
$DIC[
'rbacsystem'];
90 $this->processLocker =
null;
91 $this->testSession =
null;
92 $this->assSettings =
null;
98 $rbacsystem =
$DIC[
'rbacsystem'];
100 if (!$rbacsystem->checkAccess(
"read", $this->object->getRefId())) {
102 $this->
ilias->raiseError($this->
lng->txt(
"cannot_execute_test"), $this->ilias->error_obj->MESSAGE);
108 $executable = $this->
object->isExecutable($this->testSession, $this->testSession->getUserId());
110 if (!$executable[
'executable']) {
111 $this->tpl->setOnScreenMessage(
'info', $executable[
'errormessage'],
true);
112 $this->
ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
121 throw new ilTestException(
'active id given does not relate to current user!');
151 $this->processLocker = $processLockerFactory->withContextId((
int) $activeId)->getLocker();
163 $tagging_gui->setObject($this->
object->getId(), $this->object->getType());
164 $tagging_gui->saveInput();
165 $this->
ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
174 $this->
object->updateWorkingTime(
ilSession::get(
"active_time_id"));
179 $this->
object->startWorkingTime(
180 $this->testSession->getActiveId(),
181 $this->testSession->getPass()
195 $this->testSession->getActiveId(),
196 $this->testSession->getPass()
210 $this->
ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
224 $active_id = $this->testSession->getActiveId();
225 $starting_time = $this->
object->getStartingTimeOfUser($active_id);
226 if ($starting_time ===
false) {
229 return $this->
object->isMaxProcessingTimeReached($starting_time, $active_id);
235 $show_question_inline_score =
false;
236 if ($this->
object->getAnswerFeedbackPoints()) {
237 $show_question_inline_score =
true;
238 return $show_question_inline_score;
240 return $show_question_inline_score;
245 $this->tpl->setCurrentBlock(
'test_nav_toolbar');
246 $this->tpl->setVariable(
'TEST_NAV_TOOLBAR', $toolbarGUI->getHTML());
247 $this->tpl->parseCurrentBlock();
276 $button->setId(
'bottomnextbutton');
278 $this->tpl->setCurrentBlock(
"next_bottom");
279 $this->tpl->setVariable(
"BTN_NEXT_BOTTOM", $button->render());
280 $this->tpl->parseCurrentBlock();
286 $button->setId(
'nextbutton');
288 $this->tpl->setCurrentBlock(
"next");
289 $this->tpl->setVariable(
"BTN_NEXT", $button->render());
290 $this->tpl->parseCurrentBlock();
296 $button->setId(
'bottomprevbutton');
298 $this->tpl->setCurrentBlock(
"prev_bottom");
299 $this->tpl->setVariable(
"BTN_PREV_BOTTOM", $button->render());
300 $this->tpl->parseCurrentBlock();
306 $button->setId(
'prevbutton');
308 $this->tpl->setCurrentBlock(
"prev");
309 $this->tpl->setVariable(
"BTN_PREV", $button->render());
310 $this->tpl->parseCurrentBlock();
322 $button->setPrimary($primaryNext);
323 $button->setRightGlyph(
'glyphicon glyphicon-arrow-right');
327 $button->setCaption(
'next_question');
328 $button->addCSSClass(
'ilTstNavElem');
341 $button->setLeftGlyph(
'glyphicon glyphicon-arrow-left');
345 $button->setCaption(
'previous_question');
346 $button->addCSSClass(
'ilTstNavElem');
356 $solutionValues = $question_gui->object->getSolutionValues(
357 $this->testSession->getActiveId(),
362 $question_gui->object->fetchIndexedValuesFromValuePairs($solutionValues)
365 if (!empty($feedback)) {
366 $this->tpl->setCurrentBlock(
"specific_feedback");
367 $this->tpl->setVariable(
"SPECIFIC_FEEDBACK", $feedback);
368 $this->tpl->parseCurrentBlock();
380 $feedback = $question_gui->
getGenericFeedbackOutput($this->testSession->getActiveId(), $this->testSession->getPass());
382 if (strlen($feedback)) {
388 $this->tpl->setCurrentBlock(
"answer_feedback");
389 $this->tpl->setVariable(
"ANSWER_FEEDBACK", $feedback);
390 $this->tpl->setVariable(
"ILC_FB_CSS_CLASS", $cssClass);
391 $this->tpl->parseCurrentBlock();
399 $scoreInformation = sprintf(
400 $this->
lng->txt(
"you_received_a_of_b_points"),
405 $this->tpl->setCurrentBlock(
"received_points_information");
406 $this->tpl->setVariable(
"RECEIVED_POINTS_INFORMATION", $scoreInformation);
407 $this->tpl->parseCurrentBlock();
412 if (strlen($solutionoutput)) {
413 $this->tpl->setCurrentBlock(
"solution_output");
414 $this->tpl->setVariable(
"CORRECT_SOLUTION", $this->
lng->txt(
"tst_best_solution_is"));
415 $this->tpl->setVariable(
"QUESTION_FEEDBACK", $solutionoutput);
416 $this->tpl->parseCurrentBlock();
422 $this->tpl->setCurrentBlock(
"SyntaxStyle");
423 $this->tpl->setVariable(
424 "LOCATION_SYNTAX_STYLESHEET",
427 $this->tpl->parseCurrentBlock();
432 $this->tpl->setCurrentBlock(
"ContentStyle");
433 $this->tpl->setVariable(
434 "LOCATION_CONTENT_STYLESHEET",
437 $this->tpl->parseCurrentBlock();
447 if ($this->testSession->isAnonymousUser()) {
448 $this->testSession->setAccessCodeToSession($_POST[
'anonymous_id']);
451 $this->
ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
463 $isFirstTestStartRequest =
false;
465 $this->processLocker->executeTestStartLockOperation(
function () use ($testStartLock, &$isFirstTestStartRequest) {
466 if ($this->testSession->lookupTestStartLock() != $testStartLock) {
467 $this->testSession->persistTestStartLock($testStartLock);
468 $isFirstTestStartRequest = true;
472 if ($isFirstTestStartRequest) {
477 $this->
ctrl->setParameterByClass(
'ilObjTestGUI',
'lock', $testStartLock);
478 $this->
ctrl->redirectByClass(
"ilobjtestgui",
"redirectToInfoScreen");
483 if ($this->testrequest->isset(
'lock') && strlen($this->testrequest->raw(
'lock'))) {
484 return $this->testrequest->raw(
'lock');
500 if ($this->
object->checkMaximumAllowedUsers() ==
false) {
505 if ($this->testSession->isAnonymousUser()
506 && !$this->testSession->doesAccessCodeInSessionExists()) {
507 $accessCode = $this->testSession->createNewAccessCode();
509 $this->testSession->setAccessCodeToSession($accessCode);
510 $this->testSession->setAnonymousId($accessCode);
511 $this->testSession->saveToDb();
516 if (!$this->testSession->isAnonymousUser()) {
517 $this->testSession->unsetAccessCodeInSession();
524 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_anonymous_code_presentation.html",
"Modules/Test");
525 $this->tpl->setCurrentBlock(
"adm_content");
526 $this->tpl->setVariable(
"TEXT_ANONYMOUS_CODE_CREATED", $this->
lng->txt(
"tst_access_code_created"));
527 $this->tpl->setVariable(
"TEXT_ANONYMOUS_CODE", $this->testSession->getAccessCodeFromSession());
528 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this));
530 $this->tpl->setVariable(
"TXT_CONFIRM", $this->
lng->txt(
"continue_work"));
531 $this->tpl->parseCurrentBlock();
548 $request =
$DIC->http()->request();
552 $tst_javascript = array_key_exists(
"chb_javascript",
$post_array) ? 1 : 0;
553 $ilUser->writePref(
"tst_javascript", $tst_javascript);
555 if ($this->
object->getNrOfTries() != 1
556 && $this->object->getUsePreviousAnswers() == 1
558 $chb_use_previous_answers = array_key_exists(
"chb_use_previous_answers",
$post_array) ? 1 : 0;
559 $ilUser->writePref(
"tst_use_previous_answers", $chb_use_previous_answers);
569 $active_id = $this->testSession->getActiveId();
576 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_redirect_autosave.html",
"Modules/Test");
577 $this->tpl->setVariable(
"TEXT_REDIRECT", $this->
lng->txt(
"redirectAfterSave"));
578 $this->tpl->setVariable(
"URL",
$url);
583 $active_id = $this->testSession->getActiveId();
588 $this->testSession->setLastFinishedPass($this->testSession->getPass());
589 $this->testSession->increaseTestPass();
593 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_redirect_autosave.html",
"Modules/Test");
594 $this->tpl->setVariable(
"TEXT_REDIRECT", $this->
lng->txt(
"redirectAfterSave"));
595 $this->tpl->setVariable(
"URL",
$url);
607 if (is_countable($_POST) && count($_POST) > 0) {
609 $result =
'-IGNORE-';
615 $result = $this->
lng->txt(
"autosave_success");
617 $result = $this->
lng->txt(
"autosave_failed");
648 $this->testSession->getActiveId(),
649 $this->testSession->getPass()
652 $result[
'isAnswered'] = $state[
'authorized'];
653 $result[
'isAnswerChanged'] = $state[
'intermediate'];
655 echo json_encode($result);
677 $show_side_list =
$ilUser->getPref(
'side_list_of_questions');
678 $ilUser->writePref(
'side_list_of_questions', !$show_side_list);
695 $questionId = $this->testSequence->getQuestionForSequence(
699 $this->
object->setQuestionSetSolved(1, $questionId, $this->testSession->getUserId());
717 $questionId = $this->testSequence->getQuestionForSequence(
721 $this->
object->setQuestionSetSolved(0, $questionId, $this->testSession->getUserId());
737 protected function confirmFinishTestCmd()
746 $confirmation->setFormAction($this->
ctrl->getFormAction($this,
'confirmFinish'));
747 $confirmation->setHeaderText($this->
lng->txt(
"tst_finish_confirmation_question"));
748 $confirmation->setConfirm($this->
lng->txt(
"tst_finish_confirm_button"),
'confirmFinish');
756 $this->handleCheckTestPassValid();
759 $active_id = $this->testSession->getActiveId();
777 if ($this->
object->areObligationsEnabled() && !$allObligationsAnswered) {
778 if ($this->
object->getListOfQuestions()) {
788 if ($this->
object->getEnableExamview() && !$this->testrequest->isset(
'reviewed') && $requires_confirmation) {
789 $this->
ctrl->redirectByClass(
'ilTestSubmissionReviewGUI',
"show");
794 if (($requires_confirmation) && ($actualpass == $this->
object->getNrOfTries() - 1)) {
796 $this->confirmFinishTestCmd();
801 if (($actualpass == $this->
object->getNrOfTries() - 1) && (!$requires_confirmation)) {
803 #$ilAuth->setIdle(ilSession::getIdleValue(), false);
804 #$ilAuth->setExpire(0);
805 switch ($this->
object->getMailNotification()) {
807 $this->
object->sendSimpleNotification($active_id);
810 $this->
object->sendAdvancedNotification($active_id);
818 if ($this->
object->getMailNotificationType() == 1) {
819 switch ($this->
object->getMailNotification()) {
821 $this->
object->sendSimpleNotification($active_id);
824 $this->
object->sendAdvancedNotification($active_id);
840 $finishTasks->performFinishTasks($this->processLocker);
845 $activeId = $this->testSession->getActiveId();
846 $lastFinishedPass = $this->testSession->getLastFinishedPass();
849 if ($this->isTestSignRedirectRequired($activeId, $lastFinishedPass)) {
850 $this->
ctrl->redirectByClass(
'ilTestSignatureGUI',
'invokeSignaturePlugin');
854 if (!$this->testrequest->isset(
'skipfinalstatement')) {
855 if ($this->
object->getShowFinalStatement()) {
861 $redirection_mode = $this->
object->getRedirectionMode();
862 $redirection_url = $this->
object->getRedirectionUrl();
863 if ($redirection_url && $redirection_mode) {
865 if ($this->
object->getKioskMode()) {
877 protected function isTestSignRedirectRequired($activeId, $lastFinishedPass): bool
879 if (!$this->
object->getSignSubmission()) {
883 if (!is_null(
ilSession::get(
"signed_{$activeId}_{$lastFinishedPass}"))) {
889 $component_repository =
$DIC[
"component.repository"];
890 return $component_repository->getPluginSlotById(
"tsig")->hasActivePlugins();
901 $ilObjDataCache =
$DIC[
'ilObjDataCache'];
905 $objectivesList =
null;
908 $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
915 $objectivesList->loadObjectivesTitles();
917 $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
918 $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
919 $testResultHeaderLabelBuilder->setTestObjId($this->
object->getId());
920 $testResultHeaderLabelBuilder->setTestRefId($this->
object->getRefId());
921 $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
924 $results = $this->
object->getTestResult(
932 $results_output = $testevaluationgui->getPassListOfAnswers(
942 $testResultHeaderLabelBuilder
951 if (!is_dir(
$path)) {
954 $filename = realpath(
$path) .
'/exam_N' . $inst_id .
'-' . $this->
object->getId()
955 .
'-' . $active .
'-' . $pass .
'.pdf';
960 $archiver->handInParticipantSubmission($active, $pass,
$filename, $results_output);
966 $questions = $this->
object->getQuestions();
967 foreach ($questions as $question_id) {
968 $question_object = $this->
object->getQuestionDataset($question_id);
969 if ($question_object->type_tag ==
'assFileUpload') {
988 $handle = opendir($candidate_path);
989 while ($handle !=
false && ($file = readdir($handle)) !==
false) {
991 $filename_start =
'file_' . $active .
'_' . $pass .
'_';
993 if (strpos($file, $filename_start) === 0) {
994 $archiver->handInParticipantQuestionMaterial($active, $pass, $question_id, $file, $file);
1000 $passdata = $this->
object->getTestResult(
1006 $overview = $testevaluationgui->getPassListOfAnswers(
1016 $testResultHeaderLabelBuilder
1020 $archiver->handInTestResult($active, $pass,
$filename);
1028 $testPassesSelector->setActiveId($this->testSession->getActiveId());
1029 $testPassesSelector->setLastFinishedPass($this->testSession->getLastFinishedPass());
1031 if (count($testPassesSelector->getReportablePasses())) {
1033 $this->
ctrl->redirectByClass(array(
'ilTestResultsGUI',
'ilTestEvalObjectiveOrientedGUI'));
1036 $this->
ctrl->redirectByClass(array(
'ilTestResultsGUI',
'ilMyTestResultsGUI',
'ilTestEvaluationGUI'));
1044 $this->
ctrl->redirectByClass(
'ilObjTestGUI',
'redirectToInfoScreen');
1050 public function showFinalStatementCmd()
1054 $DIC->globalScreen()->tool()->context()->current()->getAdditionalData()->replace(
1056 $this->
object->getTitle() .
' - ' . $this->lng->txt(
'final_statement')
1059 $template =
new ilTemplate(
"tpl.il_as_tst_final_statement.html",
true,
true,
"Modules/Test");
1060 $this->
ctrl->setParameter($this,
"skipfinalstatement", 1);
1062 $template->setVariable(
"FINALSTATEMENT", $this->
object->prepareTextareaOutput($this->object->getFinalStatement(),
true));
1063 $template->setVariable(
"BUTTON_CONTINUE", $this->
lng->txt(
"btn_next"));
1074 $this->tpl->addCSS(
'Modules/Test/templates/default/test_kiosk_header.css');
1077 $template =
new ilTemplate(
'tpl.il_as_tst_kiosk_head.html',
true,
true,
'Modules/Test');
1078 if ($this->
object->getShowKioskModeTitle()) {
1079 $template->setCurrentBlock(
"kiosk_show_title");
1080 $template->setVariable(
"TEST_TITLE", $this->
object->getTitle());
1081 $template->parseCurrentBlock();
1083 if ($this->
object->getShowKioskModeParticipant()) {
1084 $template->setCurrentBlock(
"kiosk_show_participant");
1085 $template->setVariable(
"PARTICIPANT_NAME_TXT", $this->
lng->txt(
"login_as"));
1086 $template->setVariable(
"PARTICIPANT_NAME",
$ilUser->getFullname());
1087 $template->setVariable(
"PARTICIPANT_LOGIN",
$ilUser->getLogin());
1088 $template->setVariable(
"PARTICIPANT_MATRICULATION",
$ilUser->getMatriculation());
1089 $template->setVariable(
"PARTICIPANT_EMAIL",
$ilUser->getEmail());
1090 $template->parseCurrentBlock();
1092 if ($this->
object->isShowExamIdInTestPassEnabled()) {
1094 $this->testSession->getActiveId(),
1095 $this->testSession->getPass(),
1096 $this->object->getId()
1099 $template->setCurrentBlock(
"kiosk_show_exam_id");
1100 $template->setVariable(
"EXAM_ID_TXT", $this->
lng->txt(
"exam_id"));
1101 $template->setVariable(
"EXAM_ID", $exam_id);
1102 $template->parseCurrentBlock();
1104 return $template->get();
1111 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
1113 $ilNavigationHistory->addItem(
1114 $this->testSession->getRefId(),
1128 if ($this->
object->endingTimeReached()) {
1134 $this->
ctrl->setParameter($this,
"sequence", $sequenceElement);
1139 if ($this->
object->getKioskMode()) {
1143 $this->tpl->setVariable(
"TEST_ID", (
string) $this->
object->getTestId());
1144 $this->tpl->setVariable(
"LOGIN",
$ilUser->getLogin());
1145 $this->tpl->setVariable(
"SEQ_ID", $sequenceElement);
1146 $this->tpl->setVariable(
"QUEST_ID", $questionId);
1148 if ($this->
object->getEnableProcessingTime()) {
1152 $this->tpl->setVariable(
"PAGETITLE",
"- " . $this->
object->getTitle());
1154 if ($this->
object->isShowExamIdInTestPassEnabled() && !$this->object->getKioskMode()) {
1155 $this->tpl->setCurrentBlock(
'exam_id_footer');
1157 $this->testSession->getActiveId(),
1158 $this->testSession->getPass(),
1159 $this->object->getId()
1161 $this->tpl->setVariable(
'EXAM_ID_TXT', $this->
lng->txt(
'exam_id'));
1162 $this->tpl->parseCurrentBlock();
1165 if ($this->
object->getListOfQuestions()) {
1166 $this->
showSideList($presentationMode, $sequenceElement);
1177 $questionNavigationGUI->setQuestionWorkedThrough($isQuestionWorkedThrough);
1184 $answerFeedbackEnabled = (
1185 $instantResponse && $this->
object->getSpecificAnswerFeedback()
1189 $this->testSession->getActiveId(), #active_id
1190 $this->testSession->getPass(), #pass
1191 false, #graphical_output
1192 false, #result_output
1193 true, #show_question_only
1194 $answerFeedbackEnabled, #show_feedback
1195 false, #show_correct_solution
1196 false, #show_manual_scoring
1197 true #show_question_text
1203 $this->testSession->getActiveId(),
1210 $f =
$DIC->ui()->factory();
1211 $renderer =
$DIC->ui()->renderer();
1213 $this->tpl->setVariable(
1214 'LOCKSTATE_INFOBOX',
1215 $renderer->render(
$f->messageBox()->info($this->lng->txt(
"tst_player_answer_saved_and_locked")))
1217 $this->tpl->parseCurrentBlock();
1219 $this->tpl->setVariable(
'QUESTION_OUTPUT', $pageoutput);
1221 $this->tpl->setVariable(
"FORMACTION", $formAction);
1222 $this->tpl->setVariable(
"ENCTYPE",
'enctype="' . $questionGui->
getFormEncodingType() .
'"');
1223 $this->tpl->setVariable(
"FORM_TIMESTAMP", time());
1229 $questionGui->object->getId(),
1230 $this->populateCharSelectorIfRequired()
1232 if ($isQuestionWorkedThrough) {
1233 $questionNavigationGUI->setDiscardSolutionButtonEnabled(
true);
1237 } elseif ($this->
object->isPostponingEnabled()) {
1238 $questionNavigationGUI->setSkipQuestionLinkTarget(
1246 $answerFeedbackEnabled = (
1247 $instantResponse && $this->
object->getSpecificAnswerFeedback()
1250 if ($this->testrequest->isset(
'save_error') && $this->testrequest->raw(
'save_error') == 1 &&
ilSession::get(
'previouspost') !=
null) {
1254 $userPostSolution =
false;
1262 $qstConfig = $questionGui->object->getTestPresentationConfig();
1265 $qstConfig->setWorkedThrough($isQuestionWorkedThrough);
1268 if ($qstConfig->isPreviousPassSolutionReuseAllowed()) {
1270 if ($passIndex < $this->testSession->getPass()) {
1271 $qstConfig->setSolutionInitiallyPrefilled(
true);
1274 $passIndex = $this->testSession->getPass();
1281 $formAction, #form_action
1282 $this->testSession->getActiveId(), #active_id
1286 $isPostponed, #is_postponed
1287 $userPostSolution, #user_post_solution
1288 $answerFeedbackEnabled #answer_feedback == inline_specific_feedback
1299 $this->populateQuestionEditControl($questionGui);
1306 if ($this->
object->isPreviousSolutionReuseEnabled($this->testSession->getActiveId())) {
1307 $currentSolutionAvailable = $questionGui->object->authorizedOrIntermediateSolutionExists(
1308 $this->testSession->getActiveId(),
1309 $this->testSession->getPass()
1312 if (!$currentSolutionAvailable) {
1313 $previousPass = $questionGui->object->getSolutionMaxPass(
1314 $this->testSession->getActiveId()
1317 $previousSolutionAvailable = $questionGui->object->authorizedSolutionExists(
1318 $this->testSession->getActiveId(),
1322 if ($previousSolutionAvailable) {
1323 return $previousPass;
1329 return $this->testSession->getPass();
1344 $this->
ctrl->saveParameter($this,
'sequence');
1367 $user = $this->
object->getInvitedUsers(
$ilUser->getId());
1368 if (!is_array($user) || count($user) != 1) {
1369 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"user_not_invited"),
true);
1370 $this->
ctrl->redirectByClass(
"ilobjtestgui",
"backToRepository");
1373 $user = array_pop($user);
1375 if (strcmp($user[
"clientip"],
"") != 0 && strcmp($user[
"clientip"],
$_SERVER[
"REMOTE_ADDR"]) != 0) {
1376 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"user_wrong_clientip"),
true);
1377 $this->
ctrl->redirectByClass(
"ilobjtestgui",
"backToRepository");
1389 and $this->
object->startingTimeReached()
1390 and !$this->
object->endingTimeReached();
1398 return $this->
object->hasNrOfTriesRestriction() && $this->
object->isNrOfTriesReached($this->testSession->getPass());
1409 $this->testSession->increasePass();
1410 $this->testSession->setLastSequence(0);
1411 $this->testSession->saveToDb();
1435 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_submit_answers_confirm.html",
"Modules/Test");
1436 $this->tpl->setCurrentBlock(
"adm_content");
1437 if ($this->
object->isTestFinished($this->testSession->getActiveId())) {
1438 $this->tpl->setCurrentBlock(
"not_submit_allowed");
1439 $this->tpl->setVariable(
"TEXT_ALREADY_SUBMITTED", $this->
lng->txt(
"tst_already_submitted"));
1440 $this->tpl->setVariable(
"BTN_OK", $this->
lng->txt(
"tst_show_answer_sheet"));
1442 $this->tpl->setCurrentBlock(
"submit_allowed");
1443 $this->tpl->setVariable(
"TEXT_CONFIRM_SUBMIT_RESULTS", $this->
lng->txt(
"tst_confirm_submit_answers"));
1444 $this->tpl->setVariable(
"BTN_OK", $this->
lng->txt(
"tst_submit_results"));
1446 $this->tpl->setVariable(
"BTN_BACK", $this->
lng->txt(
"back"));
1447 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this,
"finalSubmission"));
1448 $this->tpl->parseCurrentBlock();
1456 $starting_time = $this->
object->getStartingTimeOfUser($active_id);
1457 $processing_time = $this->
object->getProcessingTimeInSeconds($active_id);
1458 $processing_time_minutes = floor($processing_time / 60);
1459 $processing_time_seconds = $processing_time - $processing_time_minutes * 60;
1460 $str_processing_time =
"";
1461 if ($processing_time_minutes > 0) {
1462 $str_processing_time = $processing_time_minutes .
" " . ($processing_time_minutes == 1 ? $this->
lng->txt(
"minute") : $this->
lng->txt(
"minutes"));
1464 if ($processing_time_seconds > 0) {
1465 if (strlen($str_processing_time) > 0) {
1466 $str_processing_time .=
" " . $this->
lng->txt(
"and") .
" ";
1468 $str_processing_time .= $processing_time_seconds .
" " . ($processing_time_seconds == 1 ? $this->
lng->txt(
"second") : $this->
lng->txt(
"seconds"));
1470 $time_left = $starting_time + $processing_time - time();
1471 $time_left_minutes = floor($time_left / 60);
1472 $time_left_seconds = $time_left - $time_left_minutes * 60;
1473 $str_time_left =
"";
1474 if ($time_left_minutes > 0) {
1475 $str_time_left = $time_left_minutes .
" " . ($time_left_minutes == 1 ? $this->
lng->txt(
"minute") : $this->
lng->txt(
"minutes"));
1477 if ($time_left < 300) {
1478 if ($time_left_seconds > 0) {
1479 if (strlen($str_time_left) > 0) {
1480 $str_time_left .=
" " . $this->
lng->txt(
"and") .
" ";
1482 $str_time_left .= $time_left_seconds .
" " . ($time_left_seconds == 1 ? $this->
lng->txt(
"second") : $this->
lng->txt(
"seconds"));
1485 $date = getdate($starting_time);
1487 $datenow = getdate();
1488 $this->tpl->setCurrentBlock(
"enableprocessingtime");
1489 $this->tpl->setVariable(
1490 "USER_WORKING_TIME",
1492 $this->
lng->txt(
"tst_time_already_spent"),
1493 $formattedStartingTime,
1494 $str_processing_time
1497 $this->tpl->setVariable(
"USER_REMAINING_TIME", sprintf($this->
lng->txt(
"tst_time_already_spent_left"), $str_time_left));
1498 $this->tpl->parseCurrentBlock();
1502 $template =
new ilTemplate(
"tpl.workingtime.js",
true,
true,
'Modules/Test');
1503 $template->setVariable(
"STRING_MINUTE", $this->
lng->txt(
"minute"));
1504 $template->setVariable(
"STRING_MINUTES", $this->
lng->txt(
"minutes"));
1505 $template->setVariable(
"STRING_SECOND", $this->
lng->txt(
"second"));
1506 $template->setVariable(
"STRING_SECONDS", $this->
lng->txt(
"seconds"));
1507 $template->setVariable(
"STRING_TIMELEFT", $this->
lng->txt(
"tst_time_already_spent_left"));
1508 $template->setVariable(
"AND", strtolower($this->
lng->txt(
"and")));
1509 $template->setVariable(
"YEAR", $date[
"year"]);
1510 $template->setVariable(
"MONTH", $date[
"mon"] - 1);
1511 $template->setVariable(
"DAY", $date[
"mday"]);
1512 $template->setVariable(
"HOUR", $date[
"hours"]);
1513 $template->setVariable(
"MINUTE", $date[
"minutes"]);
1514 $template->setVariable(
"SECOND", $date[
"seconds"]);
1515 if ($this->
object->isEndingTimeEnabled()) {
1517 preg_match(
"/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $date_time->get(
IL_CAL_TIMESTAMP), $matches);
1518 if (!empty($matches)) {
1519 $template->setVariable(
"ENDYEAR", $matches[1]);
1520 $template->setVariable(
"ENDMONTH", $matches[2] - 1);
1521 $template->setVariable(
"ENDDAY", $matches[3]);
1522 $template->setVariable(
"ENDHOUR", $matches[4]);
1523 $template->setVariable(
"ENDMINUTE", $matches[5]);
1524 $template->setVariable(
"ENDSECOND", $matches[6]);
1527 $template->setVariable(
"YEARNOW", $datenow[
"year"]);
1528 $template->setVariable(
"MONTHNOW", $datenow[
"mon"] - 1);
1529 $template->setVariable(
"DAYNOW", $datenow[
"mday"]);
1530 $template->setVariable(
"HOURNOW", $datenow[
"hours"]);
1531 $template->setVariable(
"MINUTENOW", $datenow[
"minutes"]);
1532 $template->setVariable(
"SECONDNOW", $datenow[
"seconds"]);
1533 $template->setVariable(
"PTIME_M", $processing_time_minutes);
1534 $template->setVariable(
"PTIME_S", $processing_time_seconds);
1535 if ($this->
ctrl->getCmd() ==
'outQuestionSummary') {
1536 $template->setVariable(
"REDIRECT_URL", $this->
ctrl->getFormAction($this,
'redirectAfterDashboardCmd'));
1538 $template->setVariable(
"REDIRECT_URL",
"");
1540 $template->setVariable(
"CHECK_URL", $this->
ctrl->getLinkTarget($this,
'checkWorkingTime',
'',
true));
1541 $this->tpl->addOnLoadCode($template->get());
1553 $active_id = $this->testSession->getActiveId();
1554 echo (
string) $this->
object->getProcessingTimeInSeconds($active_id);
1558 protected function showSideList($presentationMode, $currentSequenceElement)
1563 $sideListActive =
$ilUser->getPref(
'side_list_of_questions');
1565 if ($sideListActive) {
1566 $questionSummaryData = $this->service->getQuestionSummaryData($this->testSequence,
false);
1569 $questionSideListGUI->setTargetGUI($this);
1570 $questionSideListGUI->setQuestionSummaryData($questionSummaryData);
1571 $questionSideListGUI->setCurrentSequenceElement($currentSequenceElement);
1574 $questionSideListGUI->setDisabled(
false);
1578 $this->tpl->setVariable(
'LIST_OF_QUESTIONS', $questionSideListGUI->getHTML());
1587 public function outQuestionSummaryCmd($fullpage =
true, $contextFinishTest =
false, $obligationsInfo =
false, $obligationsFilter =
false)
1590 $help =
$DIC->help();
1592 $help->setScreenIdComponent(
"tst");
1593 $help->setScreenId(
"assessment");
1594 $help->setSubScreenId(
"question_summary");
1596 $DIC->globalScreen()->tool()->context()->current()->getAdditionalData()->replace(
1598 $this->
getObject()->getTitle() .
' - ' . $this->
lng->txt(
'question_summary')
1602 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_question_summary.html",
"Modules/Test");
1607 $this->testSession->getActiveId(),
1608 $this->testSession->getPass()
1611 if ($obligationsInfo && $this->
object->areObligationsEnabled() && !$obligationsFulfilled) {
1612 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'not_all_obligations_answered'));
1615 if ($this->
object->getKioskMode() && $fullpage) {
1617 if (strlen($head)) {
1618 $this->tpl->setCurrentBlock(
"kiosk_options");
1619 $this->tpl->setVariable(
"KIOSK_HEAD", $head);
1620 $this->tpl->parseCurrentBlock();
1625 $active_id = $this->testSession->getActiveId();
1626 $questionSummaryData = $this->service->getQuestionSummaryData($this->testSequence, $obligationsFilter);
1628 $this->
ctrl->setParameter($this,
"sequence", $this->testrequest->raw(
"sequence"));
1633 $table_gui->setShowPointsEnabled(!$this->
object->getTitleOutput());
1634 $table_gui->setShowMarkerEnabled($this->
object->getShowMarker());
1635 $table_gui->setObligationsNotAnswered(!$obligationsFulfilled);
1636 $table_gui->setShowObligationsEnabled($this->
object->areObligationsEnabled());
1637 $table_gui->setObligationsFilterEnabled($obligationsFilter);
1642 $table_gui->setData($questionSummaryData);
1644 $this->tpl->setVariable(
'TABLE_LIST_OF_QUESTIONS', $table_gui->getHTML());
1646 if ($this->
object->getEnableProcessingTime()) {
1650 if ($this->
object->isShowExamIdInTestPassEnabled()) {
1651 $this->tpl->setCurrentBlock(
'exam_id_footer');
1653 $this->testSession->getActiveId(),
1654 $this->testSession->getPass(),
1655 $this->object->getId()
1657 $this->tpl->setVariable(
'EXAM_ID_TXT', $this->
lng->txt(
'exam_id'));
1658 $this->tpl->parseCurrentBlock();
1675 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_max_allowed_users_reached.html",
"Modules/Test");
1676 $this->tpl->setCurrentBlock(
"adm_content");
1677 $this->tpl->setVariable(
"MAX_ALLOWED_USERS_MESSAGE", sprintf($this->
lng->txt(
"tst_max_allowed_users_message"), $this->object->getAllowedUsersTimeGap()));
1678 $this->tpl->setVariable(
"MAX_ALLOWED_USERS_HEADING", sprintf($this->
lng->txt(
"tst_max_allowed_users_heading"), $this->object->getAllowedUsersTimeGap()));
1680 $this->tpl->setVariable(
"TXT_BACK_TO_INFOSCREEN", $this->
lng->txt(
"tst_results_back_introduction"));
1681 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this));
1682 $this->tpl->parseCurrentBlock();
1697 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_correct_solution.html",
"Modules/Test");
1699 $this->tpl->setCurrentBlock(
"ContentStyle");
1701 $this->tpl->parseCurrentBlock();
1703 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1705 $this->tpl->parseCurrentBlock();
1708 if ($this->
object->getShowSolutionAnswersOnly()) {
1712 $this->tpl->setCurrentBlock(
"adm_content");
1713 $solution = $this->
getCorrectSolutionOutput($this->testrequest->raw(
"evaluation"), $this->testrequest->raw(
"active_id"), $this->testrequest->raw(
"pass"));
1714 $this->tpl->setVariable(
"OUTPUT_SOLUTION", $solution);
1715 $this->tpl->setVariable(
"TEXT_BACK", $this->
lng->txt(
"back"));
1716 $this->
ctrl->saveParameter($this,
"pass");
1717 $this->
ctrl->saveParameter($this,
"active_id");
1718 $this->tpl->setVariable(
"URL_BACK", $this->
ctrl->getLinkTarget($this,
"outUserResultsOverview"));
1719 $this->tpl->parseCurrentBlock();
1736 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_finish_list_of_answers.html",
"Modules/Test");
1738 $result_array = &$this->
object->getTestResult(
1747 foreach ($result_array as $question_data) {
1748 $question = $question_data[
"qid"];
1749 if (is_numeric($question)) {
1750 $this->tpl->setCurrentBlock(
"printview_question");
1751 $question_gui = $this->
object->createQuestionGUI(
"", $question);
1752 $template =
new ilTemplate(
"tpl.il_as_qpl_question_printview.html",
true,
true,
"Modules/TestQuestionPool");
1753 $template->setVariable(
"COUNTER_QUESTION", $counter .
". ");
1754 $template->setVariable(
"QUESTION_TITLE", $question_gui->object->getTitleForHTMLOutput());
1756 $show_question_only = ($this->
object->getShowSolutionAnswersOnly()) ?
true :
false;
1757 $result_output = $question_gui->getSolutionOutput($active_id, $pass,
false,
false, $show_question_only, $this->
object->getShowSolutionFeedback());
1758 $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
1759 $this->tpl->setVariable(
"QUESTION_OUTPUT", $template->get());
1760 $this->tpl->parseCurrentBlock();
1766 if ($this->
object->getShowSolutionAnswersOnly()) {
1769 if (strlen($top_data)) {
1770 $this->tpl->setCurrentBlock(
"top_data");
1771 $this->tpl->setVariable(
"TOP_DATA", $top_data);
1772 $this->tpl->parseCurrentBlock();
1775 if (strlen($bottom_data)) {
1776 $this->tpl->setCurrentBlock(
"bottom_data");
1777 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this));
1778 $this->tpl->setVariable(
"BOTTOM_DATA", $bottom_data);
1779 $this->tpl->parseCurrentBlock();
1782 $this->tpl->setCurrentBlock(
"adm_content");
1783 $this->tpl->setVariable(
"TXT_ANSWER_SHEET", $this->
lng->txt(
"tst_list_of_answers"));
1786 $this->tpl->setVariable(
"USER_DETAILS", $user_data);
1787 $this->tpl->setVariable(
"SIGNATURE", $signature);
1788 $this->tpl->setVariable(
"TITLE", $this->
object->getTitle());
1789 $this->tpl->setVariable(
"TXT_TEST_PROLOG", $this->
lng->txt(
"tst_your_answers"));
1790 $invited_user = &$this->
object->getInvitedUsers(
$ilUser->getId());
1791 $pagetitle = $this->
object->getTitle() .
" - " . $this->
lng->txt(
"clientip") .
1792 ": " . $invited_user[
$ilUser->getId()][
"clientip"] .
" - " .
1793 $this->
lng->txt(
"matriculation") .
": " .
1794 $invited_user[
$ilUser->getId()][
"matriculation"];
1795 $this->tpl->setVariable(
"PAGETITLE", $pagetitle);
1796 $this->tpl->parseCurrentBlock();
1806 return "ADM_CONTENT";
1808 if ($this->
object->getKioskMode()) {
1809 $this->tpl->setBodyClass(
"kiosk");
1810 $this->tpl->hideFooter();
1813 return "ADM_CONTENT";
1819 $this->
ctrl->redirectByClass(
1820 array(
'ilRepositoryGUI',
'ilObjTestGUI',
'ilTestEvaluationGUI'),
1821 "outUserResultsOverview"
1834 $this->
ctrl->setParameter($this,
'pmode', self::PRESENTATION_MODE_EDIT);
1848 $this->
ctrl->setParameter($this,
'pmode', self::PRESENTATION_MODE_EDIT);
1868 $this->tpl->addBlockFile(
1871 'tpl.il_as_tst_question_summary.html',
1875 if ($this->
object->getKioskMode()) {
1883 let key_event = (
event) => {
1884 if(
event.key === 13 &&
event.target.tagName.toLowerCase() ===
"a" ) {
1887 if (
event.key === 13 &&
1888 event.target.tagName.toLowerCase() !==
"textarea" &&
1889 (
event.target.tagName.toLowerCase() !==
"input" ||
event.target.type.toLowerCase() !==
"submit")) {
1890 event.preventDefault();
1894 let
form = document.getElementById(
'taForm');
1895 form.onkeyup = key_event;
1896 form.onkeydown = key_event;
1897 form.onkeypress = key_event;
1899 $this->tpl->addOnLoadCode($onload_js);
1900 $this->tpl->addBlockFile(
1903 'tpl.il_as_tst_output.html',
1912 if (strlen($head)) {
1913 $this->tpl->setCurrentBlock(
"kiosk_options");
1914 $this->tpl->setVariable(
"KIOSK_HEAD", $head);
1915 $this->tpl->parseCurrentBlock();
1927 if ($this->testSession->isPasswordChecked() ===
true) {
1931 if ($this->
ctrl->getNextClass() ==
'iltestpasswordprotectiongui') {
1935 if (!$this->passwordChecker->isPasswordProtectionPageRedirectRequired()) {
1936 $this->testSession->setPasswordChecked(
true);
1942 $nextCommand = $this->
ctrl->getCmdClass() .
'::' . $this->
ctrl->getCmd();
1943 $this->
ctrl->setParameterByClass(
'ilTestPasswordProtectionGUI',
'nextCommand', $nextCommand);
1944 $this->
ctrl->redirectByClass(
'ilTestPasswordProtectionGUI',
'showPasswordForm');
1949 if ($this->
object->isInstantFeedbackAnswerFixationEnabled() && $this->testSequence->isQuestionChecked($questionId)) {
1953 if ($this->
object->isFollowupQuestionAnswerFixationEnabled() && $this->testSequence->isNextQuestionPresented($questionId)) {
1965 return $this->
lng->txt(
"save_introduction");
1970 $this->assSettings =
new ilSetting(
'assessment');
1979 $questionList->load();
1985 $skillEvaluation->setUserId(
$testSession->getUserId());
1986 $skillEvaluation->setActiveId(
$testSession->getActiveId());
1989 $skillEvaluation->setNumRequiredBookingsForSkillTriggering($this->assSettings->get(
1990 'ass_skl_trig_num_answ_barrier',
1995 $skillEvaluation->init($questionList);
1996 $skillEvaluation->evaluate($testResults);
1998 $skillEvaluation->handleSkillTriggering();
2007 $confirmation->setFormAction($this->
ctrl->getFormAction($this));
2008 $confirmation->setCancelCmd(
'cancelAnswerOptionalQuestions');
2009 $confirmation->setConfirmCmd(
'confirmAnswerOptionalQuestions');
2011 $confirmation->build($this->
object->isFixedTest());
2018 $this->testSequence->setAnsweringOptionalQuestionsConfirmed(
true);
2019 $this->testSequence->saveToDb();
2021 $this->
ctrl->setParameter($this,
'activecommand',
'gotoquestion');
2022 $this->
ctrl->redirect($this,
'redirectQuestion');
2027 if ($this->
object->getListOfQuestions()) {
2028 $this->
ctrl->setParameter($this,
'activecommand',
'summary');
2030 $this->
ctrl->setParameter($this,
'activecommand',
'previous');
2033 $this->
ctrl->redirect($this,
'redirectQuestion');
2041 if ($this->
object->getKioskMode()) {
2043 $this->tpl->hideFooter();
2044 $this->tpl->addBlockfile(
'CONTENT',
'adm_content',
"tpl.il_as_tst_kiosk_mode_content.html",
"Modules/Test");
2045 $this->tpl->setContent($this->
ctrl->getHTML($helperGui));
2059 if (
$ilSetting->get(
'char_selector_availability') > 0) {
2062 $char_selector->addToPage();
2063 $this->tpl->setCurrentBlock(
'char_selector');
2064 $this->tpl->setVariable(
"CHAR_SELECTOR_TEMPLATE", $char_selector->getSelectorHtml());
2065 $this->tpl->parseCurrentBlock();
2081 $navigationToolbarGUI->setSuspendTestButtonEnabled($this->
object->getShowCancel());
2082 $navigationToolbarGUI->setQuestionTreeButtonEnabled($this->
object->getListOfQuestions());
2083 $navigationToolbarGUI->setQuestionTreeVisible((
bool)
$ilUser->getPref(
'side_list_of_questions'));
2084 $navigationToolbarGUI->setQuestionListButtonEnabled($this->
object->getListOfQuestions());
2087 return $navigationToolbarGUI;
2098 if ($this->
object->getShowMarker()) {
2102 if (count($solved_array) > 0) {
2103 $solved = array_pop($solved_array);
2104 $solved = $solved[
"solved"];
2109 $navigationGUI->setQuestionMarked(
true);
2112 $navigationGUI->setQuestionMarked(
false);
2117 return $navigationGUI;
2124 if ($this->
object->isForceInstantFeedbackEnabled()) {
2139 case $this->
object->getSpecificAnswerFeedback():
2140 case $this->
object->getGenericAnswerFeedback():
2141 case $this->
object->getAnswerFeedbackPoints():
2142 case $this->
object->getInstantFeedbackSolution():
2144 $navigationGUI->setAnswerFreezingEnabled($this->
object->isInstantFeedbackAnswerFixationEnabled());
2146 if ($this->
object->isForceInstantFeedbackEnabled()) {
2147 $navigationGUI->setForceInstantResponseEnabled(
true);
2155 if ($this->
object->isOfferingQuestionHintsEnabled()) {
2156 $activeId = $this->testSession->getActiveId();
2157 $pass = $this->testSession->getPass();
2161 if ($questionHintTracking->requestsPossible()) {
2165 if ($questionHintTracking->requestsExist()) {
2170 $navigationGUI->setCharSelectorEnabled($charSelectorAvailable);
2172 if ($this->
object->getShowMarker()) {
2176 if (count($solved_array) > 0) {
2177 $solved = array_pop($solved_array);
2178 $solved = $solved[
"solved"];
2184 $navigationGUI->setQuestionMarked(
true);
2187 $navigationGUI->setQuestionMarked(
false);
2191 return $navigationGUI;
2199 if (!$this->
object->getListOfQuestionsEnd()) {
2200 return 'finishTest';
2203 if ($this->
object->areObligationsEnabled()) {
2205 $this->testSession->getTestId(),
2206 $this->testSession->getActiveId(),
2207 $this->testSession->getPass()
2210 if (!$allObligationsAnswered) {
2211 return 'outQuestionSummaryWithObligationsInfo';
2215 return 'outQuestionSummary';
2223 $answerFeedbackEnabled = $this->
object->getSpecificAnswerFeedback();
2226 $this->testSession->getActiveId(), #active_id
2227 $this->testSession->getPass(), #pass
2228 false, #graphical_output
2229 false, #result_output
2230 true, #show_question_only
2231 $answerFeedbackEnabled, #show_feedback
2232 false, #show_correct_solution
2233 false, #show_manual_scoring
2234 true #show_question_text
2240 $this->testSession->getActiveId(),
2244 $tpl =
new ilTemplate(
'tpl.tst_player_response_modal.html',
true,
true,
'Modules/Test');
2250 $this->tpl = $saved_tpl;
2252 $tpl->setVariable(
'QUESTION_OUTPUT', $pageoutput);
2255 $button->setId(
'tst_confirm_feedback');
2256 $button->setUrl($navUrl);
2257 $button->setCaption(
'proceed');
2258 $button->setPrimary(
true);
2259 $tpl->setVariable(
'BUTTON', $button->render());
2263 $modal->setId(
'tst_question_feedback_modal');
2264 $modal->setHeading($this->
lng->txt(
'tst_instant_feedback'));
2265 $modal->setBody(
$tpl->get());
2267 $this->tpl->addOnLoadCode(
"$('#tst_question_feedback_modal').modal('show');");
2268 $this->tpl->setVariable(
'INSTANT_RESPONSE_MODAL', $modal->getHTML());
2277 $response_available =
false;
2278 $jump_to_response =
false;
2282 if ($this->
object->getInstantFeedbackSolution()) {
2287 $this->testSession->getActiveId(), #active_id
2289 false, #graphical_output
2290 $show_question_inline_score, #result_output
2291 true, #show_question_only
2292 false, #show_feedback
2293 true, #show_correct_solution
2294 false, #show_manual_scoring
2295 false #show_question_text
2297 $solutionoutput = str_replace(
'<h1 class="ilc_page_title_PageTitle"></h1>',
'', $solutionoutput);
2299 $response_available =
true;
2300 $jump_to_response =
true;
2303 $reachedPoints = $questionGui->object->getAdjustedReachedPoints(
2304 $this->testSession->getActiveId(),
2309 $maxPoints = $questionGui->object->getMaximumPoints();
2311 $solutionCorrect = ($reachedPoints == $maxPoints);
2315 if ($this->
object->getAnswerFeedbackPoints()) {
2317 $response_available =
true;
2318 $jump_to_response =
true;
2323 if ($this->
object->getGenericAnswerFeedback()) {
2325 $response_available =
true;
2326 $jump_to_response =
true;
2332 if ($this->
object->getSpecificAnswerFeedback()) {
2335 $jump_to_response =
false;
2337 $response_available =
true;
2338 $jump_to_response =
true;
2343 if (!$response_available) {
2354 if ($withFocusAnchor) {
2355 $this->tpl->setCurrentBlock(
'inst_resp_id');
2356 $this->tpl->setVariable(
'INSTANT_RESPONSE_FOCUS_ID',
'focus');
2357 $this->tpl->parseCurrentBlock();
2360 $this->tpl->setCurrentBlock(
'instant_response_header');
2361 $this->tpl->setVariable(
'INSTANT_RESPONSE_HEADER', $this->
lng->txt(
'tst_feedback'));
2362 $this->tpl->parseCurrentBlock();
2367 $this->tpl->setCurrentBlock(
'instant_response_message');
2368 $this->tpl->setVariable(
'INSTANT_RESPONSE_MESSAGE', $a_message);
2369 $this->tpl->parseCurrentBlock();
2379 return $this->testSession->getLastSequence();
2384 if ($this->testrequest->isset(
'sequence')) {
2385 return $this->testrequest->raw(
'sequence');
2393 if ($this->testrequest->isset(
'pmode')) {
2394 return $this->testrequest->raw(
'pmode');
2402 if ($this->testrequest->isset(
'instresp')) {
2403 return $this->testrequest->raw(
'instresp');
2411 if (isset($_POST[
'nextcmd']) && strlen($_POST[
'nextcmd'])) {
2412 return $_POST[
'nextcmd'];
2420 if (isset($_POST[
'nextseq']) && is_numeric($_POST[
'nextseq'])) {
2421 return (
int) $_POST[
'nextseq'];
2430 if (isset($_POST[
'test_player_navigation_url'])) {
2431 $navigation_url = $_POST[
'test_player_navigation_url'];
2433 $navigation_url_parts = parse_url($navigation_url);
2436 if (!isset($navigation_url_parts[
'host']) || ($ilias_url_parts[
'host'] === $navigation_url_parts[
'host'])) {
2437 return $navigation_url;
2453 return !empty($this->testrequest->raw(
'test_answer_changed'));
2462 $this->
ctrl->setParameter($this,
'test_answer_changed', $changed ?
'1' :
'0');
2488 if (!empty($_POST[
'save_on_navigation_prevent_confirmation'])) {
2492 if (!empty($_POST[self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM])) {
2493 ilSession::set(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM,
true);
2512 if (!$fromCache || !isset($this->cachedQuestionGuis[$question_id])) {
2513 $question_gui = $this->
object->createQuestionGUI(
"", $question_id);
2514 $question_gui->setTargetGui($this);
2516 $question_gui->object->setObligationsToBeConsidered($this->
object->areObligationsEnabled());
2517 $question_gui->populateJavascriptFilesRequiredForWorkForm(
$tpl);
2520 (
string) $question_id,
2521 (
string) $this->testSession->getActiveId(),
2522 (
string) $this->testSession->getPass()
2529 $this->cachedQuestionGuis[$question_id] = $question_gui;
2532 return $this->cachedQuestionGuis[$question_id];
2550 if (!$fromCache || !isset($this->cachedQuestionObjects[$questionId])) {
2555 $processLockerFactory->setQuestionId($questionOBJ->getId());
2556 $processLockerFactory->setUserId(
$ilUser->getId());
2558 $questionOBJ->setProcessLocker($processLockerFactory->getLocker());
2560 $questionOBJ->setObligationsToBeConsidered($this->
object->areObligationsEnabled());
2567 $this->cachedQuestionObjects[$questionId] = $questionOBJ;
2570 return $this->cachedQuestionObjects[$questionId];
2577 $this->
object->isPreviousSolutionReuseEnabled($this->testSession->getActiveId())
2589 $ilLog =
$DIC[
'ilLog'];
2593 .
"active={$this->testSession->getActiveId()} "
2594 .
"qId=$questionId seq=$sequenceElement "
2595 . serialize($this->testSequence)
2598 $ilLog->logStack(
'INV SEQ');
2600 $this->
ctrl->setParameter($this,
'sequence', $this->testSequence->getFirstSequence());
2609 if ($this->
object->getKioskMode()) {
2610 $this->tpl->addBlockfile($this->
getContentBlockName(),
'content',
"tpl.il_as_tst_kiosk_mode_content.html",
"Modules/Test");
2611 $this->tpl->setContent($contentHTML);
2624 if ($this->
object->isFollowupQuestionAnswerFixationEnabled()) {
2633 $tpl =
new ilTemplate(
'tpl.tst_player_confirmation_modal.html',
true,
true,
'Modules/Test');
2635 $tpl->setVariable(
'CONFIRMATION_TEXT', $this->
lng->txt(
'discard_answer_confirmation'));
2639 $button->setCaption(
'discard_answer');
2640 $tpl->setCurrentBlock(
'buttons');
2641 $tpl->setVariable(
'BUTTON', $button->render());
2642 $tpl->parseCurrentBlock();
2645 $button->setId(
'tst_cancel_discard_button');
2646 $button->setCaption(
'cancel');
2647 $button->setPrimary(
true);
2648 $tpl->setCurrentBlock(
'buttons');
2649 $tpl->setVariable(
'BUTTON', $button->render());
2650 $tpl->parseCurrentBlock();
2653 $modal->setId(
'tst_discard_solution_modal');
2654 $modal->setHeading($this->
lng->txt(
'discard_answer'));
2655 $modal->setBody(
$tpl->get());
2657 $this->tpl->setCurrentBlock(
'discard_solution_modal');
2658 $this->tpl->setVariable(
'DISCARD_SOLUTION_MODAL', $modal->getHTML());
2659 $this->tpl->parseCurrentBlock();
2666 if (
ilSession::get(
'save_on_navigation_prevent_confirmation') ==
null) {
2670 $tpl =
new ilTemplate(
'tpl.tst_player_confirmation_modal.html',
true,
true,
'Modules/Test');
2672 if ($this->
object->isInstantFeedbackAnswerFixationEnabled() && $this->object->isForceInstantFeedbackEnabled()) {
2673 $text = $this->
lng->txt(
'save_on_navigation_locked_confirmation');
2675 $text = $this->
lng->txt(
'save_on_navigation_confirmation');
2677 if ($this->
object->isForceInstantFeedbackEnabled()) {
2678 $text .=
" " . $this->
lng->txt(
'save_on_navigation_forced_feedback_hint');
2680 $tpl->setVariable(
'CONFIRMATION_TEXT', $text);
2684 $button->setId(
'tst_save_on_navigation_button');
2685 $button->setUrl(
'#');
2686 $button->setCaption(
'tst_save_and_proceed');
2687 $button->setPrimary(
true);
2688 $tpl->setCurrentBlock(
'buttons');
2689 $tpl->setVariable(
'BUTTON', $button->render());
2690 $tpl->parseCurrentBlock();
2693 $button->setId(
'tst_cancel_on_navigation_button');
2694 $button->setUrl(
'#');
2695 $button->setCaption(
'cancel');
2696 $button->setPrimary(
false);
2697 $tpl->setCurrentBlock(
'buttons');
2698 $tpl->setVariable(
'BUTTON', $button->render());
2699 $tpl->parseCurrentBlock();
2701 $tpl->setCurrentBlock(
'checkbox');
2702 $tpl->setVariable(
'CONFIRMATION_CHECKBOX_NAME',
'save_on_navigation_prevent_confirmation');
2703 $tpl->setVariable(
'CONFIRMATION_CHECKBOX_LABEL', $this->
lng->txt(
'tst_dont_show_msg_again_in_current_session'));
2704 $tpl->parseCurrentBlock();
2707 $modal->setId(
'tst_save_on_navigation_modal');
2708 $modal->setHeading($this->
lng->txt(
'save_on_navigation'));
2709 $modal->setBody(
$tpl->get());
2711 $this->tpl->setCurrentBlock(
'nav_while_edit_modal');
2712 $this->tpl->setVariable(
'NAV_WHILE_EDIT_MODAL', $modal->getHTML());
2713 $this->tpl->parseCurrentBlock();
2720 $modal->setModalId(
'tst_next_locks_unchanged_modal');
2722 $modal->setHeaderText($this->
lng->txt(
'tst_nav_next_locks_empty_answer_header'));
2723 $modal->setConfirmationText($this->
lng->txt(
'tst_nav_next_locks_empty_answer_confirm'));
2725 $button = $modal->buildModalButtonInstance(
'tst_nav_next_empty_answer_button');
2726 $button->setCaption(
'tst_proceed');
2727 $button->setPrimary(
false);
2728 $modal->addButton($button);
2730 $button = $modal->buildModalButtonInstance(
'tst_cancel_next_empty_answer_button');
2731 $button->setCaption(
'cancel');
2732 $button->setPrimary(
true);
2733 $modal->addButton($button);
2735 $this->tpl->setCurrentBlock(
'next_locks_unchanged_modal');
2736 $this->tpl->setVariable(
'NEXT_LOCKS_UNCHANGED_MODAL', $modal->getHTML());
2737 $this->tpl->parseCurrentBlock();
2747 $modal->setModalId(
'tst_next_locks_changed_modal');
2749 $modal->setHeaderText($this->
lng->txt(
'tst_nav_next_locks_current_answer_header'));
2750 $modal->setConfirmationText($this->
lng->txt(
'tst_nav_next_locks_current_answer_confirm'));
2752 $modal->setConfirmationCheckboxName(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM);
2753 $modal->setConfirmationCheckboxLabel($this->
lng->txt(
'tst_dont_show_msg_again_in_current_session'));
2755 $button = $modal->buildModalButtonInstance(
'tst_nav_next_changed_answer_button');
2756 $button->setCaption(
'tst_save_and_proceed');
2757 $button->setPrimary(
true);
2758 $modal->addButton($button);
2760 $button = $modal->buildModalButtonInstance(
'tst_cancel_next_changed_answer_button');
2761 $button->setCaption(
'cancel');
2762 $button->setPrimary(
false);
2763 $modal->addButton($button);
2765 $this->tpl->setCurrentBlock(
'next_locks_changed_modal');
2766 $this->tpl->setVariable(
'NEXT_LOCKS_CHANGED_MODAL', $modal->getHTML());
2767 $this->tpl->parseCurrentBlock();
2774 ilSession::set(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM,
true);
2779 if (
ilSession::get(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM) ==
null) {
2783 return ilSession::get(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM);
2792 protected function populateQuestionEditControl($questionGUI)
2798 $state = $questionGUI->object->lookupForExistingSolutions($this->testSession->getActiveId(), $this->testSession->getPass());
2799 $config[
'isAnswered'] = $state[
'authorized'];
2809 if ($questionGUI->isAutosaveable() && $this->object->getAutosave()) {
2811 $config[
'autosaveInterval'] = $this->
object->getAutosaveIval();
2814 $config[
'autosaveInterval'] = 0;
2819 $questionConfig = $questionGUI->object->getTestPresentationConfig();
2823 $config[
'withFormChangeDetection'] = $questionConfig->isFormChangeDetectionEnabled();
2826 $config[
'withBackgroundChangeDetection'] = $questionConfig->isBackgroundChangeDetectionEnabled();
2830 $config[
'forcedInstantFeedback'] = $this->
object->isForceInstantFeedbackEnabled();
2831 $config[
'nextQuestionLocks'] = $this->
object->isFollowupQuestionAnswerFixationEnabled();
2832 $config[
'autosaveFailureMessage'] = $this->
lng->txt(
'autosave_failed');
2834 $this->tpl->addJavascript(
'./Modules/Test/js/ilTestPlayerQuestionEditControl.js');
2835 $this->tpl->addOnLoadCode(
'il.TestPlayerQuestionEditControl.init(' . json_encode(
$config) .
')');
2851 $forced_feeback_navigation_url =
ilSession::get(
'forced_feedback_navigation_url');
2852 $forced_feeback_navigation_url[$this->testSession->getActiveId()] = $forcedFeedbackNavUrl;
2853 ilSession::set(
'forced_feedback_navigation_url', $forced_feeback_navigation_url);
2861 $forced_feedback_navigation_url =
ilSession::get(
'forced_feedback_navigation_url');
2862 if (!isset($forced_feedback_navigation_url[$this->testSession->getActiveId()])) {
2866 return $forced_feedback_navigation_url[$this->testSession->getActiveId()];
2876 $forced_feedback_navigation_url =
ilSession::get(
'forced_feedback_navigation_url');
2877 if (isset($forced_feedback_navigation_url[$this->testSession->getActiveId()])) {
2878 unset($forced_feedback_navigation_url[$this->testSession->getActiveId()]);
2879 ilSession::set(
'forced_feedback_navigation_url', $forced_feedback_navigation_url);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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
getQuestionHeaderBlockBuilder()
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
getGenericFeedbackOutput(int $active_id, ?int $pass)
getSpecificFeedbackOutput(array $userSolution)
Returns the answer specific feedback for the question.
outQuestionForTest(string $formaction, int $active_id, ?int $pass, bool $is_question_postponed=false, $user_post_solutions=false, bool $show_specific_inline_feedback=false)
setNavigationGUI(?ilTestQuestionNavigationGUI $navigationGUI)
Abstract basic class which is to be extended by the concrete assessment question type classes.
static _instantiateQuestion(int $question_id)
getTestPresentationConfig()
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
@classDescription Date and time handling
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static getInstance(ilTestSession $a_test_session)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
static _enabledAssessmentLogging()
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
static getSyntaxStylePath()
static lookupExamId($active_id, $pass)
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(string $a_var)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
const FIXED_SHUFFLER_SEED_MIN_LENGTH
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()
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.
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
Service GUI class for tests.
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.
buildQuestionAnswerShuffler(int $question_id, int $active_id, int $pass_id)
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, $overwrite_anonymity=false)
Returns the user data for a test results output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect(string $a_script)
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
form( $class_path, string $cmd)
header include for all ilias files.