ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestPlayerAbstractGUI Class Reference
+ Inheritance diagram for ilTestPlayerAbstractGUI:
+ Collaboration diagram for ilTestPlayerAbstractGUI:

Public Member Functions

 __construct (ilObjTest $object)
 
 executeCommand ()
 
 saveTagsCmd ()
 Save tags for tagging gui. More...
 
 updateWorkingTime ()
 updates working time and stores state saveresult to see if question has to be stored or not More...
 
 removeIntermediateSolution ()
 
 saveQuestionSolution (bool $authorized=true, bool $force=false)
 
 suspendTestCmd ()
 
 isMaxProcessingTimeReached ()
 
 setAnonymousIdCmd ()
 Sets a session variable with the test access code for an anonymous test user. More...
 
 getLockParameter ()
 
 displayAccessCodeCmd ()
 
 accessCodeConfirmedCmd ()
 
 handleUserSettings ()
 Handles some form parameters on starting and resuming a test. More...
 
 redirectAfterAutosaveCmd ()
 Redirect the user after an automatic save when the time limit is reached. More...
 
 redirectAfterDashboardCmd ()
 
 autosaveCmd ()
 Automatically save a user answer while working on the test (called repeatedly by asynchronous posts in configured autosave interval) More...
 
 autosaveOnTimeLimitCmd ()
 Automatically save a user answer when the limited duration of a test run is reached (called by synchronous form submit when the remaining time count down reaches zero) More...
 
 finishTestCmd ()
 
 buildFinishTestModal ()
 
 redirectBackCmd ()
 
 showFinalStatementCmd ()
 
 isTestAccessible ()
 test accessible returns true if the user can perform the test More...
 
 isNrOfTriesReached ()
 nr of tries exceeded More...
 
 endingTimeReached ()
 handle endingTimeReached More...
 
 max_processing_time_reached ()
 Outputs a message when the maximum processing time is reached. More...
 
 confirmSubmitAnswers ()
 confirm submit results if confirm then results are submitted and the screen will be redirected to the startpage of the test public More...
 
 outProcessingTime (int $active_id)
 
 checkWorkingTimeCmd ()
 This is asynchronously called by tpl.workingtime.js to check for changes in the user's processing time for a test. More...
 
 outQuestionSummaryCmd ()
 Output of a summary of all test questions for test participants. More...
 
 backFromFinishingCmd ()
 
 outCorrectSolution ()
 Creates an output of the solution of an answer compared to the correct solution. More...
 
 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 will be shown) More...
 
 getContentBlockName ()
 Returns the name of the current content block (depends on the kiosk mode setting) More...
 
 outUserResultsOverviewCmd ()
 
- Public Member Functions inherited from ilTestServiceGUI
 isContextResultPresentation ()
 
 setContextResultPresentation (bool $contextResultPresentation)
 
 setParticipantData (ilTestParticipantData $participantData)
 
 getParticipantData ()
 
 getPassOverviewTableData (ilTestSession $test_session, array $passes, bool $with_results)
 
 setObjectiveOrientedContainer (ilTestObjectiveOrientedContainer $objective_oriented_container)
 
 getObjectiveOrientedContainer ()
 
 executeCommand ()
 execute command More...
 
 buildPassOverviewTableGUI (ilTestEvaluationGUI $target_gui)
 
 getPassListOfAnswers (&$result_array, $active_id, $pass, $show_solutions=false, $only_answered_questions=false, $show_question_only=false, $show_reached_points=false, $anchorNav=false, ?ilTestQuestionRelatedObjectivesList $objectives_list=null, ?ResultsTitlesBuilder $testResultHeaderLabelBuilder=null)
 Returns the list of answers of a users test pass. More...
 
 getResultsSignature ()
 Returns HTML code for a signature field. More...
 
 getAdditionalUsrDataHtmlAndPopulateWindowTitle ($testSession, $active_id, $overwrite_anonymity=false)
 Returns the user data for a test results output. More...
 
 getCorrectSolutionOutput ($question_id, $active_id, $pass, ?ilTestQuestionRelatedObjectivesList $objectives_list=null)
 Returns an output of the solution to an answer compared to the correct solution. More...
 
 getObject ()
 

Data Fields

const PRESENTATION_MODE_VIEW = 'view'
 
const PRESENTATION_MODE_EDIT = 'edit'
 
const FIXED_SHUFFLER_SEED_MIN_LENGTH = 8
 
bool $max_processing_time_reached
 
bool $ending_time_reached
 
int $ref_id
 
const FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM = 'followup_qst_locks_prevent_confirmation'
 

Protected Member Functions

 buildTestPassQuestionList ()
 
 populateQuestionOptionalMessage ()
 
 checkReadAccess ()
 
 checkTestExecutable ()
 
 checkTestSessionUser (ilTestSession $test_session)
 
 ensureExistingTestSession (ilTestSession $test_session)
 
 initProcessLocker ($activeId)
 
 canSaveResult ()
 
 determineInlineScoreDisplay ()
 
 populateTestNavigationToolbar (ilTestNavigationToolbarGUI $toolbar_gui)
 
 populateQuestionNavigation ($sequence_element, $primary_next)
 
 populatePreviousButtons ()
 
 populateNextButtons ($primary_next)
 
 populateLowerNextButtonBlock ($primary_next)
 
 populateUpperNextButtonBlock ($primaryNext)
 
 populateLowerPreviousButtonBlock ()
 
 populateUpperPreviousButtonBlock ()
 
 populateSpecificFeedbackBlock (assQuestionGUI $question_gui)
 
 populateGenericFeedbackBlock (assQuestionGUI $question_gui, $solutionCorrect)
 
 populateScoreBlock ($reachedPoints, $maxPoints)
 
 populateSolutionBlock ($solutionoutput)
 
 populateSyntaxStyleBlock ()
 
 populateContentStyleBlock ()
 
 startPlayerCmd ()
 Start a test for the first time. More...
 
 resumePlayerCmd ()
 
 initTestCmd ()
 Start a test for the first time after a redirect. More...
 
 redirectAfterFinish ()
 
 getCurrentQuestionId ()
 
 detectChangesCmd ()
 Detect changes sent in the background to the server This is called by ajax from ilTestPlayerQuestionEditControl.js It is needed by Java and Flash question and eventually plgin question vtypes. More...
 
 submitIntermediateSolutionCmd ()
 
 markQuestionAndSaveIntermediateCmd ()
 
 markQuestionCmd ()
 Set a question solved. More...
 
 unmarkQuestionAndSaveIntermediateCmd ()
 
 unmarkQuestionCmd ()
 Set a question unsolved. More...
 
 performTestPassFinishedTasks (StatusOfAttempt $status_of_attempt)
 
 sendNewPassFinishedNotificationEmailIfActivated (int $active_id, int $pass)
 
 afterTestPassFinishedCmd ()
 
 prepareTestPage ($presentationMode, $sequenceElement, $question_id)
 
 isOptionalQuestionAnsweringConfirmationRequired (int $sequence_key)
 
 isShowingPostponeStatusReguired (int $question_id)
 
 showQuestionViewable (assQuestionGUI $question_gui, string $form_action, bool $is_question_worked_through, bool $instant_response)
 
 showQuestionEditable (assQuestionGUI $question_gui, string $form_action, bool $is_question_worked_through, bool $instant_response)
 
 determineSolutionPassIndex (assQuestionGUI $question_gui)
 
 showQuestionCmd ()
 
 editSolutionCmd ()
 
 submitSolutionCmd ()
 
 revertChangesCmd ()
 
 discardSolutionCmd ()
 
 skipQuestionCmd ()
 
 startTestCmd ()
 
 showSideList ($current_sequence_element)
 
 showRequestedHintListCmd ()
 Go to requested hint list. More...
 
 confirmHintRequestCmd ()
 Go to hint request confirmation. More...
 
 isFirstQuestionInSequence ($sequence_element)
 
 isLastQuestionInSequence ($sequence_element)
 
 handleQuestionActionCmd ()
 
 showInstantResponseCmd ()
 
 nextQuestionCmd ()
 
 previousQuestionCmd ()
 
 prepareSummaryPage ()
 
 initTestPageTemplate ()
 
 handlePasswordProtectionRedirect ()
 
 isParticipantsAnswerFixed ($question_id)
 
 getIntroductionPageButtonLabel ()
 
 initAssessmentSettings ()
 
 handleSkillTriggering (ilTestSession $test_session)
 
 showAnswerOptionalQuestionsConfirmation ()
 
 confirmAnswerOptionalQuestionsCmd ()
 
 cancelAnswerOptionalQuestionsCmd ()
 
 populateHelperGuiContent ($helperGui)
 
 getTestNavigationToolbarGUI ()
 
 buildReadOnlyStateQuestionNavigationGUI ($question_id)
 
 buildEditableStateQuestionNavigationGUI ($question_id)
 
 getFinishTestCommand ()
 
 populateInstantResponseModal (assQuestionGUI $question_gui, $nav_url)
 
 populateInstantResponseBlocks (assQuestionGUI $question_gui, $authorizedSolution)
 
 populateFeedbackBlockHeader ($withFocusAnchor)
 
 populateFeedbackBlockMessage (string $a_message)
 
 getCurrentSequenceElement ()
 
 getSequenceElementParameter ()
 
 getPresentationModeParameter ()
 
 getInstantResponseParameter ()
 
 getNextCommandParameter ()
 
 getNextSequenceParameter ()
 
 getNavigationUrlParameter ()
 
 getAnswerChangedParameter ()
 
 setAnswerChangedParameter (bool $changed=true)
 
 handleIntermediateSubmit ()
 
 saveNavigationPreventConfirmation ()
 
 getQuestionGuiInstance (int $question_id, bool $from_cache=true)
 
 getQuestionInstance (int $question_id, bool $from_cache=true)
 
 initTestQuestionConfig (assQuestion $question_obj)
 
 handleTearsAndAngerQuestionIsNull (int $question_id, $sequence_element)
 
 populateMessageContent (string $content_html)
 
 populateModals ()
 
 populateDiscardSolutionModal ()
 
 populateNextLocksUnchangedModal ()
 
 populateNextLocksChangedModal ()
 
 setFollowUpQuestionLocksConfirmationPrevented ()
 
 isFollowUpQuestionLocksConfirmationPrevented ()
 
 populateQuestionEditControl (assQuestionGUI $question_gui)
 
 getQuestionsDefaultPresentationMode ()
 
 registerForcedFeedbackNavUrl (string $forced_feedback_nav_url)
 
 getRegisteredForcedFeedbackNavUrl ()
 
 isForcedFeedbackNavUrlRegistered ()
 
 unregisterForcedFeedbackNavUrl ()
 
 handleFileUploadCmd ()
 
 updateLearningProgressOnTestStart ()
 
 submitSolutionAndNextCmd ()
 
 handleQuestionPostponing (int $question_id)
 
 handleCheckTestPassValid ()
 
 performTearsAndAngerBrokenConfessionChecks ()
 
 generateRandomTestPassForActiveUser ()
 
 adoptUserSolutionsFromPreviousPass ()
 
 handleTearsAndAngerNoObjectiveOrientedQuestion ()
 
 handlePrimaryButton (ilTestNavigationToolbarGUI $navigation_toolbar_gui, int $current_question_id)
 
 getTestPlayerTitle ()
 
- Protected Member Functions inherited from ilTestServiceGUI
 getPassDetailsOverviewTableGUI (array $result_array, int $active_id, int $pass, ilTestServiceGUI $target_gui, string $target_cmd, ?ilTestQuestionRelatedObjectivesList $objectives_list=null, bool $multiple_objectives_involved=true)
 
 buildPassDetailsOverviewTableGUI (ilTestServiceGUI $target_gui, string $target_cmd)
 
 isGradingMessageRequired ()
 
 getGradingMessageBuilder (int $active_id)
 
 buildQuestionRelatedObjectivesList (ilLOTestQuestionAdapter $objectives_adapter, ilTestQuestionSequence $test_sequence)
 
 populateContent (string $content)
 
 outCorrectSolutionCmd ()
 
 outCorrectSolution ()
 
 populatePassFinishDate (ilTemplate $tpl, ?int $pass_finish_date)
 
 populateExamId (ilTemplate $tpl, int $active_id, int $pass)
 

Protected Attributes

const FINISH_TEST_CMD = 'finishTest'
 
ilTestPasswordChecker $password_checker
 
ilTestProcessLocker $process_locker
 
ilTestSession $test_session = null
 
ilSetting $ass_settings = null
 
ilTestSequence $test_sequence = null
 
ilTestQuestionRelatedObjectivesList $question_related_objectives_list
 
InterruptiveModal $finish_test_modal = null
 
const DISCARD_MODAL = "discard_modal"
 
const LOCKS_CHANGED_MODAL = "locks_changed_modal"
 
const LOCKS_UNCHANGED_MODAL = "locks_unchanged_modal"
 
array $modal_signals = []
 
- Protected Attributes inherited from ilTestServiceGUI
readonly RequestDataCollector $testrequest
 
readonly GeneralQuestionPropertiesRepository $questionrepository
 
readonly TestQuestionsRepository $testquestionsrepository
 
ilTestService $service = null
 
readonly ilDBInterface $db
 
readonly ilLanguage $lng
 
readonly TestLogger $logger
 
readonly ilHelpGUI $help
 
readonly ilRbacSystem $rbac_system
 
ilGlobalTemplateInterface ilTemplate $tpl
 sk 2023-08-01: We need this union type, even if it is wrong! To change this More...
 
readonly ContentStyle $content_style
 
readonly ilErrorHandling $error
 
ilAccess $access
 
readonly HTTPServices $http
 
readonly ilCtrlInterface $ctrl
 
readonly ilToolbarGUI $toolbar
 
readonly ilTabsGUI $tabs
 
readonly ilObjectDataCache $obj_cache
 
readonly ilComponentRepository $component_repository
 
readonly ilObjUser $user
 
readonly ArrayBasedRequestWrapper $post_wrapper
 
readonly ilNavigationHistory $navigation_history
 
readonly Refinery $refinery
 
readonly UIFactory $ui_factory
 
readonly UIRenderer $ui_renderer
 
readonly SkillService $skills_service
 
readonly ilTestShuffler $shuffler
 
readonly ResultsDataFactory $results_data_factory
 
readonly ResultsPresentationFactory $results_presentation_factory
 
readonly ILIAS $ilias
 
readonly ilSetting $settings
 
readonly GlobalScreenServices $global_screen
 
readonly ilTree $tree
 
int $ref_id
 
ilTestSessionFactory $test_session_factory = null
 
ilTestSequenceFactory $test_sequence_factory = null
 
ilTestParticipantData $participantData = null
 
TestResultRepository $test_pass_result_repository
 
ilTestParticipantAccessFilterFactory $participant_access_filter
 

Private Member Functions

 buildQuestionObject ()
 
 save (assQuestion $question_obj, bool $authorized)
 
 buildNextButtonInstance ($primaryNext)
 
 buildPreviousButtonInstance ()
 
 getOnLoadCodeForNavigationButtons (string $target, string $cmd)
 
 getQuestionFeedbackModalHtml (ilTemplate $tpl, string $nav_url)
 
 isValidSequenceElement ($sequence_element)
 

Private Attributes

array $cached_question_guis = []
 
array $cached_question_objects = []
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTestPlayerAbstractGUI::__construct ( ilObjTest  $object)

Definition at line 78 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

79  {
80  parent::__construct($object);
81  $this->ref_id = $this->testrequest->getRefId();
82  $this->password_checker = new ilTestPasswordChecker($this->rbac_system, $this->user, $this->object, $this->lng);
83  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ accessCodeConfirmedCmd()

ilTestPlayerAbstractGUI::accessCodeConfirmedCmd ( )

Definition at line 810 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), and ilTestPlayerCommands\START_TEST.

+ Here is the call graph for this function:

◆ adoptUserSolutionsFromPreviousPass()

ilTestPlayerAbstractGUI::adoptUserSolutionsFromPreviousPass ( )
protected

Definition at line 3202 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\user().

Referenced by startTestCmd().

3202  : void
3203  {
3204  $ass_settings = new ilSetting('assessment');
3205 
3206  $userSolutionAdopter = new ilAssQuestionUserSolutionAdopter($this->db, $ass_settings);
3207  $userSolutionAdopter->setUserId($this->user->getId());
3208  $userSolutionAdopter->setActiveId($this->test_session->getActiveId());
3209  $userSolutionAdopter->setTargetPass($this->test_sequence->getPass());
3210  $userSolutionAdopter->setQuestionIds($this->test_sequence->getOptionalQuestions());
3211 
3212  $userSolutionAdopter->perform();
3213  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterTestPassFinishedCmd()

ilTestPlayerAbstractGUI::afterTestPassFinishedCmd ( )
protected

Definition at line 1051 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\object(), ilUtil\redirect(), redirectBackCmd(), and ilTestPlayerCommands\SHOW_FINAL_STATMENT.

1052  {
1053  // show final statement
1054  if (!$this->testrequest->isset('skipfinalstatement')) {
1055  if ($this->object->getMainSettings()->getFinishingSettings()->getConcludingRemarksEnabled()) {
1056  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_FINAL_STATMENT);
1057  }
1058  }
1059 
1060  // redirect after test
1061  $redirection_url = $this->object->getMainSettings()->getFinishingSettings()->getRedirectionUrl();
1062  if (!$this->object->canShowTestResults($this->test_session)
1063  && $this->object->getMainSettings()->getFinishingSettings()->getRedirectionMode() !== '0'
1064  && $redirection_url !== '') {
1065  if ($this->object->isRedirectModeKiosk()) {
1066  if ($this->object->getKioskMode()) {
1067  ilUtil::redirect($redirection_url);
1068  }
1069  } else {
1070  ilUtil::redirect($redirection_url);
1071  }
1072  }
1073 
1074  // default redirect (pass overview when enabled, otherwise testscreen)
1075  $this->redirectBackCmd();
1076  }
static redirect(string $a_script)
+ Here is the call graph for this function:

◆ autosaveCmd()

ilTestPlayerAbstractGUI::autosaveCmd ( )

Automatically save a user answer while working on the test (called repeatedly by asynchronous posts in configured autosave interval)

Definition at line 870 of file class.ilTestPlayerAbstractGUI.php.

References canSaveResult(), exit, getAnswerChangedParameter(), getCurrentQuestionId(), isParticipantsAnswerFixed(), ILIAS\Repository\lng(), and saveQuestionSolution().

870  : void
871  {
872  $test_can_run = $this->object->isExecutable($this->test_session, $this->test_session->getUserId());
873  if (!$test_can_run['executable']) {
874  echo $test_can_run['errormessage'];
875  exit;
876  }
877  if ($this->testrequest->getPostKeys() === []) {
878  echo '';
879  exit;
880  }
881 
882  if (!$this->canSaveResult() || $this->isParticipantsAnswerFixed($this->getCurrentQuestionId())) {
883  echo '-IGNORE-';
884  exit;
885  }
886 
887  if ($this->saveQuestionSolution(!$this->getAnswerChangedParameter(), true)) {
888  echo $this->lng->txt('autosave_success');
889  exit;
890  }
891 
892  echo $this->lng->txt('autosave_failed');
893  exit;
894  }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:

◆ autosaveOnTimeLimitCmd()

ilTestPlayerAbstractGUI::autosaveOnTimeLimitCmd ( )

Automatically save a user answer when the limited duration of a test run is reached (called by synchronous form submit when the remaining time count down reaches zero)

Definition at line 900 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentQuestionId(), isParticipantsAnswerFixed(), ilTestPlayerCommands\REDIRECT_ON_TIME_LIMIT, and saveQuestionSolution().

901  {
902  if (!$this->isParticipantsAnswerFixed($this->getCurrentQuestionId())) {
903  $this->saveQuestionSolution(false, true);
904  }
905  $this->ctrl->redirect($this, ilTestPlayerCommands::REDIRECT_ON_TIME_LIMIT);
906  }
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:

◆ backFromFinishingCmd()

ilTestPlayerAbstractGUI::backFromFinishingCmd ( )

Definition at line 2004 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), and ilTestPlayerCommands\SHOW_QUESTION.

+ Here is the call graph for this function:

◆ buildEditableStateQuestionNavigationGUI()

ilTestPlayerAbstractGUI::buildEditableStateQuestionNavigationGUI (   $question_id)
protected

Definition at line 2504 of file class.ilTestPlayerAbstractGUI.php.

References ilObjTest\_getSolvedQuestions(), ilTestPlayerCommands\CONFIRM_HINT_REQUEST, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilTestPlayerCommands\MARK_QUESTION_SAVE, ILIAS\Repository\object(), ilTestPlayerCommands\REVERT_CHANGES, ilTestPlayerCommands\SHOW_INSTANT_RESPONSE, ilTestPlayerCommands\SHOW_REQUESTED_HINTS_LIST, ilTestPlayerCommands\SUBMIT_SOLUTION, and ilTestPlayerCommands\UNMARK_QUESTION_SAVE.

Referenced by showQuestionEditable().

2505  {
2506  $navigation_gui = new ilTestQuestionNavigationGUI(
2507  $this->lng,
2508  $this->ui_factory,
2509  $this->ui_renderer
2510  );
2511 
2512  // fau: testNav - add a 'revert changes' link for editable question
2513  $navigation_gui->setRevertChangesLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::REVERT_CHANGES));
2514 
2515  if ($this->object->getSpecificAnswerFeedback()
2516  || $this->object->getGenericAnswerFeedback()
2517  || $this->object->getAnswerFeedbackPoints()
2518  || $this->object->getInstantFeedbackSolution()) {
2519  $navigation_gui->setAnswerFreezingEnabled($this->object->isInstantFeedbackAnswerFixationEnabled());
2520 
2521  if ($this->object->isForceInstantFeedbackEnabled()) {
2522  $navigation_gui->setForceInstantResponseEnabled(true);
2523  $navigation_gui->setInstantFeedbackCommand(ilTestPlayerCommands::SUBMIT_SOLUTION);
2524  } else {
2525  $navigation_gui->setInstantFeedbackCommand(ilTestPlayerCommands::SHOW_INSTANT_RESPONSE);
2526  }
2527  }
2528 
2529  // hints
2530  if ($this->object->isOfferingQuestionHintsEnabled()) {
2531  $activeId = $this->test_session->getActiveId();
2532  $pass = $this->test_session->getPass();
2533 
2534  $questionHintTracking = new ilAssQuestionHintTracking($question_id, $activeId, $pass);
2535 
2536  if ($questionHintTracking->requestsPossible()) {
2537  $navigation_gui->setRequestHintCommand(ilTestPlayerCommands::CONFIRM_HINT_REQUEST);
2538  }
2539 
2540  if ($questionHintTracking->requestsExist()) {
2541  $navigation_gui->setShowHintsCommand(ilTestPlayerCommands::SHOW_REQUESTED_HINTS_LIST);
2542  }
2543  }
2544 
2545  if ($this->object->getShowMarker()) {
2546  $solved_array = ilObjTest::_getSolvedQuestions($this->test_session->getActiveId(), $question_id);
2547  $solved = 0;
2548 
2549  if (count($solved_array) > 0) {
2550  $solved = array_pop($solved_array);
2551  $solved = $solved['solved'];
2552  }
2553 
2554  if ($solved === 1) {
2555  $navigation_gui->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::UNMARK_QUESTION_SAVE));
2556  $navigation_gui->setQuestionMarked(true);
2557  } else {
2558  $navigation_gui->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::MARK_QUESTION_SAVE));
2559  $navigation_gui->setQuestionMarked(false);
2560  }
2561  }
2562  return $navigation_gui;
2563  }
static _getSolvedQuestions($active_id, $question_fi=null)
get solved questions
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFinishTestModal()

ilTestPlayerAbstractGUI::buildFinishTestModal ( )

Definition at line 1078 of file class.ilTestPlayerAbstractGUI.php.

References $message, ILIAS\Repository\ctrl(), ilTestPlayerCommands\FINISH_TEST, ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by finishTestCmd().

1079  {
1080  $class = get_class($this);
1081  $this->ctrl->setParameterByClass($class, 'finalization_confirmed', 'confirmed');
1082  $next_url = $this->ctrl->getLinkTargetByClass($class, ilTestPlayerCommands::FINISH_TEST);
1083  $this->ctrl->clearParameterByClass($class, 'finalization_confirmed');
1084 
1085  $message = $this->lng->txt('tst_finish_confirmation_question');
1086  if (($this->object->getNrOfTries() - 1) === $this->test_session->getPass()) {
1087  $message = $this->lng->txt('tst_finish_confirmation_question_no_attempts_left');
1088  }
1089 
1090  return $this->ui_factory->modal()->interruptive(
1091  $this->lng->txt('finish_test'),
1092  $message,
1093  $next_url
1094  )->withActionButtonLabel($this->lng->txt('tst_finish_confirm_button'));
1095  }
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildNextButtonInstance()

ilTestPlayerAbstractGUI::buildNextButtonInstance (   $primaryNext)
private
Parameters
bool$primaryNext
Returns

Definition at line 552 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getOnLoadCodeForNavigationButtons(), ILIAS\Repository\lng(), and ilTestPlayerCommands\NEXT_QUESTION.

Referenced by populateLowerNextButtonBlock(), and populateUpperNextButtonBlock().

553  {
554  $target = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::NEXT_QUESTION);
555  if ($primaryNext) {
556  $button = $this->ui_factory->button()->primary(
557  $this->lng->txt('next_question') . $this->ui_renderer->render($this->ui_factory->symbol()->glyph()->next()),
558  ''
560  } else {
561  $button = $this->ui_factory->button()->standard(
562  $this->lng->txt('next_question') . $this->ui_renderer->render($this->ui_factory->symbol()->glyph()->next()),
563  ''
565  }
566  return $button;
567  }
getOnLoadCodeForNavigationButtons(string $target, string $cmd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPreviousButtonInstance()

ilTestPlayerAbstractGUI::buildPreviousButtonInstance ( )
private
Parameters
$disabled
Returns

Definition at line 573 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getOnLoadCodeForNavigationButtons(), ILIAS\Repository\lng(), ilTestPlayerCommands\PREVIOUS_QUESTION, and ILIAS\UI\Implementation\Component\withOnLoadCode().

Referenced by populateLowerPreviousButtonBlock(), and populateUpperPreviousButtonBlock().

574  {
575  $target = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::PREVIOUS_QUESTION);
576  $button = $this->ui_factory->button()->standard(
577  $this->ui_renderer->render($this->ui_factory->symbol()->glyph()->back()) . $this->lng->txt('previous_question'),
578  ''
580  return $button;
581  }
getOnLoadCodeForNavigationButtons(string $target, string $cmd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildQuestionObject()

ilTestPlayerAbstractGUI::buildQuestionObject ( )
private

Definition at line 386 of file class.ilTestPlayerAbstractGUI.php.

References getQuestionInstance(), isParticipantsAnswerFixed(), and null.

Referenced by saveQuestionSolution().

386  : ?assQuestion
387  {
388  $q_id = $this->test_sequence->getQuestionForSequence($this->testrequest->int('sequence'));
389 
390  if ($this->isParticipantsAnswerFixed($q_id)) {
391  // should only be reached by firebugging the disabled form in ui
392  throw new ilTestException('not allowed request');
393  }
394 
395  if ($q_id === null) {
396  return null;
397  }
398 
399  return $this->getQuestionInstance($q_id);
400  }
getQuestionInstance(int $question_id, bool $from_cache=true)
Base Exception for all Exceptions relating to Modules/Test.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildReadOnlyStateQuestionNavigationGUI()

ilTestPlayerAbstractGUI::buildReadOnlyStateQuestionNavigationGUI (   $question_id)
protected

Definition at line 2470 of file class.ilTestPlayerAbstractGUI.php.

References ilObjTest\_getSolvedQuestions(), ILIAS\Repository\ctrl(), ilTestPlayerCommands\EDIT_SOLUTION, isParticipantsAnswerFixed(), ILIAS\Repository\lng(), ilTestPlayerCommands\MARK_QUESTION, ILIAS\Repository\object(), and ilTestPlayerCommands\UNMARK_QUESTION.

Referenced by showQuestionViewable().

2471  {
2472  $navigationGUI = new ilTestQuestionNavigationGUI(
2473  $this->lng,
2474  $this->ui_factory,
2475  $this->ui_renderer
2476  );
2477 
2478  if (!$this->isParticipantsAnswerFixed($question_id)) {
2479  $navigationGUI->setEditSolutionCommand(ilTestPlayerCommands::EDIT_SOLUTION);
2480  }
2481 
2482  if ($this->object->getShowMarker()) {
2483  $solved_array = ilObjTest::_getSolvedQuestions($this->test_session->getActiveId(), $question_id);
2484  $solved = 0;
2485 
2486  if (count($solved_array) > 0) {
2487  $solved = array_pop($solved_array);
2488  $solved = $solved["solved"];
2489  }
2490  // fau: testNav - change question mark command to link target
2491  if ($solved == 1) {
2492  $navigationGUI->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::UNMARK_QUESTION));
2493  $navigationGUI->setQuestionMarked(true);
2494  } else {
2495  $navigationGUI->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::MARK_QUESTION));
2496  $navigationGUI->setQuestionMarked(false);
2497  }
2498  }
2499  // fau.
2500 
2501  return $navigationGUI;
2502  }
static _getSolvedQuestions($active_id, $question_fi=null)
get solved questions
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTestPassQuestionList()

ilTestPlayerAbstractGUI::buildTestPassQuestionList ( )
abstractprotected

Referenced by executeCommand(), and handleSkillTriggering().

+ Here is the caller graph for this function:

◆ cancelAnswerOptionalQuestionsCmd()

ilTestPlayerAbstractGUI::cancelAnswerOptionalQuestionsCmd ( )
protected

Definition at line 2442 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

2443  {
2444  if ($this->object->getListOfQuestions()) {
2445  $this->ctrl->setParameter($this, 'activecommand', 'summary');
2446  } else {
2447  $this->ctrl->setParameter($this, 'activecommand', 'previous');
2448  }
2449 
2450  $this->ctrl->redirect($this, 'redirectQuestion');
2451  }
+ Here is the call graph for this function:

◆ canSaveResult()

ilTestPlayerAbstractGUI::canSaveResult ( )
protected

Definition at line 438 of file class.ilTestPlayerAbstractGUI.php.

References isMaxProcessingTimeReached(), and isNrOfTriesReached().

Referenced by autosaveCmd(), and saveQuestionSolution().

438  : bool
439  {
440  return !$this->object->endingTimeReached() && !$this->isMaxProcessingTimeReached() && !$this->isNrOfTriesReached();
441  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkReadAccess()

ilTestPlayerAbstractGUI::checkReadAccess ( )
protected

Definition at line 239 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\user().

Referenced by executeCommand().

239  : bool|string
240  {
241  if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
242  return $this->lng->txt('cannot_execute_test');
243  }
244 
245  $participant_access = (new ilTestAccess($this->object->getRefId()))->isParticipantAllowed(
246  $this->object->getId(),
247  $this->user->getId()
248  );
249  if ($participant_access !== ParticipantAccess::ALLOWED) {
250  return $participant_access->getAccessForbiddenMessage($this->lng);
251  }
252 
253  return true;
254  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkTestExecutable()

ilTestPlayerAbstractGUI::checkTestExecutable ( )
protected

Definition at line 256 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl().

Referenced by executeCommand().

257  {
258  $executable = $this->object->isExecutable($this->test_session, $this->test_session->getUserId());
259 
260  if (!$executable['executable']) {
261  $this->tpl->setOnScreenMessage('info', $executable['errormessage'], true);
262  $this->ctrl->redirectByClass([ilRepositoryGUI::class, ilObjTestGUI::class, TestScreenGUI::class]);
263  }
264  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkTestSessionUser()

ilTestPlayerAbstractGUI::checkTestSessionUser ( ilTestSession  $test_session)
protected

Definition at line 266 of file class.ilTestPlayerAbstractGUI.php.

References ilTestSession\getUserId(), and ILIAS\Repository\user().

Referenced by executeCommand().

266  : void
267  {
268  if ($test_session->getUserId() != $this->user->getId()) {
269  throw new ilTestException('active id given does not relate to current user!');
270  }
271  }
Base Exception for all Exceptions relating to Modules/Test.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkWorkingTimeCmd()

ilTestPlayerAbstractGUI::checkWorkingTimeCmd ( )

This is asynchronously called by tpl.workingtime.js to check for changes in the user's processing time for a test.

This includes extra time added during the test, as this is checked by ilObjTest::getProcessingTimeInSeconds(). The Javascript side then updates the test timer without needing to reload the test page.

Definition at line 1895 of file class.ilTestPlayerAbstractGUI.php.

References exit.

1895  : void
1896  {
1897  $active_id = $this->test_session->getActiveId();
1898  echo (string) $this->object->getProcessingTimeInSeconds($active_id);
1899  exit;
1900  }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ confirmAnswerOptionalQuestionsCmd()

ilTestPlayerAbstractGUI::confirmAnswerOptionalQuestionsCmd ( )
protected

Definition at line 2433 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl().

2434  {
2435  $this->test_sequence->setAnsweringOptionalQuestionsConfirmed(true);
2436  $this->test_sequence->saveToDb();
2437 
2438  $this->ctrl->setParameter($this, 'activecommand', 'gotoquestion');
2439  $this->ctrl->redirect($this, 'redirectQuestion');
2440  }
+ Here is the call graph for this function:

◆ confirmHintRequestCmd()

ilTestPlayerAbstractGUI::confirmHintRequestCmd ( )
protected

Go to hint request confirmation.

Definition at line 2163 of file class.ilTestPlayerAbstractGUI.php.

References ilAssQuestionHintRequestGUI\CMD_CONFIRM_REQUEST, ILIAS\Repository\ctrl(), and handleIntermediateSubmit().

2164  {
2165  // fau: testNav - handle intermediate submit for confirming hint requests
2166  $this->handleIntermediateSubmit();
2167  // fau.
2168 
2169  $this->ctrl->setParameter($this, 'pmode', self::PRESENTATION_MODE_EDIT);
2170 
2171  $this->ctrl->redirectByClass('ilAssQuestionHintRequestGUI', ilAssQuestionHintRequestGUI::CMD_CONFIRM_REQUEST);
2172  }
+ Here is the call graph for this function:

◆ confirmSubmitAnswers()

ilTestPlayerAbstractGUI::confirmSubmitAnswers ( )

confirm submit results if confirm then results are submitted and the screen will be redirected to the startpage of the test public

Definition at line 1777 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getContentBlockName(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

1778  {
1779  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_submit_answers_confirm.html", "components/ILIAS/Test");
1780  $this->tpl->setCurrentBlock("adm_content");
1781  if ($this->object->isTestFinished($this->test_session->getActiveId())) {
1782  $this->tpl->setCurrentBlock("not_submit_allowed");
1783  $this->tpl->setVariable("TEXT_ALREADY_SUBMITTED", $this->lng->txt("tst_already_submitted"));
1784  $this->tpl->setVariable("BTN_OK", $this->lng->txt("tst_show_answer_sheet"));
1785  } else {
1786  $this->tpl->setCurrentBlock("submit_allowed");
1787  $this->tpl->setVariable("TEXT_CONFIRM_SUBMIT_RESULTS", $this->lng->txt("tst_confirm_submit_answers"));
1788  $this->tpl->setVariable("BTN_OK", $this->lng->txt("tst_submit_results"));
1789  }
1790  $this->tpl->setVariable("BTN_BACK", $this->lng->txt("back"));
1791  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "finalSubmission"));
1792  $this->tpl->parseCurrentBlock();
1793  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:

◆ detectChangesCmd()

ilTestPlayerAbstractGUI::detectChangesCmd ( )
protected

Detect changes sent in the background to the server This is called by ajax from ilTestPlayerQuestionEditControl.js It is needed by Java and Flash question and eventually plgin question vtypes.

Definition at line 915 of file class.ilTestPlayerAbstractGUI.php.

References exit, getCurrentQuestionId(), and getQuestionInstance().

916  {
917  $question_id = $this->getCurrentQuestionId();
918  $state = $this->getQuestionInstance($question_id)->lookupForExistingSolutions(
919  $this->test_session->getActiveId(),
920  $this->test_session->getPass()
921  );
922  $result = [];
923  $result['isAnswered'] = $state['authorized'];
924  $result['isAnswerChanged'] = $state['intermediate'];
925 
926  echo json_encode($result);
927  exit;
928  }
getQuestionInstance(int $question_id, bool $from_cache=true)
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ determineInlineScoreDisplay()

ilTestPlayerAbstractGUI::determineInlineScoreDisplay ( )
protected

Definition at line 459 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\object().

Referenced by populateInstantResponseBlocks().

459  : bool
460  {
461  $show_question_inline_score = false;
462  if ($this->object->getAnswerFeedbackPoints()) {
463  $show_question_inline_score = true;
464  return $show_question_inline_score;
465  }
466  return $show_question_inline_score;
467  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineSolutionPassIndex()

ilTestPlayerAbstractGUI::determineSolutionPassIndex ( assQuestionGUI  $question_gui)
protected

Definition at line 1318 of file class.ilTestPlayerAbstractGUI.php.

References assQuestionGUI\getObject(), and ILIAS\Repository\object().

Referenced by showQuestionEditable().

1318  : int
1319  {
1320  if ($this->object->isPreviousSolutionReuseEnabled($this->test_session->getActiveId())) {
1321  $currentSolutionAvailable = $question_gui->getObject()->authorizedOrIntermediateSolutionExists(
1322  $this->test_session->getActiveId(),
1323  $this->test_session->getPass()
1324  );
1325 
1326  if (!$currentSolutionAvailable) {
1327  $previousPass = $question_gui->getObject()->getSolutionMaxPass(
1328  $this->test_session->getActiveId()
1329  );
1330 
1331  $previousSolutionAvailable = $question_gui->getObject()->authorizedSolutionExists(
1332  $this->test_session->getActiveId(),
1333  $previousPass
1334  );
1335 
1336  if ($previousSolutionAvailable) {
1337  return $previousPass;
1338  }
1339 
1340  }
1341  }
1342 
1343  return $this->test_session->getPass();
1344  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ discardSolutionCmd()

ilTestPlayerAbstractGUI::discardSolutionCmd ( )
protected

Definition at line 1562 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, ILIAS\Repository\ctrl(), getCurrentSequenceElement(), ilTestServiceGUI\getObject(), getQuestionInstance(), ILIAS\Repository\logger(), ILIAS\Repository\object(), PRESENTATION_MODE_VIEW, ilTestPlayerCommands\SHOW_QUESTION, and ILIAS\Repository\user().

1563  {
1564  $current_sequence_element = $this->getCurrentSequenceElement();
1565 
1566  $current_question_obj = $this->getQuestionInstance(
1567  $this->test_sequence->getQuestionForSequence($current_sequence_element)
1568  );
1569  $current_question_obj->setTestId($this->object->getId());
1570 
1571  $current_question_obj->resetUsersAnswer(
1572  $this->test_session->getActiveId(),
1573  $this->test_session->getPass()
1574  );
1575 
1576  if ($this->logger->isLoggingEnabled()
1577  && !$this->getObject()->getAnonymity()) {
1578  $this->logger->logParticipantInteraction(
1579  $this->logger->getInteractionFactory()->buildParticipantInteraction(
1580  $this->object->getRefId(),
1581  $this->test_sequence->getQuestionForSequence($current_sequence_element),
1582  $this->user->getId(),
1583  $this->logger->isIPLoggingEnabled() ? $_SERVER['REMOTE_ADDR'] : '',
1584  TestParticipantInteractionTypes::ANSWER_DELETED,
1585  []
1586  )
1587  );
1588  }
1589 
1590  $this->ctrl->saveParameter($this, 'sequence');
1591 
1592  $this->ctrl->setParameter($this, 'pmode', ilTestPlayerAbstractGUI::PRESENTATION_MODE_VIEW);
1593 
1594  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1595  }
getQuestionInstance(int $question_id, bool $from_cache=true)
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
+ Here is the call graph for this function:

◆ displayAccessCodeCmd()

ilTestPlayerAbstractGUI::displayAccessCodeCmd ( )

Definition at line 798 of file class.ilTestPlayerAbstractGUI.php.

References ilTestPlayerCommands\ACCESS_CODE_CONFIRMED, ILIAS\Repository\ctrl(), getContentBlockName(), and ILIAS\Repository\lng().

799  {
800  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_anonymous_code_presentation.html", "components/ILIAS/Test");
801  $this->tpl->setCurrentBlock("adm_content");
802  $this->tpl->setVariable("TEXT_ANONYMOUS_CODE_CREATED", $this->lng->txt("tst_access_code_created"));
803  $this->tpl->setVariable("TEXT_ANONYMOUS_CODE", $this->test_session->getAccessCodeFromSession());
804  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
805  $this->tpl->setVariable("CMD_CONFIRM", ilTestPlayerCommands::ACCESS_CODE_CONFIRMED);
806  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("continue_work"));
807  $this->tpl->parseCurrentBlock();
808  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:

◆ editSolutionCmd()

ilTestPlayerAbstractGUI::editSolutionCmd ( )
protected

Definition at line 1502 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), PRESENTATION_MODE_EDIT, and ilTestPlayerCommands\SHOW_QUESTION.

+ Here is the call graph for this function:

◆ endingTimeReached()

ilTestPlayerAbstractGUI::endingTimeReached ( )

handle endingTimeReached

Definition at line 1750 of file class.ilTestPlayerAbstractGUI.php.

References ilDatePresentation\formatDate(), IL_CAL_UNIX, ILIAS\Repository\lng(), ILIAS\Repository\object(), and redirectBackCmd().

Referenced by prepareTestPage().

1751  {
1752  $this->tpl->setOnScreenMessage('info', sprintf($this->lng->txt("detail_ending_time_reached"), ilDatePresentation::formatDate(new ilDateTime($this->object->getEndingTime(), IL_CAL_UNIX))));
1753  $this->test_session->increasePass();
1754  $this->test_session->setLastSequence(0);
1755  $this->test_session->saveToDb();
1756 
1757  $this->redirectBackCmd();
1758  }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureExistingTestSession()

ilTestPlayerAbstractGUI::ensureExistingTestSession ( ilTestSession  $test_session)
protected

Definition at line 273 of file class.ilTestPlayerAbstractGUI.php.

References ilTestSession\doesAccessCodeInSessionExists(), ilTestSession\getAccessCodeFromSession(), ilTestSession\getActiveId(), ilTestSession\isAnonymousUser(), ilTestSession\saveToDb(), ilTestSession\setAnonymousId(), ilTestSession\setUserId(), and ILIAS\Repository\user().

Referenced by executeCommand().

273  : void
274  {
275  if ($test_session->getActiveId()) {
276  return;
277  }
278 
279  $test_session->setUserId($this->user->getId());
280 
281  if ($test_session->isAnonymousUser()) {
282  if (!$test_session->doesAccessCodeInSessionExists()) {
283  return;
284  }
285 
286  $test_session->setAnonymousId($test_session->getAccessCodeFromSession());
287  }
288 
289  $test_session->saveToDb();
290  }
setUserId(int $user_id)
setAnonymousId(string $anonymous_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilTestPlayerAbstractGUI::executeCommand ( )

Definition at line 85 of file class.ilTestPlayerAbstractGUI.php.

References ilTestServiceGUI\$test_sequence_factory, buildTestPassQuestionList(), checkReadAccess(), checkTestExecutable(), checkTestSessionUser(), ILIAS\Repository\ctrl(), ensureExistingTestSession(), exit, getAnswerChangedParameter(), getCurrentSequenceElement(), ilTestServiceGUI\getObjectiveOrientedContainer(), getTestPlayerTitle(), handlePasswordProtectionRedirect(), initAssessmentSettings(), iljQueryUtil\initjQuery(), initProcessLocker(), ilTestPlayerCommands\isTestExecutionCommand(), ILIAS\Repository\lng(), ILIAS\Repository\object(), populateQuestionOptionalMessage(), setAnswerChangedParameter(), ILIAS\Repository\settings(), ilTestPlayerCommands\SHOW_QUESTION, ILIAS\Repository\tabs(), ilTestPlayerLayoutProvider\TEST_PLAYER_KIOSK_MODE_ENABLED, ilTestPlayerLayoutProvider\TEST_PLAYER_SHORT_TITLE, ilTestPlayerLayoutProvider\TEST_PLAYER_TITLE, ilTestPlayerLayoutProvider\TEST_PLAYER_VIEW_TITLE, and ILIAS\Repository\user().

86  {
87  $this->tabs->clearTargets();
88 
89  $cmd = $this->ctrl->getCmd();
90  $next_class = $this->ctrl->getNextClass($this);
91 
92  if (($read_access = $this->checkReadAccess()) !== true) {
93  if ($cmd === 'autosave') {
94  echo $this->lng->txt('autosave_failed') . ': ' . $read_access;
95  exit;
96  }
97  $this->tpl->setOnScreenMessage('failure', $read_access, true);
98  $this->ctrl->redirectByClass([ilRepositoryGUI::class, ilObjTestGUI::class, TestScreenGUI::class]);
99  }
100 
101  $this->ctrl->saveParameter($this, "sequence");
102  $this->ctrl->saveParameter($this, "pmode");
103  $this->ctrl->saveParameter($this, "active_id");
104 
105  $this->initAssessmentSettings();
106 
107  $testSessionFactory = new ilTestSessionFactory($this->object, $this->db, $this->user);
108  $this->test_session = $testSessionFactory->getSession($this->testrequest->int('active_id'));
109 
110  $this->ensureExistingTestSession($this->test_session);
111  $this->checkTestSessionUser($this->test_session);
112 
113  $this->initProcessLocker($this->test_session->getActiveId());
114 
115  $test_sequence_factory = new ilTestSequenceFactory($this->object, $this->db, $this->questionrepository);
116  $this->test_sequence = $test_sequence_factory->getSequenceByTestSession($this->test_session);
117  $this->test_sequence->loadFromDb();
118  $this->test_sequence->loadQuestions();
119 
120  $this->question_related_objectives_list = new ilTestQuestionRelatedObjectivesList();
121 
123 
125 
126  $instance_name = $this->settings->get('short_inst_name') ?? '';
127  if (trim($instance_name) === '') {
128  $instance_name = 'ILIAS';
129  }
130  $this->global_screen->tool()->context()->current()->addAdditionalData(
132  $instance_name
133  );
134  $this->global_screen->tool()->context()->current()->addAdditionalData(
136  $this->object->getKioskMode()
137  );
138  $this->global_screen->tool()->context()->current()->addAdditionalData(
140  $this->object->getTitle()
141  );
142  $this->global_screen->tool()->context()->current()->addAdditionalData(
144  $this->getTestPlayerTitle()
145  );
146 
147  switch ($next_class) {
148  case 'ilassquestionpagegui':
149  $this->checkTestExecutable();
150 
151  $question_id = $this->test_sequence->getQuestionForSequence($this->getCurrentSequenceElement());
152 
153  $page_gui = new ilAssQuestionPageGUI($question_id);
154  $ret = $this->ctrl->forwardCommand($page_gui);
155  break;
156 
157  case 'iltestsubmissionreviewgui':
158  $this->checkTestExecutable();
159 
160  $gui = new ilTestSubmissionReviewGUI($this, $this->object, $this->test_session);
161  $gui->setObjectiveOrientedContainer($this->getObjectiveOrientedContainer());
162  $ret = $this->ctrl->forwardCommand($gui);
163  break;
164 
165  case 'ilassquestionhintrequestgui':
166  $this->checkTestExecutable();
167 
168  $question_gui = $this->object->createQuestionGUI(
169  "",
170  $this->test_sequence->getQuestionForSequence($this->getCurrentSequenceElement())
171  );
172 
173  $questionHintTracking = new ilAssQuestionHintTracking(
174  $question_gui->getObject()->getId(),
175  $this->test_session->getActiveId(),
176  $this->test_session->getPass()
177  );
178 
179  $gui = new ilAssQuestionHintRequestGUI(
180  $this,
182  $question_gui,
183  $questionHintTracking,
184  $this->ctrl,
185  $this->lng,
186  $this->tpl,
187  $this->tabs,
188  $this->global_screen
189  );
190 
191  // fau: testNav - save the 'answer changed' status for viewing hint requests
193  // fau.
194  $ret = $this->ctrl->forwardCommand($gui);
195 
196  break;
197 
198  case 'iltestpasswordprotectiongui':
199  $this->checkTestExecutable();
200 
201  $gui = new ilTestPasswordProtectionGUI(
202  $this->ctrl,
203  $this->tpl,
204  $this->lng,
205  $this,
206  $this->password_checker,
207  $this->testrequest,
208  $this->global_screen
209  );
210  $ret = $this->ctrl->forwardCommand($gui);
211  break;
212 
213  default:
214  if ($cmd !== 'autosave' && ilTestPlayerCommands::isTestExecutionCommand($cmd)) {
215  $this->checkTestExecutable();
216  }
217 
218  if (strtolower($cmd) === 'showquestion') {
219  $testPassesSelector = new ilTestPassesSelector($this->db, $this->object);
220  $testPassesSelector->setActiveId($this->test_session->getActiveId());
221  $testPassesSelector->setLastFinishedPass($this->test_session->getLastFinishedPass());
222 
223  if (!$testPassesSelector->openPassExists()) {
224  $this->tpl->setOnScreenMessage('info', $this->lng->txt('tst_pass_finished'), true);
225  $this->ctrl->redirectByClass([ilRepositoryGUI::class, ilObjTestGUI::class, TestScreenGUI::class]);
226  }
227  }
228 
229  $cmd .= 'Cmd';
230  $ret = $this->$cmd();
231  break;
232  }
233  return $ret;
234  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilTestSequenceFactory $test_sequence_factory
checkTestSessionUser(ilTestSession $test_session)
static initjQuery(?ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
ensureExistingTestSession(ilTestSession $test_session)
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ finishTestCmd()

ilTestPlayerAbstractGUI::finishTestCmd ( )

Definition at line 982 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, ilTestPlayerCommands\AFTER_TEST_PASS_FINISHED, buildFinishTestModal(), ilSession\clear(), ILIAS\Repository\ctrl(), ilSession\get(), ilTestServiceGUI\getObject(), handleCheckTestPassValid(), ILIAS\Repository\logger(), null, performTestPassFinishedTasks(), ilSession\set(), showQuestionCmd(), ILIAS\Test\Logging\TEST_RUN_FINISHED, and ILIAS\Repository\user().

983  {
984  $this->handleCheckTestPassValid();
985  ilSession::clear('tst_next');
986 
987  if ($this->testrequest->strVal('finalization_confirmed') !== 'confirmed') {
988  $this->finish_test_modal = $this->buildFinishTestModal();
989  $this->showQuestionCmd();
990  return;
991  }
992 
993  // Non-last try finish
994  if (ilSession::get('tst_pass_finish') === null) {
995  ilSession::set('tst_pass_finish', 1);
996  }
997 
998  $this->performTestPassFinishedTasks(StatusOfAttempt::FINISHED_BY_PARTICIPANT);
999 
1000  if ($this->logger->isLoggingEnabled()
1001  && !$this->getObject()->getAnonymity()
1002  && ($interaction = $this->logger->getInteractionFactory()->buildParticipantInteraction(
1003  $this->ref_id,
1004  null,
1005  $this->user->getId(),
1006  $this->logger->isIPLoggingEnabled() ? $_SERVER['REMOTE_ADDR'] : '',
1008  []
1009  )) !== null) {
1010  $this->logger->logParticipantInteraction($interaction);
1011  }
1012 
1013  $this->ctrl->redirect($this, ilTestPlayerCommands::AFTER_TEST_PASS_FINISHED);
1014  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
performTestPassFinishedTasks(StatusOfAttempt $status_of_attempt)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ generateRandomTestPassForActiveUser()

ilTestPlayerAbstractGUI::generateRandomTestPassForActiveUser ( )
protected

Definition at line 3165 of file class.ilTestPlayerAbstractGUI.php.

References ilTestRandomQuestionSetBuilder\getInstance(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), and performTearsAndAngerBrokenConfessionChecks().

Referenced by resumePlayerCmd(), and startTestCmd().

3165  : void
3166  {
3167  $questionSetConfig = new ilTestRandomQuestionSetConfig(
3168  $this->tree,
3169  $this->db,
3170  $this->lng,
3171  $this->logger,
3172  $this->component_repository,
3173  $this->object,
3174  $this->questionrepository
3175  );
3176  $questionSetConfig->loadFromDb();
3177 
3178  $sourcePoolDefinitionFactory = new ilTestRandomQuestionSetSourcePoolDefinitionFactory($this->db, $this->object);
3179 
3180  $sourcePoolDefinitionList = new ilTestRandomQuestionSetSourcePoolDefinitionList($this->db, $this->object, $sourcePoolDefinitionFactory);
3181  $sourcePoolDefinitionList->loadDefinitions();
3182 
3183  $this->process_locker->executeRandomPassBuildOperation(function () use ($questionSetConfig, $sourcePoolDefinitionList) {
3185  $stagingPoolQuestionList = new ilTestRandomQuestionSetStagingPoolQuestionList($this->db, $this->component_repository);
3186 
3187  $questionSetBuilder = ilTestRandomQuestionSetBuilder::getInstance(
3188  $this->db,
3189  $this->lng,
3190  $this->logger,
3191  $this->object,
3192  $questionSetConfig,
3193  $sourcePoolDefinitionList,
3194  $stagingPoolQuestionList
3195  );
3196 
3197  $questionSetBuilder->performBuild($this->test_session);
3198  }
3199  }, $sourcePoolDefinitionList->hasTaxonomyFilters());
3200  }
static getInstance(ilDBInterface $db, ilLanguage $lng, TestLogger $logger, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAnswerChangedParameter()

ilTestPlayerAbstractGUI::getAnswerChangedParameter ( )
protected

Definition at line 2790 of file class.ilTestPlayerAbstractGUI.php.

Referenced by autosaveCmd(), executeCommand(), handleIntermediateSubmit(), and populateQuestionEditControl().

2790  : bool
2791  {
2792  return !empty($this->testrequest->raw('test_answer_changed'));
2793  }
+ Here is the caller graph for this function:

◆ getContentBlockName()

ilTestPlayerAbstractGUI::getContentBlockName ( )

Returns the name of the current content block (depends on the kiosk mode setting)

Returns
string The name of the content block

Definition at line 2125 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\object().

Referenced by confirmSubmitAnswers(), displayAccessCodeCmd(), initTestPageTemplate(), outQuestionSummaryCmd(), populateHelperGuiContent(), populateMessageContent(), prepareSummaryPage(), redirectAfterFinish(), showFinalStatementCmd(), and showListOfAnswers().

2125  : string
2126  {
2127  return "ADM_CONTENT";
2128 
2129  if ($this->object->getKioskMode()) {
2130  $this->tpl->setBodyClass("kiosk");
2131  $this->tpl->hideFooter();
2132  return "CONTENT";
2133  } else {
2134  return "ADM_CONTENT";
2135  }
2136  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentQuestionId()

ilTestPlayerAbstractGUI::getCurrentQuestionId ( )
protected

Definition at line 861 of file class.ilTestPlayerAbstractGUI.php.

Referenced by autosaveCmd(), autosaveOnTimeLimitCmd(), detectChangesCmd(), and removeIntermediateSolution().

861  : int
862  {
863  return $this->test_sequence->getQuestionForSequence($this->testrequest->int('sequence'));
864  }
+ Here is the caller graph for this function:

◆ getCurrentSequenceElement()

ilTestPlayerAbstractGUI::getCurrentSequenceElement ( )
protected

Definition at line 2729 of file class.ilTestPlayerAbstractGUI.php.

References getSequenceElementParameter().

Referenced by discardSolutionCmd(), executeCommand(), handleQuestionActionCmd(), markQuestionCmd(), nextQuestionCmd(), previousQuestionCmd(), showInstantResponseCmd(), showQuestionCmd(), showSideList(), skipQuestionCmd(), submitSolutionAndNextCmd(), submitSolutionCmd(), and unmarkQuestionCmd().

2729  : int
2730  {
2731  if ($this->getSequenceElementParameter()) {
2732  return $this->getSequenceElementParameter();
2733  }
2734 
2735  return $this->test_session->getLastSequence();
2736  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFinishTestCommand()

ilTestPlayerAbstractGUI::getFinishTestCommand ( )
protected

Definition at line 2565 of file class.ilTestPlayerAbstractGUI.php.

References ilTestPlayerCommands\FINISH_TEST, ILIAS\Repository\object(), and ilTestPlayerCommands\QUESTION_SUMMARY.

Referenced by getTestNavigationToolbarGUI().

2565  : string
2566  {
2567  if (!$this->object->getListOfQuestionsEnd()) {
2569  }
2570 
2572  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstantResponseParameter()

ilTestPlayerAbstractGUI::getInstantResponseParameter ( )
protected

Definition at line 2756 of file class.ilTestPlayerAbstractGUI.php.

Referenced by showQuestionCmd().

2756  : bool
2757  {
2758  return $this->testrequest->isInstanceResponseRequested();
2759  }
+ Here is the caller graph for this function:

◆ getIntroductionPageButtonLabel()

ilTestPlayerAbstractGUI::getIntroductionPageButtonLabel ( )
protected
Returns
string

Definition at line 2374 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng().

2374  : string
2375  {
2376  return $this->lng->txt("save_introduction");
2377  }
+ Here is the call graph for this function:

◆ getLockParameter()

ilTestPlayerAbstractGUI::getLockParameter ( )

Definition at line 722 of file class.ilTestPlayerAbstractGUI.php.

References null.

Referenced by handlePasswordProtectionRedirect(), and startPlayerCmd().

723  {
724  if ($this->testrequest->isset('lock') && strlen($this->testrequest->raw('lock'))) {
725  return $this->testrequest->raw('lock');
726  }
727 
728  return null;
729  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getNavigationUrlParameter()

ilTestPlayerAbstractGUI::getNavigationUrlParameter ( )
protected

Definition at line 2776 of file class.ilTestPlayerAbstractGUI.php.

References ilUtil\_getHttpPath().

Referenced by showInstantResponseCmd(), and submitSolutionCmd().

2776  : string
2777  {
2778  $navigation_url = $this->testrequest->strVal('test_player_navigation_url');
2779  if ($navigation_url !== '') {
2780  $navigation_url_parts = parse_url($navigation_url);
2781  $ilias_url_parts = parse_url(ilUtil::_getHttpPath());
2782 
2783  if (!isset($navigation_url_parts['host']) || ($ilias_url_parts['host'] === $navigation_url_parts['host'])) {
2784  return $navigation_url;
2785  }
2786  }
2787  return '';
2788  }
static _getHttpPath()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNextCommandParameter()

ilTestPlayerAbstractGUI::getNextCommandParameter ( )
protected

Definition at line 2761 of file class.ilTestPlayerAbstractGUI.php.

References null.

Referenced by submitSolutionCmd().

2762  {
2763  $nextcmd = '';
2764  if ($this->testrequest->isset('nextcmd')) {
2765  $nextcmd = $this->testrequest->strVal('nextcmd');
2766  }
2767 
2768  return $nextcmd !== '' ? $nextcmd : null;
2769  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getNextSequenceParameter()

ilTestPlayerAbstractGUI::getNextSequenceParameter ( )
protected

Definition at line 2771 of file class.ilTestPlayerAbstractGUI.php.

Referenced by submitSolutionCmd().

2771  : int
2772  {
2773  return $this->testrequest->int('nextseq');
2774  }
+ Here is the caller graph for this function:

◆ getOnLoadCodeForNavigationButtons()

ilTestPlayerAbstractGUI::getOnLoadCodeForNavigationButtons ( string  $target,
string  $cmd 
)
private

Definition at line 583 of file class.ilTestPlayerAbstractGUI.php.

References $id.

Referenced by buildNextButtonInstance(), and buildPreviousButtonInstance().

583  : Closure
584  {
585  return static function (string $id) use ($target, $cmd): string {
586  return "document.getElementById('{$id}').addEventListener('click', "
587  . "(e) => {il.TestPlayerQuestionEditControl.checkNavigation('{$target}', '{$cmd}', e);}"
588  . ");";
589  };
590  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ getPresentationModeParameter()

ilTestPlayerAbstractGUI::getPresentationModeParameter ( )
protected

Definition at line 2747 of file class.ilTestPlayerAbstractGUI.php.

References null.

2748  {
2749  if ($this->testrequest->isset('pmode')) {
2750  return $this->testrequest->raw('pmode');
2751  }
2752 
2753  return null;
2754  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getQuestionFeedbackModalHtml()

ilTestPlayerAbstractGUI::getQuestionFeedbackModalHtml ( ilTemplate  $tpl,
string  $nav_url 
)
private

Definition at line 2612 of file class.ilTestPlayerAbstractGUI.php.

References ilTemplate\get(), and ILIAS\Repository\lng().

Referenced by populateInstantResponseModal().

2612  : string
2613  {
2614  $modal = $this->ui_factory->modal()->roundtrip(
2615  $this->lng->txt('tst_instant_feedback'),
2616  $this->ui_factory->legacy()->content($tpl->get()),
2617  []
2618  )->withActionButtons([
2619  $this->ui_factory->button()->standard($this->lng->txt('proceed'), $nav_url)
2620  ]);
2621 
2622  return $this->ui_renderer->render([
2623  $modal->withOnLoad($modal->getShowSignal())
2624  ]);
2625  }
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionGuiInstance()

ilTestPlayerAbstractGUI::getQuestionGuiInstance ( int  $question_id,
bool  $from_cache = true 
)
protected

Definition at line 2821 of file class.ilTestPlayerAbstractGUI.php.

References ilTestServiceGUI\$tpl, initTestQuestionConfig(), and assQuestionGUI\PRESENTATION_CONTEXT_TEST.

Referenced by showQuestionCmd().

2821  : object
2822  {
2823  $tpl = $this->tpl;
2824 
2825  if (!$from_cache || !isset($this->cached_question_guis[$question_id])) {
2826  $question_gui = $this->object->createQuestionGUI("", $question_id);
2827  $question_gui->setTargetGui($this);
2828  $question_gui->setPresentationContext(assQuestionGUI::PRESENTATION_CONTEXT_TEST);
2829  $question = $question_gui->getObject();
2830  $question->setShuffler($this->shuffler->getAnswerShuffleFor(
2831  $question_id,
2832  $this->test_session->getActiveId(),
2833  $this->test_session->getPass()
2834  ));
2835  $question_gui->setObject($question);
2836  $question_gui->populateJavascriptFilesRequiredForWorkForm($tpl);
2837 
2838  // hey: prevPassSolutions - determine solution pass index and configure gui accordingly
2839  $this->initTestQuestionConfig($question_gui->getObject());
2840  // hey.
2841 
2842  $this->cached_question_guis[$question_id] = $question_gui;
2843  }
2844 
2845  return $this->cached_question_guis[$question_id];
2846  }
ilGlobalTemplateInterface ilTemplate $tpl
sk 2023-08-01: We need this union type, even if it is wrong! To change this
initTestQuestionConfig(assQuestion $question_obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionInstance()

ilTestPlayerAbstractGUI::getQuestionInstance ( int  $question_id,
bool  $from_cache = true 
)
protected

Definition at line 2848 of file class.ilTestPlayerAbstractGUI.php.

References initTestQuestionConfig(), assQuestion\instantiateQuestion(), and ILIAS\Repository\user().

Referenced by buildQuestionObject(), detectChangesCmd(), discardSolutionCmd(), and removeIntermediateSolution().

2848  : assQuestion
2849  {
2850  if ($from_cache && isset($this->cached_question_objects[$question_id])) {
2851  return $this->cached_question_objects[$question_id];
2852  }
2853  $question = assQuestion::instantiateQuestion($question_id);
2854  $ass_settings = new ilSetting('assessment');
2855 
2856  $process_locker_factory = new ilAssQuestionProcessLockerFactory($ass_settings, $this->db);
2857  $process_locker_factory->setQuestionId($question->getId());
2858  $process_locker_factory->setUserId($this->user->getId());
2859  $question->setProcessLocker($process_locker_factory->getLocker());
2860 
2861  $this->initTestQuestionConfig($question);
2862 
2863  $this->cached_question_objects[$question_id] = $question;
2864  return $question;
2865  }
static instantiateQuestion(int $question_id)
initTestQuestionConfig(assQuestion $question_obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionsDefaultPresentationMode()

ilTestPlayerAbstractGUI::getQuestionsDefaultPresentationMode ( )
protected

Definition at line 3022 of file class.ilTestPlayerAbstractGUI.php.

3022  : string
3023  {
3024  return self::PRESENTATION_MODE_EDIT;
3025  }

◆ getRegisteredForcedFeedbackNavUrl()

ilTestPlayerAbstractGUI::getRegisteredForcedFeedbackNavUrl ( )
protected

Definition at line 3037 of file class.ilTestPlayerAbstractGUI.php.

References ilSession\get(), and null.

Referenced by isForcedFeedbackNavUrlRegistered(), and showQuestionCmd().

3037  : ?string
3038  {
3039  if (ilSession::get('forced_feedback_navigation_url') === null) {
3040  return null;
3041  }
3042  $forced_feedback_navigation_url = ilSession::get('forced_feedback_navigation_url');
3043  if (!isset($forced_feedback_navigation_url[$this->test_session->getActiveId()])) {
3044  return null;
3045  }
3046 
3047  return $forced_feedback_navigation_url[$this->test_session->getActiveId()];
3048  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSequenceElementParameter()

ilTestPlayerAbstractGUI::getSequenceElementParameter ( )
protected

Definition at line 2738 of file class.ilTestPlayerAbstractGUI.php.

References null.

Referenced by getCurrentSequenceElement().

2738  : ?int
2739  {
2740  if ($this->testrequest->isset('sequence')) {
2741  return $this->testrequest->int('sequence');
2742  }
2743 
2744  return null;
2745  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getTestNavigationToolbarGUI()

ilTestPlayerAbstractGUI::getTestNavigationToolbarGUI ( )
protected

Definition at line 2461 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getFinishTestCommand(), and ILIAS\Repository\object().

Referenced by showQuestionCmd().

2462  {
2463  $navigation_toolbar = new ilTestNavigationToolbarGUI($this->ctrl, $this);
2464  $navigation_toolbar->setSuspendTestButtonEnabled($this->object->getShowCancel());
2465  $navigation_toolbar->setUserPassOverviewEnabled($this->object->getUsrPassOverviewEnabled());
2466  $navigation_toolbar->setFinishTestCommand($this->getFinishTestCommand());
2467  return $navigation_toolbar;
2468  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTestPlayerTitle()

ilTestPlayerAbstractGUI::getTestPlayerTitle ( )
protected

Definition at line 3249 of file class.ilTestPlayerAbstractGUI.php.

References ilObjTest\buildExamId(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\user().

Referenced by executeCommand().

3249  : string
3250  {
3251  $title_content = $this->ui_factory->listing()->property();
3252 
3253  if ($this->object->getShowKioskModeParticipant()) {
3254  $pax_name_label = $this->lng->txt("conf_user_name");
3255  // this is a placeholder solution with inline html tags to differentiate the different elements
3256  // should be removed when a title component with grouping and visual weighting is available
3257  // see: https://github.com/ILIAS-eLearning/ILIAS/pull/7311
3258  $pax_name_value = "<span class='il-test-kiosk-head__participant-name'>"
3259  . $this->user->getFullname() . "</span>";
3260  $title_content = $title_content->withProperty($pax_name_label, $pax_name_value, false);
3261  }
3262 
3263  if ($this->object->isShowExamIdInTestPassEnabled()) {
3264  $exam_id_label = $this->lng->txt("exam_id_label");
3265  $exam_id_value = ilObjTest::buildExamId(
3266  $this->test_session->getActiveId(),
3267  $this->test_session->getPass(),
3268  $this->object->getId()
3269  );
3270  $title_content = $title_content->withProperty($exam_id_label, $exam_id_value);
3271  }
3272 
3273  if ($this->object->getShowKioskModeTitle()) {
3274  $test_title_label = $this->lng->txt("test");
3275  $test_title_value = $this->object->getTitle();
3276  $title_content = $title_content->withProperty($test_title_label, $test_title_value, false);
3277  }
3278 
3279  return $this->ui_renderer->render($title_content);
3280  }
static buildExamId($active_id, $pass, $test_obj_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleCheckTestPassValid()

ilTestPlayerAbstractGUI::handleCheckTestPassValid ( )
protected

Definition at line 3130 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng().

Referenced by finishTestCmd(), nextQuestionCmd(), and previousQuestionCmd().

3130  : void
3131  {
3132  $testObj = new ilObjTest($this->ref_id, true);
3133 
3134  $participants = $testObj->getActiveParticipantList();
3135  $participant = $participants->getParticipantByActiveId($this->testrequest->getActiveId());
3136  if (!$participant || !$participant->hasUnfinishedPasses()) {
3137  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("tst_current_run_no_longer_valid"), true);
3138  }
3139  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleFileUploadCmd()

ilTestPlayerAbstractGUI::handleFileUploadCmd ( )
protected

Definition at line 3064 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), saveQuestionSolution(), ilTestPlayerCommands\SUBMIT_SOLUTION, and updateWorkingTime().

3064  : void
3065  {
3066  $this->updateWorkingTime();
3067  $this->saveQuestionSolution(false);
3068  $this->ctrl->redirect($this, ilTestPlayerCommands::SUBMIT_SOLUTION);
3069  }
updateWorkingTime()
updates working time and stores state saveresult to see if question has to be stored or not ...
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:

◆ handleIntermediateSubmit()

ilTestPlayerAbstractGUI::handleIntermediateSubmit ( )
protected

Definition at line 2800 of file class.ilTestPlayerAbstractGUI.php.

References getAnswerChangedParameter(), removeIntermediateSolution(), saveQuestionSolution(), and setAnswerChangedParameter().

Referenced by confirmHintRequestCmd(), markQuestionAndSaveIntermediateCmd(), showRequestedHintListCmd(), and unmarkQuestionAndSaveIntermediateCmd().

2801  {
2802  if ($this->getAnswerChangedParameter()) {
2803  $this->saveQuestionSolution(false);
2804  } else {
2805  $this->removeIntermediateSolution();
2806  }
2808  }
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlePasswordProtectionRedirect()

ilTestPlayerAbstractGUI::handlePasswordProtectionRedirect ( )
protected

The test password is only checked once per session to avoid errors during autosave if the password is changed during a running test. See Mantis #22536 for more details.

Definition at line 2330 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getLockParameter(), and ilTestPlayerCommands\START_TEST.

Referenced by executeCommand().

2331  {
2338  if ($this->test_session->isPasswordChecked() === true) {
2339  return;
2340  }
2341 
2342  if ($this->ctrl->getNextClass() === 'iltestpasswordprotectiongui') {
2343  return;
2344  }
2345 
2346  if (!$this->password_checker->isPasswordProtectionPageRedirectRequired()) {
2347  $this->test_session->setPasswordChecked(true);
2348  return;
2349  }
2350 
2351  $this->ctrl->setParameterByClass(self::class, 'lock', $this->getLockParameter());
2352 
2353  $next_command = $this->ctrl->getCmdClass() . '::' . ilTestPlayerCommands::START_TEST;
2354  $this->ctrl->setParameterByClass(ilTestPasswordProtectionGUI::class, 'nextCommand', $next_command);
2355  $this->ctrl->redirectByClass(ilTestPasswordProtectionGUI::class, 'showPasswordForm');
2356  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlePrimaryButton()

ilTestPlayerAbstractGUI::handlePrimaryButton ( ilTestNavigationToolbarGUI  $navigation_toolbar_gui,
int  $current_question_id 
)
protected

Definition at line 3221 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\object(), and ilTestNavigationToolbarGUI\setFinishTestButtonPrimary().

Referenced by showQuestionCmd().

3221  : bool
3222  {
3223  $is_next_primary = true;
3224 
3225  if ($this->object->isForceInstantFeedbackEnabled()) {
3226  $is_next_primary = false;
3227  }
3228 
3229  $questions_missing_result = $this->questionrepository->getQuestionsMissingResultRecord(
3230  $this->test_session->getActiveId(),
3231  $this->test_session->getPass(),
3232  $this->test_sequence->getOrderedSequenceQuestions()
3233  );
3234 
3235  if ($questions_missing_result === []) {
3236  $navigation_toolbar_gui->setFinishTestButtonPrimary(true);
3237  return false;
3238  }
3239 
3240  if (count($questions_missing_result) === 1
3241  && $current_question_id === current($questions_missing_result)) {
3242  $navigation_toolbar_gui->setFinishTestButtonPrimary(true);
3243  return false;
3244  }
3245 
3246  return $is_next_primary;
3247  }
setFinishTestButtonPrimary($finishTestButtonPrimary)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleQuestionActionCmd()

ilTestPlayerAbstractGUI::handleQuestionActionCmd ( )
protected

Definition at line 2184 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), isParticipantsAnswerFixed(), saveQuestionSolution(), setAnswerChangedParameter(), ilTestPlayerCommands\SHOW_QUESTION, and updateWorkingTime().

2185  {
2186  $question_id = $this->test_sequence->getQuestionForSequence(
2187  $this->getCurrentSequenceElement()
2188  );
2189 
2190  if (!$this->isParticipantsAnswerFixed($question_id)) {
2191  $this->updateWorkingTime();
2192  $this->saveQuestionSolution(false);
2193  // fau: testNav - add changed status of the question
2194  $this->setAnswerChangedParameter(true);
2195  // fau.
2196  }
2197 
2198  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
2199  }
updateWorkingTime()
updates working time and stores state saveresult to see if question has to be stored or not ...
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:

◆ handleQuestionPostponing()

ilTestPlayerAbstractGUI::handleQuestionPostponing ( int  $question_id)
protected

Definition at line 3123 of file class.ilTestPlayerAbstractGUI.php.

Referenced by nextQuestionCmd().

3125  : void {
3126  $this->test_sequence->postponeQuestion($question_id);
3127  $this->test_sequence->saveToDb();
3128  }
+ Here is the caller graph for this function:

◆ handleSkillTriggering()

ilTestPlayerAbstractGUI::handleSkillTriggering ( ilTestSession  $test_session)
protected
Parameters
ilTestSession$test_session

Definition at line 2387 of file class.ilTestPlayerAbstractGUI.php.

References buildTestPassQuestionList(), ilTestSession\getActiveId(), ilTestSession\getPass(), ilTestSession\getUserId(), ILIAS\Repository\logger(), ILIAS\Repository\object(), and ilTestSkillEvaluation\setUserId().

Referenced by save().

2387  : void
2388  {
2389  $skill_evaluation = new ilTestSkillEvaluation(
2390  $this->db,
2391  $this->logger,
2392  $this->object->getTestId(),
2393  $this->object->getRefId(),
2394  $this->skills_service->profile(),
2395  $this->skills_service->personal()
2396  );
2397 
2398  $skill_evaluation->setUserId($test_session->getUserId());
2399  $skill_evaluation->setActiveId($test_session->getActiveId());
2400  $skill_evaluation->setPass($test_session->getPass());
2401 
2402  $skill_evaluation->setNumRequiredBookingsForSkillTriggering(
2403  $this->object->getGlobalSettings()->getSkillTriggeringNumberOfAnswers()
2404  );
2405 
2406  $question_list = $this->buildTestPassQuestionList();
2407  $question_list->load();
2408  $skill_evaluation->init($question_list);
2409  $skill_evaluation->evaluate(
2410  $this->object->getTestResult(
2411  $test_session->getActiveId(),
2412  $test_session->getPass(),
2413  true
2414  )
2415  );
2416 
2417  $skill_evaluation->handleSkillTriggering();
2418  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleTearsAndAngerNoObjectiveOrientedQuestion()

ilTestPlayerAbstractGUI::handleTearsAndAngerNoObjectiveOrientedQuestion ( )
protected

Definition at line 3215 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by showQuestionCmd().

3215  : void
3216  {
3217  $this->tpl->setOnScreenMessage('failure', sprintf($this->lng->txt('tst_objective_oriented_test_pass_without_questions'), $this->object->getTitle()), true);
3218  $this->ctrl->redirectByClass(ilObjTestGUI::class);
3219  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleTearsAndAngerQuestionIsNull()

ilTestPlayerAbstractGUI::handleTearsAndAngerQuestionIsNull ( int  $question_id,
  $sequence_element 
)
protected

Definition at line 2874 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\logger(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by showQuestionCmd().

2874  : void
2875  {
2876  $this->logger->error(
2877  "INV SEQ:"
2878  . "active={$this->test_session->getActiveId()} "
2879  . "qId=$question_id seq=$sequence_element "
2880  . serialize($this->test_sequence)
2881  );
2882 
2883  $this->ctrl->setParameter($this, 'sequence', $this->test_sequence->getFirstSequence());
2884  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
2885  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleUserSettings()

ilTestPlayerAbstractGUI::handleUserSettings ( )

Handles some form parameters on starting and resuming a test.

Definition at line 818 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\object(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

Referenced by resumePlayerCmd(), and startPlayerCmd().

819  {
820  if ($this->object->getNrOfTries() != 1
821  && $this->object->getUsePreviousAnswers() == 1
822  ) {
823  $chb_use_previous_answers = 0;
824  if ($this->post_wrapper->has('chb_use_previous_answers')) {
825  $chb_use_previous_answers = $this->post_wrapper->retrieve(
826  'chb_use_previous_answers',
827  $this->refinery->kindlyTo()->int()
828  );
829  }
830  $this->user->writePref("tst_use_previous_answers", (string) $chb_use_previous_answers);
831  }
832  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAssessmentSettings()

ilTestPlayerAbstractGUI::initAssessmentSettings ( )
protected

Definition at line 2379 of file class.ilTestPlayerAbstractGUI.php.

Referenced by executeCommand().

2380  {
2381  $this->ass_settings = new ilSetting('assessment');
2382  }
+ Here is the caller graph for this function:

◆ initProcessLocker()

ilTestPlayerAbstractGUI::initProcessLocker (   $activeId)
protected

Definition at line 292 of file class.ilTestPlayerAbstractGUI.php.

References ilTestServiceGUI\$db, and $ilDB.

Referenced by executeCommand().

293  {
294  $ilDB = $this->db;
295  $process_lockerFactory = new ilTestProcessLockerFactory($this->ass_settings, $ilDB);
296  $this->process_locker = $process_lockerFactory->withContextId((int) $activeId)->getLocker();
297  }
readonly ilDBInterface $db
+ Here is the caller graph for this function:

◆ initTestCmd()

ilTestPlayerAbstractGUI::initTestCmd ( )
protected

Start a test for the first time after a redirect.

Definition at line 779 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), ilTestPlayerCommands\DISPLAY_ACCESS_CODE, and ilTestPlayerCommands\START_TEST.

780  {
781  if ($this->test_session->isAnonymousUser()
782  && !$this->test_session->doesAccessCodeInSessionExists()) {
783  $access_code = $this->test_session->createNewAccessCode();
784 
785  $this->test_session->setAccessCodeToSession($access_code);
786  $this->test_session->setAnonymousId($access_code);
787  $this->test_session->saveToDb();
788 
789  $this->ctrl->redirect($this, ilTestPlayerCommands::DISPLAY_ACCESS_CODE);
790  }
791 
792  if (!$this->test_session->isAnonymousUser()) {
793  $this->test_session->unsetAccessCodeInSession();
794  }
795  $this->ctrl->redirect($this, ilTestPlayerCommands::START_TEST);
796  }
+ Here is the call graph for this function:

◆ initTestPageTemplate()

ilTestPlayerAbstractGUI::initTestPageTemplate ( )
protected

Definition at line 2302 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\event(), ILIAS\Repository\form(), and getContentBlockName().

Referenced by prepareTestPage().

2303  {
2304  $onload_js = <<<JS
2305  let key_event = (event) => {
2306  if( event.key === 13 && event.target.tagName.toLowerCase() === "a" ) {
2307  return;
2308  }
2309  if (event.key === 13 &&
2310  event.target.tagName.toLowerCase() !== "textarea" &&
2311  (event.target.tagName.toLowerCase() !== "input" || event.target.type.toLowerCase() !== "submit")) {
2312  event.preventDefault();
2313  }
2314  };
2315 
2316  let form = document.getElementById('taForm');
2317  form.onkeyup = key_event;
2318  form.onkeydown = key_event;
2319  form.onkeypress = key_event;
2320 JS;
2321  $this->tpl->addOnLoadCode($onload_js);
2322  $this->tpl->addBlockFile(
2323  $this->getContentBlockName(),
2324  'adm_content',
2325  'tpl.il_as_tst_output.html',
2326  'components/ILIAS/Test'
2327  );
2328  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTestQuestionConfig()

ilTestPlayerAbstractGUI::initTestQuestionConfig ( assQuestion  $question_obj)
protected

Definition at line 2867 of file class.ilTestPlayerAbstractGUI.php.

References assQuestion\getTestPresentationConfig(), and ILIAS\Repository\object().

Referenced by getQuestionGuiInstance(), and getQuestionInstance().

2868  {
2869  $question_obj->getTestPresentationConfig()->setPreviousPassSolutionReuseAllowed(
2870  $this->object->isPreviousSolutionReuseEnabled($this->test_session->getActiveId())
2871  );
2872  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFirstQuestionInSequence()

ilTestPlayerAbstractGUI::isFirstQuestionInSequence (   $sequence_element)
protected

Definition at line 2174 of file class.ilTestPlayerAbstractGUI.php.

Referenced by populateQuestionNavigation().

2174  : bool
2175  {
2176  return $sequence_element == $this->test_sequence->getFirstSequence();
2177  }
+ Here is the caller graph for this function:

◆ isFollowUpQuestionLocksConfirmationPrevented()

ilTestPlayerAbstractGUI::isFollowUpQuestionLocksConfirmationPrevented ( )
protected

Definition at line 2974 of file class.ilTestPlayerAbstractGUI.php.

References ilSession\get(), and null.

Referenced by populateNextLocksChangedModal().

2975  {
2976  if (ilSession::get(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM) == null) {
2977  return false;
2978  }
2979 
2980  return ilSession::get(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM);
2981  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isForcedFeedbackNavUrlRegistered()

ilTestPlayerAbstractGUI::isForcedFeedbackNavUrlRegistered ( )
protected

Definition at line 3050 of file class.ilTestPlayerAbstractGUI.php.

References getRegisteredForcedFeedbackNavUrl(), and null.

Referenced by isParticipantsAnswerFixed(), and showQuestionCmd().

3050  : bool
3051  {
3052  return $this->getRegisteredForcedFeedbackNavUrl() !== null;
3053  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isLastQuestionInSequence()

ilTestPlayerAbstractGUI::isLastQuestionInSequence (   $sequence_element)
protected

Definition at line 2179 of file class.ilTestPlayerAbstractGUI.php.

Referenced by populateQuestionNavigation().

2179  : bool
2180  {
2181  return $sequence_element == $this->test_sequence->getLastSequence();
2182  }
+ Here is the caller graph for this function:

◆ isMaxProcessingTimeReached()

ilTestPlayerAbstractGUI::isMaxProcessingTimeReached ( )

Definition at line 448 of file class.ilTestPlayerAbstractGUI.php.

Referenced by canSaveResult(), isTestAccessible(), and prepareTestPage().

448  : bool
449  {
450  $active_id = $this->test_session->getActiveId();
451  $starting_time = $this->object->getStartingTimeOfUser($active_id);
452  if ($starting_time === false) {
453  return false;
454  } else {
455  return $this->object->isMaxProcessingTimeReached($starting_time, $active_id);
456  }
457  }
+ Here is the caller graph for this function:

◆ isNrOfTriesReached()

ilTestPlayerAbstractGUI::isNrOfTriesReached ( )

nr of tries exceeded

Definition at line 1740 of file class.ilTestPlayerAbstractGUI.php.

Referenced by canSaveResult(), isTestAccessible(), and saveQuestionSolution().

1740  : bool
1741  {
1742  return $this->object->hasNrOfTriesRestriction() && $this->object->isNrOfTriesReached($this->test_session->getPass());
1743  }
+ Here is the caller graph for this function:

◆ isOptionalQuestionAnsweringConfirmationRequired()

ilTestPlayerAbstractGUI::isOptionalQuestionAnsweringConfirmationRequired ( int  $sequence_key)
protected

Definition at line 1197 of file class.ilTestPlayerAbstractGUI.php.

Referenced by prepareTestPage().

1197  : bool
1198  {
1199  if ($this->test_sequence->isAnsweringOptionalQuestionsConfirmed()) {
1200  return false;
1201  }
1202 
1203  $question_id = $this->test_sequence->getQuestionForSequence($sequence_key);
1204 
1205  if (!$this->test_sequence->isQuestionOptional($question_id)) {
1206  return false;
1207  }
1208 
1209  return true;
1210  }
+ Here is the caller graph for this function:

◆ isParticipantsAnswerFixed()

ilTestPlayerAbstractGUI::isParticipantsAnswerFixed (   $question_id)
protected

Definition at line 2358 of file class.ilTestPlayerAbstractGUI.php.

References isForcedFeedbackNavUrlRegistered(), and ILIAS\Repository\object().

Referenced by autosaveCmd(), autosaveOnTimeLimitCmd(), buildQuestionObject(), buildReadOnlyStateQuestionNavigationGUI(), handleQuestionActionCmd(), populateQuestionEditControl(), showInstantResponseCmd(), and showQuestionCmd().

2358  : bool
2359  {
2360  if ($this->object->isInstantFeedbackAnswerFixationEnabled()) {
2361  return $this->test_sequence->isQuestionChecked($question_id);
2362  }
2363 
2364  if ($this->object->isFollowupQuestionAnswerFixationEnabled()) {
2365  return $this->isForcedFeedbackNavUrlRegistered() || $this->test_sequence->isNextQuestionPresented($question_id);
2366  }
2367 
2368  return false;
2369  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isShowingPostponeStatusReguired()

ilTestPlayerAbstractGUI::isShowingPostponeStatusReguired ( int  $question_id)
protected

Definition at line 1212 of file class.ilTestPlayerAbstractGUI.php.

Referenced by populateInstantResponseModal(), showQuestionEditable(), and showQuestionViewable().

1212  : bool
1213  {
1214  return $this->test_sequence->isPostponedQuestion($question_id);
1215  }
+ Here is the caller graph for this function:

◆ isTestAccessible()

ilTestPlayerAbstractGUI::isTestAccessible ( )

test accessible returns true if the user can perform the test

Definition at line 1729 of file class.ilTestPlayerAbstractGUI.php.

References isMaxProcessingTimeReached(), and isNrOfTriesReached().

1729  : bool
1730  {
1731  return !$this->isNrOfTriesReached()
1732  and !$this->isMaxProcessingTimeReached()
1733  and $this->object->startingTimeReached()
1734  and !$this->object->endingTimeReached();
1735  }
endingTimeReached()
handle endingTimeReached
+ Here is the call graph for this function:

◆ isValidSequenceElement()

ilTestPlayerAbstractGUI::isValidSequenceElement (   $sequence_element)
private

Definition at line 3076 of file class.ilTestPlayerAbstractGUI.php.

Referenced by nextQuestionCmd(), previousQuestionCmd(), showQuestionCmd(), skipQuestionCmd(), and submitSolutionAndNextCmd().

3076  : bool
3077  {
3078  if ($sequence_element === false) {
3079  return false;
3080  }
3081 
3082  if ($sequence_element < 1) {
3083  return false;
3084  }
3085 
3086  if (!$this->test_sequence->getPositionOfSequence($sequence_element)) {
3087  return false;
3088  }
3089 
3090  return true;
3091  }
+ Here is the caller graph for this function:

◆ markQuestionAndSaveIntermediateCmd()

ilTestPlayerAbstractGUI::markQuestionAndSaveIntermediateCmd ( )
protected

Definition at line 940 of file class.ilTestPlayerAbstractGUI.php.

References handleIntermediateSubmit(), and markQuestionCmd().

940  : void
941  {
942  $this->handleIntermediateSubmit();
943  $this->markQuestionCmd();
944  }
markQuestionCmd()
Set a question solved.
+ Here is the call graph for this function:

◆ markQuestionCmd()

ilTestPlayerAbstractGUI::markQuestionCmd ( )
protected

Set a question solved.

Definition at line 949 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by markQuestionAndSaveIntermediateCmd().

949  : void
950  {
951  $question_id = $this->test_sequence->getQuestionForSequence(
953  );
954 
955  $this->object->setQuestionSetSolved(1, $question_id, $this->test_session->getUserId());
956 
957  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
958  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ max_processing_time_reached()

ilTestPlayerAbstractGUI::max_processing_time_reached ( )

Outputs a message when the maximum processing time is reached.

Outputs a message when the maximum processing time is reached

public

Definition at line 1767 of file class.ilTestPlayerAbstractGUI.php.

References suspendTestCmd().

Referenced by prepareTestPage().

1768  {
1769  $this->suspendTestCmd();
1770  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nextQuestionCmd()

ilTestPlayerAbstractGUI::nextQuestionCmd ( )
protected

Definition at line 2232 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, ILIAS\Repository\ctrl(), getCurrentSequenceElement(), ilTestServiceGUI\getObject(), handleCheckTestPassValid(), handleQuestionPostponing(), isValidSequenceElement(), ILIAS\Repository\logger(), ILIAS\Repository\object(), ilTestPlayerCommands\SHOW_QUESTION, and ILIAS\Repository\user().

2233  {
2234  $this->handleCheckTestPassValid();
2235  $last_sequence_element = $this->getCurrentSequenceElement();
2236  $next_sequence_element = $this->test_sequence->getNextSequence($last_sequence_element);
2237 
2238  $question_id = $this->test_sequence->getQuestionForSequence($last_sequence_element);
2239  $is_worked_through = $this->questionrepository->lookupResultRecordExist(
2240  $this->test_session->getActiveId(),
2241  $question_id,
2242  $this->test_session->getPass()
2243  );
2244 
2245  if (!$is_worked_through) {
2246  if ($this->logger->isLoggingEnabled()
2247  && !$this->getObject()->getAnonymity()) {
2248  $this->logger->logParticipantInteraction(
2249  $this->logger->getInteractionFactory()->buildParticipantInteraction(
2250  $this->object->getRefId(),
2251  $question_id,
2252  $this->user->getId(),
2253  $this->logger->isIPLoggingEnabled() ? $_SERVER['REMOTE_ADDR'] : '',
2254  TestParticipantInteractionTypes::QUESTION_SKIPPED,
2255  []
2256  )
2257  );
2258  }
2259  if ($this->object->isPostponingEnabled()) {
2260  $this->handleQuestionPostponing($question_id);
2261  }
2262  }
2263 
2264  if (!$this->isValidSequenceElement($next_sequence_element)) {
2265  $next_sequence_element = $this->test_sequence->getFirstSequence();
2266  }
2267 
2268  $this->ctrl->setParameter($this, 'sequence', $next_sequence_element);
2269  $this->ctrl->setParameter($this, 'pmode', '');
2270 
2271  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
2272  }
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
+ Here is the call graph for this function:

◆ outCorrectSolution()

ilTestPlayerAbstractGUI::outCorrectSolution ( )

Creates an output of the solution of an answer compared to the correct solution.

Definition at line 2012 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), ilObjStyleSheet\getContentStylePath(), ilTestServiceGUI\getCorrectSolutionOutput(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

2012  : void
2013  {
2014  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_correct_solution.html", "components/ILIAS/Test");
2015 
2016  $this->tpl->setCurrentBlock("ContentStyle");
2017  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
2018  $this->tpl->parseCurrentBlock();
2019 
2020  $this->tpl->setCurrentBlock("SyntaxStyle");
2021  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
2022  $this->tpl->parseCurrentBlock();
2023 
2024  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css"), "print");
2025  if ($this->object->getShowSolutionAnswersOnly()) {
2026  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css"), "print");
2027  }
2028 
2029  $this->tpl->setCurrentBlock("adm_content");
2030  $solution = $this->getCorrectSolutionOutput($this->testrequest->raw("evaluation"), $this->testrequest->raw("active_id"), $this->testrequest->raw("pass"));
2031  $this->tpl->setVariable("OUTPUT_SOLUTION", $solution);
2032  $this->tpl->setVariable("TEXT_BACK", $this->lng->txt("back"));
2033  $this->ctrl->saveParameter($this, "pass");
2034  $this->ctrl->saveParameter($this, "active_id");
2035  $this->tpl->setVariable("URL_BACK", $this->ctrl->getLinkTarget($this, "outUserResultsOverview"));
2036  $this->tpl->parseCurrentBlock();
2037  }
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
getCorrectSolutionOutput($question_id, $active_id, $pass, ?ilTestQuestionRelatedObjectivesList $objectives_list=null)
Returns an output of the solution to an answer compared to the correct solution.
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
+ Here is the call graph for this function:

◆ outProcessingTime()

ilTestPlayerAbstractGUI::outProcessingTime ( int  $active_id)

Definition at line 1795 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), IL_CAL_FKT_GETDATE, IL_CAL_TIMESTAMP, IL_CAL_UNIX, iljQueryUtil\initjQuery(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by outQuestionSummaryCmd(), and prepareTestPage().

1795  : void
1796  {
1797  $starting_time = $this->object->getStartingTimeOfUser($active_id);
1798  $processing_time = $this->object->getProcessingTimeInSeconds($active_id);
1799  $processing_time_minutes = floor($processing_time / 60);
1800  $processing_time_seconds = $processing_time - $processing_time_minutes * 60;
1801  $str_processing_time = "";
1802  if ($processing_time_minutes > 0) {
1803  $str_processing_time = $processing_time_minutes . " "
1804  . ($processing_time_minutes == 1 ? $this->lng->txt("minute") : $this->lng->txt("minutes"));
1805  }
1806  if ($processing_time_seconds > 0) {
1807  if (strlen($str_processing_time) > 0) {
1808  $str_processing_time .= " " . $this->lng->txt("and") . " ";
1809  }
1810  $str_processing_time .= $processing_time_seconds . " " . ($processing_time_seconds == 1 ? $this->lng->txt("second") : $this->lng->txt("seconds"));
1811  }
1812  $time_left = $starting_time + $processing_time - time();
1813  $time_left_minutes = floor($time_left / 60);
1814  $time_left_seconds = $time_left - $time_left_minutes * 60;
1815  $str_time_left = "";
1816  if ($time_left_minutes > 0) {
1817  $str_time_left = $time_left_minutes . " "
1818  . ($time_left_minutes == 1 ? $this->lng->txt("minute") : $this->lng->txt("minutes"));
1819  }
1820  if ($time_left < 300) {
1821  if ($time_left_seconds > 0) {
1822  if (strlen($str_time_left) > 0) {
1823  $str_time_left .= " " . $this->lng->txt("and") . " ";
1824  }
1825  $str_time_left .= $time_left_seconds . " "
1826  . ($time_left_seconds == 1 ? $this->lng->txt("second") : $this->lng->txt("seconds"));
1827  }
1828  }
1829  $date = getdate($starting_time);
1830  $formattedStartingTime = ilDatePresentation::formatDate(new ilDateTime($date, IL_CAL_FKT_GETDATE));
1831  $datenow = getdate();
1832  $this->tpl->setCurrentBlock("enableprocessingtime");
1833  $this->tpl->setVariable(
1834  "USER_WORKING_TIME",
1835  sprintf(
1836  $this->lng->txt("tst_time_already_spent"),
1837  $formattedStartingTime,
1838  $str_processing_time
1839  )
1840  );
1841  $this->tpl->setVariable("USER_REMAINING_TIME", sprintf($this->lng->txt("tst_time_already_spent_left"), $str_time_left));
1842  $this->tpl->parseCurrentBlock();
1843 
1844  // jQuery is required by tpl.workingtime.js
1846  $template = new ilTemplate("tpl.workingtime.js", true, true, 'components/ILIAS/Test');
1847  $template->setVariable("STRING_MINUTE", $this->lng->txt("minute"));
1848  $template->setVariable("STRING_MINUTES", $this->lng->txt("minutes"));
1849  $template->setVariable("STRING_SECOND", $this->lng->txt("second"));
1850  $template->setVariable("STRING_SECONDS", $this->lng->txt("seconds"));
1851  $template->setVariable("STRING_TIMELEFT", $this->lng->txt("tst_time_already_spent_left"));
1852  $template->setVariable("AND", strtolower($this->lng->txt("and")));
1853  $template->setVariable("YEAR", $date["year"]);
1854  $template->setVariable("MONTH", $date["mon"] - 1);
1855  $template->setVariable("DAY", $date["mday"]);
1856  $template->setVariable("HOUR", $date["hours"]);
1857  $template->setVariable("MINUTE", $date["minutes"]);
1858  $template->setVariable("SECOND", $date["seconds"]);
1859  if ($this->object->isEndingTimeEnabled()) {
1860  $date_time = new ilDateTime($this->object->getEndingTime(), IL_CAL_UNIX);
1861  preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $date_time->get(IL_CAL_TIMESTAMP), $matches);
1862  if (!empty($matches)) {
1863  $template->setVariable("ENDYEAR", $matches[1]);
1864  $template->setVariable("ENDMONTH", $matches[2] - 1);
1865  $template->setVariable("ENDDAY", $matches[3]);
1866  $template->setVariable("ENDHOUR", $matches[4]);
1867  $template->setVariable("ENDMINUTE", $matches[5]);
1868  $template->setVariable("ENDSECOND", $matches[6]);
1869  }
1870  }
1871  $template->setVariable("YEARNOW", $datenow["year"]);
1872  $template->setVariable("MONTHNOW", $datenow["mon"] - 1);
1873  $template->setVariable("DAYNOW", $datenow["mday"]);
1874  $template->setVariable("HOURNOW", $datenow["hours"]);
1875  $template->setVariable("MINUTENOW", $datenow["minutes"]);
1876  $template->setVariable("SECONDNOW", $datenow["seconds"]);
1877  $template->setVariable("PTIME_M", $processing_time_minutes);
1878  $template->setVariable("PTIME_S", $processing_time_seconds);
1879  if ($this->ctrl->getCmd() == 'outQuestionSummary') {
1880  $template->setVariable("REDIRECT_URL", $this->ctrl->getFormAction($this, 'redirectAfterDashboardCmd'));
1881  } else {
1882  $template->setVariable("REDIRECT_URL", "");
1883  }
1884  $template->setVariable("CHECK_URL", $this->ctrl->getLinkTarget($this, 'checkWorkingTime', '', true));
1885  $this->tpl->addOnLoadCode($template->get());
1886  }
const IL_CAL_UNIX
static initjQuery(?ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
const IL_CAL_FKT_GETDATE
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
const IL_CAL_TIMESTAMP
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionSummaryCmd()

ilTestPlayerAbstractGUI::outQuestionSummaryCmd ( )

Output of a summary of all test questions for test participants.

Definition at line 1953 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getContentBlockName(), ilTestServiceGUI\getObject(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilObjTest\lookupExamId(), ILIAS\Repository\object(), outProcessingTime(), and ilTestPlayerLayoutProvider\TEST_PLAYER_VIEW_TITLE.

1954  {
1955  $this->help->setScreenIdComponent('tst');
1956  $this->help->setScreenId('assessment');
1957  $this->help->setSubScreenId('question_summary');
1958 
1959  $this->tpl->addBlockFile(
1960  $this->getContentBlockName(),
1961  'adm_content',
1962  'tpl.il_as_tst_question_summary.html',
1963  'components/ILIAS/Test'
1964  );
1965 
1966  $this->global_screen->tool()->context()->current()->getAdditionalData()->replace(
1968  $this->getObject()->getTitle() . ' - ' . $this->lng->txt('question_summary')
1969  );
1970 
1971  $active_id = $this->test_session->getActiveId();
1972  $question_summary_data = $this->service->getQuestionSummaryData($this->test_sequence);
1973 
1974  $this->ctrl->setParameter($this, 'sequence', $this->testrequest->raw('sequence'));
1975 
1976  $table = new QuestionsOfAttemptTable(
1977  $this->lng,
1978  $this->ctrl,
1979  $this->ui_factory,
1980  new DataFactory(),
1981  $this->http,
1982  $this,
1983  $this->object,
1984  $question_summary_data
1985  );
1986  $this->tpl->setVariable('TABLE_LIST_OF_QUESTIONS', $this->ui_renderer->render($table->buildComponents()));
1987 
1988  if ($this->object->getEnableProcessingTime()) {
1989  $this->outProcessingTime($active_id);
1990  }
1991 
1992  if ($this->object->isShowExamIdInTestPassEnabled()) {
1993  $this->tpl->setCurrentBlock('exam_id_footer');
1994  $this->tpl->setVariable('EXAM_ID_VAL', ilObjTest::lookupExamId(
1995  $this->test_session->getActiveId(),
1996  $this->test_session->getPass(),
1997  $this->object->getId()
1998  ));
1999  $this->tpl->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
2000  $this->tpl->parseCurrentBlock();
2001  }
2002  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupExamId($active_id, $pass)
+ Here is the call graph for this function:

◆ outUserResultsOverviewCmd()

ilTestPlayerAbstractGUI::outUserResultsOverviewCmd ( )

Definition at line 2138 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl().

2139  {
2140  $this->ctrl->redirectByClass(
2141  [ilRepositoryGUI::class, ilObjTestGUI::class, ilTestEvaluationGUI::class],
2142  "outUserResultsOverview"
2143  );
2144  }
+ Here is the call graph for this function:

◆ performTearsAndAngerBrokenConfessionChecks()

ilTestPlayerAbstractGUI::performTearsAndAngerBrokenConfessionChecks ( )
protected

Definition at line 3141 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng(), ILIAS\Repository\logger(), and ILIAS\Repository\user().

Referenced by generateRandomTestPassForActiveUser().

3141  : bool
3142  {
3143  if ($this->test_session->getActiveId() > 0) {
3144  if ($this->test_sequence->hasRandomQuestionsForPass($this->test_session->getActiveId(), $this->test_session->getPass()) > 0) {
3145  $this->logger->info(
3146  __METHOD__ . ' Random Questions allready exists for user ' .
3147  $this->user->getId() . ' in test ' . $this->object->getTestId()
3148  );
3149 
3150  return true;
3151  }
3152  } else {
3153  $this->logger->info(__METHOD__ . ' ' . sprintf(
3154  $this->lng->txt("error_random_question_generation"),
3155  $this->user->getId(),
3156  $this->object->getTestId()
3157  ));
3158 
3159  return true;
3160  };
3161 
3162  return false;
3163  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performTestPassFinishedTasks()

ilTestPlayerAbstractGUI::performTestPassFinishedTasks ( StatusOfAttempt  $status_of_attempt)
protected

Definition at line 1016 of file class.ilTestPlayerAbstractGUI.php.

References null, and sendNewPassFinishedNotificationEmailIfActivated().

Referenced by finishTestCmd(), redirectAfterAutosaveCmd(), and redirectAfterDashboardCmd().

1016  : void
1017  {
1018  (new ilTestPassFinishTasks(
1019  $this->test_session,
1020  $this->object,
1021  $this->test_pass_result_repository
1022  ))->performFinishTasks($this->process_locker, $status_of_attempt);
1023  $this->object->updateTestResultCache($this->test_session->getActiveId(), null);
1024 
1026  $this->test_session->getActiveId(),
1027  $this->test_session->getPass()
1028  );
1029  }
Class ilTestPassFinishTasks.
sendNewPassFinishedNotificationEmailIfActivated(int $active_id, int $pass)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateContentStyleBlock()

ilTestPlayerAbstractGUI::populateContentStyleBlock ( )
protected

Definition at line 671 of file class.ilTestPlayerAbstractGUI.php.

References ilObjStyleSheet\getContentStylePath().

Referenced by prepareTestPage().

672  {
673  $this->tpl->setCurrentBlock("ContentStyle");
674  $this->tpl->setVariable(
675  "LOCATION_CONTENT_STYLESHEET",
677  );
678  $this->tpl->parseCurrentBlock();
679  }
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateDiscardSolutionModal()

ilTestPlayerAbstractGUI::populateDiscardSolutionModal ( )
protected

Definition at line 2912 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), ilTestPlayerCommands\DISCARD_SOLUTION, and ILIAS\Repository\lng().

Referenced by populateModals().

2912  : Signal
2913  {
2914  $modal = $this->ui_factory->modal()->interruptive(
2915  $this->lng->txt('discard_answer'),
2916  $this->lng->txt('discard_answer_confirmation'),
2917  $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::DISCARD_SOLUTION)
2918  )->withActionButtonLabel($this->lng->txt('discard_answer'));
2919 
2920  $this->tpl->setCurrentBlock('discard_solution_modal');
2921  $this->tpl->setVariable('DISCARD_SOLUTION_MODAL', $this->ui_renderer->render($modal));
2922  $this->tpl->parseCurrentBlock();
2923  return $modal->getShowSignal();
2924  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateFeedbackBlockHeader()

ilTestPlayerAbstractGUI::populateFeedbackBlockHeader (   $withFocusAnchor)
protected

Definition at line 2708 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng().

Referenced by populateInstantResponseBlocks().

2709  {
2710  if ($withFocusAnchor) {
2711  $this->tpl->setCurrentBlock('inst_resp_id');
2712  $this->tpl->setVariable('INSTANT_RESPONSE_FOCUS_ID', 'focus');
2713  $this->tpl->parseCurrentBlock();
2714  }
2715 
2716  $this->tpl->setCurrentBlock('instant_response_header');
2717  $this->tpl->setVariable('INSTANT_RESPONSE_HEADER', $this->lng->txt('tst_feedback'));
2718  $this->tpl->parseCurrentBlock();
2719  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateFeedbackBlockMessage()

ilTestPlayerAbstractGUI::populateFeedbackBlockMessage ( string  $a_message)
protected

Definition at line 2721 of file class.ilTestPlayerAbstractGUI.php.

Referenced by populateInstantResponseBlocks().

2722  {
2723  $this->tpl->setCurrentBlock('instant_response_message');
2724  $this->tpl->setVariable('INSTANT_RESPONSE_MESSAGE', $a_message);
2725  $this->tpl->parseCurrentBlock();
2726  }
+ Here is the caller graph for this function:

◆ populateGenericFeedbackBlock()

ilTestPlayerAbstractGUI::populateGenericFeedbackBlock ( assQuestionGUI  $question_gui,
  $solutionCorrect 
)
protected
Returns
bool true, if there is some feedback populated

Definition at line 618 of file class.ilTestPlayerAbstractGUI.php.

References ilAssQuestionFeedback\CSS_CLASS_FEEDBACK_CORRECT, ilAssQuestionFeedback\CSS_CLASS_FEEDBACK_WRONG, and assQuestionGUI\getGenericFeedbackOutput().

Referenced by populateInstantResponseBlocks().

618  : bool
619  {
620  // fix #031263: add pass
621  $feedback = $question_gui->getGenericFeedbackOutput($this->test_session->getActiveId(), $this->test_session->getPass());
622 
623  if (strlen($feedback)) {
624  $cssClass = (
625  $solutionCorrect ?
627  );
628 
629  $this->tpl->setCurrentBlock("answer_feedback");
630  $this->tpl->setVariable("ANSWER_FEEDBACK", $feedback);
631  $this->tpl->setVariable("ILC_FB_CSS_CLASS", $cssClass);
632  $this->tpl->parseCurrentBlock();
633  return true;
634  }
635  return false;
636  }
getGenericFeedbackOutput(int $active_id, ?int $pass)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateHelperGuiContent()

ilTestPlayerAbstractGUI::populateHelperGuiContent (   $helperGui)
protected
Parameters
$helperGui

Definition at line 2456 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), and getContentBlockName().

Referenced by showAnswerOptionalQuestionsConfirmation().

2457  {
2458  $this->tpl->setVariable($this->getContentBlockName(), $this->ctrl->getHTML($helperGui));
2459  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateInstantResponseBlocks()

ilTestPlayerAbstractGUI::populateInstantResponseBlocks ( assQuestionGUI  $question_gui,
  $authorizedSolution 
)
protected
See also
ilAssQuestionPreviewGUI::handleInstantResponseRendering()

Definition at line 2631 of file class.ilTestPlayerAbstractGUI.php.

References ilObjTest\_getPass(), determineInlineScoreDisplay(), assQuestionGUI\getObject(), assQuestionGUI\getSolutionOutput(), assQuestionGUI\hasInlineFeedback(), ILIAS\Repository\lng(), ILIAS\Repository\object(), populateFeedbackBlockHeader(), populateFeedbackBlockMessage(), populateGenericFeedbackBlock(), populateScoreBlock(), populateSolutionBlock(), and populateSpecificFeedbackBlock().

Referenced by populateInstantResponseModal(), and showQuestionCmd().

2632  {
2633  $response_available = false;
2634  $jump_to_response = false;
2635 
2636  // This controls if the solution should be shown.
2637  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Solutions"
2638  if ($this->object->getInstantFeedbackSolution()) {
2639  $show_question_inline_score = $this->determineInlineScoreDisplay();
2640 
2641  // Notation of the params prior to getting rid of this crap in favor of a class
2642  $solutionoutput = $question_gui->getSolutionOutput(
2643  $this->test_session->getActiveId(), #active_id
2644  $this->test_session->getPass(), #pass
2645  false, #graphical_output
2646  $show_question_inline_score, #result_output
2647  true, #show_question_only
2648  false, #show_feedback
2649  true, #show_correct_solution
2650  false, #show_manual_scoring
2651  false #show_question_text
2652  );
2653  $solutionoutput = str_replace('<h1 class="ilc_page_title_PageTitle"></h1>', '', $solutionoutput);
2654  $this->populateSolutionBlock($solutionoutput);
2655  $response_available = true;
2656  $jump_to_response = true;
2657  }
2658 
2659  $reachedPoints = $question_gui->getObject()->getAdjustedReachedPoints(
2660  $this->test_session->getActiveId(),
2661  ilObjTest::_getPass($this->test_session->getActiveId()),
2662  $authorizedSolution
2663  );
2664 
2665  $maxPoints = $question_gui->getObject()->getMaximumPoints();
2666 
2667  $solutionCorrect = ($reachedPoints == $maxPoints);
2668 
2669  // This controls if the score should be shown.
2670  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Results (Only Points)"
2671  if ($this->object->getAnswerFeedbackPoints()) {
2672  $this->populateScoreBlock($reachedPoints, $maxPoints);
2673  $response_available = true;
2674  $jump_to_response = true;
2675  }
2676 
2677  // This controls if the generic feedback should be shown.
2678  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Solutions"
2679  if ($this->object->getGenericAnswerFeedback()) {
2680  if ($this->populateGenericFeedbackBlock($question_gui, $solutionCorrect)) {
2681  $response_available = true;
2682  $jump_to_response = true;
2683  }
2684  }
2685 
2686  // This controls if the specific feedback should be shown.
2687  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Answer-Specific Feedback"
2688  if ($this->object->getSpecificAnswerFeedback()) {
2689  if ($question_gui->hasInlineFeedback()) {
2690  // Don't jump to the feedback below the question if some feedback is shown within the question
2691  $jump_to_response = false;
2692  } elseif ($this->populateSpecificFeedbackBlock($question_gui)) {
2693  $response_available = true;
2694  $jump_to_response = true;
2695  }
2696  }
2697 
2698  $this->populateFeedbackBlockHeader($jump_to_response);
2699  if (!$response_available) {
2700  if ($question_gui->hasInlineFeedback()) {
2701  $this->populateFeedbackBlockMessage($this->lng->txt('tst_feedback_is_given_inline'));
2702  } else {
2703  $this->populateFeedbackBlockMessage($this->lng->txt('tst_feedback_not_available_for_answer'));
2704  }
2705  }
2706  }
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
populateSpecificFeedbackBlock(assQuestionGUI $question_gui)
populateGenericFeedbackBlock(assQuestionGUI $question_gui, $solutionCorrect)
getSolutionOutput(int $active_id, ?int $pass=null, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_inline_feedback=true)
populateScoreBlock($reachedPoints, $maxPoints)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateInstantResponseModal()

ilTestPlayerAbstractGUI::populateInstantResponseModal ( assQuestionGUI  $question_gui,
  $nav_url 
)
protected

Definition at line 2574 of file class.ilTestPlayerAbstractGUI.php.

References ilTestServiceGUI\$tpl, assQuestionGUI\getObject(), getQuestionFeedbackModalHtml(), assQuestionGUI\getQuestionHeaderBlockBuilder(), assQuestionGUI\getSolutionOutput(), isShowingPostponeStatusReguired(), null, assQuestionGUI\outQuestionPage(), populateInstantResponseBlocks(), assQuestionGUI\setNavigationGUI(), and ILIAS\UICore\GlobalTemplate\setVariable().

Referenced by showQuestionCmd().

2574  : void
2575  {
2576  $question_gui->setNavigationGUI(null);
2577  $question_gui->getQuestionHeaderBlockBuilder()->setQuestionAnswered(true);
2578 
2579  $answer_feedback_enabled = $this->object->getSpecificAnswerFeedback();
2580 
2581  $solutionoutput = $question_gui->getSolutionOutput(
2582  $this->test_session->getActiveId(), #active_id
2583  $this->test_session->getPass(), #pass
2584  false, #graphical_output
2585  false, #result_output
2586  true, #show_question_only
2587  $answer_feedback_enabled, #show_feedback
2588  false, #show_correct_solution
2589  false, #show_manual_scoring
2590  true #show_question_text
2591  );
2592 
2593  $pageoutput = $question_gui->outQuestionPage(
2594  "",
2595  $this->isShowingPostponeStatusReguired($question_gui->getObject()->getId()),
2596  $this->test_session->getActiveId(),
2597  $solutionoutput
2598  );
2599 
2600  $tpl = new ilTemplate('tpl.tst_player_response_modal.html', true, true, 'components/ILIAS/Test');
2601 
2602  // populate the instant response blocks in the
2603  $saved_tpl = $this->tpl;
2604  $this->tpl = $tpl;
2605  $this->populateInstantResponseBlocks($question_gui, true);
2606  $this->tpl = $saved_tpl;
2607 
2608  $tpl->setVariable('QUESTION_OUTPUT', $pageoutput);
2609  $this->tpl->setVariable('INSTANT_RESPONSE_MODAL', $this->getQuestionFeedbackModalHtml($tpl, $nav_url));
2610  }
ilGlobalTemplateInterface ilTemplate $tpl
sk 2023-08-01: We need this union type, even if it is wrong! To change this
setVariable(string $variable, $value='')
Sets the given variable to the given value.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getQuestionFeedbackModalHtml(ilTemplate $tpl, string $nav_url)
populateInstantResponseBlocks(assQuestionGUI $question_gui, $authorizedSolution)
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
getSolutionOutput(int $active_id, ?int $pass=null, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_inline_feedback=true)
setNavigationGUI(?ilTestQuestionNavigationGUI $navigationGUI)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateLowerNextButtonBlock()

ilTestPlayerAbstractGUI::populateLowerNextButtonBlock (   $primary_next)
protected

Definition at line 512 of file class.ilTestPlayerAbstractGUI.php.

References buildNextButtonInstance().

Referenced by populateNextButtons().

512  : void
513  {
514  $button = $this->buildNextButtonInstance($primary_next);
515 
516  $this->tpl->setCurrentBlock("next_bottom");
517  $this->tpl->setVariable("BTN_NEXT_BOTTOM", $this->ui_renderer->render($button));
518  $this->tpl->parseCurrentBlock();
519  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateLowerPreviousButtonBlock()

ilTestPlayerAbstractGUI::populateLowerPreviousButtonBlock ( )
protected

Definition at line 530 of file class.ilTestPlayerAbstractGUI.php.

References buildPreviousButtonInstance().

Referenced by populatePreviousButtons().

531  {
532  $button = $this->buildPreviousButtonInstance();
533 
534  $this->tpl->setCurrentBlock("prev_bottom");
535  $this->tpl->setVariable("BTN_PREV_BOTTOM", $this->ui_renderer->render($button));
536  $this->tpl->parseCurrentBlock();
537  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateMessageContent()

ilTestPlayerAbstractGUI::populateMessageContent ( string  $content_html)
protected

Definition at line 2887 of file class.ilTestPlayerAbstractGUI.php.

References getContentBlockName(), and ILIAS\Repository\object().

2887  : void
2888  {
2889  if ($this->object->getKioskMode()) {
2890  $this->tpl->addBlockfile($this->getContentBlockName(), 'content', "tpl.il_as_tst_kiosk_mode_content.html", "components/ILIAS/Test");
2891  $this->tpl->setContent($content_html);
2892  return;
2893  }
2894  $this->tpl->setVariable($this->getContentBlockName(), $content_html);
2895  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:

◆ populateModals()

ilTestPlayerAbstractGUI::populateModals ( )
protected
Returns
array<self::DISCARD_MODAL|self::LOCKS_CHANGED_MODAL|self::LOCKS_UNCHANGED_MODAL, Signal>

Definition at line 2900 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\object(), populateDiscardSolutionModal(), populateNextLocksChangedModal(), and populateNextLocksUnchangedModal().

Referenced by showQuestionEditable().

2900  : array
2901  {
2902  $signals = [self::DISCARD_MODAL => $this->populateDiscardSolutionModal()];
2903 
2904  if ($this->object->isFollowupQuestionAnswerFixationEnabled()) {
2905  $signals[self::LOCKS_CHANGED_MODAL] = $this->populateNextLocksChangedModal();
2906  $signals[self::LOCKS_UNCHANGED_MODAL] = $this->populateNextLocksUnchangedModal();
2907  }
2908 
2909  return $signals;
2910  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateNextButtons()

ilTestPlayerAbstractGUI::populateNextButtons (   $primary_next)
protected

Definition at line 506 of file class.ilTestPlayerAbstractGUI.php.

References populateLowerNextButtonBlock(), and populateUpperNextButtonBlock().

Referenced by populateQuestionNavigation().

506  : void
507  {
508  $this->populateUpperNextButtonBlock($primary_next);
509  $this->populateLowerNextButtonBlock($primary_next);
510  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateNextLocksChangedModal()

ilTestPlayerAbstractGUI::populateNextLocksChangedModal ( )
protected

Definition at line 2940 of file class.ilTestPlayerAbstractGUI.php.

References isFollowUpQuestionLocksConfirmationPrevented(), and ILIAS\Repository\lng().

Referenced by populateModals().

2940  : Signal
2941  {
2942  $empty_signal = new \ILIAS\UI\Implementation\Component\Signal('');
2944  return $empty_signal;
2945  }
2946 
2947  $modal_message = $this->ui_factory->messageBox()->confirmation(
2948  $this->lng->txt('tst_nav_next_locks_current_answer_confirm')
2949  );
2950  $modal_checkbox = $this->ui_factory->input()->field()->checkbox(
2951  $this->lng->txt('tst_dont_show_msg_again_in_current_session')
2952  )->withDedicatedName(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM);
2953 
2954  $modal = $this->ui_factory->modal()->roundtrip(
2955  $this->lng->txt('tst_nav_next_locks_current_answer_header'),
2956  $modal_message,
2957  [ $modal_checkbox ],
2958  'javascript:il.TestPlayerQuestionEditControl.confirmNextLocksChanged()'
2959  )->withSubmitLabel($this->lng->txt('tst_proceed'));
2960 
2961  $this->tpl->setCurrentBlock('next_locks_changed_modal');
2962  $this->tpl->setVariable('NEXT_LOCKS_CHANGED_MODAL', $this->ui_renderer->render($modal));
2963  $this->tpl->parseCurrentBlock();
2964  return $modal->getShowSignal();
2965  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateNextLocksUnchangedModal()

ilTestPlayerAbstractGUI::populateNextLocksUnchangedModal ( )
protected

Definition at line 2926 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng().

Referenced by populateModals().

2926  : Signal
2927  {
2928  $modal = $this->ui_factory->modal()->interruptive(
2929  $this->lng->txt('tst_nav_next_locks_empty_answer_header'),
2930  $this->lng->txt('tst_nav_next_locks_empty_answer_confirm'),
2931  'javascript:il.TestPlayerQuestionEditControl.confirmNextLocksUnchanged()'
2932  )->withActionButtonLabel($this->lng->txt('tst_proceed'));
2933 
2934  $this->tpl->setCurrentBlock('next_locks_unchanged_modal');
2935  $this->tpl->setVariable('NEXT_LOCKS_UNCHANGED_MODAL', $this->ui_renderer->render($modal));
2936  $this->tpl->parseCurrentBlock();
2937  return $modal->getShowSignal();
2938  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populatePreviousButtons()

ilTestPlayerAbstractGUI::populatePreviousButtons ( )
protected

Definition at line 500 of file class.ilTestPlayerAbstractGUI.php.

References populateLowerPreviousButtonBlock(), and populateUpperPreviousButtonBlock().

Referenced by populateQuestionNavigation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateQuestionEditControl()

ilTestPlayerAbstractGUI::populateQuestionEditControl ( assQuestionGUI  $question_gui)
protected

Definition at line 2983 of file class.ilTestPlayerAbstractGUI.php.

References $modal_signals, ilTestPlayerCommands\AUTO_SAVE, ilTestPlayerCommands\AUTO_SAVE_ON_TIME_LIMIT, ILIAS\Repository\ctrl(), ilTestPlayerCommands\DETECT_CHANGES, getAnswerChangedParameter(), ILIAS\UI\Component\Signal\getId(), assQuestionGUI\getObject(), isParticipantsAnswerFixed(), and ILIAS\Repository\lng().

Referenced by showQuestionEditable(), and showQuestionViewable().

2983  : void
2984  {
2985  $config = [];
2986  $state = $question_gui->getObject()->lookupForExistingSolutions($this->test_session->getActiveId(), $this->test_session->getPass());
2987  $config['isAnswered'] = $state['authorized'];
2988  $config['isAnswerChanged'] = $state['intermediate'] || $this->getAnswerChangedParameter();
2989  $config['isAnswerFixed'] = $this->isParticipantsAnswerFixed($question_gui->getObject()->getId());
2990  $config['saveOnTimeReachedUrl'] = str_replace('&amp;', '&', $this->ctrl->getFormAction($this, ilTestPlayerCommands::AUTO_SAVE_ON_TIME_LIMIT));
2991 
2992  $config['autosaveUrl'] = '';
2993  $config['autosaveInterval'] = 0;
2994  if ($question_gui->getObject() instanceof QuestionAutosaveable && $this->object->getAutosave()) {
2995  $config['autosaveUrl'] = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::AUTO_SAVE, '', true);
2996  $config['autosaveInterval'] = $this->object->getMainSettings()->getQuestionBehaviourSettings()->getAutosaveInterval();
2997  }
2998 
2999  $question_config = $question_gui->getObject()->getTestPresentationConfig();
3000 
3001  $config['withFormChangeDetection'] = $question_config->isFormChangeDetectionEnabled();
3002 
3003  // Flash and Java questions: changes are directly sent to ilias and have to be polled from there
3004  $config['withBackgroundChangeDetection'] = $question_config->isBackgroundChangeDetectionEnabled();
3005  $config['backgroundDetectorUrl'] = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::DETECT_CHANGES, '', true);
3006 
3007  // Forced feedback will change the navigation saving command
3008  $config['forcedInstantFeedback'] = $this->object->isForceInstantFeedbackEnabled();
3009  $config['questionLocked'] = $this->isParticipantsAnswerFixed($question_gui->getObject()->getId());
3010  $config['nextQuestionLocks'] = $this->object->isFollowupQuestionAnswerFixationEnabled();
3011  $config['autosaveFailureMessage'] = $this->lng->txt('autosave_failed');
3012 
3013  // Add the modal signals and parameter name for the follow-up question locks confirmation
3014  $config['modalSignals'] = array_map(fn(Signal $signal) => $signal->getId(), $this->modal_signals);
3015  $config['preventConfirmationParam'] = self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM;
3016 
3017  $this->tpl->addJavascript('assets/js/ilTestPlayerQuestionEditControl.js');
3018  $this->tpl->addOnLoadCode('il.TestPlayerQuestionEditControl.init(' . json_encode($config) . ')');
3019  }
getId()
Get the ID of this signal.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateQuestionNavigation()

ilTestPlayerAbstractGUI::populateQuestionNavigation (   $sequence_element,
  $primary_next 
)
protected

Definition at line 489 of file class.ilTestPlayerAbstractGUI.php.

References isFirstQuestionInSequence(), isLastQuestionInSequence(), populateNextButtons(), and populatePreviousButtons().

Referenced by showQuestionCmd().

489  : void
490  {
491  if (!$this->isFirstQuestionInSequence($sequence_element)) {
492  $this->populatePreviousButtons();
493  }
494 
495  if (!$this->isLastQuestionInSequence($sequence_element)) {
496  $this->populateNextButtons($primary_next);
497  }
498  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateQuestionOptionalMessage()

ilTestPlayerAbstractGUI::populateQuestionOptionalMessage ( )
abstractprotected

Referenced by executeCommand(), and showQuestionCmd().

+ Here is the caller graph for this function:

◆ populateScoreBlock()

ilTestPlayerAbstractGUI::populateScoreBlock (   $reachedPoints,
  $maxPoints 
)
protected

Definition at line 638 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng().

Referenced by populateInstantResponseBlocks().

639  {
640  $scoreInformation = sprintf(
641  $this->lng->txt("you_received_a_of_b_points"),
642  $reachedPoints,
643  $maxPoints
644  );
645 
646  $this->tpl->setCurrentBlock("received_points_information");
647  $this->tpl->setVariable("RECEIVED_POINTS_INFORMATION", $scoreInformation);
648  $this->tpl->parseCurrentBlock();
649  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateSolutionBlock()

ilTestPlayerAbstractGUI::populateSolutionBlock (   $solutionoutput)
protected

Definition at line 651 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\lng().

Referenced by populateInstantResponseBlocks().

652  {
653  if (strlen($solutionoutput)) {
654  $this->tpl->setCurrentBlock("solution_output");
655  $this->tpl->setVariable("CORRECT_SOLUTION", $this->lng->txt("tst_best_solution_is"));
656  $this->tpl->setVariable("QUESTION_FEEDBACK", $solutionoutput);
657  $this->tpl->parseCurrentBlock();
658  }
659  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateSpecificFeedbackBlock()

ilTestPlayerAbstractGUI::populateSpecificFeedbackBlock ( assQuestionGUI  $question_gui)
protected
Returns
bool true, if there is some feedback populated

Definition at line 595 of file class.ilTestPlayerAbstractGUI.php.

References assQuestionGUI\getObject(), assQuestionGUI\getSpecificFeedbackOutput(), and null.

Referenced by populateInstantResponseBlocks().

595  : bool
596  {
597  $solutionValues = $question_gui->getObject()->getSolutionValues(
598  $this->test_session->getActiveId(),
599  null
600  );
601 
602  $feedback = $question_gui->getSpecificFeedbackOutput(
603  $question_gui->getObject()->fetchIndexedValuesFromValuePairs($solutionValues)
604  );
605 
606  if (!empty($feedback)) {
607  $this->tpl->setCurrentBlock("specific_feedback");
608  $this->tpl->setVariable("SPECIFIC_FEEDBACK", $feedback);
609  $this->tpl->parseCurrentBlock();
610  return true;
611  }
612  return false;
613  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getSpecificFeedbackOutput(array $userSolution)
Returns the answer specific feedback for the question.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateSyntaxStyleBlock()

ilTestPlayerAbstractGUI::populateSyntaxStyleBlock ( )
protected

Definition at line 661 of file class.ilTestPlayerAbstractGUI.php.

References ilObjStyleSheet\getSyntaxStylePath().

Referenced by prepareTestPage().

662  {
663  $this->tpl->setCurrentBlock("SyntaxStyle");
664  $this->tpl->setVariable(
665  "LOCATION_SYNTAX_STYLESHEET",
667  );
668  $this->tpl->parseCurrentBlock();
669  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateTestNavigationToolbar()

ilTestPlayerAbstractGUI::populateTestNavigationToolbar ( ilTestNavigationToolbarGUI  $toolbar_gui)
protected

Definition at line 469 of file class.ilTestPlayerAbstractGUI.php.

References null.

Referenced by showQuestionCmd().

469  : void
470  {
471  $this->tpl->setCurrentBlock('test_nav_toolbar');
472  $this->tpl->setVariable('TEST_NAV_TOOLBAR', $toolbar_gui->getHTML());
473  $this->tpl->parseCurrentBlock();
474 
475  if ($this->finish_test_modal === null) {
476  return;
477  }
478 
479  $this->tpl->setCurrentBlock('finish_test_modal');
480  $this->tpl->setVariable(
481  'FINISH_TEST_MODAL',
482  $this->ui_renderer->render(
483  $this->finish_test_modal->withOnLoad($this->finish_test_modal->getShowSignal())
484  )
485  );
486  $this->tpl->parseCurrentBlock();
487  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ populateUpperNextButtonBlock()

ilTestPlayerAbstractGUI::populateUpperNextButtonBlock (   $primaryNext)
protected

Definition at line 521 of file class.ilTestPlayerAbstractGUI.php.

References buildNextButtonInstance().

Referenced by populateNextButtons().

522  {
523  $button = $this->buildNextButtonInstance($primaryNext);
524 
525  $this->tpl->setCurrentBlock("next");
526  $this->tpl->setVariable("BTN_NEXT", $this->ui_renderer->render($button));
527  $this->tpl->parseCurrentBlock();
528  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateUpperPreviousButtonBlock()

ilTestPlayerAbstractGUI::populateUpperPreviousButtonBlock ( )
protected

Definition at line 539 of file class.ilTestPlayerAbstractGUI.php.

References buildPreviousButtonInstance().

Referenced by populatePreviousButtons().

540  {
541  $button = $this->buildPreviousButtonInstance();
542 
543  $this->tpl->setCurrentBlock("prev");
544  $this->tpl->setVariable("BTN_PREV", $this->ui_renderer->render($button));
545  $this->tpl->parseCurrentBlock();
546  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareSummaryPage()

ilTestPlayerAbstractGUI::prepareSummaryPage ( )
protected

Definition at line 2292 of file class.ilTestPlayerAbstractGUI.php.

References getContentBlockName().

2293  {
2294  $this->tpl->addBlockFile(
2295  $this->getContentBlockName(),
2296  'adm_content',
2297  'tpl.il_as_tst_question_summary.html',
2298  'components/ILIAS/Test'
2299  );
2300  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:

◆ prepareTestPage()

ilTestPlayerAbstractGUI::prepareTestPage (   $presentationMode,
  $sequenceElement,
  $question_id 
)
protected

Definition at line 1141 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), endingTimeReached(), initTestPageTemplate(), isMaxProcessingTimeReached(), isOptionalQuestionAnsweringConfirmationRequired(), ILIAS\Repository\lng(), ilObjTest\lookupExamId(), max_processing_time_reached(), ILIAS\Repository\object(), outProcessingTime(), populateContentStyleBlock(), populateSyntaxStyleBlock(), ilTestPlayerCommands\RESUME_PLAYER, showAnswerOptionalQuestionsConfirmation(), showSideList(), and ILIAS\Repository\user().

Referenced by showQuestionCmd().

1142  {
1143  $this->navigation_history->addItem(
1144  $this->test_session->getRefId(),
1145  $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::RESUME_PLAYER),
1146  'tst'
1147  );
1148 
1149  $this->initTestPageTemplate();
1150  $this->populateContentStyleBlock();
1151  $this->populateSyntaxStyleBlock();
1152 
1153  if ($this->isMaxProcessingTimeReached()) {
1154  $this->max_processing_time_reached();
1155  return;
1156  }
1157 
1158  if ($this->object->endingTimeReached()) {
1159  $this->endingTimeReached();
1160  return;
1161  }
1162 
1163  if ($this->isOptionalQuestionAnsweringConfirmationRequired($sequenceElement)) {
1164  $this->ctrl->setParameter($this, "sequence", $sequenceElement);
1166  return;
1167  }
1168 
1169  $this->tpl->setVariable("TEST_ID", (string) $this->object->getTestId());
1170  $this->tpl->setVariable("LOGIN", $this->user->getLogin());
1171 
1172  $this->tpl->setVariable("SEQ_ID", $sequenceElement);
1173  $this->tpl->setVariable("QUEST_ID", $question_id);
1174 
1175  if ($this->object->getEnableProcessingTime()) {
1176  $this->outProcessingTime($this->test_session->getActiveId());
1177  }
1178 
1179  $this->tpl->setVariable("PAGETITLE", "- " . $this->object->getTitle());
1180 
1181  if ($this->object->isShowExamIdInTestPassEnabled() && !$this->object->getKioskMode()) {
1182  $this->tpl->setCurrentBlock('exam_id_footer');
1183  $this->tpl->setVariable('EXAM_ID_VAL', ilObjTest::lookupExamId(
1184  $this->test_session->getActiveId(),
1185  $this->test_session->getPass(),
1186  $this->object->getId()
1187  ));
1188  $this->tpl->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
1189  $this->tpl->parseCurrentBlock();
1190  }
1191 
1192  if ($this->object->getListOfQuestions()) {
1193  $this->showSideList($sequenceElement);
1194  }
1195  }
showSideList($current_sequence_element)
max_processing_time_reached()
Outputs a message when the maximum processing time is reached.
endingTimeReached()
handle endingTimeReached
isOptionalQuestionAnsweringConfirmationRequired(int $sequence_key)
static lookupExamId($active_id, $pass)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ previousQuestionCmd()

ilTestPlayerAbstractGUI::previousQuestionCmd ( )
protected

Definition at line 2274 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), handleCheckTestPassValid(), isValidSequenceElement(), and ilTestPlayerCommands\SHOW_QUESTION.

2275  {
2276  $this->handleCheckTestPassValid();
2277 
2278  $sequence_element = $this->test_sequence->getPreviousSequence(
2279  $this->getCurrentSequenceElement()
2280  );
2281 
2282  if (!$this->isValidSequenceElement($sequence_element)) {
2283  $sequence_element = $this->test_sequence->getLastSequence();
2284  }
2285 
2286  $this->ctrl->setParameter($this, 'sequence', $sequence_element);
2287  $this->ctrl->setParameter($this, 'pmode', '');
2288 
2289  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
2290  }
+ Here is the call graph for this function:

◆ redirectAfterAutosaveCmd()

ilTestPlayerAbstractGUI::redirectAfterAutosaveCmd ( )

Redirect the user after an automatic save when the time limit is reached.

Exceptions
ilTestException

Definition at line 838 of file class.ilTestPlayerAbstractGUI.php.

References performTestPassFinishedTasks(), and redirectAfterFinish().

838  : void
839  {
840  $this->performTestPassFinishedTasks(StatusOfAttempt::FINISHED_BY_DURATION);
841 
842  $this->redirectAfterFinish();
843  }
performTestPassFinishedTasks(StatusOfAttempt $status_of_attempt)
+ Here is the call graph for this function:

◆ redirectAfterDashboardCmd()

ilTestPlayerAbstractGUI::redirectAfterDashboardCmd ( )

Definition at line 845 of file class.ilTestPlayerAbstractGUI.php.

References performTestPassFinishedTasks(), and redirectAfterFinish().

845  : void
846  {
847  $this->performTestPassFinishedTasks(StatusOfAttempt::FINISHED_BY_PARTICIPANT);
848 
849  $this->redirectAfterFinish();
850  }
performTestPassFinishedTasks(StatusOfAttempt $status_of_attempt)
+ Here is the call graph for this function:

◆ redirectAfterFinish()

ilTestPlayerAbstractGUI::redirectAfterFinish ( )
protected

Definition at line 852 of file class.ilTestPlayerAbstractGUI.php.

References $url, ilTestPlayerCommands\AFTER_TEST_PASS_FINISHED, ILIAS\Repository\ctrl(), getContentBlockName(), and ILIAS\Repository\lng().

Referenced by redirectAfterAutosaveCmd(), and redirectAfterDashboardCmd().

852  : void
853  {
854  $url = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::AFTER_TEST_PASS_FINISHED, '', false, false);
855 
856  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_redirect_autosave.html", "components/ILIAS/Test");
857  $this->tpl->setVariable("TEXT_REDIRECT", $this->lng->txt("redirectAfterSave"));
858  $this->tpl->setVariable("URL", $url);
859  }
$url
Definition: shib_logout.php:66
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectBackCmd()

ilTestPlayerAbstractGUI::redirectBackCmd ( )

Definition at line 1097 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), and ilTestServiceGUI\getObjectiveOrientedContainer().

Referenced by afterTestPassFinishedCmd(), and endingTimeReached().

1097  : void
1098  {
1099  $testPassesSelector = new ilTestPassesSelector($this->db, $this->object);
1100  $testPassesSelector->setActiveId($this->test_session->getActiveId());
1101  $testPassesSelector->setLastFinishedPass($this->test_session->getLastFinishedPass());
1102 
1103  if (count($testPassesSelector->getReportablePasses())) {
1104  if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1105  $this->ctrl->redirectByClass(['ilTestResultsGUI', 'ilTestEvalObjectiveOrientedGUI']);
1106  }
1107 
1108  $this->ctrl->redirectByClass([ilTestResultsGUI::class, ilMyTestResultsGUI::class, ilTestEvaluationGUI::class]);
1109  }
1110 
1111  $this->ctrl->redirectByClass(TestScreenGUI::class, TestScreenGUI::DEFAULT_CMD);
1112  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerForcedFeedbackNavUrl()

ilTestPlayerAbstractGUI::registerForcedFeedbackNavUrl ( string  $forced_feedback_nav_url)
protected

Definition at line 3027 of file class.ilTestPlayerAbstractGUI.php.

References ilSession\get(), null, and ilSession\set().

Referenced by showInstantResponseCmd().

3027  : void
3028  {
3029  if (ilSession::get('forced_feedback_navigation_url') == null) {
3030  ilSession::set('forced_feedback_navigation_url', []);
3031  }
3032  $forced_feeback_navigation_url = ilSession::get('forced_feedback_navigation_url');
3033  $forced_feeback_navigation_url[$this->test_session->getActiveId()] = $forced_feedback_nav_url;
3034  ilSession::set('forced_feedback_navigation_url', $forced_feeback_navigation_url);
3035  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeIntermediateSolution()

ilTestPlayerAbstractGUI::removeIntermediateSolution ( )

Definition at line 331 of file class.ilTestPlayerAbstractGUI.php.

References getCurrentQuestionId(), and getQuestionInstance().

Referenced by handleIntermediateSubmit(), revertChangesCmd(), showInstantResponseCmd(), submitSolutionAndNextCmd(), and submitSolutionCmd().

331  : void
332  {
333  $question_id = $this->getCurrentQuestionId();
334 
335  $this->getQuestionInstance($question_id)->removeIntermediateSolution(
336  $this->test_session->getActiveId(),
337  $this->test_session->getPass()
338  );
339  }
getQuestionInstance(int $question_id, bool $from_cache=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resumePlayerCmd()

ilTestPlayerAbstractGUI::resumePlayerCmd ( )
protected

Definition at line 731 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), generateRandomTestPassForActiveUser(), handleUserSettings(), null, ILIAS\Repository\object(), ilTestPlayerCommands\QUESTION_SUMMARY, ilSession\set(), and ilTestPlayerCommands\SHOW_QUESTION.

732  {
733  $this->handleUserSettings();
734 
735  $active_id = $this->test_session->getActiveId();
736  $this->ctrl->setParameter($this, "active_id", $active_id);
737 
738  $active_time_id = $this->object->startWorkingTime($active_id, $this->test_session->getPass());
739  ilSession::set("active_time_id", $active_time_id);
740  ilSession::set('tst_pass_finish', 0);
741 
742  if ($this->object->isRandomTest()) {
743  if (!$this->test_sequence->hasRandomQuestionsForPass($active_id, $this->test_session->getPass())) {
744  // create a new set of random questions
746  }
747  }
748 
749  $shuffle = $this->object->getShuffleQuestions();
750  if ($this->object->isRandomTest()) {
751  $shuffle = false;
752  }
753 
754  $this->object->updateTestPassResults(
755  $active_id,
756  $this->test_session->getPass(),
757  null,
758  $this->object->getId()
759  );
760 
761  // ensure existing test sequence
762  if (!$this->test_sequence->hasSequence()) {
763  $this->test_sequence->createNewSequence($this->object->getQuestionCount(), $shuffle);
764  $this->test_sequence->saveToDb();
765  }
766 
767  if ($this->object->getListOfQuestionsStart()) {
768  $this->ctrl->redirect($this, ilTestPlayerCommands::QUESTION_SUMMARY);
769  }
770 
771  $this->ctrl->setParameter($this, 'sequence', $this->test_session->getLastSequence());
772  $this->ctrl->setParameter($this, 'pmode', '');
773  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
774  }
handleUserSettings()
Handles some form parameters on starting and resuming a test.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ revertChangesCmd()

ilTestPlayerAbstractGUI::revertChangesCmd ( )
protected

Definition at line 1553 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), removeIntermediateSolution(), setAnswerChangedParameter(), and ilTestPlayerCommands\SHOW_QUESTION.

1554  {
1555  $this->removeIntermediateSolution();
1556  $this->setAnswerChangedParameter(false);
1557  $this->ctrl->saveParameter($this, 'sequence');
1558  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1559  }
+ Here is the call graph for this function:

◆ save()

ilTestPlayerAbstractGUI::save ( assQuestion  $question_obj,
bool  $authorized 
)
private

Definition at line 402 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, ilObjTest\_getPass(), assQuestion\answerToParticipantInteraction(), ilLOTestQuestionAdapter\getInstance(), ilTestServiceGUI\getObject(), handleSkillTriggering(), ILIAS\Repository\logger(), null, ILIAS\Repository\object(), and assQuestion\persistWorkingState().

Referenced by saveQuestionSolution().

402  : bool
403  {
404  $active_id = $this->test_session->getActiveId();
405  $pass = ilObjTest::_getPass($active_id);
406  if (!$question_obj->persistWorkingState(
407  $active_id,
408  $pass,
409  $authorized
410  )) {
411  return false;
412  }
413 
414  if ($authorized && $this->test_session->isObjectiveOriented()) {
415  $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($this->test_session);
416  $objectivesAdapter->updateQuestionResult($this->test_session, $question_obj);
417  }
418 
419  if ($authorized && $this->object->isSkillServiceToBeConsidered()) {
420  $this->handleSkillTriggering($this->test_session);
421  }
422 
423  if ($authorized && $this->logger->isLoggingEnabled()
424  && !$this->getObject()->getAnonymity()
425  && ($interaction = $question_obj->answerToParticipantInteraction(
426  $this->logger->getAdditionalInformationGenerator(),
427  $this->getObject()->getRefId(),
428  $active_id,
429  $pass,
430  $this->logger->isIPLoggingEnabled() ? $_SERVER['REMOTE_ADDR'] : '',
431  TestParticipantInteractionTypes::ANSWER_SUBMITTED
432  )) !== null) {
433  $this->logger->logParticipantInteraction($interaction);
434  }
435  return true;
436  }
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
persistWorkingState(int $active_id, $pass, bool $authorized=true)
persists the working state for current testactive and testpass
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getInstance(ilTestSession $a_test_session)
answerToParticipantInteraction(AdditionalInformationGenerator $additional_info, int $test_ref_id, int $active_id, int $pass, string $source_ip, TestParticipantInteractionTypes $interaction_type)
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
handleSkillTriggering(ilTestSession $test_session)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveNavigationPreventConfirmation()

ilTestPlayerAbstractGUI::saveNavigationPreventConfirmation ( )
protected

Definition at line 2810 of file class.ilTestPlayerAbstractGUI.php.

References ilSession\set().

Referenced by showInstantResponseCmd(), and submitSolutionCmd().

2810  : void
2811  {
2812  if ($this->testrequest->retrieveBoolFromPost('save_on_navigation_prevent_confirmation')) {
2813  ilSession::set('save_on_navigation_prevent_confirmation', true);
2814  }
2815 
2816  if ($this->testrequest->retrieveBoolFromPost(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM)) {
2817  ilSession::set(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM, true);
2818  }
2819  }
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveQuestionSolution()

ilTestPlayerAbstractGUI::saveQuestionSolution ( bool  $authorized = true,
bool  $force = false 
)

Definition at line 341 of file class.ilTestPlayerAbstractGUI.php.

References buildQuestionObject(), canSaveResult(), ILIAS\Repository\ctrl(), ilSession\get(), isNrOfTriesReached(), null, save(), ilSession\set(), updateWorkingTime(), and ILIAS\TestQuestionPool\Questions\Question\validateSolutionSubmit().

Referenced by autosaveCmd(), autosaveOnTimeLimitCmd(), handleFileUploadCmd(), handleIntermediateSubmit(), handleQuestionActionCmd(), showInstantResponseCmd(), submitIntermediateSolutionCmd(), submitSolutionAndNextCmd(), and submitSolutionCmd().

344  : bool {
345  $this->updateWorkingTime();
346 
347  $formtimestamp = $this->testrequest->int('formtimestamp');
348  if (!$force
349  && ilSession::get('formtimestamp') !== null
350  && $formtimestamp === ilSession::get('formtimestamp')) {
351  return false;
352  }
353 
354  ilSession::set('formtimestamp', $formtimestamp);
355 
356  /*
357  #21097 - exceed maximum passes
358  this is a battle of conditions; e.g. ilTestPlayerAbstractGUI::autosaveOnTimeLimitCmd forces saving of results.
359  However, if an admin has finished the pass in the meantime, a new pass should not be created.
360  */
361  if ($force && $this->isNrOfTriesReached()) {
362  $force = false;
363  }
364 
365  $question_obj = $this->buildQuestionObject();
366 
367  if ($question_obj === null) {
368  return false;
369  }
370 
371  if ($this->canSaveResult() || $force) {
372  $saved = $this->save($question_obj, $authorized);
373  }
374 
375  if (!$saved
376  || ($question_obj instanceof QuestionPartiallySaveable
377  && !$question_obj->validateSolutionSubmit())) {
378 
379  $this->ctrl->setParameter($this, 'save_error', '1');
380  ilSession::set('previouspost', $this->testrequest->getParsedBody());
381  }
382 
383  return $saved;
384  }
static get(string $a_var)
updateWorkingTime()
updates working time and stores state saveresult to see if question has to be stored or not ...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
save(assQuestion $question_obj, bool $authorized)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTagsCmd()

ilTestPlayerAbstractGUI::saveTagsCmd ( )

Save tags for tagging gui.

Needed this function here because the test info page uses another class to send its form results

Definition at line 305 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

306  {
307  $tagging_gui = new ilTaggingGUI();
308  $tagging_gui->setObject($this->object->getId(), $this->object->getType());
309  $tagging_gui->saveInput();
310  $this->ctrl->redirectByClass([ilRepositoryGUI::class, ilObjTestGUI::class, ilInfoScreenGUI::class]);
311  }
Class ilTaggingGUI.
+ Here is the call graph for this function:

◆ sendNewPassFinishedNotificationEmailIfActivated()

ilTestPlayerAbstractGUI::sendNewPassFinishedNotificationEmailIfActivated ( int  $active_id,
int  $pass 
)
protected

Definition at line 1031 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\object().

Referenced by performTestPassFinishedTasks().

1032  {
1033  $notification_type = $this->object->getMainSettings()->getFinishingSettings()->getMailNotificationContentType();
1034 
1035  if ($notification_type === 0
1036  || !$this->object->getMainSettings()->getFinishingSettings()->getAlwaysSendMailNotification()
1037  && $pass !== $this->object->getNrOfTries() - 1) {
1038  return;
1039  }
1040 
1041  switch ($this->object->getMainSettings()->getFinishingSettings()->getMailNotificationContentType()) {
1042  case 1:
1043  $this->object->sendSimpleNotification($active_id);
1044  break;
1045  case 2:
1046  $this->object->sendAdvancedNotification($active_id);
1047  break;
1048  }
1049  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAnonymousIdCmd()

ilTestPlayerAbstractGUI::setAnonymousIdCmd ( )

Sets a session variable with the test access code for an anonymous test user.

Sets a session variable with the test access code for an anonymous test user

Definition at line 686 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl().

686  : void
687  {
688  if ($this->test_session->isAnonymousUser()) {
689  $this->test_session->setAccessCodeToSession($this->testrequest->strVal('anonymous_id'));
690  }
691 
692  $this->ctrl->redirectByClass([ilRepositoryGUI::class, ilObjTestGUI::class, ilInfoScreenGUI::class]);
693  }
+ Here is the call graph for this function:

◆ setAnswerChangedParameter()

ilTestPlayerAbstractGUI::setAnswerChangedParameter ( bool  $changed = true)
protected

Definition at line 2795 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl().

Referenced by executeCommand(), handleIntermediateSubmit(), handleQuestionActionCmd(), revertChangesCmd(), showInstantResponseCmd(), and submitIntermediateSolutionCmd().

2796  {
2797  $this->ctrl->setParameter($this, 'test_answer_changed', $changed ? '1' : '0');
2798  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFollowUpQuestionLocksConfirmationPrevented()

ilTestPlayerAbstractGUI::setFollowUpQuestionLocksConfirmationPrevented ( )
protected

Definition at line 2969 of file class.ilTestPlayerAbstractGUI.php.

References ilSession\set().

2970  {
2971  ilSession::set(self::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM, true);
2972  }
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ showAnswerOptionalQuestionsConfirmation()

ilTestPlayerAbstractGUI::showAnswerOptionalQuestionsConfirmation ( )
protected

Definition at line 2420 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and populateHelperGuiContent().

Referenced by prepareTestPage().

2421  {
2422  $confirmation = new ilTestAnswerOptionalQuestionsConfirmationGUI($this->lng);
2423 
2424  $confirmation->setFormAction($this->ctrl->getFormAction($this));
2425  $confirmation->setCancelCmd('cancelAnswerOptionalQuestions');
2426  $confirmation->setConfirmCmd('confirmAnswerOptionalQuestions');
2427 
2428  $confirmation->build($this->object->isFixedTest());
2429 
2430  $this->populateHelperGuiContent($confirmation);
2431  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showFinalStatementCmd()

ilTestPlayerAbstractGUI::showFinalStatementCmd ( )

Definition at line 1117 of file class.ilTestPlayerAbstractGUI.php.

References ilTestPlayerCommands\AFTER_TEST_PASS_FINISHED, ILIAS\Repository\ctrl(), getContentBlockName(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilTestPlayerLayoutProvider\TEST_PLAYER_VIEW_TITLE.

1118  {
1119  $this->global_screen->tool()->context()->current()->getAdditionalData()->replace(
1121  $this->object->getTitle() . ' - ' . $this->lng->txt('final_statement')
1122  );
1123 
1124  $this->content_style->gui()->addCss($this->tpl, $this->ref_id);
1125  $this->ctrl->setParameterByClass(ilTestPageGUI::class, 'page_type', 'concludingremarkspage');
1126  $this->ctrl->setParameterByClass(static::class, 'skipfinalstatement', 1);
1127  $this->tpl->setVariable(
1128  $this->getContentBlockName(),
1129  $this->ui_renderer->render([
1130  $this->ui_factory->legacy()->content(
1131  $this->object->prepareTextareaOutput($this->object->getFinalStatement(), true)
1132  ),
1133  $this->ui_factory->button()->standard(
1134  $this->lng->txt('btn_next'),
1135  $this->ctrl->getLinkTargetByClass(static::class, ilTestPlayerCommands::AFTER_TEST_PASS_FINISHED)
1136  )
1137  ])
1138  );
1139  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:

◆ showInstantResponseCmd()

ilTestPlayerAbstractGUI::showInstantResponseCmd ( )
protected

Definition at line 2201 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), getNavigationUrlParameter(), isParticipantsAnswerFixed(), ILIAS\Repository\object(), registerForcedFeedbackNavUrl(), removeIntermediateSolution(), saveNavigationPreventConfirmation(), saveQuestionSolution(), setAnswerChangedParameter(), and ilTestPlayerCommands\SHOW_QUESTION.

2202  {
2203  $question_id = $this->test_sequence->getQuestionForSequence(
2204  $this->getCurrentSequenceElement()
2205  );
2206 
2207  if (!$this->isParticipantsAnswerFixed($question_id)) {
2208  if ($this->saveQuestionSolution(true)) {
2209  $this->removeIntermediateSolution();
2210  $this->setAnswerChangedParameter(false);
2211  } else {
2212  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
2213  }
2214  $this->test_sequence->setQuestionChecked($question_id);
2215  $this->test_sequence->saveToDb();
2216  } elseif ($this->object->isForceInstantFeedbackEnabled()) {
2217  $this->test_sequence->setQuestionChecked($question_id);
2218  $this->test_sequence->saveToDb();
2219  }
2220 
2221  $this->ctrl->setParameter($this, 'instresp', 1);
2222 
2223  // fau: testNav - handle navigation after feedback
2224  if ($this->getNavigationUrlParameter()) {
2227  }
2228  // fau.
2229  $this->ctrl->redirectByClass(static::class, ilTestPlayerCommands::SHOW_QUESTION);
2230  }
registerForcedFeedbackNavUrl(string $forced_feedback_nav_url)
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:

◆ showListOfAnswers()

ilTestPlayerAbstractGUI::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 will be shown)

Parameters
integer$active_idActive id of the participant
integer$passTest pass of the participant
boolean$testnavigationDeceides wheather to show a navigation for tests or not public

Definition at line 2048 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, ILIAS\Repository\ctrl(), ilTestServiceGUI\getAdditionalUsrDataHtmlAndPopulateWindowTitle(), getContentBlockName(), ilTestServiceGUI\getObjectiveOrientedContainer(), ilTestServiceGUI\getResultsSignature(), ilUtil\getStyleSheetLocation(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\user().

2049  {
2050  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_finish_list_of_answers.html", "components/ILIAS/Test");
2051 
2052  $result_array = $this->object->getTestResult(
2053  $active_id,
2054  $pass,
2055  false,
2056  !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
2057  );
2058 
2059  $counter = 1;
2060  // output of questions with solutions
2061  foreach ($result_array as $question_data) {
2062  $question = $question_data["qid"];
2063  if (is_numeric($question)) {
2064  $this->tpl->setCurrentBlock("printview_question");
2065  $question_gui = $this->object->createQuestionGUI("", $question);
2066  $template = new ilTemplate("tpl.il_as_qpl_question_printview.html", true, true, "components/ILIAS/TestQuestionPool");
2067  $template->setVariable("COUNTER_QUESTION", $counter . ". ");
2068  $template->setVariable("QUESTION_TITLE", $question_gui->getObject()->getTitleForHTMLOutput());
2069 
2070  $show_question_only = ($this->object->getShowSolutionAnswersOnly()) ? true : false;
2071  $result_output = $question_gui->getSolutionOutput(
2072  $active_id,
2073  $pass,
2074  false,
2075  false,
2076  $show_question_only,
2077  $this->object->getShowSolutionFeedback()
2078  );
2079  $template->setVariable("SOLUTION_OUTPUT", $result_output);
2080  $this->tpl->setVariable("QUESTION_OUTPUT", $template->get());
2081  $this->tpl->parseCurrentBlock();
2082  $counter++;
2083  }
2084  }
2085 
2086  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css"), "print");
2087  if ($this->object->getShowSolutionAnswersOnly()) {
2088  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css"), "print");
2089  }
2090  if (strlen($top_data)) {
2091  $this->tpl->setCurrentBlock("top_data");
2092  $this->tpl->setVariable("TOP_DATA", $top_data);
2093  $this->tpl->parseCurrentBlock();
2094  }
2095 
2096  if (strlen($bottom_data)) {
2097  $this->tpl->setCurrentBlock("bottom_data");
2098  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2099  $this->tpl->setVariable("BOTTOM_DATA", $bottom_data);
2100  $this->tpl->parseCurrentBlock();
2101  }
2102 
2103  $this->tpl->setCurrentBlock("adm_content");
2104  $this->tpl->setVariable("TXT_ANSWER_SHEET", $this->lng->txt("tst_list_of_answers"));
2105  $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($this->test_session, $active_id, true);
2106  $signature = $this->getResultsSignature();
2107  $this->tpl->setVariable("USER_DETAILS", $user_data);
2108  $this->tpl->setVariable("SIGNATURE", $signature);
2109  $this->tpl->setVariable("TITLE", $this->object->getTitle());
2110  $this->tpl->setVariable("TXT_TEST_PROLOG", $this->lng->txt("tst_your_answers"));
2111  $invited_user = &$this->object->getInvitedUsers($this->user->getId());
2112  $pagetitle = $this->object->getTitle() . ' - ' . $this->lng->txt('clientip') .
2113  ': ' . $_SERVER['REMOTE_ADDR'] . ' - ' .
2114  $this->lng->txt('matriculation') . ': ' .
2115  $invited_user[$this->user->getId()]['matriculation'];
2116  $this->tpl->setVariable('PAGETITLE', $pagetitle);
2117  $this->tpl->parseCurrentBlock();
2118  }
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, $overwrite_anonymity=false)
Returns the user data for a test results output.
getResultsSignature()
Returns HTML code for a signature field.
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
+ Here is the call graph for this function:

◆ showQuestionCmd()

ilTestPlayerAbstractGUI::showQuestionCmd ( )
protected

Definition at line 1346 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, ILIAS\Repository\ctrl(), getCurrentSequenceElement(), ilLOTestQuestionAdapter\getInstance(), getInstantResponseParameter(), ilTestServiceGUI\getObject(), getQuestionGuiInstance(), getRegisteredForcedFeedbackNavUrl(), getTestNavigationToolbarGUI(), handlePrimaryButton(), handleTearsAndAngerNoObjectiveOrientedQuestion(), handleTearsAndAngerQuestionIsNull(), ILIAS\Repository\help(), isForcedFeedbackNavUrlRegistered(), isParticipantsAnswerFixed(), isValidSequenceElement(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), null, ILIAS\Repository\object(), populateInstantResponseBlocks(), populateInstantResponseModal(), populateQuestionNavigation(), populateQuestionOptionalMessage(), populateTestNavigationToolbar(), prepareTestPage(), PRESENTATION_MODE_EDIT, PRESENTATION_MODE_VIEW, ilSession\set(), showQuestionEditable(), showQuestionViewable(), ilTestPlayerCommands\SUBMIT_INTERMEDIATE_SOLUTION, unregisterForcedFeedbackNavUrl(), and ILIAS\Repository\user().

Referenced by finishTestCmd().

1346  : void
1347  {
1348  ilSession::set('tst_pass_finish', 0);
1349 
1351  "active_time_id",
1352  $this->object->startWorkingTime(
1353  $this->test_session->getActiveId(),
1354  $this->test_session->getPass()
1355  )
1356  );
1357 
1358  $this->help->setScreenIdComponent('tst');
1359  $this->help->setScreenId('assessment');
1360  $this->help->setSubScreenId('question');
1361 
1362  $sequence_element = $this->getCurrentSequenceElement();
1363 
1364  if (!$this->isValidSequenceElement($sequence_element)) {
1365  $sequence_element = $this->test_sequence->getFirstSequence();
1366  }
1367 
1368  $this->test_session->setLastSequence($sequence_element ?? 0);
1369  $this->test_session->saveToDb();
1370 
1371  $question_id = $this->test_sequence->getQuestionForSequence($sequence_element ?? 0);
1372  if ($question_id === null && $this->test_session->isObjectiveOriented()) {
1374  }
1375 
1376  if ($question_id !== null && !$this->test_sequence->isQuestionPresented($question_id)) {
1377  $this->test_sequence->setQuestionPresented($question_id);
1378  $this->test_sequence->saveToDb();
1379  }
1380 
1381  $question_worked_through = $this->questionrepository->lookupResultRecordExist(
1382  $this->test_session->getActiveId(),
1383  $question_id,
1384  $this->test_session->getPass()
1385  );
1386 
1387  $instant_response = false;
1388  if ($this->isParticipantsAnswerFixed($question_id)) {
1390  $s = $this->object->getMainSettings()->getQuestionBehaviourSettings();
1391  if ($s->getInstantFeedbackGenericEnabled()
1392  || $s->getInstantFeedbackPointsEnabled()
1393  || $s->getInstantFeedbackSolutionEnabled()
1394  || $s->getInstantFeedbackSpecificEnabled()) {
1395  $instant_response = true;
1396  }
1397  } else {
1399  if (!$this->object->isInstantFeedbackAnswerFixationEnabled()) {
1400  $instant_response = $this->getInstantResponseParameter();
1401  }
1402  }
1403 
1404  $question_gui = $this->getQuestionGuiInstance($question_id);
1405 
1406  if (!($question_gui instanceof assQuestionGUI)) {
1407  $this->handleTearsAndAngerQuestionIsNull($question_id, $sequence_element);
1408  }
1409 
1410  $question_gui->setSequenceNumber($this->test_sequence->getPositionOfSequence($sequence_element));
1411  $question_gui->setQuestionCount($this->test_sequence->getUserQuestionCount());
1412 
1413  $header_block_builder = new ilTestQuestionHeaderBlockBuilder($this->lng);
1414  $header_block_builder->setHeaderMode($this->object->getTitleOutput());
1415  $header_block_builder->setQuestionTitle($question_gui->getObject()->getTitleForHTMLOutput());
1416  $header_block_builder->setQuestionPoints($question_gui->getObject()->getPoints());
1417  $header_block_builder->setQuestionPosition($this->test_sequence->getPositionOfSequence($sequence_element));
1418  $header_block_builder->setQuestionCount($this->test_sequence->getUserQuestionCount());
1419  $header_block_builder->setQuestionPostponed($this->test_sequence->isPostponedQuestion($question_id));
1420  if ($this->test_session->isObjectiveOriented()) {
1421  $objectives_adapter = ilLOTestQuestionAdapter::getInstance($this->test_session);
1422  $objectives_adapter->buildQuestionRelatedObjectiveList($this->test_sequence, $this->question_related_objectives_list);
1423  $this->question_related_objectives_list->loadObjectivesTitles();
1424 
1425  $header_block_builder->setQuestionRelatedObjectives(
1426  $this->question_related_objectives_list->getQuestionRelatedObjectiveTitles($question_id)
1427  );
1428  }
1429  $question_gui->setQuestionHeaderBlockBuilder($header_block_builder);
1430 
1431  $this->prepareTestPage($presentation_mode, $sequence_element, $question_id);
1432 
1433  $navigation_toolbar_gui = $this->getTestNavigationToolbarGUI();
1434  $navigation_toolbar_gui->setFinishTestButtonEnabled(true);
1435 
1436  $is_next_primary = $this->handlePrimaryButton($navigation_toolbar_gui, $question_id);
1437 
1438  $this->ctrl->setParameter($this, 'sequence', $sequence_element);
1439  $this->ctrl->setParameter($this, 'pmode', $presentation_mode);
1440  $form_action = $this->ctrl->getFormAction($this, ilTestPlayerCommands::SUBMIT_INTERMEDIATE_SOLUTION);
1441 
1442  switch ($presentation_mode) {
1444  $navigation_toolbar_gui->setDisabledStateEnabled(false);
1445  $this->showQuestionEditable(
1446  $question_gui,
1447  $form_action,
1448  $question_worked_through,
1449  $instant_response
1450  );
1451 
1452  if ($this->ctrl->getCmd() !== self::FINISH_TEST_CMD
1453  && $this->logger->isLoggingEnabled()
1454  && !$this->getObject()->getAnonymity()) {
1455  $this->logger->logParticipantInteraction(
1456  $this->logger->getInteractionFactory()->buildParticipantInteraction(
1457  $this->object->getRefId(),
1458  $question_id,
1459  $this->user->getId(),
1460  $this->logger->isIPLoggingEnabled() ? $_SERVER['REMOTE_ADDR'] : '',
1461  TestParticipantInteractionTypes::QUESTION_SHOWN,
1462  []
1463  )
1464  );
1465  }
1466  break;
1467 
1469  if ($this->test_sequence->isQuestionOptional($question_gui->getObject()->getId())) {
1471  }
1472 
1473  $this->showQuestionViewable(
1474  $question_gui,
1475  $form_action,
1476  $question_worked_through,
1477  $instant_response
1478  );
1479  break;
1480 
1481  default:
1482  throw new ilTestException('no presentation mode given');
1483  }
1484 
1485  $navigation_toolbar_gui->build();
1486  $this->populateTestNavigationToolbar($navigation_toolbar_gui);
1487  $this->populateQuestionNavigation($sequence_element, $is_next_primary);
1488 
1489  if ($instant_response) {
1491  $question_gui,
1492  true
1493  );
1494  }
1495 
1496  if ($this->isForcedFeedbackNavUrlRegistered()) {
1497  $this->populateInstantResponseModal($question_gui, $this->getRegisteredForcedFeedbackNavUrl());
1499  }
1500  }
showQuestionViewable(assQuestionGUI $question_gui, string $form_action, bool $is_question_worked_through, bool $instant_response)
populateInstantResponseModal(assQuestionGUI $question_gui, $nav_url)
populateTestNavigationToolbar(ilTestNavigationToolbarGUI $toolbar_gui)
Base Exception for all Exceptions relating to Modules/Test.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
populateQuestionNavigation($sequence_element, $primary_next)
static getInstance(ilTestSession $a_test_session)
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
prepareTestPage($presentationMode, $sequenceElement, $question_id)
handlePrimaryButton(ilTestNavigationToolbarGUI $navigation_toolbar_gui, int $current_question_id)
populateInstantResponseBlocks(assQuestionGUI $question_gui, $authorizedSolution)
handleTearsAndAngerQuestionIsNull(int $question_id, $sequence_element)
showQuestionEditable(assQuestionGUI $question_gui, string $form_action, bool $is_question_worked_through, bool $instant_response)
static set(string $a_var, $a_val)
Set a value.
getQuestionGuiInstance(int $question_id, bool $from_cache=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showQuestionEditable()

ilTestPlayerAbstractGUI::showQuestionEditable ( assQuestionGUI  $question_gui,
string  $form_action,
bool  $is_question_worked_through,
bool  $instant_response 
)
protected

Definition at line 1261 of file class.ilTestPlayerAbstractGUI.php.

References buildEditableStateQuestionNavigationGUI(), ilSession\clear(), ILIAS\Repository\ctrl(), determineSolutionPassIndex(), ilSession\get(), assQuestionGUI\getObject(), assQuestionGUI\getQuestionHeaderBlockBuilder(), isShowingPostponeStatusReguired(), null, ILIAS\Repository\object(), assQuestionGUI\outQuestionForTest(), populateModals(), populateQuestionEditControl(), assQuestionGUI\setNavigationGUI(), and ilTestPlayerCommands\SKIP_QUESTION.

Referenced by showQuestionCmd().

1266  : void {
1267  $question_navigation_gui = $this->buildEditableStateQuestionNavigationGUI($question_gui->getObject()->getId());
1268  $question_navigation_gui->setQuestionWorkedThrough($is_question_worked_through);
1269  if ($is_question_worked_through) {
1270  $question_navigation_gui->setDiscardSolutionButtonEnabled(true);
1271  $question_gui->getQuestionHeaderBlockBuilder()->setQuestionAnswered(true);
1272  } elseif ($this->object->isPostponingEnabled()) {
1273  $question_navigation_gui->setSkipQuestionLinkTarget(
1274  $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::SKIP_QUESTION)
1275  );
1276  }
1277  $question_gui->setNavigationGUI($question_navigation_gui);
1278 
1279  $user_post_solution = false;
1280  if ($this->testrequest->isset('save_error')
1281  && $this->testrequest->int('save_error') === 1
1282  && ilSession::get('previouspost') !== null) {
1283  $user_post_solution = ilSession::get('previouspost');
1284  ilSession::clear('previouspost');
1285  }
1286 
1287  $question_config = $question_gui->getObject()->getTestPresentationConfig();
1288 
1289  if ($question_gui instanceof assMultipleChoiceGUI) {
1290  $question_config->setWorkedThrough($is_question_worked_through);
1291  }
1292 
1293  if ($question_config->isPreviousPassSolutionReuseAllowed()) {
1294  $pass_index = $this->determineSolutionPassIndex($question_gui);
1295  if ($pass_index < $this->test_session->getPass()) {
1296  $question_config->setSolutionInitiallyPrefilled(true);
1297  }
1298  } else {
1299  $pass_index = $this->test_session->getPass();
1300  }
1301 
1302 
1303  $this->modal_signals = $this->populateModals();
1304  $question_navigation_gui->setShowDiscardModalSignal($this->modal_signals[self::DISCARD_MODAL]);
1305 
1306  $question_gui->outQuestionForTest(
1307  $form_action,
1308  $this->test_session->getActiveId(),
1309  $pass_index,
1310  $this->isShowingPostponeStatusReguired($question_gui->getObject()->getId()),
1311  $user_post_solution,
1312  $instant_response && $this->object->getSpecificAnswerFeedback()
1313  );
1314 
1315  $this->populateQuestionEditControl($question_gui);
1316  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
outQuestionForTest(string $formaction, int $active_id, ?int $pass, bool $is_question_postponed=false, array|bool $user_post_solutions=false, bool $show_specific_inline_feedback=false)
populateQuestionEditControl(assQuestionGUI $question_gui)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
determineSolutionPassIndex(assQuestionGUI $question_gui)
static clear(string $a_var)
setNavigationGUI(?ilTestQuestionNavigationGUI $navigationGUI)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showQuestionViewable()

ilTestPlayerAbstractGUI::showQuestionViewable ( assQuestionGUI  $question_gui,
string  $form_action,
bool  $is_question_worked_through,
bool  $instant_response 
)
protected

Definition at line 1217 of file class.ilTestPlayerAbstractGUI.php.

References buildReadOnlyStateQuestionNavigationGUI(), assQuestionGUI\getFormEncodingType(), assQuestionGUI\getObject(), assQuestionGUI\getQuestionHeaderBlockBuilder(), assQuestionGUI\getSolutionOutput(), isShowingPostponeStatusReguired(), ILIAS\Repository\lng(), assQuestionGUI\outQuestionPage(), populateQuestionEditControl(), and assQuestionGUI\setNavigationGUI().

Referenced by showQuestionCmd().

1222  : void {
1223  $question_navigation_gui = $this->buildReadOnlyStateQuestionNavigationGUI($question_gui->getObject()->getId());
1224  $question_navigation_gui->setQuestionWorkedThrough($is_question_worked_through);
1225  $question_gui->setNavigationGUI($question_navigation_gui);
1226  $question_gui->getQuestionHeaderBlockBuilder()->setQuestionAnswered($is_question_worked_through);
1227 
1228  $solutionoutput = $question_gui->getSolutionOutput(
1229  $this->test_session->getActiveId(),
1230  $this->test_session->getPass(),
1231  false,
1232  false,
1233  true,
1234  $instant_response && $this->object->getSpecificAnswerFeedback(),
1235  false,
1236  false,
1237  true
1238  );
1239 
1240  $pageoutput = $question_gui->outQuestionPage(
1241  '',
1242  $this->isShowingPostponeStatusReguired($question_gui->getObject()->getId()),
1243  $this->test_session->getActiveId(),
1244  $solutionoutput
1245  );
1246 
1247  $this->tpl->setVariable(
1248  'LOCKSTATE_INFOBOX',
1249  $this->ui_renderer->render(
1250  $this->ui_factory->messageBox()->info($this->lng->txt('tst_player_answer_saved_and_locked'))
1251  )
1252  );
1253  $this->tpl->parseCurrentBlock();
1254  $this->tpl->setVariable('QUESTION_OUTPUT', $pageoutput);
1255  $this->tpl->setVariable('FORMACTION', $form_action);
1256  $this->tpl->setVariable('ENCTYPE', 'enctype="' . $question_gui->getFormEncodingType() . '"');
1257  $this->tpl->setVariable('FORM_TIMESTAMP', time());
1258  $this->populateQuestionEditControl($question_gui);
1259  }
populateQuestionEditControl(assQuestionGUI $question_gui)
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
getSolutionOutput(int $active_id, ?int $pass=null, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_inline_feedback=true)
setNavigationGUI(?ilTestQuestionNavigationGUI $navigationGUI)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showRequestedHintListCmd()

ilTestPlayerAbstractGUI::showRequestedHintListCmd ( )
protected

Go to requested hint list.

Definition at line 2149 of file class.ilTestPlayerAbstractGUI.php.

References ilAssQuestionHintRequestGUI\CMD_SHOW_LIST, ILIAS\Repository\ctrl(), and handleIntermediateSubmit().

2150  {
2151  // fau: testNav - handle intermediate submit for viewing requested hints
2152  $this->handleIntermediateSubmit();
2153  // fau.
2154 
2155  $this->ctrl->setParameter($this, 'pmode', self::PRESENTATION_MODE_EDIT);
2156 
2157  $this->ctrl->redirectByClass('ilAssQuestionHintRequestGUI', ilAssQuestionHintRequestGUI::CMD_SHOW_LIST);
2158  }
+ Here is the call graph for this function:

◆ showSideList()

ilTestPlayerAbstractGUI::showSideList (   $current_sequence_element)
protected

Definition at line 1902 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), ILIAS\UI\Component\Listing\Workflow\Step\IN_PROGRESS, ILIAS\Repository\lng(), ILIAS\UI\Component\Listing\Workflow\Step\NOT_STARTED, ilLegacyFormElementsUtil\prepareFormOutput(), PRESENTATION_MODE_VIEW, ilTestPlayerCommands\SHOW_QUESTION, and ilTestPlayerLayoutProvider\TEST_PLAYER_QUESTIONLIST.

Referenced by prepareTestPage().

1902  : void
1903  {
1904  $question_summary_data = $this->service->getQuestionSummaryData($this->test_sequence);
1905  $questions = [];
1906  $active = 0;
1907 
1908  foreach ($question_summary_data as $idx => $row) {
1909  $title = ilLegacyFormElementsUtil::prepareFormOutput($row['title']);
1910  $description = '';
1911  if ($row['description'] !== '') {
1912  $description = ' title="' . htmlspecialchars($row['description']) . '" ';
1913  }
1914 
1915  if (!$row['disabled']) {
1916  $this->ctrl->setParameter($this, 'pmode', '');
1917  $this->ctrl->setParameter($this, 'sequence', $row['sequence']);
1918  $action = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::SHOW_QUESTION);
1919  $this->ctrl->setParameter($this, 'pmode', ilTestPlayerAbstractGUI::PRESENTATION_MODE_VIEW);
1920  $this->ctrl->setParameter($this, 'sequence', $this->getCurrentSequenceElement($current_sequence_element));
1921  }
1922 
1924 
1925  if (
1926  ($row['worked_through'] || $row['isAnswered'])
1927  && $row['has_authorized_answer']
1928  ) {
1930  }
1931 
1932  $questions[] = $this->ui_factory->listing()->workflow()
1933  ->step($title, $description, $action)
1934  ->withStatus($status);
1935  $active = $row['sequence'] == $current_sequence_element ? $idx : $active;
1936  }
1937 
1938  $question_listing = $this->ui_factory->listing()->workflow()->linear(
1939  $this->lng->txt('mainbar_button_label_questionlist'),
1940  $questions
1941  )->withActive($active);
1942 
1943 
1944  $this->global_screen->tool()->context()->current()->addAdditionalData(
1946  $question_listing
1947  );
1948  }
static prepareFormOutput($a_str, bool $a_strip=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ skipQuestionCmd()

ilTestPlayerAbstractGUI::skipQuestionCmd ( )
protected

Definition at line 1597 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, ILIAS\Repository\ctrl(), getCurrentSequenceElement(), ilTestServiceGUI\getObject(), isValidSequenceElement(), ILIAS\Repository\logger(), ILIAS\Repository\object(), ilTestPlayerCommands\SHOW_QUESTION, and ILIAS\Repository\user().

1598  {
1599  $current_sequence_element = $this->getCurrentSequenceElement();
1600  $next_sequence_element = $this->test_sequence->getNextSequence($current_sequence_element);
1601 
1602  if (!$this->isValidSequenceElement($next_sequence_element)) {
1603  $next_sequence_element = $this->test_sequence->getFirstSequence();
1604  }
1605 
1606  if ($this->object->isPostponingEnabled()) {
1607  $this->test_sequence->postponeSequence($current_sequence_element);
1608  $this->test_sequence->saveToDb();
1609  }
1610 
1611  if ($this->logger->isLoggingEnabled()
1612  && !$this->getObject()->getAnonymity()) {
1613  $this->logger->logParticipantInteraction(
1614  $this->logger->getInteractionFactory()->buildParticipantInteraction(
1615  $this->object->getRefId(),
1616  $this->test_sequence->getQuestionForSequence($current_sequence_element),
1617  $this->user->getId(),
1618  $this->logger->isIPLoggingEnabled() ? $_SERVER['REMOTE_ADDR'] : '',
1619  TestParticipantInteractionTypes::QUESTION_SKIPPED,
1620  []
1621  )
1622  );
1623  }
1624 
1625  $this->ctrl->setParameter($this, 'sequence', $next_sequence_element);
1626  $this->ctrl->setParameter($this, 'pmode', '');
1627 
1628  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1629  }
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
+ Here is the call graph for this function:

◆ startPlayerCmd()

ilTestPlayerAbstractGUI::startPlayerCmd ( )
protected

Start a test for the first time.

Start a test for the first time. This method contains a lock to prevent multiple submissions by the start test button

Definition at line 701 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getLockParameter(), handleUserSettings(), and ilTestPlayerCommands\INIT_TEST.

702  {
703  $testStartLock = $this->getLockParameter();
704  $isFirstTestStartRequest = false;
705 
706  $this->process_locker->executeTestStartLockOperation(function () use ($testStartLock, &$isFirstTestStartRequest) {
707  if ($this->test_session->lookupTestStartLock() !== $testStartLock) {
708  $this->test_session->persistTestStartLock($testStartLock);
709  $isFirstTestStartRequest = true;
710  }
711  });
712 
713  if ($isFirstTestStartRequest) {
714  $this->handleUserSettings();
715  $this->ctrl->redirect($this, ilTestPlayerCommands::INIT_TEST);
716  }
717 
718  $this->ctrl->setParameterByClass('ilObjTestGUI', 'lock', $testStartLock);
719  $this->ctrl->redirectByClass([ilRepositoryGUI::class, ilObjTestGUI::class, ilInfoScreenGUI::class]);
720  }
handleUserSettings()
Handles some form parameters on starting and resuming a test.
+ Here is the call graph for this function:

◆ startTestCmd()

ilTestPlayerAbstractGUI::startTestCmd ( )
protected

Definition at line 1631 of file class.ilTestPlayerAbstractGUI.php.

References $_SERVER, adoptUserSolutionsFromPreviousPass(), ILIAS\Repository\ctrl(), generateRandomTestPassForActiveUser(), ilSession\get(), ilLOTestQuestionAdapter\getInstance(), ilTestServiceGUI\getObject(), ilTestServiceGUI\getObjectiveOrientedContainer(), ILIAS\Repository\logger(), null, ILIAS\Repository\object(), ilTestPlayerCommands\QUESTION_SUMMARY, ilSession\set(), ilTestPlayerCommands\SHOW_QUESTION, updateLearningProgressOnTestStart(), and ILIAS\Repository\user().

1632  {
1633  ilSession::set('tst_pass_finish', 0);
1634 
1635  // ensure existing test session
1636  $this->test_session->setUserId($this->user->getId());
1637  $access_code = ilSession::get('tst_access_code');
1638  if ($access_code != null && isset($access_code[$this->object->getTestId()])) {
1639  $this->test_session->setAnonymousId($access_code[$this->object->getTestId()]);
1640  }
1641  if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
1642  $this->test_session->setObjectiveOrientedContainerId($this->getObjectiveOrientedContainer()->getObjId());
1643  }
1644  $this->test_session->saveToDb();
1645 
1646  $active_id = $this->test_session->getActiveId();
1647  $this->ctrl->setParameter($this, "active_id", $active_id);
1648 
1649  $shuffle = $this->object->getShuffleQuestions();
1650  if ($this->object->isRandomTest()) {
1652 
1653  $this->object->loadQuestions();
1654  $shuffle = false; // shuffle is already done during the creation of the random questions
1655  }
1656 
1657  $this->object->updateTestPassResults(
1658  $active_id,
1659  $this->test_session->getPass(),
1660  null,
1661  $this->object->getId()
1662  );
1663 
1664  // ensure existing test sequence
1665  if (!$this->test_sequence->hasSequence()) {
1666  $this->test_sequence->createNewSequence($this->object->getQuestionCount(), $shuffle);
1667  $this->test_sequence->saveToDb();
1668  }
1669 
1670  $this->test_sequence->loadFromDb();
1671  $this->test_sequence->loadQuestions();
1672 
1673  if ($this->test_session->isObjectiveOriented()) {
1674  $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($this->test_session);
1675 
1676  $objectivesAdapter->notifyTestStart($this->test_session, $this->object->getId());
1677  $objectivesAdapter->prepareTestPass($this->test_session, $this->test_sequence);
1678 
1679  $objectivesAdapter->buildQuestionRelatedObjectiveList(
1680  $this->test_sequence,
1681  $this->question_related_objectives_list
1682  );
1683 
1684  if ($this->test_sequence->hasOptionalQuestions()) {
1686 
1687  $this->test_sequence->reorderOptionalQuestionsToSequenceEnd();
1688  $this->test_sequence->saveToDb();
1689  }
1690  }
1691 
1692  $active_time_id = $this->object->startWorkingTime(
1693  $this->test_session->getActiveId(),
1694  $this->test_session->getPass()
1695  );
1696  ilSession::set("active_time_id", $active_time_id);
1697 
1699 
1700  $sequence_element = $this->test_sequence->getFirstSequence();
1701 
1702  $this->ctrl->setParameter($this, 'sequence', $sequence_element);
1703  $this->ctrl->setParameter($this, 'pmode', '');
1704 
1705  if ($this->logger->isLoggingEnabled()
1706  && !$this->getObject()->getAnonymity()) {
1707  $this->logger->logParticipantInteraction(
1708  $this->logger->getInteractionFactory()->buildParticipantInteraction(
1709  $this->object->getRefId(),
1710  null,
1711  $this->user->getId(),
1712  $this->logger->isIPLoggingEnabled() ? $_SERVER['REMOTE_ADDR'] : '',
1713  TestParticipantInteractionTypes::TEST_RUN_STARTED,
1714  []
1715  )
1716  );
1717  }
1718 
1719  if ($this->object->getListOfQuestionsStart()) {
1720  $this->ctrl->redirect($this, ilTestPlayerCommands::QUESTION_SUMMARY);
1721  }
1722 
1723  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1724  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getInstance(ilTestSession $a_test_session)
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ submitIntermediateSolutionCmd()

ilTestPlayerAbstractGUI::submitIntermediateSolutionCmd ( )
protected

Definition at line 931 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), saveQuestionSolution(), setAnswerChangedParameter(), and ilTestPlayerCommands\SHOW_QUESTION.

932  {
933  $this->saveQuestionSolution(false, true);
934  // fau: testNav - set the 'answer changed' parameter when an intermediate solution is submitted
935  $this->setAnswerChangedParameter(true);
936  // fau.
937  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
938  }
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:

◆ submitSolutionAndNextCmd()

ilTestPlayerAbstractGUI::submitSolutionAndNextCmd ( )
protected

Definition at line 3093 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), isValidSequenceElement(), ILIAS\Repository\object(), removeIntermediateSolution(), saveQuestionSolution(), ilTestPlayerCommands\SHOW_QUESTION, and submitSolutionCmd().

3093  : void
3094  {
3095  if ($this->object->isForceInstantFeedbackEnabled()) {
3096  $this->submitSolutionCmd();
3097  return;
3098  }
3099 
3100  if ($this->saveQuestionSolution(true, false)) {
3101  $this->test_sequence->getQuestionForSequence(
3102  $this->getCurrentSequenceElement()
3103  );
3104 
3105  $this->removeIntermediateSolution();
3106 
3107  $next_sequence_element = $this->test_sequence->getNextSequence($this->getCurrentSequenceElement());
3108 
3109  if (!$this->isValidSequenceElement($next_sequence_element)) {
3110  $next_sequence_element = $this->test_sequence->getFirstSequence();
3111  }
3112 
3113  $this->test_session->setLastSequence($next_sequence_element ?? 0);
3114  $this->test_session->saveToDb();
3115 
3116  $this->ctrl->setParameter($this, 'sequence', $next_sequence_element);
3117  $this->ctrl->setParameter($this, 'pmode', '');
3118  }
3119 
3120  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
3121  }
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:

◆ submitSolutionCmd()

ilTestPlayerAbstractGUI::submitSolutionCmd ( )
protected

Definition at line 1508 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), getNavigationUrlParameter(), getNextCommandParameter(), getNextSequenceParameter(), ILIAS\Repository\object(), PRESENTATION_MODE_VIEW, ilUtil\redirect(), removeIntermediateSolution(), saveNavigationPreventConfirmation(), saveQuestionSolution(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by submitSolutionAndNextCmd().

1509  {
1510  if ($this->saveQuestionSolution(true, false)) {
1511  $question_id = $this->test_sequence->getQuestionForSequence(
1512  $this->getCurrentSequenceElement()
1513  );
1514 
1515  $this->removeIntermediateSolution();
1516 
1517  if ($this->object->isForceInstantFeedbackEnabled()) {
1518  $this->ctrl->setParameter($this, 'instresp', 1);
1519 
1520  $this->test_sequence->setQuestionChecked($question_id);
1521  $this->test_sequence->saveToDb();
1522  }
1523 
1524  if ($this->getNextCommandParameter()) {
1525  if ($this->getNextSequenceParameter()) {
1526  $this->ctrl->setParameter($this, 'sequence', $this->getNextSequenceParameter());
1527  $this->ctrl->setParameter($this, 'pmode', '');
1528  }
1529 
1530  $this->ctrl->redirect($this, $this->getNextCommandParameter());
1531  }
1532 
1533  $this->ctrl->setParameter($this, 'pmode', ilTestPlayerAbstractGUI::PRESENTATION_MODE_VIEW);
1534  } else {
1535  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1536  }
1537 
1538  // fau: testNav - remember to prevent the navigation confirmation
1540  // fau.
1541 
1542  // fau: testNav - handle navigation after saving
1543  if ($this->getNavigationUrlParameter()) {
1545  } else {
1546  $this->ctrl->saveParameter($this, 'sequence');
1547  }
1548  // fau.
1549  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1550  }
static redirect(string $a_script)
saveQuestionSolution(bool $authorized=true, bool $force=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ suspendTestCmd()

ilTestPlayerAbstractGUI::suspendTestCmd ( )

Definition at line 443 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl().

Referenced by max_processing_time_reached().

444  {
445  $this->ctrl->redirectByClass(TestScreenGUI::class, TestScreenGUI::DEFAULT_CMD);
446  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unmarkQuestionAndSaveIntermediateCmd()

ilTestPlayerAbstractGUI::unmarkQuestionAndSaveIntermediateCmd ( )
protected

Definition at line 960 of file class.ilTestPlayerAbstractGUI.php.

References handleIntermediateSubmit(), and unmarkQuestionCmd().

961  {
962  // fau: testNav - handle intermediate submit when unmarking the question
963  $this->handleIntermediateSubmit();
964  // fau.
965  $this->unmarkQuestionCmd();
966  }
unmarkQuestionCmd()
Set a question unsolved.
+ Here is the call graph for this function:

◆ unmarkQuestionCmd()

ilTestPlayerAbstractGUI::unmarkQuestionCmd ( )
protected

Set a question unsolved.

Definition at line 971 of file class.ilTestPlayerAbstractGUI.php.

References ILIAS\Repository\ctrl(), getCurrentSequenceElement(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by unmarkQuestionAndSaveIntermediateCmd().

972  {
973  $question_id = $this->test_sequence->getQuestionForSequence(
975  );
976 
977  $this->object->setQuestionSetSolved(0, $question_id, $this->test_session->getUserId());
978 
979  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
980  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unregisterForcedFeedbackNavUrl()

ilTestPlayerAbstractGUI::unregisterForcedFeedbackNavUrl ( )
protected

Definition at line 3055 of file class.ilTestPlayerAbstractGUI.php.

References ilSession\get(), and ilSession\set().

Referenced by showQuestionCmd().

3055  : void
3056  {
3057  $forced_feedback_navigation_url = ilSession::get('forced_feedback_navigation_url');
3058  if (isset($forced_feedback_navigation_url[$this->test_session->getActiveId()])) {
3059  unset($forced_feedback_navigation_url[$this->test_session->getActiveId()]);
3060  ilSession::set('forced_feedback_navigation_url', $forced_feedback_navigation_url);
3061  }
3062  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLearningProgressOnTestStart()

ilTestPlayerAbstractGUI::updateLearningProgressOnTestStart ( )
protected

Definition at line 3071 of file class.ilTestPlayerAbstractGUI.php.

References ilLPStatusWrapper\_updateStatus(), ILIAS\Repository\object(), and ILIAS\Repository\user().

Referenced by startTestCmd().

3071  : void
3072  {
3073  ilLPStatusWrapper::_updateStatus($this->object->getId(), $this->user->getId());
3074  }
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateWorkingTime()

ilTestPlayerAbstractGUI::updateWorkingTime ( )

updates working time and stores state saveresult to see if question has to be stored or not

Definition at line 316 of file class.ilTestPlayerAbstractGUI.php.

References ilSession\get(), null, ILIAS\Repository\object(), and ilSession\set().

Referenced by handleFileUploadCmd(), handleQuestionActionCmd(), and saveQuestionSolution().

317  {
318  if (ilSession::get("active_time_id") != null) {
319  $this->object->updateWorkingTime(ilSession::get("active_time_id"));
320  }
321 
323  "active_time_id",
324  $this->object->startWorkingTime(
325  $this->test_session->getActiveId(),
326  $this->test_session->getPass()
327  )
328  );
329  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ass_settings

ilSetting ilTestPlayerAbstractGUI::$ass_settings = null
protected

Definition at line 62 of file class.ilTestPlayerAbstractGUI.php.

◆ $cached_question_guis

array ilTestPlayerAbstractGUI::$cached_question_guis = []
private

Definition at line 52 of file class.ilTestPlayerAbstractGUI.php.

◆ $cached_question_objects

array ilTestPlayerAbstractGUI::$cached_question_objects = []
private

Definition at line 57 of file class.ilTestPlayerAbstractGUI.php.

◆ $ending_time_reached

bool ilTestPlayerAbstractGUI::$ending_time_reached

Definition at line 46 of file class.ilTestPlayerAbstractGUI.php.

◆ $finish_test_modal

InterruptiveModal ilTestPlayerAbstractGUI::$finish_test_modal = null
protected

Definition at line 66 of file class.ilTestPlayerAbstractGUI.php.

◆ $max_processing_time_reached

bool ilTestPlayerAbstractGUI::$max_processing_time_reached

Definition at line 45 of file class.ilTestPlayerAbstractGUI.php.

◆ $modal_signals

array ilTestPlayerAbstractGUI::$modal_signals = []
protected

Definition at line 76 of file class.ilTestPlayerAbstractGUI.php.

Referenced by populateQuestionEditControl().

◆ $password_checker

ilTestPasswordChecker ilTestPlayerAbstractGUI::$password_checker
protected

Definition at line 59 of file class.ilTestPlayerAbstractGUI.php.

◆ $process_locker

ilTestProcessLocker ilTestPlayerAbstractGUI::$process_locker
protected

Definition at line 60 of file class.ilTestPlayerAbstractGUI.php.

◆ $question_related_objectives_list

ilTestQuestionRelatedObjectivesList ilTestPlayerAbstractGUI::$question_related_objectives_list
protected

Definition at line 64 of file class.ilTestPlayerAbstractGUI.php.

◆ $ref_id

int ilTestPlayerAbstractGUI::$ref_id

Definition at line 47 of file class.ilTestPlayerAbstractGUI.php.

◆ $test_sequence

ilTestSequence ilTestPlayerAbstractGUI::$test_sequence = null
protected

Definition at line 63 of file class.ilTestPlayerAbstractGUI.php.

◆ $test_session

ilTestSession ilTestPlayerAbstractGUI::$test_session = null
protected

Definition at line 61 of file class.ilTestPlayerAbstractGUI.php.

◆ DISCARD_MODAL

const ilTestPlayerAbstractGUI::DISCARD_MODAL = "discard_modal"
protected

Definition at line 68 of file class.ilTestPlayerAbstractGUI.php.

◆ FINISH_TEST_CMD

const ilTestPlayerAbstractGUI::FINISH_TEST_CMD = 'finishTest'
protected

Definition at line 41 of file class.ilTestPlayerAbstractGUI.php.

◆ FIXED_SHUFFLER_SEED_MIN_LENGTH

const ilTestPlayerAbstractGUI::FIXED_SHUFFLER_SEED_MIN_LENGTH = 8

Definition at line 43 of file class.ilTestPlayerAbstractGUI.php.

◆ FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM

const ilTestPlayerAbstractGUI::FOLLOWUP_QST_LOCKS_PREVENT_CONFIRMATION_PARAM = 'followup_qst_locks_prevent_confirmation'

Definition at line 2967 of file class.ilTestPlayerAbstractGUI.php.

◆ LOCKS_CHANGED_MODAL

const ilTestPlayerAbstractGUI::LOCKS_CHANGED_MODAL = "locks_changed_modal"
protected

Definition at line 69 of file class.ilTestPlayerAbstractGUI.php.

◆ LOCKS_UNCHANGED_MODAL

const ilTestPlayerAbstractGUI::LOCKS_UNCHANGED_MODAL = "locks_unchanged_modal"
protected

Definition at line 70 of file class.ilTestPlayerAbstractGUI.php.

◆ PRESENTATION_MODE_EDIT

const ilTestPlayerAbstractGUI::PRESENTATION_MODE_EDIT = 'edit'

Definition at line 39 of file class.ilTestPlayerAbstractGUI.php.

Referenced by editSolutionCmd(), and showQuestionCmd().

◆ PRESENTATION_MODE_VIEW

const ilTestPlayerAbstractGUI::PRESENTATION_MODE_VIEW = 'view'

The documentation for this class was generated from the following file: