4 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
5 require_once
'./Modules/Test/classes/class.ilTestServiceGUI.php';
6 require_once
'./Modules/TestQuestionPool/classes/class.assQuestion.php';
7 require_once
'./Services/UIComponent/Button/classes/class.ilSubmitButton.php';
56 parent::ilTestServiceGUI($a_object);
57 $this->ref_id =
$_GET[
"ref_id"];
60 require_once
'Modules/Test/classes/class.ilTestPasswordChecker.php';
63 $this->processLocker = null;
64 $this->testSession = null;
76 $testSession->
setUserId($ilUser->getId());
97 require_once
'Modules/Test/classes/class.ilTestProcessLockerFactory.php';
100 $processLockerFactory->setActiveId($activeId);
102 $this->processLocker = $processLockerFactory->getLocker();
113 include_once(
"./Services/Tagging/classes/class.ilTaggingGUI.php");
115 $tagging_gui->setObject($this->object->getId(), $this->
object->getType());
116 $tagging_gui->saveInput();
117 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
123 $ilCtrl->redirectByClass(
'ilTestToplistGUI',
'outResultsToplist');
133 $this->
object->updateWorkingTime(
$_SESSION[
"active_time_id"]);
144 abstract protected function outWorkingForm($sequence =
"", $test_id, $postpone_allowed, $directfeedback =
false);
158 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
171 $active_id = $this->testSession->getActiveId();
172 $starting_time = $this->
object->getStartingTimeOfUser($active_id);
173 if ($starting_time === FALSE)
179 return $this->
object->isMaxProcessingTimeReached($starting_time, $active_id);
185 $show_question_inline_score = FALSE;
186 if ($this->object->getAnswerFeedbackPoints())
188 $show_question_inline_score = TRUE;
189 return $show_question_inline_score;
191 return $show_question_inline_score;
208 $this->tpl->setCurrentBlock(
"isnotmarked" );
209 $this->tpl->setVariable(
"CMD_UNMARKED",
'markQuestion' );
211 $this->tpl->setVariable(
"TEXT_UNMARKED", $this->lng->txt(
"tst_question_mark" ) );
212 $this->tpl->parseCurrentBlock();
217 $this->tpl->setCurrentBlock(
"ismarked" );
218 $this->tpl->setVariable(
"CMD_MARKED",
'unmarkQuestion' );
220 $this->tpl->setVariable(
"TEXT_MARKED", $this->lng->txt(
"tst_remove_mark" ) );
221 $this->tpl->parseCurrentBlock();
233 $button->setPrimary(
true );
234 $button->setCommand(
'nextQuestion' );
235 $button->setCaption(
'save_next' );
236 $button->setId(
'bottomnextbutton' );
238 $this->tpl->setCurrentBlock(
"next_bottom" );
239 $this->tpl->setVariable(
"BTN_NEXT", $button->render());
240 $this->tpl->parseCurrentBlock();
246 $button->setPrimary(
true );
247 $button->setCommand(
'nextQuestion' );
248 $button->setCaption(
'save_next' );
249 $button->setId(
'nextbutton' );
251 $this->tpl->setCurrentBlock(
"next" );
252 $this->tpl->setVariable(
"BTN_NEXT", $button->render());
253 $this->tpl->parseCurrentBlock();
265 $button->setPrimary(
true );
266 $button->setCommand(
'nextQuestion' );
267 $button->setCaption(
'save_finish' );
268 $button->setId(
'bottomnextbutton' );
270 $this->tpl->setCurrentBlock(
"next_bottom" );
271 $this->tpl->setVariable(
"BTN_NEXT", $button->render());
272 $this->tpl->parseCurrentBlock();
278 $button->setPrimary(
true );
279 $button->setCommand(
'nextQuestion' );
280 $button->setCaption(
'save_finish' );
281 $button->setId(
'nextbutton' );
283 $this->tpl->setCurrentBlock(
"next" );
284 $this->tpl->setVariable(
"BTN_NEXT", $button->render());
285 $this->tpl->parseCurrentBlock();
297 $button->setPrimary(
true );
298 $button->setCommand(
'nextQuestion' );
299 $button->setCaption(
'question_summary' );
300 $button->setId(
'bottomnextbutton' );
302 $this->tpl->setCurrentBlock(
"next_bottom" );
303 $this->tpl->setVariable(
"BTN_NEXT", $button->render());
304 $this->tpl->parseCurrentBlock();
310 $button->setPrimary(
true );
311 $button->setCommand(
'nextQuestion' );
312 $button->setCaption(
'question_summary' );
313 $button->setId(
'nextbutton' );
315 $this->tpl->setCurrentBlock(
"next" );
316 $this->tpl->setVariable(
"BTN_NEXT", $button->render());
317 $this->tpl->parseCurrentBlock();
322 $this->tpl->setCurrentBlock(
'cancel_test');
323 $this->tpl->setVariable(
'TEXT_CANCELTEST', $this->lng->txt(
'cancel_test'));
324 $this->ctrl->setParameterByClass(get_class($this),
'cancelTest',
'true');
325 $this->tpl->setVariable(
'HREF_CANCELTEXT', $this->ctrl->getLinkTargetByClass(get_class($this),
'outIntroductionPage'));
326 $this->ctrl->setParameterByClass(get_class($this),
'cancelTest', null);
327 $this->tpl->parseCurrentBlock();
338 $this->tpl->setCurrentBlock(
"summary_bottom" );
339 $this->tpl->setVariable(
"CMD_SUMMARY",
'showQuestionList' );
340 $this->tpl->setVariable(
"BTN_SUMMARY", $this->lng->txt(
"question_summary" ) );
341 $this->tpl->parseCurrentBlock();
346 $this->tpl->setCurrentBlock(
"summary" );
347 $this->tpl->setVariable(
"CMD_SUMMARY",
'showQuestionList' );
348 $this->tpl->setVariable(
"BTN_SUMMARY", $this->lng->txt(
"question_summary" ) );
349 $this->tpl->parseCurrentBlock();
360 $this->tpl->setCurrentBlock(
"summary_bottom" );
361 $this->tpl->setVariable(
"CMD_SUMMARY",
'showQuestionSelection' );
362 $this->tpl->setVariable(
"BTN_SUMMARY", $this->lng->txt(
"tst_change_dyn_test_question_selection" ) );
363 $this->tpl->parseCurrentBlock();
368 $this->tpl->setCurrentBlock(
"summary" );
369 $this->tpl->setVariable(
"CMD_SUMMARY",
'showQuestionSelection' );
370 $this->tpl->setVariable(
"BTN_SUMMARY", $this->lng->txt(
"tst_change_dyn_test_question_selection" ) );
371 $this->tpl->parseCurrentBlock();
382 $this->tpl->setCurrentBlock(
"postpone_bottom" );
383 $this->tpl->setVariable(
"CMD_POSTPONE",
'postponeQuestion' );
384 $this->tpl->setVariable(
"BTN_POSTPONE", $this->lng->txt(
"postpone" ) );
385 $this->tpl->parseCurrentBlock();
390 $this->tpl->setCurrentBlock(
"postpone" );
391 $this->tpl->setVariable(
"CMD_POSTPONE",
'postponeQuestion' );
392 $this->tpl->setVariable(
"BTN_POSTPONE", $this->lng->txt(
"postpone" ) );
393 $this->tpl->parseCurrentBlock();
399 'previousQuestion', $this->lng->txt(
"save_previous" )
402 'previousQuestion', $this->lng->txt(
"save_previous" )
418 $this->tpl->setCurrentBlock(
"prev_bottom" );
419 $this->tpl->setVariable(
"CMD_PREV",
$cmd);
420 $this->tpl->setVariable(
"BTN_PREV", $label);
421 $this->tpl->parseCurrentBlock();
426 $this->tpl->setCurrentBlock(
"prev" );
427 $this->tpl->setVariable(
"CMD_PREV",
$cmd);
428 $this->tpl->setVariable(
"BTN_PREV", $label);
429 $this->tpl->parseCurrentBlock();
434 $this->tpl->setCurrentBlock(
"specific_feedback" );
435 $this->tpl->setVariable(
"SPECIFIC_FEEDBACK",
436 $question_gui->getSpecificFeedbackOutput(
437 $this->testSession->getActiveId(),
441 $this->tpl->parseCurrentBlock();
446 $this->tpl->setCurrentBlock(
"answer_feedback" );
447 $this->tpl->setVariable(
"ANSWER_FEEDBACK",
448 $question_gui->getAnswerFeedbackOutput( $this->testSession->getActiveId(),
452 $this->tpl->parseCurrentBlock();
457 $scoreInformation = sprintf(
458 $this->lng->txt(
"you_received_a_of_b_points" ), $reachedPoints, $maxPoints
461 $this->tpl->setCurrentBlock(
"received_points_information" );
462 $this->tpl->setVariable(
"RECEIVED_POINTS_INFORMATION", $scoreInformation);
463 $this->tpl->parseCurrentBlock();
468 $this->tpl->setCurrentBlock(
"solution_output" );
469 $this->tpl->setVariable(
"CORRECT_SOLUTION", $this->lng->txt(
"tst_best_solution_is" ) );
470 $this->tpl->setVariable(
"QUESTION_FEEDBACK", $solutionoutput );
471 $this->tpl->parseCurrentBlock();
477 if ($ilSetting->get(
'char_selector_availability') > 0)
479 require_once
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
483 $char_selector->addToPage();
484 $this->tpl->setCurrentBlock(
'char_selector');
485 $this->tpl->setVariable(
"CHAR_SELECTOR_IMAGE",
ilUtil::getImagePath(
'icon_omega_test.svg',
'Services/UIComponent/CharSelector'));
486 $this->tpl->setVariable(
"CHAR_SELECTOR_TEXT", $this->lng->txt(
'char_selector'));
487 $this->tpl->setVariable(
"CHAR_SELECTOR_TEMPLATE", $char_selector->getSelectorHtml());
488 $this->tpl->parseCurrentBlock();
497 $show_side_list = $ilUser->getPref(
'side_list_of_questions');
498 $this->tpl->setCurrentBlock(
'view_sidelist');
499 $this->tpl->setVariable(
'IMAGE_SIDELIST',
503 $this->tpl->setVariable(
'TEXT_SIDELIST',
504 ($show_side_list) ? $this->lng->txt(
'tst_hide_side_list' 505 ) : $this->lng->txt(
'tst_show_side_list')
507 $this->tpl->parseCurrentBlock();
517 $this->tpl->setCurrentBlock(
"SyntaxStyle" );
518 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
521 $this->tpl->parseCurrentBlock();
526 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
527 $this->tpl->setCurrentBlock(
"ContentStyle" );
528 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
531 $this->tpl->parseCurrentBlock();
541 if( $this->testSession->isAnonymousUser() )
543 $this->testSession->setAccessCodeToSession(
$_POST[
'anonymous_id']);
546 $this->ctrl->redirectByClass(
"ilobjtestgui",
"infoScreen");
558 $isFirstTestStartRequest =
false;
560 $this->processLocker->requestTestStartLockCheckLock();
562 if( $this->testSession->lookupTestStartLock() != $testStartLock )
564 $this->testSession->persistTestStartLock($testStartLock);
565 $isFirstTestStartRequest =
true;
568 $this->processLocker->releaseTestStartLockCheckLock();
570 if( $isFirstTestStartRequest )
573 $this->ctrl->redirect($this,
"initTest");
576 $this->ctrl->setParameterByClass(
'ilObjTestGUI',
'lock', $testStartLock);
577 $this->ctrl->redirectByClass(
"ilobjtestgui",
"redirectToInfoScreen");
586 elseif( isset(
$_GET[
'lock']) && strlen(
$_GET[
'lock']) )
588 return $_GET[
'lock'];
601 $this->ctrl->setParameter($this,
"activecommand",
"resume");
602 $this->ctrl->redirect($this,
"redirectQuestion");
610 if ($this->object->checkMaximumAllowedUsers() == FALSE)
615 if( $this->testSession->isAnonymousUser() && !$this->testSession->getActiveId() )
617 $accessCode = $this->testSession->createNewAccessCode();
619 $this->testSession->setAccessCodeToSession($accessCode);
620 $this->testSession->setAnonymousId($accessCode);
621 $this->testSession->saveToDb();
623 $this->ctrl->redirect($this,
'displayCode');
626 $this->ctrl->redirect($this,
'startTest');
631 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_anonymous_code_presentation.html",
"Modules/Test");
632 $this->tpl->setCurrentBlock(
"adm_content");
633 $this->tpl->setVariable(
"TEXT_ANONYMOUS_CODE_CREATED", $this->lng->txt(
"tst_access_code_created"));
634 $this->tpl->setVariable(
"TEXT_ANONYMOUS_CODE", $this->testSession->getAccessCodeFromSession());
635 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
636 $this->tpl->setVariable(
"CONTINUE", $this->lng->txt(
"continue_work"));
637 $this->tpl->parseCurrentBlock();
642 $this->ctrl->setParameter($this,
"activecommand",
"start");
643 $this->ctrl->redirect($this,
"redirectQuestion");
653 if (
$_POST[
"chb_javascript"])
655 $ilUser->writePref(
"tst_javascript", 1);
659 $ilUser->writePref(
"tst_javascript", 0);
663 if ($this->object->getNrOfTries() != 1)
665 if ($this->object->getUsePreviousAnswers() == 1)
667 if (
$_POST[
"chb_use_previous_answers"])
669 $ilUser->writePref(
"tst_use_previous_answers", 1);
673 $ilUser->writePref(
"tst_use_previous_answers", 0);
684 $sequence =
$_GET[
"sequence"];
685 if (!$sequence) $sequence = $this->testSequence->getFirstSequence();
686 if (array_key_exists(
"save_error",
$_GET))
688 if (
$_GET[
"save_error"] == 1)
693 switch (
$_GET[
"activecommand"])
696 $sequence = $this->testSequence->getNextSequence($sequence);
699 $sequence = $this->testSequence->getPreviousSequence($sequence);
707 $active_id = $this->testSession->getActiveId();
708 $actualpass = $this->
object->_getPass($active_id);
712 $this->testSession->setLastFinishedPass($this->testSession->getPass());
713 $this->testSession->increaseTestPass();
715 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_redirect_autosave.html",
"Modules/Test");
716 $this->tpl->setVariable(
"TEXT_REDIRECT", $this->lng->txt(
"redirectAfterSave"));
717 $this->tpl->setCurrentBlock(
"HeadContent");
718 $this->tpl->setVariable(
"CONTENT_BLOCK",
"<meta http-equiv=\"refresh\" content=\"5; url=" . $this->ctrl->getLinkTarget($this,
"afterTestPassFinished") .
"\">");
719 $this->tpl->parseCurrentBlock();
738 $result = $this->lng->txt(
"autosave_success");
742 $result = $this->lng->txt(
"autosave_failed");
749 $result = $this->ctrl->getLinkTarget($this,
"redirectAfterAutosave",
"",
true);
762 $show_side_list = $ilUser->getPref(
'side_list_of_questions');
763 $ilUser->writePref(
'side_list_of_questions', !$show_side_list);
765 $this->ctrl->redirect($this,
"redirectQuestion");
774 $this->ctrl->setParameter($this,
"activecommand",
"setmarked");
775 $this->ctrl->redirect($this,
"redirectQuestion");
784 $this->ctrl->setParameter($this,
"activecommand",
"resetmarked");
785 $this->ctrl->redirect($this,
"redirectQuestion");
794 $this->ctrl->setParameter($this,
"sequence",
$_GET[
"sequence"]);
795 $this->ctrl->setParameter($this,
"activecommand",
"gotoquestion");
796 $this->ctrl->saveParameter($this,
"tst_javascript");
798 $this->ctrl->redirect($this,
"redirectQuestion");
808 $this->ctrl->setParameter($this,
"activecommand",
"back");
809 $this->ctrl->redirect($this,
"redirectQuestion");
823 protected function confirmFinishTestCmd()
830 require_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
832 $confirmation->setFormAction($this->ctrl->getFormAction($this,
'confirmFinish'));
833 $confirmation->setHeaderText($this->lng->txt(
"tst_finish_confirmation_question"));
834 $confirmation->setConfirm($this->lng->txt(
"tst_finish_confirm_button"),
'confirmFinish');
835 $confirmation->setCancel($this->lng->txt(
"tst_finish_confirm_cancel_button"),
'backConfirmFinish');
837 if($this->object->getKioskMode())
839 $this->tpl->addBlockfile($this->
getContentBlockName(),
'content',
"tpl.il_as_tst_kiosk_mode_content.html",
"Modules/Test");
840 $this->tpl->setContent($confirmation->getHtml());
854 $active_id = $this->testSession->getActiveId();
855 $actualpass = $this->
object->_getPass($active_id);
872 if( $this->object->areObligationsEnabled() && !$allObligationsAnswered )
874 if( $this->object->getListOfQuestions() )
876 $_GET[
'activecommand'] =
'summary_obligations';
880 $_GET[
'activecommand'] =
'summary_obligations_only';
883 $this->redirectQuestionCmd();
888 if ($this->object->getEnableExamview() && !isset(
$_GET[
'reviewed']) && $requires_confirmation)
890 $_GET[
'activecommand'] =
'test_submission_overview';
891 $this->redirectQuestionCmd();
896 if (($requires_confirmation) && ($actualpass == $this->object->getNrOfTries() - 1))
899 return $this->confirmFinishTestCmd();
903 if(($actualpass == $this->object->getNrOfTries() - 1) && (!$requires_confirmation))
906 $ilAuth->setExpire(0);
907 switch($this->object->getMailNotification())
910 $this->
object->sendSimpleNotification($active_id);
913 $this->
object->sendAdvancedNotification($active_id);
922 if($this->object->getMailNotificationType() == 1)
924 switch($this->object->getMailNotification())
927 $this->
object->sendSimpleNotification($active_id);
930 $this->
object->sendAdvancedNotification($active_id);
940 $this->testSession->setLastFinishedPass($this->testSession->getPass());
941 $this->testSession->increaseTestPass();
943 $this->ctrl->redirect($this,
'afterTestPassFinished');
948 if( !$this->testSession->isSubmitted() )
950 $this->testSession->setSubmitted(1);
951 $this->testSession->setSubmittedTimestamp(date(
'Y-m-d H:i:s'));
952 $this->testSession->saveToDb();
958 $activeId = $this->testSession->getActiveId();
959 $lastFinishedPass = $this->testSession->getLastFinishedPass();
965 $this->ctrl->redirectByClass(
'ilTestSignatureGUI',
'invokeSignaturePlugin');
968 if(!
$_GET[
'skipfinalstatement'])
970 if ($this->object->getShowFinalStatement())
972 $this->ctrl->redirect($this,
'showFinalStatement');
977 $redirection_mode = $this->
object->getRedirectionMode();
978 $redirection_url = $this->
object->getRedirectionUrl();
979 if( $redirection_url && $redirection_mode && !$this->object->canViewResults() )
983 if( $this->object->getKioskMode() )
1006 if( !$this->object->getSignSubmission() )
1011 if( !is_null(
ilSession::get(
"signed_{$activeId}_{$lastFinishedPass}")) )
1016 global $ilPluginAdmin;
1018 $activePlugins = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_MODULE,
'Test',
'tsig');
1020 if( !count($activePlugins) )
1035 require_once
'class.ilTestEvaluationGUI.php';
1038 $results_output = $testevaluationgui->getPassListOfAnswers(
$results, $active,
$pass,
false,
false,
false,
false);
1040 require_once
'./Modules/Test/classes/class.ilTestArchiver.php';
1042 $inst_id = $ilSetting->get(
'inst_id', null);
1050 $filename = $path .
'/exam_N' . $inst_id .
'-' . $this->
object->getId()
1051 .
'-' . $active .
'-' .
$pass .
'.pdf';
1053 require_once
'class.ilTestPDFGenerator.php';
1057 $archiver->handInParticipantSubmission( $active,
$pass,
$filename, $results_output );
1062 $questions = $this->
object->getQuestions();
1063 foreach ($questions as $question_id)
1065 $question_object = $this->
object->getQuestionDataset( $question_id );
1066 if ($question_object->type_tag ==
'assFileUpload')
1086 $handle = opendir( $candidate_path );
1087 while ($handle !==
false && (
$file = readdir( $handle )) !==
false)
1091 $filename_start =
'file_' . $active .
'_' .
$pass .
'_';
1093 if (strpos(
$file, $filename_start ) === 0)
1095 $archiver->handInParticipantQuestionMaterial( $active,
$pass, $question_id,
$file,
$file );
1101 $passdata = $this->
object->getTestResult($active,
$pass);
1102 $overview = $testevaluationgui->getPassListOfAnswers($passdata, $active,
$pass,
true,
false,
false,
true);
1113 if(!$this->object->canViewResults())
1119 $this->ctrl->redirectByClass(
"ilTestEvaluationGUI",
"outUserResultsOverview");
1128 $template =
new ilTemplate(
"tpl.il_as_tst_final_statement.html", TRUE, TRUE,
"Modules/Test");
1129 $this->ctrl->setParameter($this,
"skipfinalstatement", 1);
1130 $template->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"afterTestPassFinished"));
1131 $template->setVariable(
"FINALSTATEMENT", $this->object->prepareTextareaOutput($this->object->getFinalStatement(),
true));
1132 $template->setVariable(
"BUTTON_CONTINUE", $this->lng->txt(
"btn_next"));
1140 $template =
new ilTemplate(
'tpl.il_as_tst_kiosk_head.html',
true,
true,
'Modules/Test');
1141 if ($this->object->getShowKioskModeTitle())
1143 $template->setCurrentBlock(
"kiosk_show_title");
1144 $template->setVariable(
"TEST_TITLE", $this->object->getTitle());
1145 $template->parseCurrentBlock();
1147 if ($this->object->getShowKioskModeParticipant())
1149 $template->setCurrentBlock(
"kiosk_show_participant");
1150 $template->setVariable(
"PARTICIPANT_NAME_TXT", $this->lng->txt(
"login_as"));
1151 $template->setVariable(
"PARTICIPANT_NAME", $ilUser->getFullname());
1152 $template->setVariable(
"PARTICIPANT_LOGIN", $ilUser->getLogin());
1153 $template->setVariable(
"PARTICIPANT_MATRICULATION", $ilUser->getMatriculation());
1154 $template->setVariable(
"PARTICIPANT_EMAIL", $ilUser->getEmail());
1155 $template->parseCurrentBlock();
1157 if ($this->object->isShowExamIdInTestPassEnabled())
1160 $this->testSession->getActiveId() , $this->testSession->getPass(), $this->
object->getId()
1163 $template->setCurrentBlock(
"kiosk_show_exam_id");
1164 $template->setVariable(
"EXAM_ID_TXT", $this->lng->txt(
"exam_id"));
1165 $template->setVariable(
"EXAM_ID", $exam_id);
1166 $template->parseCurrentBlock();
1168 return $template->get();
1180 if (!$rbacsystem->checkAccess(
"read", $this->object->getRefId()))
1183 $this->
ilias->raiseError($this->lng->txt(
"cannot_execute_test"),$this->
ilias->error_obj->MESSAGE);
1192 if ($this->object->endingTimeReached())
1198 if ($this->object->getKioskMode())
1203 $this->tpl->setVariable(
"TEST_ID", $this->object->getTestId());
1204 $this->tpl->setVariable(
"LOGIN", $ilUser->getLogin());
1205 $this->tpl->setVariable(
"SEQ_ID", $this->sequence);
1206 $this->tpl->setVariable(
"QUEST_ID", $this->testSequence->questions[$this->sequence]);
1208 if ($this->object->getEnableProcessingTime())
1213 $this->tpl->setVariable(
"FORM_TIMESTAMP", time());
1215 $this->tpl->setVariable(
"PAGETITLE",
"- " . $this->object->getTitle());
1217 $postpone = ( $this->
object->getSequenceSettings() ==
TEST_POSTPONE );
1219 if ($this->object->isShowExamIdInTestPassEnabled() && !$this->
object->getKioskMode())
1221 $this->tpl->setCurrentBlock(
'exam_id_footer');
1223 $this->testSession->getActiveId(), $this->testSession->getPass(), $this->
object->getId()
1225 $this->tpl->setVariable(
'EXAM_ID_TXT', $this->lng->txt(
'exam_id'));
1226 $this->tpl->parseCurrentBlock();
1229 $this->
outWorkingForm($this->sequence, $this->object->getTestId(), $postpone, $directfeedback);
1244 $user = $this->
object->getInvitedUsers($ilUser->getId());
1245 if (!is_array ($user) || count($user)!=1)
1248 $this->ctrl->redirectByClass(
"ilobjtestgui",
"backToRepository");
1251 $user = array_pop($user);
1253 if (strcmp($user[
"clientip"],
"")!=0 && strcmp($user[
"clientip"],$_SERVER[
"REMOTE_ADDR"])!=0)
1256 $this->ctrl->redirectByClass(
"ilobjtestgui",
"backToRepository");
1268 and $this->
object->startingTimeReached()
1269 and !$this->
object->endingTimeReached();
1277 return $this->
object->hasNrOfTriesRestriction() && $this->
object->isNrOfTriesReached($this->testSession->getPass());
1289 if (array_key_exists(
"pass",
$_GET) && (strlen(
$_GET[
"pass"]) > 0))
1291 $this->ctrl->saveParameter($this,
"pass");
1292 $this->ctrl->saveParameter($this,
"active_id");
1293 $this->outTestResults(
false,
$_GET[
"pass"]);
1297 $this->outTestResults(
false);
1309 $this->testSession->increasePass();
1310 $this->testSession->setLastSequence(0);
1311 $this->testSession->saveToDb();
1312 if (!$this->object->canViewResults())
1314 $this->outIntroductionPage();
1318 $this->ctrl->redirectByClass(
"ilTestEvaluationGUI",
"outUserResultsOverview");
1331 $this->outIntroductionPage();
1341 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_submit_answers_confirm.html",
"Modules/Test");
1342 $this->tpl->setCurrentBlock(
"adm_content");
1343 if ($this->object->isTestFinished($this->testSession->getActiveId()))
1345 $this->tpl->setCurrentBlock(
"not_submit_allowed");
1346 $this->tpl->setVariable(
"TEXT_ALREADY_SUBMITTED", $this->lng->txt(
"tst_already_submitted"));
1347 $this->tpl->setVariable(
"BTN_OK", $this->lng->txt(
"tst_show_answer_sheet"));
1350 $this->tpl->setCurrentBlock(
"submit_allowed");
1351 $this->tpl->setVariable(
"TEXT_CONFIRM_SUBMIT_RESULTS", $this->lng->txt(
"tst_confirm_submit_answers"));
1352 $this->tpl->setVariable(
"BTN_OK", $this->lng->txt(
"tst_submit_results"));
1354 $this->tpl->setVariable(
"BTN_BACK", $this->lng->txt(
"back"));
1355 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"finalSubmission"));
1356 $this->tpl->parseCurrentBlock();
1363 $starting_time = $this->
object->getStartingTimeOfUser($active_id);
1364 $processing_time = $this->
object->getProcessingTimeInSeconds($active_id);
1365 $processing_time_minutes = floor($processing_time / 60);
1366 $processing_time_seconds = $processing_time - $processing_time_minutes * 60;
1367 $str_processing_time =
"";
1368 if ($processing_time_minutes > 0)
1370 $str_processing_time = $processing_time_minutes .
" " . ($processing_time_minutes == 1 ? $this->lng->txt(
"minute") : $this->lng->txt(
"minutes"));
1372 if ($processing_time_seconds > 0)
1374 if (strlen($str_processing_time) > 0) $str_processing_time .=
" " . $this->lng->txt(
"and") .
" ";
1375 $str_processing_time .= $processing_time_seconds .
" " . ($processing_time_seconds == 1 ? $this->lng->txt(
"second") : $this->lng->txt(
"seconds"));
1377 $time_left = $starting_time + $processing_time - mktime();
1378 $time_left_minutes = floor($time_left / 60);
1379 $time_left_seconds = $time_left - $time_left_minutes * 60;
1380 $str_time_left =
"";
1381 if ($time_left_minutes > 0)
1383 $str_time_left = $time_left_minutes .
" " . ($time_left_minutes == 1 ? $this->lng->txt(
"minute") : $this->lng->txt(
"minutes"));
1385 if ($time_left < 300)
1387 if ($time_left_seconds > 0)
1389 if (strlen($str_time_left) > 0) $str_time_left .=
" " . $this->lng->txt(
"and") .
" ";
1390 $str_time_left .= $time_left_seconds .
" " . ($time_left_seconds == 1 ? $this->lng->txt(
"second") : $this->lng->txt(
"seconds"));
1393 $date = getdate($starting_time);
1405 $datenow = getdate();
1406 $this->tpl->setCurrentBlock(
"enableprocessingtime");
1407 $this->tpl->setVariable(
"USER_WORKING_TIME",
1409 $this->lng->txt(
"tst_time_already_spent"),
1410 $formattedStartingTime,
1411 $str_processing_time
1414 $this->tpl->setVariable(
"USER_REMAINING_TIME", sprintf($this->lng->txt(
"tst_time_already_spent_left"), $str_time_left));
1415 $this->tpl->parseCurrentBlock();
1416 $template =
new ilTemplate(
"tpl.workingtime.js.html", TRUE, TRUE,
'Modules/Test');
1417 $template->setVariable(
"STRING_MINUTE", $this->lng->txt(
"minute"));
1418 $template->setVariable(
"STRING_MINUTES", $this->lng->txt(
"minutes"));
1419 $template->setVariable(
"STRING_SECOND", $this->lng->txt(
"second"));
1420 $template->setVariable(
"STRING_SECONDS", $this->lng->txt(
"seconds"));
1421 $template->setVariable(
"STRING_TIMELEFT", $this->lng->txt(
"tst_time_already_spent_left"));
1422 $template->setVariable(
"AND", strtolower($this->lng->txt(
"and")));
1423 $template->setVariable(
"YEAR", $date[
"year"]);
1424 $template->setVariable(
"MONTH", $date[
"mon"]-1);
1425 $template->setVariable(
"DAY", $date[
"mday"]);
1426 $template->setVariable(
"HOUR", $date[
"hours"]);
1427 $template->setVariable(
"MINUTE", $date[
"minutes"]);
1428 $template->setVariable(
"SECOND", $date[
"seconds"]);
1429 if ($this->object->isEndingTimeEnabled() && preg_match(
"/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $this->object->getEndingTime(), $matches))
1431 $template->setVariable(
"ENDYEAR", $matches[1]);
1432 $template->setVariable(
"ENDMONTH", $matches[2]-1);
1433 $template->setVariable(
"ENDDAY", $matches[3]);
1434 $template->setVariable(
"ENDHOUR", $matches[4]);
1435 $template->setVariable(
"ENDMINUTE", $matches[5]);
1436 $template->setVariable(
"ENDSECOND", $matches[6]);
1438 $template->setVariable(
"YEARNOW", $datenow[
"year"]);
1439 $template->setVariable(
"MONTHNOW", $datenow[
"mon"]-1);
1440 $template->setVariable(
"DAYNOW", $datenow[
"mday"]);
1441 $template->setVariable(
"HOURNOW", $datenow[
"hours"]);
1442 $template->setVariable(
"MINUTENOW", $datenow[
"minutes"]);
1443 $template->setVariable(
"SECONDNOW", $datenow[
"seconds"]);
1444 $template->setVariable(
"PTIME_M", $processing_time_minutes);
1445 $template->setVariable(
"PTIME_S", $processing_time_seconds);
1447 $this->tpl->setCurrentBlock(
"HeadContent");
1448 $this->tpl->setVariable(
"CONTENT_BLOCK", $template->get());
1449 $this->tpl->parseCurrentBlock();
1455 public function outQuestionSummaryCmd($fullpage =
true, $contextFinishTest =
false, $obligationsNotAnswered =
false, $obligationsFilter =
false)
1459 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_question_summary.html",
"Modules/Test");
1462 if( $obligationsNotAnswered )
1467 $active_id = $this->testSession->getActiveId();
1468 $result_array = & $this->testSequence->getSequenceSummary($obligationsFilter);
1470 $marked_questions = array();
1472 if( $this->object->getKioskMode() && $fullpage )
1477 $this->tpl->setCurrentBlock(
"kiosk_options");
1478 $this->tpl->setVariable(
"KIOSK_HEAD", $head);
1479 $this->tpl->parseCurrentBlock();
1483 if( $this->object->getShowMarker() )
1485 include_once
"./Modules/Test/classes/class.ilObjTest.php";
1491 foreach( $result_array as $key => $value )
1493 $this->ctrl->setParameter($this,
"sequence", $value[
"sequence"]);
1495 $href = $this->ctrl->getLinkTargetByClass(get_class($this),
"gotoQuestion");
1497 $this->tpl->setVariable(
"VALUE_QUESTION_TITLE",
"<a href=\"".$this->ctrl->getLinkTargetByClass(get_class($this),
"gotoQuestion").
"\">" . $this->
object->getQuestionTitle($value[
"title"]) .
"</a>");
1499 $this->ctrl->setParameter($this,
"sequence",
$_GET[
"sequence"]);
1502 if( $this->object->getListOfQuestionsDescription() )
1504 $description = $value[
"description"];
1508 if( !$this->object->getTitleOutput() )
1510 $points = $value[
"points"].
" ".$this->lng->txt(
"points_short");
1514 if( count($marked_questions) )
1516 if( array_key_exists($value[
"qid"], $marked_questions) )
1518 $obj = $marked_questions[$value[
"qid"]];
1519 if( $obj[
"solved"] == 1 )
1526 array_push(
$data, array(
1527 'order' => $value[
"nr"],
1529 'title' => $this->object->getQuestionTitle($value[
"title"]),
1530 'description' => $description,
1531 'worked_through' => ($value[
"worked_through"]) ?
true :
false,
1532 'postponed' => ($value[
"postponed"]) ? $this->lng->txt(
"postponed") :
'',
1533 'points' => $points,
1534 'marked' => $marked,
1535 'sequence' => $value[
"sequence"],
1536 'obligatory' => $value[
'obligatory'],
1537 'isAnswered' => $value[
'isAnswered']
1541 $this->ctrl->setParameter($this,
"sequence",
$_GET[
"sequence"]);
1545 include_once
"./Modules/Test/classes/tables/class.ilListOfQuestionsTableGUI.php";
1548 $table_gui->setShowPointsEnabled( !$this->object->getTitleOutput() );
1549 $table_gui->setShowMarkerEnabled( $this->object->getShowMarker() );
1550 $table_gui->setObligationsNotAnswered( $obligationsNotAnswered );
1551 $table_gui->setShowObligationsEnabled( $this->object->areObligationsEnabled() );
1552 $table_gui->setObligationsFilterEnabled( $obligationsFilter );
1556 $table_gui->setData(
$data);
1558 $this->tpl->setVariable(
'TABLE_LIST_OF_QUESTIONS', $table_gui->getHTML());
1560 if( $this->object->getEnableProcessingTime() )
1567 $template =
new ilTemplate(
'tpl.il_as_tst_list_of_questions_short.html',
true,
true,
'Modules/Test');
1571 if( strlen($row[
'description']) )
1573 $template->setCurrentBlock(
'description');
1574 $template->setVariable(
"DESCRIPTION", $row[
'description']);
1575 $template->parseCurrentBlock();
1580 $template->setCurrentBlock(
'item');
1581 $template->setVariable(
'CLASS', ($row[
'walked_through']) ? (
'answered'.$active) : (
'unanswered'.$active));
1583 $template->setVariable(
'SEQUENCE', $row[
'sequence']);
1584 $template->parseCurrentBlock();
1587 require_once
'Services/UIComponent/Panel/classes/class.ilPanelGUI.php';
1591 $panel->setHeading($this->lng->txt(
'list_of_questions'));
1592 $panel->setBody($template->get());
1594 $this->tpl->setVariable(
'LIST_OF_QUESTIONS', $panel->getHTML());
1610 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_max_allowed_users_reached.html",
"Modules/Test");
1611 $this->tpl->setCurrentBlock(
"adm_content");
1612 $this->tpl->setVariable(
"MAX_ALLOWED_USERS_MESSAGE", sprintf($this->lng->txt(
"tst_max_allowed_users_message"), $this->
object->getAllowedUsersTimeGap()));
1613 $this->tpl->setVariable(
"MAX_ALLOWED_USERS_HEADING", sprintf($this->lng->txt(
"tst_max_allowed_users_heading"), $this->
object->getAllowedUsersTimeGap()));
1614 $this->tpl->setVariable(
"BACK_TO_INTRODUCTION", $this->lng->txt(
"tst_results_back_introduction"));
1615 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1616 $this->tpl->parseCurrentBlock();
1621 $this->ctrl->redirect($this,
'gotoQuestion');
1631 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_correct_solution.html",
"Modules/Test");
1633 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1634 $this->tpl->setCurrentBlock(
"ContentStyle");
1636 $this->tpl->parseCurrentBlock();
1638 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1640 $this->tpl->parseCurrentBlock();
1643 if ($this->object->getShowSolutionAnswersOnly())
1648 $this->tpl->setCurrentBlock(
"adm_content");
1650 $this->tpl->setVariable(
"OUTPUT_SOLUTION", $solution);
1651 $this->tpl->setVariable(
"TEXT_BACK", $this->lng->txt(
"back"));
1652 $this->ctrl->saveParameter($this,
"pass");
1653 $this->ctrl->saveParameter($this,
"active_id");
1654 $this->tpl->setVariable(
"URL_BACK", $this->ctrl->getLinkTarget($this,
"outUserResultsOverview"));
1655 $this->tpl->parseCurrentBlock();
1671 $this->tpl->addBlockFile($this->
getContentBlockName(),
"adm_content",
"tpl.il_as_tst_finish_list_of_answers.html",
"Modules/Test");
1673 $result_array =& $this->
object->getTestResult($active_id,
$pass);
1677 foreach ($result_array as $question_data)
1679 $question = $question_data[
"qid"];
1680 if (is_numeric($question))
1682 $this->tpl->setCurrentBlock(
"printview_question");
1683 $question_gui = $this->
object->createQuestionGUI(
"", $question);
1684 $template =
new ilTemplate(
"tpl.il_as_qpl_question_printview.html", TRUE, TRUE,
"Modules/TestQuestionPool");
1685 $template->setVariable(
"COUNTER_QUESTION", $counter.
". ");
1686 $template->setVariable(
"QUESTION_TITLE", $question_gui->object->getTitle());
1688 $show_question_only = ($this->
object->getShowSolutionAnswersOnly()) ? TRUE : FALSE;
1689 $result_output = $question_gui->getSolutionOutput($active_id,
$pass, FALSE, FALSE, $show_question_only, $this->object->getShowSolutionFeedback());
1690 $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
1691 $this->tpl->setVariable(
"QUESTION_OUTPUT", $template->get());
1692 $this->tpl->parseCurrentBlock();
1698 if ($this->object->getShowSolutionAnswersOnly())
1702 if (strlen($top_data))
1704 $this->tpl->setCurrentBlock(
"top_data");
1705 $this->tpl->setVariable(
"TOP_DATA", $top_data);
1706 $this->tpl->parseCurrentBlock();
1709 if (strlen($bottom_data))
1711 $this->tpl->setCurrentBlock(
"bottom_data");
1712 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1713 $this->tpl->setVariable(
"BOTTOM_DATA", $bottom_data);
1714 $this->tpl->parseCurrentBlock();
1717 $this->tpl->setCurrentBlock(
"adm_content");
1718 $this->tpl->setVariable(
"TXT_ANSWER_SHEET", $this->lng->txt(
"tst_list_of_answers"));
1721 $this->tpl->setVariable(
"USER_DETAILS", $user_data);
1722 $this->tpl->setVariable(
"SIGNATURE", $signature);
1723 $this->tpl->setVariable(
"TITLE", $this->object->getTitle());
1724 $this->tpl->setVariable(
"TXT_TEST_PROLOG", $this->lng->txt(
"tst_your_answers"));
1725 $invited_user =& $this->
object->getInvitedUsers($ilUser->getId());
1726 $pagetitle = $this->
object->getTitle() .
" - " . $this->lng->txt(
"clientip") .
1727 ": " . $invited_user[$ilUser->getId()][
"clientip"] .
" - " .
1728 $this->lng->txt(
"matriculation") .
": " .
1729 $invited_user[$ilUser->getId()][
"matriculation"];
1730 $this->tpl->setVariable(
"PAGETITLE", $pagetitle);
1731 $this->tpl->parseCurrentBlock();
1741 if ($this->object->getKioskMode())
1743 $this->tpl->setBodyClass(
"kiosk");
1744 $this->tpl->setAddFooter(FALSE);
1749 return "ADM_CONTENT";
1755 $this->ctrl->redirectByClass(
1756 array(
'ilRepositoryGUI',
'ilObjTestGUI',
'ilTestEvaluationGUI'),
"outUserResultsOverview" 1762 $this->ctrl->redirectByClass(
1763 array(
'ilRepositoryGUI',
'ilObjTestGUI',
'ilTestEvaluationGUI'),
"outUserListOfAnswerPasses" 1774 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
1785 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
1801 $parseQuestionRelatedNavigation =
false;
1805 case $this->
object->getSpecificAnswerFeedback():
1806 case $this->
object->getGenericAnswerFeedback():
1807 case $this->
object->getAnswerFeedbackPoints():
1808 case $this->
object->getInstantFeedbackSolution():
1810 $tpl->setCurrentBlock(
"direct_feedback");
1811 $tpl->setVariable(
"CMD_SHOW_INSTANT_RESPONSE",
'showInstantResponse');
1812 $tpl->setVariable(
"TEXT_SHOW_INSTANT_RESPONSE", $lng->txt(
"check"));
1813 $tpl->parseCurrentBlock();
1815 $parseQuestionRelatedNavigation =
true;
1818 if( $this->object->isOfferingQuestionHintsEnabled() )
1820 $questionId = $questionGUI->object->getId();
1821 $activeId = $this->testSession->getActiveId();
1822 $pass = $this->testSession->getPass();
1824 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
1827 $requestsExist = $questionHintTracking->requestsExist();
1828 $requestsPossible = $questionHintTracking->requestsPossible();
1830 if( $requestsPossible )
1832 if( $requestsExist )
1834 $buttonText = $lng->txt(
"button_request_next_question_hint");
1838 $buttonText = $lng->txt(
"button_request_question_hint");
1841 $tpl->setCurrentBlock(
"button_request_next_question_hint");
1842 $tpl->setVariable(
"CMD_REQUEST_NEXT_QUESTION_HINT",
'confirmHintRequest');
1843 $tpl->setVariable(
"TEXT_REQUEST_NEXT_QUESTION_HINT", $buttonText);
1844 $tpl->parseCurrentBlock();
1846 $parseQuestionRelatedNavigation =
true;
1849 if( $requestsExist )
1851 $tpl->setCurrentBlock(
"button_show_requested_question_hints");
1852 $tpl->setVariable(
"CMD_SHOW_REQUESTED_QUESTION_HINTS",
'showRequestedHintList');
1853 $tpl->setVariable(
"TEXT_SHOW_REQUESTED_QUESTION_HINTS", $lng->txt(
"button_show_requested_question_hints"));
1854 $tpl->parseCurrentBlock();
1856 $parseQuestionRelatedNavigation =
true;
1860 if( $parseQuestionRelatedNavigation )
1862 $tpl->setCurrentBlock(
"question_related_navigation");
1863 $tpl->parseCurrentBlock();
1886 if( $this->object->getShowMarker() )
1888 include_once
"./Modules/Test/classes/class.ilObjTest.php";
1893 $marked_questions = array();
1896 return $marked_questions;
1901 $this->tpl->addBlockFile(
1902 $this->
getContentBlockName(),
'adm_content',
'tpl.il_as_tst_question_summary.html',
'Modules/Test' 1905 if ($this->object->getShowCancel())
1910 if ($this->object->getKioskMode())
1918 $this->tpl->addBlockFile(
1931 $this->tpl->setCurrentBlock(
"kiosk_options");
1932 $this->tpl->setVariable(
"KIOSK_HEAD", $head);
1933 $this->tpl->parseCurrentBlock();
1939 if( $this->ctrl->getNextClass() ==
'iltestpasswordprotectiongui' )
1944 if( !$this->passwordChecker->isPasswordProtectionPageRedirectRequired() )
1951 $nextCommand = $this->ctrl->getCmdClass().
'::'.$this->ctrl->getCmd();
1952 $this->ctrl->setParameterByClass(
'ilTestPasswordProtectionGUI',
'nextCommand', $nextCommand);
1953 $this->ctrl->redirectByClass(
'ilTestPasswordProtectionGUI',
'showPasswordForm');
1958 if( !$this->object->isInstantFeedbackAnswerFixationEnabled() )
1963 if( !$this->testSequence->isQuestionChecked($questionId) )
1986 if( $this->testSession->isObjectiveOriented() )
1988 return $this->lng->txt(
"save_back_to_objective_container");
1991 return $this->lng->txt(
"save_introduction");
populateNextButtonsLeadingToSummary()
static makeDirParents($a_dir)
Create a new directory and all parent directories.
populateSyntaxStyleBlock()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
redirectAfterAutosaveCmd()
startPlayerCmd()
Start a test for the first time.
getCorrectSolutionOutput($question_id, $active_id, $pass)
Returns an output of the solution to an answer compared to the correct solution.
populateLowerNextButtonBlockLeadingToSummary()
getResultsUserdata($testSession, $active_id, $overwrite_anonymity=FALSE)
Returns the user data for a test results output.
performTestPassFinishedTasks($finishedPass)
const CMD_CONFIRM_REQUEST
outObligationsOnlySummaryCmd()
static allObligationsAnswered($test_id, $active_id, $pass)
checks wether all questions marked as obligatory were answered within the test pass with given testId...
outTestPage($directfeedback)
Outputs the question of the active sequence.
saveQuestionSolution($force=FALSE)
saves the user input of a question
populateSpecificFeedbackBlock($question_gui)
populateContentStyleBlock()
handleQuestionActionCmd()
passDetails()
Output of the learners view of an existing test pass.
populateNextButtonsLeadingToEndOfTest()
getAccessCodeFromSession()
checkOnlineTestAccess()
check access restrictions like client ip, partipating user etc.
setAnonymousIdCmd()
Sets a session variable with the test access code for an anonymous test user.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
outUserResultsOverviewCmd()
populateUpperNextButtonBlockLeadingToSummary()
confirmSubmitAnswers()
confirm submit results if confirm then results are submitted and the screen will be redirected to the...
populateLowerPostponeButtonBlock()
updateWorkingTime()
updates working time and stores state saveresult to see if question has to be stored or not ...
populateQuestionSelectionButtons()
saveTagsCmd()
Save tags for tagging gui.
isTestSignRedirectRequired($activeId, $lastFinishedPass)
isFirstPageInSequence($sequence)
static get($a_var)
Get a value.
populatePostponeButtons()
populateLowerNextButtonBlockLeadingToQuestion()
doesAccessCodeInSessionExists()
getResultsSignature()
Returns HTML code for a signature field.
backFromSummaryCmd()
Go back to the last active question from the summary.
setAnonymousId($anonymous_id)
_getSolvedQuestions($active_id, $question_fi=null)
get solved questions
handleUserSettings()
Handles some form parameters on starting and resuming a test.
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...
afterTestPassFinishedCmd()
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
confirmHintRequestCmd()
Go to hint request confirmation.
populateUpperNextButtonBlockLeadingToEndOfTest()
populatePreviousButtonsLeadingToIntroduction()
getSyntaxStylePath()
get syntax style path
populateUpperNextButtonBlockLeadingToQuestion()
gotoQuestionCmd()
Go to the question with the active sequence.
__construct($a_object)
ilTestOutputGUI constructor
maxProcessingTimeReached()
Outputs a message when the maximum processing time is reached.
showRequestedHintListCmd()
Go to requested hint list.
calculateSequence()
Calculates the sequence to determine the next question.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
isNrOfTriesReached()
nr of tries exceeded
ensureExistingTestSession(ilTestSession $testSession)
populateUpperPreviousButtonBlock($cmd, $label)
confirmFinishCmd()
The final submission of a test was confirmed.
markQuestionCmd()
Set a question solved.
fillQuestionRelatedNavigation(assQuestionGUI $questionGUI)
renders the elements for the question related navigation
$maxProcessingTimeReached
populateUpperQuestionSelectionButtonBlock()
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
populateLowerPreviousButtonBlock($cmd, $label)
outQuestionSummaryWithObligationsInfoCmd()
outCorrectSolution()
Creates an output of the solution of an answer compared to the correct solution.
isLastQuestionInSequence(assQuestionGUI $questionGUI)
populateUpperSummaryButtonBlock()
getIntroductionPageButtonLabel()
special template class to simplify handling of ITX/PEAR
resumePlayerCmd()
Resume a test at the last position.
endingTimeReached()
handle endingTimeReached
togglesidelistCmd()
Toggle side list.
static formatDate(ilDateTime $date)
Format a date public.
Output class for assessment test evaluation.
lookupExamId($active_id, $pass)
redirection script todo: (a better solution should control the processing via a xml file) ...
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...
populateQuestionMarkingBlockAsMarked()
populatePreviousButtons($sequence)
Basic GUI class for assessment questions.
static getIdleValue($fixedMode=false)
Returns the idle time in seconds.
populatePreviousButtonsLeadingToQuestion()
populateNextButtonsLeadingToQuestion()
archiveParticipantSubmission( $active, $pass)
initProcessLocker($activeId)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const HEADING_STYLE_SUBHEADING
outWorkingForm($sequence="", $test_id, $postpone_allowed, $directfeedback=false)
outQuestionSummaryCmd($fullpage=true, $contextFinishTest=false, $obligationsNotAnswered=false, $obligationsFilter=false)
Output of a summary of all test questions for test participants.
unmarkQuestionCmd()
Set a question unsolved.
handlePasswordProtectionRedirect()
static getInstance()
Get instance.
const CMD_SHOW_LIST
command constants
isTestAccessible()
test accessible returns true if the user can perform the test
showMaximumAllowedUsersReachedMessage()
outUserListOfAnswerPassesCmd()
getContentStylePath($a_style_id)
get content style path
outProcessingTime($active_id)
determineInlineScoreDisplay()
static generatePDF($pdf_output, $output_mode, $filename=null)
populateQuestionMarkingBlockAsUnmarked()
populateLowerNextButtonBlockLeadingToEndOfTest()
static buildExamId($active_id, $pass, $test_obj_id=null)
const PANEL_STYLE_SECONDARY
outIntroductionPageCmd()
Creates the introduction page for a test.
populateGenericFeedbackBlock($question_gui)
populateLowerSummaryButtonBlock()
Service GUI class for tests.
initTestCmd()
Start a test for the first time after a redirect.
finishTestCmd($requires_confirmation=true)
isMaxProcessingTimeReached()
Checks wheather the maximum processing time is reached or not.
populateUpperPostponeButtonBlock()
static redirect($a_script)
http redirect to other script
static getWebspaceDir($mode="filesystem")
get webspace directory
populateCancelButtonBlock()
populateLowerQuestionSelectionButtonBlock()
populateSolutionBlock($solutionoutput)
populateScoreBlock($reachedPoints, $maxPoints)
isParticipantsAnswerFixed($questionId)
Output class for assessment test execution.
Confirmation screen class.