ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTestPlayerDynamicQuestionSetGUI Class Reference
+ Inheritance diagram for ilTestPlayerDynamicQuestionSetGUI:
+ Collaboration diagram for ilTestPlayerDynamicQuestionSetGUI:

Public Member Functions

 executeCommand ()
 execute command More...
 
 saveQuestionSolution ($authorized=true, $force=false)
 saves the user input of a question More...
 
 outQuestionSummaryCmd ($fullpage=true, $contextFinishTest=false, $obligationsNotAnswered=false, $obligationsFilter=false)
 
- Public Member Functions inherited from ilTestPlayerAbstractGUI
 __construct ($a_object)
 ilTestOutputGUI constructor More...
 
 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 ()
 remove an auto-saved solution of the current question More...
 
 saveQuestionSolution ($authorized=true, $force=false)
 saves the user input of a question More...
 
 suspendTestCmd ()
 
 isMaxProcessingTimeReached ()
 Checks wheather the maximum processing time is reached or not. More...
 
 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 ()
 
 autosaveCmd ()
 
 toggleSideListCmd ()
 Toggle side list. More...
 
 finishTestCmd ($requires_confirmation=true)
 
 redirectBackCmd ()
 
 showFinalStatementCmd ()
 
 getKioskHead ()
 
 checkOnlineTestAccess ()
 check access restrictions like client ip, partipating user etc. More...
 
 isTestAccessible ()
 test accessible returns true if the user can perform the test More...
 
 isNrOfTriesReached ()
 nr of tries exceeded More...
 
 maxProcessingTimeReached ()
 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 ($active_id)
 
 outQuestionSummaryCmd ($fullpage=true, $contextFinishTest=false, $obligationsNotAnswered=false, $obligationsFilter=false)
 Output of a summary of all test questions for test participants. More...
 
 outQuestionSummaryWithObligationsInfoCmd ()
 
 outObligationsOnlySummaryCmd ()
 
 showMaximumAllowedUsersReachedMessage ()
 
 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 ($contextResultPresentation)
 
 __construct (ilObjTest $a_object)
 The constructor takes the test object reference as parameter. More...
 
 setParticipantData ($participantData)
 
 getParticipantData ()
 
 getPassOverviewTableData (ilTestSession $testSession, $passes, $withResults)
 
 setObjectiveOrientedContainer (ilTestObjectiveOrientedContainer $objectiveOrientedContainer)
 
 getObjectiveOrientedContainer ()
 
 executeCommand ()
 execute command More...
 
 getCommand ($cmd)
 Retrieves the ilCtrl command. More...
 
 buildPassOverviewTableGUI ($targetGUI, $targetCmd='')
 
 getPassListOfAnswers (&$result_array, $active_id, $pass, $show_solutions=FALSE, $only_answered_questions=FALSE, $show_question_only=FALSE, $show_reached_points=FALSE, $anchorNav=false, ilTestQuestionRelatedObjectivesList $objectivesList=null, ilTestResultHeaderLabelBuilder $testResultHeaderLabelBuilder=null)
 Returns the list of answers of a users test pass. More...
 
 getPassListOfAnswersWithScoring (&$result_array, $active_id, $pass, $show_solutions=FALSE)
 Returns the list of answers of a users test pass and offers a scoring option. 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 $objectivesList=null)
 Returns an output of the solution to an answer compared to the correct solution. More...
 
 getResultsOfUserOutput ($testSession, $active_id, $pass, $targetGUI, $show_pass_details=TRUE, $show_answers=TRUE, $show_question_only=FALSE, $show_reached_points=FALSE)
 Output of the pass overview for a test called by a test participant. More...
 
 getResultsHeadUserAndPass ($active_id, $pass)
 Returns the user and pass data for a test results output. More...
 
 getQuestionResultForTestUsers ($question_id, $test_id)
 Creates a HTML representation for the results of a given question in a test. More...
 
 populatePassFinishDate ($tpl, $passFinishDate)
 

Protected Member Functions

 getCurrentQuestionId ()
 
 resumePlayerCmd ()
 Resume a test at the last position. More...
 
 startTestCmd ()
 
 showQuestionSelectionCmd ()
 
 filterQuestionSelectionCmd ()
 
 resetQuestionSelectionCmd ()
 
 previousQuestionCmd ()
 
 fromPassDeletionCmd ()
 
 nextQuestionCmd ()
 
 markQuestionCmd ()
 
 unmarkQuestionCmd ()
 
 editSolutionCmd ()
 
 submitSolutionAndNextCmd ()
 
 submitSolutionCmd ()
 
 discardSolutionCmd ()
 
 skipQuestionCmd ()
 
 isCheckedQuestionResettingConfirmationRequired ()
 
 showQuestionCmd ()
 
 showInstantResponseCmd ()
 
 handleQuestionActionCmd ()
 
 isFirstQuestionInSequence ($sequenceElement)
 
 isLastQuestionInSequence ($sequenceElement)
 
 canSaveResult ()
 Returns TRUE if the answers of the current user could be saved. More...
 
 buildQuestionsTableDataArray ($questions, $marked_questions)
 
 buildQuestionSetAnswerStatisticRowArray ($questions, $trackedQuestions)
 
 persistQuestionAnswerStatus ()
 
 resetQuestionIdParameter ()
 
 getQuestionIdParameter ()
 
 getResetCheckedParameter ()
 
 showCheckedQuestionResettingConfirmation ()
 
 unfreezeCheckedQuestionsAnswersCmd ()
 
 populateQuestionNavigation ($sequenceElement, $disabled, $primaryNext)
 
 getStartTestFromQuestionSelectionLink ()
 
 isShowingPostponeStatusReguired ($questionId)
 
 buildTestPassQuestionList ()
 
 isQuestionSummaryFinishTestButtonRequired ()
 
 isOptionalQuestionAnsweringConfirmationRequired ($sequenceKey)
 
- Protected Member Functions inherited from ilTestPlayerAbstractGUI
 checkReadAccess ()
 
 checkTestExecutable ()
 
 checkTestSessionUser (ilTestSession $testSession)
 
 ensureExistingTestSession (ilTestSession $testSession)
 
 initProcessLocker ($activeId)
 
 canSaveResult ()
 
 determineInlineScoreDisplay ()
 
 populateTestNavigationToolbar (ilTestNavigationToolbarGUI $toolbarGUI)
 
 populateQuestionNavigation ($sequenceElement, $disabled, $primaryNext)
 
 populatePreviousButtons ($disabled)
 
 populateNextButtons ($disabled, $primaryNext)
 
 populateLowerNextButtonBlock ($disabled, $primaryNext)
 
 populateUpperNextButtonBlock ($disabled, $primaryNext)
 
 populateLowerPreviousButtonBlock ($disabled)
 
 populateUpperPreviousButtonBlock ($disabled)
 
 populateSpecificFeedbackBlock ($question_gui)
 
 populateGenericFeedbackBlock (assQuestionGUI $question_gui, $solutionCorrect)
 
 populateScoreBlock ($reachedPoints, $maxPoints)
 
 populateSolutionBlock ($solutionoutput)
 
 populateSyntaxStyleBlock ()
 
 populateContentStyleBlock ()
 
 startPlayerCmd ()
 Start a test for the first time. More...
 
 resumePlayerCmd ()
 Resume a test at the last position. More...
 
 initTestCmd ()
 Start a test for the first time after a redirect. More...
 
 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...
 
 confirmFinishCmd ()
 The final submission of a test was confirmed. More...
 
 performTestPassFinishedTasks ($finishedPass)
 
 afterTestPassFinishedCmd ()
 
 isTestSignRedirectRequired ($activeId, $lastFinishedPass)
 
 archiveParticipantSubmission ( $active, $pass)
 
 backToInfoScreenCmd ()
 
 prepareTestPage ($presentationMode, $sequenceElement, $questionId)
 
 isOptionalQuestionAnsweringConfirmationRequired ($sequenceElement)
 
 isShowingPostponeStatusReguired ($questionId)
 
 showQuestionViewable (assQuestionGUI $questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse)
 
 showQuestionEditable (assQuestionGUI $questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse)
 
 determineSolutionPassIndex (assQuestionGUI $questionGui)
 
 showQuestionCmd ()
 
 editSolutionCmd ()
 
 submitSolutionCmd ()
 
 revertChangesCmd ()
 
 discardSolutionCmd ()
 
 skipQuestionCmd ()
 
 startTestCmd ()
 
 showSideList ($presentationMode, $currentSequenceElement)
 
 isQuestionSummaryFinishTestButtonRequired ()
 
 showRequestedHintListCmd ()
 Go to requested hint list. More...
 
 confirmHintRequestCmd ()
 Go to hint request confirmation. More...
 
 isFirstQuestionInSequence ($sequenceElement)
 
 isLastQuestionInSequence ($sequenceElement)
 
 handleQuestionActionCmd ()
 
 showInstantResponseCmd ()
 
 nextQuestionCmd ()
 
 previousQuestionCmd ()
 
 prepareSummaryPage ()
 
 initTestPageTemplate ()
 
 populateKioskHead ()
 
 handlePasswordProtectionRedirect ()
 
 isParticipantsAnswerFixed ($questionId)
 
 getIntroductionPageButtonLabel ()
 
 initAssessmentSettings ()
 
 handleSkillTriggering (ilTestSession $testSession)
 
 buildTestPassQuestionList ()
 
 showAnswerOptionalQuestionsConfirmation ()
 
 confirmAnswerOptionalQuestionsCmd ()
 
 cancelAnswerOptionalQuestionsCmd ()
 
 populateHelperGuiContent ($helperGui)
 
 populateCharSelectorIfRequired ()
 
 getTestNavigationToolbarGUI ()
 
 buildReadOnlyStateQuestionNavigationGUI ($questionId)
 
 buildEditableStateQuestionNavigationGUI ($questionId, $charSelectorAvailable)
 
 getFinishTestCommand ()
 
 populateInstantResponseModal (assQuestionGUI $questionGui, $navUrl)
 
 populateInstantResponseBlocks (assQuestionGUI $questionGui, $authorizedSolution)
 
 getCurrentSequenceElement ()
 
 resetSequenceElementParameter ()
 
 getSequenceElementParameter ()
 
 getPresentationModeParameter ()
 
 getInstantResponseParameter ()
 
 getNextCommandParameter ()
 
 getNextSequenceParameter ()
 
 getNavigationUrlParameter ()
 
 getAnswerChangedParameter ()
 Get the 'answer changed' status from the current request It may be set by ilTestPlayerNavigationControl.js or by a previousRequest. More...
 
 setAnswerChangedParameter ($changed=true)
 Set the 'answer changed' url parameter for generated links. More...
 
 handleIntermediateSubmit ()
 Check the 'answer changed' parameter when a question form is intermediately submitted. More...
 
 saveNavigationPreventConfirmation ()
 Save the save the switch to prevent the navigation confirmation. More...
 
 getQuestionGuiInstance ($questionId, $fromCache=true)
 
 getQuestionInstance ($questionId, $fromCache=true)
 
 initTestQuestionConfig (assQuestion $questionOBJ)
 
 buildQuestionAnswerShuffler ($questionId)
 
 handleTearsAndAngerQuestionIsNull ($questionId, $sequenceElement)
 
 populateMessageContent ($contentHTML)
 
 populateModals ()
 
 populateDiscardSolutionModal ()
 
 populateNavWhenChangedModal ()
 
 getQuestionsDefaultPresentationMode ($isQuestionWorkedThrough)
 
 buildFixedShufflerSeed ($questionId)
 
 registerForcedFeedbackNavUrl ($forcedFeedbackNavUrl)
 
 getRegisteredForcedFeedbackNavUrl ()
 
 isForcedFeedbackNavUrlRegistered ()
 
 unregisterForcedFeedbackNavUrl ()
 
- Protected Member Functions inherited from ilTestServiceGUI
 handleTabs ($activeTabId)
 
 isPdfDeliveryRequest ()
 
 getPassDetailsOverviewTableGUI ($result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav, ilTestQuestionRelatedObjectivesList $objectivesList=null, $multipleObjectivesInvolved=true)
 
 buildPassDetailsOverviewTableGUI ($targetGUI, $targetCMD)
 
 isGradingMessageRequired ()
 
 getGradingMessageBuilder ($activeId)
 
 buildQuestionRelatedObjectivesList (ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
 
 getFilteredTestResult ($active_id, $pass, $considerHiddenQuestions, $considerOptionalQuestions)
 
 populateContent ($content)
 
 buildUserTestResultsToolbarGUI ()
 
 outCorrectSolutionCmd ()
 
 outCorrectSolution ()
 Creates an output of the solution of an answer compared to the correct solution. More...
 

Protected Attributes

 $testSequence
 
 $testSession
 
- Protected Attributes inherited from ilTestPlayerAbstractGUI
 $passwordChecker
 
 $processLocker
 
 $testSession
 
 $assSettings
 
 $testSequence = null
 
- Protected Attributes inherited from ilTestServiceGUI
 $db
 
 $tabs
 
 $objCache
 
 $testSessionFactory = null
 
 $testSequenceFactory = null
 
 $participantData
 

Private Member Functions

 outCurrentlyFinishedPage ()
 
 isQuestionAnsweredCorrect ($questionId, $activeId, $pass)
 
 buildQuestionSetCompleteStatisticTableGUI ()
 
 buildQuestionSetFilteredStatisticTableGUI ()
 
 buildQuestionSetStatisticTableGUI ($tableId)
 
 getEnterTestButtonLangVar ()
 
 resetCurrentQuestion ()
 
 buildFinishPagePassDeletionLink ()
 
 getPassDeletionTarget ()
 

Private Attributes

 $dynamicQuestionSetConfig = null
 

Additional Inherited Members

- Data Fields inherited from ilTestPlayerAbstractGUI
const PRESENTATION_MODE_VIEW = 'view'
 
const PRESENTATION_MODE_EDIT = 'edit'
 
const FIXED_SHUFFLER_SEED_MIN_LENGTH = 8
 
 $ref_id
 
 $saveResult
 
 $sequence
 
 $cmdCtrl
 
 $maxProcessingTimeReached
 
 $endingTimeReached
 
- Data Fields inherited from ilTestServiceGUI
 $object = null
 
 $service = null
 
 $lng
 
 $tpl
 
 $ctrl
 
 $ilias
 
 $tree
 
 $ref_id
 

Detailed Description

Definition at line 29 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

Member Function Documentation

◆ buildFinishPagePassDeletionLink()

ilTestPlayerDynamicQuestionSetGUI::buildFinishPagePassDeletionLink ( )
private
Returns
string

Definition at line 1015 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References getPassDeletionTarget().

1016  {
1017  $href = $this->getPassDeletionTarget();
1018 
1019  $label = $this->lng->txt('tst_dyn_test_msg_pass_deletion_link');
1020 
1021  return "<a href=\"{$href}\">{$label}</a>";
1022  }
+ Here is the call graph for this function:

◆ buildQuestionSetAnswerStatisticRowArray()

ilTestPlayerDynamicQuestionSetGUI::buildQuestionSetAnswerStatisticRowArray (   $questions,
  $trackedQuestions 
)
protected

Definition at line 887 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References array, ilAssQuestionList\QUESTION_ANSWER_STATUS_CORRECT_ANSWERED, ilAssQuestionList\QUESTION_ANSWER_STATUS_NON_ANSWERED, and ilAssQuestionList\QUESTION_ANSWER_STATUS_WRONG_ANSWERED.

Referenced by showQuestionSelectionCmd().

888  {
889  $questionAnswerStats = array(
890  'total_all' => count($questions),
891  'total_open' => 0,
892  'non_answered_notseen' => 0,
893  'non_answered_skipped' => 0,
894  'wrong_answered' => 0,
895  'correct_answered' => 0
896  );
897 
898  foreach($questions as $key => $value )
899  {
900  switch( $value['question_answer_status'] )
901  {
903  if( isset($trackedQuestions[$key]) )
904  {
905  $questionAnswerStats['non_answered_skipped']++;
906  }
907  else
908  {
909  $questionAnswerStats['non_answered_notseen']++;
910  }
911  $questionAnswerStats['total_open']++;
912  break;
914  $questionAnswerStats['wrong_answered']++;
915  $questionAnswerStats['total_open']++;
916  break;
918  $questionAnswerStats['correct_answered']++;
919  break;
920  }
921  }
922 
923  return $questionAnswerStats;
924  }
Create styles array
The data for the language used.
const QUESTION_ANSWER_STATUS_NON_ANSWERED
answer status domain for single questions
+ Here is the caller graph for this function:

◆ buildQuestionSetCompleteStatisticTableGUI()

ilTestPlayerDynamicQuestionSetGUI::buildQuestionSetCompleteStatisticTableGUI ( )
private

Definition at line 926 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References buildQuestionSetStatisticTableGUI(), and ilTestDynamicQuestionSetStatisticTableGUI\COMPLETE_TABLE_ID.

Referenced by showQuestionSelectionCmd().

927  {
928  require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
929  $gui = $this->buildQuestionSetStatisticTableGUI(
931  );
932 
933  $gui->initTitle('tst_dynamic_question_set_complete');
934  $gui->initColumns('tst_num_all_questions');
935 
936  return $gui;
937  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildQuestionSetFilteredStatisticTableGUI()

ilTestPlayerDynamicQuestionSetGUI::buildQuestionSetFilteredStatisticTableGUI ( )
private

Definition at line 939 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References buildQuestionSetStatisticTableGUI(), ilTestDynamicQuestionSetStatisticTableGUI\FILTERED_TABLE_ID, and ilObjTaxonomy\getUsageOfObject().

Referenced by executeCommand(), filterQuestionSelectionCmd(), resetQuestionSelectionCmd(), and showQuestionSelectionCmd().

940  {
941  require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
942  $gui = $this->buildQuestionSetStatisticTableGUI(
944  );
945 
946  $gui->initTitle('tst_dynamic_question_set_selection');
947  $gui->initColumns('tst_num_selected_questions');
948 
949  require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
950  $gui->setTaxIds(ilObjTaxonomy::getUsageOfObject(
951  $this->dynamicQuestionSetConfig->getSourceQuestionPoolId()
952  ));
953 
954  $gui->setTaxonomyFilterEnabled($this->dynamicQuestionSetConfig->isTaxonomyFilterEnabled());
955  $gui->setAnswerStatusFilterEnabled($this->dynamicQuestionSetConfig->isAnswerStatusFilterEnabled());
956 
957  $gui->setFilterSelection($this->testSession->getQuestionSetFilterSelection());
958  $gui->initFilter();
959  $gui->setFilterCommand('filterQuestionSelection');
960  $gui->setResetCommand('resetQuestionSelection');
961 
962  return $gui;
963  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildQuestionSetStatisticTableGUI()

ilTestPlayerDynamicQuestionSetGUI::buildQuestionSetStatisticTableGUI (   $tableId)
private

Definition at line 965 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerCommands\SHOW_QUESTION_SELECTION.

Referenced by buildQuestionSetCompleteStatisticTableGUI(), and buildQuestionSetFilteredStatisticTableGUI().

966  {
967  require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
969  $this->ctrl, $this->lng, $this, ilTestPlayerCommands::SHOW_QUESTION_SELECTION, $tableId
970  );
971 
972  return $gui;
973  }
+ Here is the caller graph for this function:

◆ buildQuestionsTableDataArray()

ilTestPlayerDynamicQuestionSetGUI::buildQuestionsTableDataArray (   $questions,
  $marked_questions 
)
protected

Definition at line 846 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $data, array, and object.

847  {
848  $data = array();
849 
850  foreach($questions as $key => $value )
851  {
852  $this->ctrl->setParameter($this, 'sequence', $value['question_id']);
853  $href = $this->ctrl->getLinkTarget($this, 'gotoQuestion');
854  $this->ctrl->setParameter($this, 'sequence', '');
855 
856  $description = "";
857  if( $this->object->getListOfQuestionsDescription() )
858  {
859  $description = $value["description"];
860  }
861 
862  $marked = false;
863  if( count($marked_questions) )
864  {
865  if( isset($marked_questions[$value["question_id"]]) )
866  {
867  if( $marked_questions[$value["question_id"]]["solved"] == 1 )
868  {
869  $marked = true;
870  }
871  }
872  }
873 
874  array_push($data, array(
875  'href' => $href,
876  'title' => $this->object->getQuestionTitle($value["title"]),
877  'description' => $description,
878  'worked_through' => $this->testSequence->isAnsweredQuestion($value["question_id"]),
879  'postponed' => $this->testSequence->isPostponedQuestion($value["question_id"]),
880  'marked' => $marked
881  ));
882  }
883 
884  return $data;
885  }
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate

◆ buildTestPassQuestionList()

ilTestPlayerDynamicQuestionSetGUI::buildTestPassQuestionList ( )
protected

Definition at line 1116 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilAssQuestionList\QUESTION_INSTANCE_TYPE_ORIGINALS.

1117  {
1118  global $ilPluginAdmin;
1119 
1120  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
1121  $questionList = new ilAssQuestionList($this->db, $this->lng, $ilPluginAdmin);
1122  $questionList->setParentObjId($this->dynamicQuestionSetConfig->getSourceQuestionPoolId());
1123  $questionList->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
1124 
1125  return $questionList;
1126  }

◆ canSaveResult()

ilTestPlayerDynamicQuestionSetGUI::canSaveResult ( )
protected

Returns TRUE if the answers of the current user could be saved.

Returns
boolean TRUE if the answers could be saved, FALSE otherwise

Definition at line 763 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

Referenced by saveQuestionSolution().

764  {
765  return !$this->object->endingTimeReached();
766  }
+ Here is the caller graph for this function:

◆ discardSolutionCmd()

ilTestPlayerDynamicQuestionSetGUI::discardSolutionCmd ( )
protected

Definition at line 449 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\getQuestionInstance(), ilTestPlayerAbstractGUI\PRESENTATION_MODE_VIEW, and ilTestPlayerCommands\SHOW_QUESTION.

450  {
451  $questionId = $this->testSession->getCurrentQuestionId();
452 
453  $currentQuestionOBJ = $this->getQuestionInstance($questionId);
454 
455  $currentQuestionOBJ->resetUsersAnswer(
456  $this->testSession->getActiveId(), $this->testSession->getPass()
457  );
458 
459  $this->ctrl->setParameter($this, 'pmode', ilTestPlayerAbstractGUI::PRESENTATION_MODE_VIEW);
460 
461  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
462  }
getQuestionInstance($questionId, $fromCache=true)
+ Here is the call graph for this function:

◆ editSolutionCmd()

ilTestPlayerDynamicQuestionSetGUI::editSolutionCmd ( )
protected

◆ executeCommand()

ilTestPlayerDynamicQuestionSetGUI::executeCommand ( )

execute command

Definition at line 49 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $_GET, $cmd, $ilDB, ilTestServiceGUI\$lng, $ret, ilTestServiceGUI\$testSequenceFactory, ilTestServiceGUI\$testSessionFactory, ilTestServiceGUI\$tree, buildQuestionSetFilteredStatisticTableGUI(), ilTestPlayerAbstractGUI\checkTestSessionUser(), ilTestPlayerAbstractGUI\ensureExistingTestSession(), ilTestPlayerAbstractGUI\getAnswerChangedParameter(), ilTestPlayerAbstractGUI\handlePasswordProtectionRedirect(), ilTestPlayerAbstractGUI\initAssessmentSettings(), ilYuiUtil\initConnectionWithAnimation(), ilOverlayGUI\initJavascript(), iljQueryUtil\initjQuery(), ilTestPlayerAbstractGUI\initProcessLocker(), object, ilTestPlayerAbstractGUI\setAnswerChangedParameter(), and ilTestPlayerCommands\SHOW_QUESTION.

50  {
51  global $ilDB, $lng, $ilPluginAdmin, $ilTabs, $tree;
52 
53  $ilTabs->clearTargets();
54 
55  $this->ctrl->saveParameter($this, "sequence");
56  $this->ctrl->saveParameter($this, "active_id");
57 
58  $this->initAssessmentSettings();
59 
60  require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
61  $this->dynamicQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig($tree, $ilDB, $ilPluginAdmin, $this->object);
62  $this->dynamicQuestionSetConfig->loadFromDb();
63 
64  $testSessionFactory = new ilTestSessionFactory($this->object);
65  $this->testSession = $testSessionFactory->getSession($_GET['active_id']);
66 
67  $this->ensureExistingTestSession($this->testSession);
68  $this->checkTestSessionUser($this->testSession);
69  $this->initProcessLocker($this->testSession->getActiveId());
70 
71  $testSequenceFactory = new ilTestSequenceFactory($ilDB, $lng, $ilPluginAdmin, $this->object);
72  $this->testSequence = $testSequenceFactory->getSequenceByTestSession($this->testSession);
73  $this->testSequence->loadFromDb();
74 
75  if( $this->object->isInstantFeedbackAnswerFixationEnabled() )
76  {
77  $this->testSequence->setPreventCheckedQuestionsFromComingUpEnabled(true);
78  }
79 
80  include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
82  include_once "./Services/YUI/classes/class.ilYuiUtil.php";
84  if( $this->object->getKioskMode() )
85  {
86  include_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
88  }
89 
91 
92  $cmd = $this->ctrl->getCmd();
93  $nextClass = $this->ctrl->getNextClass($this);
94 
95  switch($nextClass)
96  {
97  case 'ilassquestionpagegui':
98 
99  $questionId = $this->testSession->getCurrentQuestionId();
100 
101  require_once "./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
102  $page_gui = new ilAssQuestionPageGUI($questionId);
103  $ret = $this->ctrl->forwardCommand($page_gui);
104  break;
105 
106  case 'ilassquestionhintrequestgui':
107 
108  $this->ctrl->saveParameter($this, 'pmode');
109 
110  $questionGUI = $this->object->createQuestionGUI(
111  "", $this->testSession->getCurrentQuestionId()
112  );
113 
114  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
115  $questionHintTracking = new ilAssQuestionHintTracking(
116  $questionGUI->object->getId(), $this->testSession->getActiveId(), $this->testSession->getPass()
117  );
118 
119  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
120  $gui = new ilAssQuestionHintRequestGUI(
121  $this, ilTestPlayerCommands::SHOW_QUESTION, $questionGUI, $questionHintTracking
122  );
123 
124 // fau: testNav - save the 'answer changed status' for viewing hint requests
126 // fau.
127  $this->ctrl->forwardCommand($gui);
128 
129  break;
130 
131  case 'ildynamicquestionsetstatistictablegui':
132 
133  $this->ctrl->forwardCommand( $this->buildQuestionSetFilteredStatisticTableGUI() );
134 
135  break;
136 
137  case 'iltestpasswordprotectiongui':
138  require_once 'Modules/Test/classes/class.ilTestPasswordProtectionGUI.php';
139  $gui = new ilTestPasswordProtectionGUI($this->ctrl, $this->tpl, $this->lng, $this, $this->passwordChecker);
140  $ret = $this->ctrl->forwardCommand($gui);
141  break;
142 
143  default:
144 
145  $cmd .= 'Cmd';
146  $ret =& $this->$cmd();
147  break;
148  }
149 
150  return $ret;
151  }
checkTestSessionUser(ilTestSession $testSession)
setAnswerChangedParameter($changed=true)
Set the &#39;answer changed&#39; url parameter for generated links.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
Question page GUI class.
ensureExistingTestSession(ilTestSession $testSession)
getAnswerChangedParameter()
Get the &#39;answer changed&#39; status from the current request It may be set by ilTestPlayerNavigationContr...
Create new PHPExcel object
obj_idprivate
global $ilDB
$ret
Definition: parser.php:6
static initjQuery($a_tpl=null)
Init jQuery.
static initConnectionWithAnimation()
Init YUI Connection module.
static initJavascript()
Init javascript.
+ Here is the call graph for this function:

◆ filterQuestionSelectionCmd()

ilTestPlayerDynamicQuestionSetGUI::filterQuestionSelectionCmd ( )
protected

Definition at line 271 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilAssQuestionList\ANSWER_STATUS_FILTER_ALL_NON_CORRECT, array, buildQuestionSetFilteredStatisticTableGUI(), and ilTestPlayerCommands\SHOW_QUESTION_SELECTION.

272  {
273  $tableGUI = $this->buildQuestionSetFilteredStatisticTableGUI();
274  $tableGUI->writeFilterToSession();
275 
276  $taxFilterSelection = array();
277  $answerStatusFilterSelection = ilAssQuestionList::ANSWER_STATUS_FILTER_ALL_NON_CORRECT;
278 
279  foreach( $tableGUI->getFilterItems() as $item )
280  {
281  if( strpos($item->getPostVar(), 'tax_') !== false )
282  {
283  $taxId = substr( $item->getPostVar(), strlen('tax_') );
284  $taxFilterSelection[$taxId] = $item->getValue();
285  }
286  elseif( $item->getPostVar() == 'question_answer_status' )
287  {
288  $answerStatusFilterSelection = $item->getValue();
289  }
290  }
291 
292  $this->testSession->getQuestionSetFilterSelection()->setTaxonomySelection($taxFilterSelection);
293  $this->testSession->getQuestionSetFilterSelection()->setAnswerStatusSelection($answerStatusFilterSelection);
294  $this->testSession->saveToDb();
295 
296  $this->testSequence->resetTrackedQuestionList();
297  $this->testSequence->saveToDb();
298 
299 
300  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION_SELECTION);
301  }
Create styles array
The data for the language used.
const ANSWER_STATUS_FILTER_ALL_NON_CORRECT
answer status filter value domain
+ Here is the call graph for this function:

◆ fromPassDeletionCmd()

ilTestPlayerDynamicQuestionSetGUI::fromPassDeletionCmd ( )
protected

Definition at line 323 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References resetCurrentQuestion(), and ilTestPlayerCommands\SHOW_QUESTION.

+ Here is the call graph for this function:

◆ getCurrentQuestionId()

ilTestPlayerDynamicQuestionSetGUI::getCurrentQuestionId ( )
protected
Returns
integer

Definition at line 156 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

157  {
158  return $this->testSession->getCurrentQuestionId();
159  }

◆ getEnterTestButtonLangVar()

ilTestPlayerDynamicQuestionSetGUI::getEnterTestButtonLangVar ( )
private

Definition at line 975 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

Referenced by showQuestionSelectionCmd().

976  {
977  if( $this->testSequence->trackedQuestionExists() )
978  {
979  return 'tst_resume_dyn_test_with_cur_quest_sel';
980  }
981 
982  return 'tst_start_dyn_test_with_cur_quest_sel';
983  }
+ Here is the caller graph for this function:

◆ getPassDeletionTarget()

ilTestPlayerDynamicQuestionSetGUI::getPassDeletionTarget ( )
private
Returns
string

Definition at line 1027 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPassDeletionConfirmationGUI\CONTEXT_DYN_TEST_PLAYER.

Referenced by buildFinishPagePassDeletionLink(), and showQuestionSelectionCmd().

1028  {
1029  require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
1030 
1031  $this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'context', ilTestPassDeletionConfirmationGUI::CONTEXT_DYN_TEST_PLAYER);
1032  $this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'active_id', $this->testSession->getActiveId());
1033  $this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'pass', $this->testSession->getPass());
1034 
1035  return $this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'confirmDeletePass');
1036  }
+ Here is the caller graph for this function:

◆ getQuestionIdParameter()

ilTestPlayerDynamicQuestionSetGUI::getQuestionIdParameter ( )
protected

Definition at line 1043 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\getSequenceElementParameter().

Referenced by showQuestionCmd().

1044  {
1045  return $this->getSequenceElementParameter();
1046  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getResetCheckedParameter()

ilTestPlayerDynamicQuestionSetGUI::getResetCheckedParameter ( )
protected

Definition at line 1048 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $_GET.

Referenced by isCheckedQuestionResettingConfirmationRequired().

1049  {
1050  if( isset($_GET['reset_checked']) )
1051  {
1052  return $_GET['reset_checked'];
1053  }
1054 
1055  return null;
1056 
1057  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ getStartTestFromQuestionSelectionLink()

ilTestPlayerDynamicQuestionSetGUI::getStartTestFromQuestionSelectionLink ( )
protected

Definition at line 1102 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerCommands\SHOW_QUESTION.

Referenced by showQuestionSelectionCmd().

1103  {
1104  $this->ctrl->setParameter($this, 'reset_checked', 1);
1105  $link = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::SHOW_QUESTION);
1106  $this->ctrl->setParameter($this, 'reset_checked', '');
1107 
1108  return $link;
1109  }
+ Here is the caller graph for this function:

◆ handleQuestionActionCmd()

ilTestPlayerDynamicQuestionSetGUI::handleQuestionActionCmd ( )
protected

Definition at line 707 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), saveQuestionSolution(), ilTestPlayerAbstractGUI\setAnswerChangedParameter(), and ilTestPlayerCommands\SHOW_QUESTION.

708  {
709  $questionId = $this->testSession->getCurrentQuestionId();
710 
711  if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
712  {
713  $this->saveQuestionSolution(false);
714 // fau: testNav - add changed status of the question
715  $this->setAnswerChangedParameter(true);
716 // fau.
717  }
718 
719  $this->ctrl->setParameter(
720  $this, 'sequence', $this->testSession->getCurrentQuestionId()
721  );
722 
723  $this->ctrl->saveParameter($this, 'pmode');
724 
725  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
726  }
setAnswerChangedParameter($changed=true)
Set the &#39;answer changed&#39; url parameter for generated links.
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
+ Here is the call graph for this function:

◆ isCheckedQuestionResettingConfirmationRequired()

ilTestPlayerDynamicQuestionSetGUI::isCheckedQuestionResettingConfirmationRequired ( )
protected

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

References getResetCheckedParameter().

Referenced by showQuestionCmd().

470  {
471  if( !$this->getResetCheckedParameter() )
472  {
473  return false;
474  }
475 
476  if( $this->testSession->getQuestionSetFilterSelection()->isAnswerStatusSelectionWrongAnswered() )
477  {
478  $this->testSequence->loadQuestions(
479  $this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
480  );
481 
482  if( $this->testSequence->hasFilteredQuestionListCheckedQuestions() )
483  {
484  return true;
485  }
486  }
487 
488  return false;
489  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFirstQuestionInSequence()

ilTestPlayerDynamicQuestionSetGUI::isFirstQuestionInSequence (   $sequenceElement)
protected

Definition at line 748 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

749  {
750  return !$this->testSequence->trackedQuestionExists();
751  }

◆ isLastQuestionInSequence()

ilTestPlayerDynamicQuestionSetGUI::isLastQuestionInSequence (   $sequenceElement)
protected

Definition at line 753 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

Referenced by populateQuestionNavigation().

754  {
755  return false; // always
756  }
+ Here is the caller graph for this function:

◆ isOptionalQuestionAnsweringConfirmationRequired()

ilTestPlayerDynamicQuestionSetGUI::isOptionalQuestionAnsweringConfirmationRequired (   $sequenceKey)
protected

Definition at line 1133 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

1134  {
1135  return false;
1136  }

◆ isQuestionAnsweredCorrect()

ilTestPlayerDynamicQuestionSetGUI::isQuestionAnsweredCorrect (   $questionId,
  $activeId,
  $pass 
)
private

Definition at line 831 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $pass, and assQuestion\_getReachedPoints().

Referenced by persistQuestionAnswerStatus().

832  {
833  $questionGUI = $this->object->createQuestionGUI("", $questionId);
834 
835  $reachedPoints = assQuestion::_getReachedPoints($activeId, $questionId, $pass);
836  $maxPoints = $questionGUI->object->getMaximumPoints();
837 
838  if($reachedPoints < $maxPoints)
839  {
840  return false;
841  }
842 
843  return true;
844  }
static _getReachedPoints($active_id, $question_id, $pass=NULL)
Returns the points, a learner has reached answering the question.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isQuestionSummaryFinishTestButtonRequired()

ilTestPlayerDynamicQuestionSetGUI::isQuestionSummaryFinishTestButtonRequired ( )
protected

Definition at line 1128 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

1129  {
1130  return false;
1131  }

◆ isShowingPostponeStatusReguired()

ilTestPlayerDynamicQuestionSetGUI::isShowingPostponeStatusReguired (   $questionId)
protected

Definition at line 1111 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

1112  {
1113  return false;
1114  }

◆ markQuestionCmd()

ilTestPlayerDynamicQuestionSetGUI::markQuestionCmd ( )
protected

Definition at line 346 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $ilUser, and ilTestPlayerCommands\SHOW_QUESTION.

347  {
348  global $ilUser;
349  $this->object->setQuestionSetSolved(1, $this->testSession->getCurrentQuestionId(), $ilUser->getId());
350 
351  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
352  }
$ilUser
Definition: imgupload.php:18

◆ nextQuestionCmd()

ilTestPlayerDynamicQuestionSetGUI::nextQuestionCmd ( )
protected

Definition at line 329 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References assQuestion\_isWorkedThrough(), resetCurrentQuestion(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by skipQuestionCmd().

330  {
331  $isWorkedThrough = assQuestion::_isWorkedThrough(
332  $this->testSession->getActiveId(), $this->testSession->getCurrentQuestionId(), $this->testSession->getPass()
333  );
334 
335  if( !$isWorkedThrough )
336  {
337  $this->testSequence->setQuestionPostponed($this->testSession->getCurrentQuestionId());
338  $this->testSequence->saveToDb();
339  }
340 
341  $this->resetCurrentQuestion();
342 
343  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
344  }
static _isWorkedThrough($active_id, $question_id, $pass=NULL)
Returns true if the question was worked through in the given pass Worked through means that the user ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outCurrentlyFinishedPage()

ilTestPlayerDynamicQuestionSetGUI::outCurrentlyFinishedPage ( )
private

Definition at line 728 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestServiceGUI\$tpl.

Referenced by showQuestionCmd().

729  {
730  if( $this->testSequence->openQuestionExists() )
731  {
732  $message = $this->lng->txt('tst_dyn_test_msg_currently_finished_selection');
733  }
734  else
735  {
736  $message = $this->lng->txt('tst_dyn_test_msg_currently_finished_completely');
737  $message .= "<br /><br />{$this->buildFinishPagePassDeletionLink()}";
738  }
739 
740  $msgHtml = $this->tpl->getMessageHTML($message);
741 
742  $tpl = new ilTemplate('tpl.test_currently_finished_msg.html', true, true, 'Modules/Test');
743  $tpl->setVariable('TEST_CURRENTLY_FINISHED_MSG', $msgHtml);
744 
745  $this->tpl->setVariable('QUESTION_OUTPUT', $tpl->get());
746  }
special template class to simplify handling of ITX/PEAR
+ Here is the caller graph for this function:

◆ outQuestionSummaryCmd()

ilTestPlayerDynamicQuestionSetGUI::outQuestionSummaryCmd (   $fullpage = true,
  $contextFinishTest = false,
  $obligationsNotAnswered = false,
  $obligationsFilter = false 
)

Definition at line 1059 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

1060  {
1061  $this->testSequence->loadQuestions(
1062  $this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
1063  );
1064 
1065  $this->testSequence->setCurrentQuestionId($this->testSession->getCurrentQuestionId());
1066 
1067  parent::outQuestionSummaryCmd($fullpage, $contextFinishTest, $obligationsNotAnswered, $obligationsFilter);
1068  }

◆ persistQuestionAnswerStatus()

ilTestPlayerDynamicQuestionSetGUI::persistQuestionAnswerStatus ( )
protected

Definition at line 985 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $pass, and isQuestionAnsweredCorrect().

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

986  {
987  $questionId = $this->testSession->getCurrentQuestionId();
988  $activeId = $this->testSession->getActiveId();
989  $pass = $this->testSession->getPass();
990 
991  if($this->isQuestionAnsweredCorrect($questionId, $activeId, $pass))
992  {
993  $this->testSequence->setQuestionAnsweredCorrect($questionId);
994  }
995  else
996  {
997  $this->testSequence->setQuestionAnsweredWrong($questionId);
998  }
999 
1000  $this->testSequence->saveToDb();
1001  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateQuestionNavigation()

ilTestPlayerDynamicQuestionSetGUI::populateQuestionNavigation (   $sequenceElement,
  $disabled,
  $primaryNext 
)
protected

Definition at line 1094 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References isLastQuestionInSequence(), and ilTestPlayerAbstractGUI\populateNextButtons().

Referenced by showQuestionCmd().

1095  {
1096  if( !$this->isLastQuestionInSequence($sequenceElement) )
1097  {
1098  $this->populateNextButtons($disabled, $primaryNext);
1099  }
1100  }
populateNextButtons($disabled, $primaryNext)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ previousQuestionCmd()

ilTestPlayerDynamicQuestionSetGUI::previousQuestionCmd ( )
protected

Definition at line 318 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

319  {
320  // nothing to do, won't be called
321  }

◆ resetCurrentQuestion()

ilTestPlayerDynamicQuestionSetGUI::resetCurrentQuestion ( )
private

Definition at line 1003 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

Referenced by fromPassDeletionCmd(), nextQuestionCmd(), and submitSolutionAndNextCmd().

1004  {
1005  $this->testSession->setCurrentQuestionId(null);
1006  $this->testSession->saveToDb();
1007 
1008  $this->ctrl->setParameter($this, 'sequence', $this->testSession->getCurrentQuestionId());
1009  $this->ctrl->setParameter($this, 'pmode', '');
1010  }
+ Here is the caller graph for this function:

◆ resetQuestionIdParameter()

ilTestPlayerDynamicQuestionSetGUI::resetQuestionIdParameter ( )
protected

Definition at line 1038 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\resetSequenceElementParameter().

Referenced by showQuestionCmd().

1039  {
1041  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetQuestionSelectionCmd()

ilTestPlayerDynamicQuestionSetGUI::resetQuestionSelectionCmd ( )
protected

Definition at line 303 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References array, buildQuestionSetFilteredStatisticTableGUI(), and ilTestPlayerCommands\SHOW_QUESTION_SELECTION.

304  {
305  $tableGUI = $this->buildQuestionSetFilteredStatisticTableGUI();
306  $tableGUI->resetFilter();
307 
308  $this->testSession->getQuestionSetFilterSelection()->setTaxonomySelection( array() );
309  $this->testSession->getQuestionSetFilterSelection()->setAnswerStatusSelection( null );
310  $this->testSession->saveToDb();
311 
312  $this->testSequence->resetTrackedQuestionList();
313  $this->testSequence->saveToDb();
314 
315  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION_SELECTION);
316  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ resumePlayerCmd()

ilTestPlayerDynamicQuestionSetGUI::resumePlayerCmd ( )
protected

Resume a test at the last position.

Definition at line 164 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\handleUserSettings(), object, ilTestPlayerCommands\SHOW_QUESTION, ilTestPlayerCommands\SHOW_QUESTION_SELECTION, and ilTestPlayerAbstractGUI\showMaximumAllowedUsersReachedMessage().

165  {
166  if ($this->object->checkMaximumAllowedUsers() == FALSE)
167  {
169  }
170 
171  $this->handleUserSettings();
172 
173  if( $this->dynamicQuestionSetConfig->isAnyQuestionFilterEnabled() )
174  {
175  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION_SELECTION);
176  }
177 
178  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
179  }
handleUserSettings()
Handles some form parameters on starting and resuming a test.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ saveQuestionSolution()

ilTestPlayerDynamicQuestionSetGUI::saveQuestionSolution (   $authorized = true,
  $force = false 
)

saves the user input of a question

Definition at line 771 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $_GET, $_POST, $_SESSION, $pass, ilTestPlayerAbstractGUI\$saveResult, canSaveResult(), ilTestPlayerAbstractGUI\handleSkillTriggering(), object, and OUTPUT_JAVASCRIPT.

Referenced by handleQuestionActionCmd(), showInstantResponseCmd(), submitSolutionAndNextCmd(), and submitSolutionCmd().

772  {
773  // what is this formtimestamp ??
774  if (!$force)
775  {
776  $formtimestamp = $_POST["formtimestamp"];
777  if (strlen($formtimestamp) == 0) $formtimestamp = $_GET["formtimestamp"];
778  if ($formtimestamp != $_SESSION["formtimestamp"])
779  {
780  $_SESSION["formtimestamp"] = $formtimestamp;
781  }
782  else
783  {
784  return FALSE;
785  }
786  }
787 
788  // determine current question
789 
790  $qId = $this->testSession->getCurrentQuestionId();
791 
792  if( !$qId || $qId != $_GET["sequence"])
793  {
794  return false;
795  }
796 
797  // save question solution
798 
799  $this->saveResult = FALSE;
800 
801  if ($this->canSaveResult($qId) || $force)
802  {
803  $questionGUI = $this->object->createQuestionGUI("", $qId);
804 
805  if( $this->object->getJavaScriptOutput() )
806  {
807  $questionGUI->object->setOutputType(OUTPUT_JAVASCRIPT);
808  }
809 
810  $activeId = $this->testSession->getActiveId();
811 
812  $this->saveResult = $questionGUI->object->persistWorkingState(
813  $activeId, $pass = null, $this->object->areObligationsEnabled(), $authorized
814  );
815 
816  if( $authorized && $this->object->isSkillServiceToBeConsidered() )
817  {
818  $this->handleSkillTriggering($this->testSession);
819  }
820  }
821 
822  if ($this->saveResult == FALSE)
823  {
824  $this->ctrl->setParameter($this, "save_error", "1");
825  $_SESSION["previouspost"] = $_POST;
826  }
827 
828  return $this->saveResult;
829  }
$_SESSION["AccountId"]
$_GET["client_id"]
const OUTPUT_JAVASCRIPT
handleSkillTriggering(ilTestSession $testSession)
Create new PHPExcel object
obj_idprivate
canSaveResult()
Returns TRUE if the answers of the current user could be saved.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showCheckedQuestionResettingConfirmation()

ilTestPlayerDynamicQuestionSetGUI::showCheckedQuestionResettingConfirmation ( )
protected

Definition at line 1070 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\populateMessageContent(), ilTestPlayerCommands\SHOW_QUESTION, and ilTestPlayerCommands\UNFREEZE_ANSWERS.

Referenced by showQuestionCmd().

1071  {
1072  require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
1073  $confirmation = new ilConfirmationGUI();
1074  $confirmation->setFormAction($this->ctrl->getFormAction($this));
1075  $confirmation->setHeaderText($this->lng->txt('tst_dyn_unfreeze_answers_confirmation'));
1076  $confirmation->setConfirm($this->lng->txt('tst_dyn_unfreeze_answers'), ilTestPlayerCommands::UNFREEZE_ANSWERS);
1077  $confirmation->setCancel($this->lng->txt('tst_dyn_keep_answ_freeze'), ilTestPlayerCommands::SHOW_QUESTION);
1078 
1079  $this->populateMessageContent($confirmation->getHtml());
1080  }
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showInstantResponseCmd()

ilTestPlayerDynamicQuestionSetGUI::showInstantResponseCmd ( )
protected

Definition at line 662 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References array, ilTestPlayerAbstractGUI\getNavigationUrlParameter(), ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), persistQuestionAnswerStatus(), ilTestPlayerAbstractGUI\registerForcedFeedbackNavUrl(), ilTestPlayerAbstractGUI\removeIntermediateSolution(), ilTestPlayerAbstractGUI\saveNavigationPreventConfirmation(), saveQuestionSolution(), ilTestPlayerAbstractGUI\setAnswerChangedParameter(), and ilTestPlayerCommands\SHOW_QUESTION.

663  {
664  $questionId = $this->testSession->getCurrentQuestionId();
665 
666  $filterSelection = $this->testSession->getQuestionSetFilterSelection();
667 
668  $filterSelection->setForcedQuestionIds(array($this->testSession->getCurrentQuestionId()));
669 
670  $this->testSequence->loadQuestions($this->dynamicQuestionSetConfig, $filterSelection);
671  $this->testSequence->cleanupQuestions($this->testSession);
672  $this->testSequence->saveToDb();
673 
674  if( !$this->isParticipantsAnswerFixed($questionId) )
675  {
676  if( $this->saveQuestionSolution(true) )
677  {
680  $this->setAnswerChangedParameter(false);
681  }
682  else
683  {
684  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
685  }
686  $this->testSequence->unsetQuestionPostponed($questionId);
687  $this->testSequence->setQuestionChecked($questionId);
688  $this->testSequence->saveToDb();
689  }
690 
691  $this->ctrl->setParameter(
692  $this, 'sequence', $this->testSession->getCurrentQuestionId()
693  );
694 
695  $this->ctrl->setParameter($this, 'instresp', 1);
696 
697 // fau: testNav - handle navigation after feedback
698  if ($this->getNavigationUrlParameter())
699  {
702  }
703 // fau.
704  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
705  }
removeIntermediateSolution()
remove an auto-saved solution of the current question
setAnswerChangedParameter($changed=true)
Set the &#39;answer changed&#39; url parameter for generated links.
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
saveNavigationPreventConfirmation()
Save the save the switch to prevent the navigation confirmation.
Create styles array
The data for the language used.
registerForcedFeedbackNavUrl($forcedFeedbackNavUrl)
+ Here is the call graph for this function:

◆ showQuestionCmd()

ilTestPlayerDynamicQuestionSetGUI::showQuestionCmd ( )
protected

Definition at line 491 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References assQuestion\_isWorkedThrough(), array, ilTestPlayerAbstractGUI\getInstantResponseParameter(), ilTestPlayerAbstractGUI\getQuestionGuiInstance(), getQuestionIdParameter(), ilTestPlayerAbstractGUI\getRegisteredForcedFeedbackNavUrl(), ilTestPlayerAbstractGUI\getTestNavigationToolbarGUI(), ilTestPlayerAbstractGUI\handleTearsAndAngerQuestionIsNull(), isCheckedQuestionResettingConfirmationRequired(), ilTestPlayerAbstractGUI\isForcedFeedbackNavUrlRegistered(), ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), ilObjTest\isQuestionObligatory(), object, outCurrentlyFinishedPage(), ilTestPlayerAbstractGUI\populateInstantResponseBlocks(), ilTestPlayerAbstractGUI\populateInstantResponseModal(), populateQuestionNavigation(), ilTestPlayerAbstractGUI\populateTestNavigationToolbar(), ilTestPlayerAbstractGUI\prepareTestPage(), ilTestPlayerAbstractGUI\PRESENTATION_MODE_EDIT, ilTestPlayerAbstractGUI\PRESENTATION_MODE_VIEW, resetQuestionIdParameter(), showCheckedQuestionResettingConfirmation(), ilTestPlayerAbstractGUI\showQuestionEditable(), ilTestPlayerAbstractGUI\showQuestionViewable(), ilTestPlayerCommands\SUBMIT_INTERMEDIATE_SOLUTION, ilTestPlayerAbstractGUI\unregisterForcedFeedbackNavUrl(), and ilTestPlayerAbstractGUI\updateWorkingTime().

492  {
493  $this->updateWorkingTime();
494 
495  $this->testSequence->loadQuestions(
496  $this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
497  );
498 
499  $this->testSequence->cleanupQuestions($this->testSession);
500 
502  {
504  return;
505  }
506 
507  if( $this->testSequence->getQuestionSet()->getSelectionQuestionList()->isInList($this->getQuestionIdParameter()) )
508  {
509  $this->testSession->setCurrentQuestionId($this->getQuestionIdParameter());
510  }
511  else
512  {
513  $this->resetQuestionIdParameter();
514  }
515 
516  if( !$this->testSession->getCurrentQuestionId() )
517  {
518  $upComingQuestionId = $this->testSequence->getUpcomingQuestionId();
519 
520  $this->testSession->setCurrentQuestionId($upComingQuestionId);
521 
522  // seems to be a first try of freezing answers not too hard
523  /*if( $this->testSequence->isQuestionChecked($upComingQuestionId) )
524  {
525  $this->testSequence->setQuestionUnchecked($upComingQuestionId);
526  }*/
527  }
528 
529  $navigationToolbarGUI = $this->getTestNavigationToolbarGUI();
530  $navigationToolbarGUI->setQuestionSelectionButtonEnabled(true);
531 
532  if( $this->testSession->getCurrentQuestionId() )
533  {
534  $questionGui = $this->getQuestionGuiInstance($this->testSession->getCurrentQuestionId());
535  $this->testSequence->setCurrentQuestionId($this->testSession->getCurrentQuestionId());
536 
537  $questionGui->setQuestionCount(
538  $this->testSequence->getLastPositionIndex()
539  );
540  $questionGui->setSequenceNumber(
541  $this->testSequence->getCurrentPositionIndex($this->testSession->getCurrentQuestionId())
542  );
543 
544  if( !($questionGui instanceof assQuestionGUI) )
545  {
547  $this->testSession->getCurrentQuestionId(), $this->testSession->getCurrentQuestionId()
548  );
549  }
550 
551  $isQuestionWorkedThrough = assQuestion::_isWorkedThrough(
552  $this->testSession->getActiveId(), $this->testSession->getCurrentQuestionId(), $this->testSession->getPass()
553  );
554 
555  require_once 'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
556  $headerBlockBuilder = new ilTestQuestionHeaderBlockBuilder($this->lng);
557  $headerBlockBuilder->setHeaderMode(
558  // avoid legacy setting combination: ctm without question titles
559  $this->object->getTitleOutput() == 2 ? 1 : $this->object->getTitleOutput()
560  );
561  $headerBlockBuilder->setQuestionTitle($questionGui->object->getTitle());
562  $headerBlockBuilder->setQuestionPoints($questionGui->object->getPoints());
563  /* avoid showing Qst X of Y within CTMs
564  $headerBlockBuilder->setQuestionPosition(
565  $this->testSequence->getCurrentPositionIndex($this->testSession->getCurrentQuestionId())
566  );
567  $headerBlockBuilder->setQuestionCount($this->testSequence->getLastPositionIndex());
568  */
569  $headerBlockBuilder->setQuestionPostponed($this->testSequence->isPostponedQuestion(
570  $this->testSession->getCurrentQuestionId())
571  );
572  $headerBlockBuilder->setQuestionObligatory(
573  $this->object->areObligationsEnabled() && ilObjTest::isQuestionObligatory($this->object->getId())
574  );
575  $questionGui->setQuestionHeaderBlockBuilder($headerBlockBuilder);
576 
577 // fau: testNav - always use edit mode, except for fixed answer
578  if( $this->isParticipantsAnswerFixed($this->testSession->getCurrentQuestionId()) )
579  {
580  $instantResponse = true;
582  }
583  else
584  {
585  $instantResponse = $this->getInstantResponseParameter();
587  }
588 // fau.
589 
590  $this->prepareTestPage($presentationMode,
591  $this->testSession->getCurrentQuestionId(), $this->testSession->getCurrentQuestionId()
592  );
593 
594  $this->ctrl->setParameter($this, 'sequence', $this->testSession->getCurrentQuestionId());
595  $this->ctrl->setParameter($this, 'pmode', $presentationMode);
596  $formAction = $this->ctrl->getFormAction($this, ilTestPlayerCommands::SUBMIT_INTERMEDIATE_SOLUTION);
597 
598  switch($presentationMode)
599  {
601 
602 // fau: testNav - enable navigation toolbar in edit mode
603  $navigationToolbarGUI->setDisabledStateEnabled(false);
604 // fau.
605  $this->showQuestionEditable($questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse);
606 
607  break;
608 
610 
611  $this->showQuestionViewable($questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse);
612 
613  break;
614 
615  default:
616 
617  require_once 'Modules/Test/exceptions/class.ilTestException.php';
618  throw new ilTestException('no presentation mode given');
619  }
620 
621  $navigationToolbarGUI->build();
622  $this->populateTestNavigationToolbar($navigationToolbarGUI);
623 
624 // fau: testNav - enable the question navigation in edit mode
626  $this->testSession->getCurrentQuestionId(), false, $this->object->isForceInstantFeedbackEnabled()
627  );
628 // fau.
629 
630  if ($instantResponse)
631  {
632 // fau: testNav - always use authorized solution for instant feedback
634  $questionGui, true
635  );
636 // fau.
637  $this->testSession->getQuestionSetFilterSelection()->setForcedQuestionIds(array());
638  }
639 
640 // fau: testNav - add feedback modal
642  {
645  }
646 // fau.
647  }
648  else
649  {
651 
652  $navigationToolbarGUI->build();
653  $this->populateTestNavigationToolbar($navigationToolbarGUI);
654 
655  $this->outCurrentlyFinishedPage();
656  }
657 
658  $this->testSequence->saveToDb();
659  $this->testSession->saveToDb();
660  }
showQuestionEditable(assQuestionGUI $questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse)
updateWorkingTime()
updates working time and stores state saveresult to see if question has to be stored or not ...
Base Exception for all Exceptions relating to Modules/Test.
prepareTestPage($presentationMode, $sequenceElement, $questionId)
populateInstantResponseBlocks(assQuestionGUI $questionGui, $authorizedSolution)
static isQuestionObligatory($question_id)
checks wether the question with given id is marked as obligatory or not
populateQuestionNavigation($sequenceElement, $disabled, $primaryNext)
populateTestNavigationToolbar(ilTestNavigationToolbarGUI $toolbarGUI)
Basic GUI class for assessment questions.
Create styles array
The data for the language used.
showQuestionViewable(assQuestionGUI $questionGui, $formAction, $isQuestionWorkedThrough, $instantResponse)
Create new PHPExcel object
obj_idprivate
populateInstantResponseModal(assQuestionGUI $questionGui, $navUrl)
getQuestionGuiInstance($questionId, $fromCache=true)
handleTearsAndAngerQuestionIsNull($questionId, $sequenceElement)
static _isWorkedThrough($active_id, $question_id, $pass=NULL)
Returns true if the question was worked through in the given pass Worked through means that the user ...
+ Here is the call graph for this function:

◆ showQuestionSelectionCmd()

ilTestPlayerDynamicQuestionSetGUI::showQuestionSelectionCmd ( )
protected

Definition at line 205 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References array, buildQuestionSetAnswerStatisticRowArray(), buildQuestionSetCompleteStatisticTableGUI(), buildQuestionSetFilteredStatisticTableGUI(), ilTestPassDeletionConfirmationGUI\CONTEXT_DYN_TEST_PLAYER, getEnterTestButtonLangVar(), ilLinkButton\getInstance(), getPassDeletionTarget(), getStartTestFromQuestionSelectionLink(), object, ilTestPlayerAbstractGUI\outProcessingTime(), ilTestPlayerAbstractGUI\prepareSummaryPage(), ilTestPlayerCommands\SUSPEND_TEST, and vd().

206  {
207  $this->prepareSummaryPage();
208 
209  $this->testSequence->loadQuestions(
210  $this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
211  );
212 
213  $this->testSequence->cleanupQuestions($this->testSession);
214 
215  $this->testSequence->saveToDb();
216 
217  require_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
218  $toolbarGUI = new ilToolbarGUI();
219 
220  require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
221  $button = ilLinkButton::getInstance();
222  $button->setUrl($this->getStartTestFromQuestionSelectionLink());
223  $button->setCaption($this->getEnterTestButtonLangVar());
224  $button->setPrimary(true);
225  $toolbarGUI->addButtonInstance($button);
226 
227  if( $this->object->getShowCancel() )
228  {
229  $button = ilLinkButton::getInstance();
230  $button->setUrl($this->ctrl->getLinkTarget(
232  ));
233  $button->setCaption('cancel_test');
234  $toolbarGUI->addButtonInstance($button);
235  }
236 
237  if( $this->object->isPassDeletionAllowed() )
238  {
239  require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
240 
241  $toolbarGUI->addButton(
242  $this->lng->txt('tst_dyn_test_pass_deletion_button'),
244  );
245  }
246 
247  $filteredData = array($this->buildQuestionSetAnswerStatisticRowArray(
248  $this->testSequence->getFilteredQuestionsData(), $this->testSequence->getTrackedQuestionList()
249  )); #vd($filteredData);
250  $filteredTableGUI = $this->buildQuestionSetFilteredStatisticTableGUI();
251  $filteredTableGUI->setData($filteredData);
252 
253  $completeData = array($this->buildQuestionSetAnswerStatisticRowArray(
254  $this->testSequence->getCompleteQuestionsData(), $this->testSequence->getTrackedQuestionList()
255  )); #vd($completeData);
256  $completeTableGUI = $this->buildQuestionSetCompleteStatisticTableGUI();
257  $completeTableGUI->setData($completeData);
258 
259  $content = $this->ctrl->getHTML($toolbarGUI);
260  $content .= $this->ctrl->getHTML($filteredTableGUI);
261  $content .= $this->ctrl->getHTML($completeTableGUI);
262 
263  $this->tpl->setVariable('TABLE_LIST_OF_QUESTIONS', $content);
264 
265  if( $this->object->getEnableProcessingTime() )
266  {
267  $this->outProcessingTime($this->testSession->getActiveId());
268  }
269  }
vd()
shortcut for var_dump with enhanced debug information
Definition: inc.debug.php:42
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
buildQuestionSetAnswerStatisticRowArray($questions, $trackedQuestions)
+ Here is the call graph for this function:

◆ skipQuestionCmd()

ilTestPlayerDynamicQuestionSetGUI::skipQuestionCmd ( )
protected

Definition at line 464 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References nextQuestionCmd().

+ Here is the call graph for this function:

◆ startTestCmd()

ilTestPlayerDynamicQuestionSetGUI::startTestCmd ( )
protected

Definition at line 181 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $_SESSION, ilTestPlayerCommands\SHOW_QUESTION, and ilTestPlayerCommands\SHOW_QUESTION_SELECTION.

182  {
183  $this->testSession->setCurrentQuestionId(null); // no question "came up" yet
184 
185  $this->testSession->saveToDb();
186 
187  $this->ctrl->setParameter($this, 'active_id', $this->testSession->getActiveId());
188 
189  assQuestion::_updateTestPassResults($this->testSession->getActiveId(), $this->testSession->getPass(), false, null, $this->object->id);
190 
191  $_SESSION['active_time_id'] = $this->object->startWorkingTime(
192  $this->testSession->getActiveId(), $this->testSession->getPass()
193  );
194 
195  $this->ctrl->saveParameter($this, 'tst_javascript');
196 
197  if( $this->dynamicQuestionSetConfig->isAnyQuestionFilterEnabled() )
198  {
199  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION_SELECTION);
200  }
201 
202  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
203  }
$_SESSION["AccountId"]

◆ submitSolutionAndNextCmd()

ilTestPlayerDynamicQuestionSetGUI::submitSolutionAndNextCmd ( )
protected

Definition at line 368 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\getQuestionInstance(), object, persistQuestionAnswerStatus(), resetCurrentQuestion(), saveQuestionSolution(), ilTestPlayerCommands\SHOW_QUESTION, and submitSolutionCmd().

369  {
370  if( $this->object->isForceInstantFeedbackEnabled() )
371  {
372  return $this->submitSolutionCmd();
373  }
374 
375  if( $this->saveQuestionSolution(true, false) )
376  {
377  $questionId = $this->testSession->getCurrentQuestionId();
378 
379  $this->getQuestionInstance($questionId)->removeIntermediateSolution(
380  $this->testSession->getActiveId(), $this->testSession->getPass()
381  );
382 
384 
385  $this->ctrl->setParameter($this, 'pmode', '');
386 
387  $this->resetCurrentQuestion();
388  }
389 
390  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
391  }
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
Create new PHPExcel object
obj_idprivate
getQuestionInstance($questionId, $fromCache=true)
+ Here is the call graph for this function:

◆ submitSolutionCmd()

ilTestPlayerDynamicQuestionSetGUI::submitSolutionCmd ( )
protected

Definition at line 393 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerAbstractGUI\getNavigationUrlParameter(), ilTestPlayerAbstractGUI\getNextCommandParameter(), ilTestPlayerAbstractGUI\getNextSequenceParameter(), ilTestPlayerAbstractGUI\getQuestionInstance(), object, persistQuestionAnswerStatus(), ilTestPlayerAbstractGUI\PRESENTATION_MODE_VIEW, ilUtil\redirect(), ilTestPlayerAbstractGUI\saveNavigationPreventConfirmation(), saveQuestionSolution(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by submitSolutionAndNextCmd().

394  {
395  if( $this->saveQuestionSolution(true, false) )
396  {
397  $questionId = $this->testSession->getCurrentQuestionId();
398 
399  $this->getQuestionInstance($questionId)->removeIntermediateSolution(
400  $this->testSession->getActiveId(), $this->testSession->getPass()
401  );
402 
404 
405  if( $this->object->isForceInstantFeedbackEnabled() )
406  {
407  $this->ctrl->setParameter($this, 'instresp', 1);
408 
409  $this->testSequence->unsetQuestionPostponed($questionId);
410  $this->testSequence->setQuestionChecked($questionId);
411  $this->testSequence->saveToDb();
412  }
413 
414  if( $this->getNextCommandParameter() )
415  {
416  if( $this->getNextSequenceParameter() )
417  {
418  $this->ctrl->setParameter($this, 'sequence', $this->getNextSequenceParameter());
419  $this->ctrl->setParameter($this, 'pmode', '');
420  }
421 
422  $this->ctrl->redirect($this, $this->getNextCommandParameter());
423  }
424 
425  $this->ctrl->setParameter($this, 'pmode', ilTestPlayerAbstractGUI::PRESENTATION_MODE_VIEW);
426  }
427  else
428  {
429  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
430  }
431 
432 // fau: testNav - remember to prevent the navigation confirmation
434 // fau.
435 
436 // fau: testNav - handle navigation after saving
437  if ($this->getNavigationUrlParameter())
438  {
440  }
441  else
442  {
443  $this->ctrl->saveParameter($this, 'sequence');
444  }
445 // fau.
446  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
447  }
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
saveNavigationPreventConfirmation()
Save the save the switch to prevent the navigation confirmation.
Create new PHPExcel object
obj_idprivate
getQuestionInstance($questionId, $fromCache=true)
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unfreezeCheckedQuestionsAnswersCmd()

ilTestPlayerDynamicQuestionSetGUI::unfreezeCheckedQuestionsAnswersCmd ( )
protected

Definition at line 1082 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References ilTestPlayerCommands\SHOW_QUESTION.

1083  {
1084  $this->testSequence->loadQuestions(
1085  $this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
1086  );
1087 
1088  $this->testSequence->resetFilteredQuestionListsCheckedStatus();
1089  $this->testSequence->saveToDb();
1090 
1091  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1092  }

◆ unmarkQuestionCmd()

ilTestPlayerDynamicQuestionSetGUI::unmarkQuestionCmd ( )
protected

Definition at line 354 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $ilUser, and ilTestPlayerCommands\SHOW_QUESTION.

355  {
356  global $ilUser;
357  $this->object->setQuestionSetSolved(0, $this->testSession->getCurrentQuestionId(), $ilUser->getId());
358 
359  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
360  }
$ilUser
Definition: imgupload.php:18

Field Documentation

◆ $dynamicQuestionSetConfig

ilTestPlayerDynamicQuestionSetGUI::$dynamicQuestionSetConfig = null
private

Definition at line 34 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

◆ $testSequence

ilTestPlayerDynamicQuestionSetGUI::$testSequence
protected

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

◆ $testSession

ilTestPlayerDynamicQuestionSetGUI::$testSession
protected

Definition at line 44 of file class.ilTestPlayerDynamicQuestionSetGUI.php.


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