ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTestPlayerAbstractGUI Class Reference

Output class for assessment test execution. More...

+ Inheritance diagram for ilTestPlayerAbstractGUI:
+ Collaboration diagram for ilTestPlayerAbstractGUI:

Public Member Functions

 __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)
 

Data Fields

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
 

Protected Member Functions

 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

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

Private Member Functions

 buildNextButtonInstance ($disabled, $primaryNext)
 
 buildPreviousButtonInstance ($disabled)
 
 endingTimeReached ()
 handle endingTimeReached More...
 

Private Attributes

 $cachedQuestionGuis = array()
 
 $cachedQuestionObjects = array()
 

Detailed Description

Output class for assessment test execution.

The ilTestOutputGUI class creates the output for the ilObjTestGUI class when learners execute a test. This saves some heap space because the ilObjTestGUI class will be much smaller then

Author
Björn Heyser bheys.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

ModulesTest

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

Constructor & Destructor Documentation

◆ __construct()

ilTestPlayerAbstractGUI::__construct (   $a_object)

ilTestOutputGUI constructor

Parameters
ilObjTest$a_object

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

References $_GET, $ilUser, and ilTestServiceGUI\$lng.

70  {
71  parent::__construct($a_object);
72  $this->ref_id = $_GET["ref_id"];
73 
74  global $rbacsystem, $ilUser, $lng;
75  require_once 'Modules/Test/classes/class.ilTestPasswordChecker.php';
76  $this->passwordChecker = new ilTestPasswordChecker($rbacsystem, $ilUser, $this->object, $lng);
77 
78  $this->processLocker = null;
79  $this->testSession = null;
80  $this->assSettings = null;
81  }
$_GET["client_id"]
$ilUser
Definition: imgupload.php:18

Member Function Documentation

◆ accessCodeConfirmedCmd()

ilTestPlayerAbstractGUI::accessCodeConfirmedCmd ( )

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

References ilTestPlayerCommands\START_TEST.

524  {
525  $this->ctrl->redirect($this, ilTestPlayerCommands::START_TEST);
526  }

◆ afterTestPassFinishedCmd()

ilTestPlayerAbstractGUI::afterTestPassFinishedCmd ( )
protected

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

References $_GET, isTestSignRedirectRequired(), object, ilUtil\redirect(), REDIRECT_KIOSK, redirectBackCmd(), and ilTestPlayerCommands\SHOW_FINAL_STATMENT.

850  {
851  $activeId = $this->testSession->getActiveId();
852  $lastFinishedPass = $this->testSession->getLastFinishedPass();
853 
854  // handle test signature
855  if ( $this->isTestSignRedirectRequired($activeId, $lastFinishedPass) )
856  {
857  $this->ctrl->redirectByClass('ilTestSignatureGUI', 'invokeSignaturePlugin');
858  }
859 
860  // show final statement
861  if(!$_GET['skipfinalstatement'])
862  {
863  if ($this->object->getShowFinalStatement())
864  {
865  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_FINAL_STATMENT);
866  }
867  }
868 
869  // redirect after test
870  $redirection_mode = $this->object->getRedirectionMode();
871  $redirection_url = $this->object->getRedirectionUrl();
872  if( $redirection_url && $redirection_mode && !$this->object->canViewResults() )
873  {
874  if( $redirection_mode == REDIRECT_KIOSK )
875  {
876  if( $this->object->getKioskMode() )
877  {
878  ilUtil::redirect($redirection_url);
879  }
880  }
881  else
882  {
883  ilUtil::redirect($redirection_url);
884  }
885  }
886 
887  // default redirect (pass overview when enabled, otherwise infoscreen)
888  $this->redirectBackCmd();
889  }
$_GET["client_id"]
isTestSignRedirectRequired($activeId, $lastFinishedPass)
const REDIRECT_KIOSK
Create new PHPExcel object
obj_idprivate
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ archiveParticipantSubmission()

ilTestPlayerAbstractGUI::archiveParticipantSubmission (   $active,
  $pass 
)
protected
Parameters
$active
Returns
void

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

References $file, $filename, ilTestServiceGUI\$ilias, $ilSetting, $pass, $path, $results, $testSequence, ilTestServiceGUI\buildQuestionRelatedObjectivesList(), ilTestArchiver\DIR_SEP, ilTestPDFGenerator\generatePDF(), ilLOTestQuestionAdapter\getInstance(), ilTestServiceGUI\getObjectiveOrientedContainer(), ilUtil\getWebspaceDir(), ilUtil\makeDirParents(), object, and ilTestPDFGenerator\PDF_OUTPUT_FILE.

921  {
922  global $ilObjDataCache;
923 
924  require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
925  $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $ilObjDataCache);
926 
927  $objectivesList = null;
928 
929  if( $this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired() )
930  {
931  $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($this->testSession->getActiveId(), $this->testSession->getPass());
932  $testSequence->loadFromDb();
933  $testSequence->loadQuestions();
934 
935  require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
936  $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($this->testSession);
937 
938  $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence);
939  $objectivesList->loadObjectivesTitles();
940 
941  $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($this->testSession->getObjectiveOrientedContainerId());
942  $testResultHeaderLabelBuilder->setUserId($this->testSession->getUserId());
943  $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
944  $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
945  $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
946  }
947 
948  $results = $this->object->getTestResult(
949  $active, $pass, false, !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
950  );
951 
952  require_once 'class.ilTestEvaluationGUI.php';
953  $testevaluationgui = new ilTestEvaluationGUI($this->object);
954  $results_output = $testevaluationgui->getPassListOfAnswers(
955  $results, $active, $pass, false, false, false, false, false, $objectivesList, $testResultHeaderLabelBuilder
956  );
957 
958  require_once './Modules/Test/classes/class.ilTestArchiver.php';
959  global $ilSetting;
960  $inst_id = $ilSetting->get('inst_id', null);
961  $archiver = new ilTestArchiver($this->object->getId());
962 
963  $path = ilUtil::getWebspaceDir() . '/assessment/'. $this->object->getId() . '/exam_pdf';
964  if (!is_dir($path))
965  {
966  ilUtil::makeDirParents($path);
967  }
968  $filename = realpath($path) . '/exam_N' . $inst_id . '-' . $this->object->getId()
969  . '-' . $active . '-' . $pass . '.pdf';
970 
971  require_once 'class.ilTestPDFGenerator.php';
973  //$template->setVariable("PDF_FILE_LOCATION", $filename);
974  // Participant submission
975  $archiver->handInParticipantSubmission( $active, $pass, $filename, $results_output );
976  //$archiver->handInParticipantMisc( $active, $pass, 'signature_gedoens.sig', $filename );
977  //$archiver->handInParticipantQuestionMaterial( $active, $pass, 123, 'file_upload.pdf', $filename );
978 
979  global $ilias;
980  $questions = $this->object->getQuestions();
981  foreach ($questions as $question_id)
982  {
983  $question_object = $this->object->getQuestionDataset( $question_id );
984  if ($question_object->type_tag == 'assFileUpload')
985  {
986  // Pfad: /data/default/assessment/tst_2/14/21/files/file_14_4_1370417414.png
987  // /data/ - klar
988  // /assessment/ - Konvention
989  // /tst_2/ = /tst_<test_id> (ilObjTest)
990  // /14/ = /<active_fi>/
991  // /21/ = /<question_id>/ (question_object)
992  // /files/ - Konvention
993  // file_14_4_1370417414.png = file_<active_fi>_<pass>_<some timestamp>.<ext>
994 
995  $candidate_path =
996  $ilias->ini_ilias->readVariable( 'server', 'absolute_path' ) . ilTestArchiver::DIR_SEP
997  . $ilias->ini_ilias->readVariable( 'clients', 'path' ) . ilTestArchiver::DIR_SEP
998  . $ilias->client_id . ilTestArchiver::DIR_SEP
999  . 'assessment' . ilTestArchiver::DIR_SEP
1000  . 'tst_' . $this->object->test_id . ilTestArchiver::DIR_SEP
1001  . $active . ilTestArchiver::DIR_SEP
1002  . $question_id . ilTestArchiver::DIR_SEP
1003  . 'files' . ilTestArchiver::DIR_SEP;
1004  $handle = opendir( $candidate_path );
1005  while ($handle !== false && ($file = readdir( $handle )) !== false)
1006  {
1007  if ($file != null)
1008  {
1009  $filename_start = 'file_' . $active . '_' . $pass . '_';
1010 
1011  if (strpos( $file, $filename_start ) === 0)
1012  {
1013  $archiver->handInParticipantQuestionMaterial( $active, $pass, $question_id, $file, $file );
1014  }
1015  }
1016  }
1017  }
1018  }
1019  $passdata = $this->object->getTestResult(
1020  $active, $pass, false, !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
1021  );
1022  $overview = $testevaluationgui->getPassListOfAnswers(
1023  $passdata, $active, $pass, true, false, false, true, false, $objectivesList, $testResultHeaderLabelBuilder
1024  );
1025  $filename = realpath(ilUtil::getWebspaceDir()) . '/assessment/scores-'.$this->object->getId() . '-' . $active . '-' . $pass . '.pdf';
1027  $archiver->handInTestResult($active, $pass, $filename);
1028  unlink($filename);
1029 
1030  return;
1031  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
$path
Definition: aliased.php:25
buildQuestionRelatedObjectivesList(ilLOTestQuestionAdapter $objectivesAdapter, ilTestQuestionSequence $testSequence)
static getInstance(ilTestSession $a_test_session)
Output class for assessment test evaluation.
$results
Class ilTestArchiver.
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
static generatePDF($pdf_output, $output_mode, $filename=null)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ autosaveCmd()

ilTestPlayerAbstractGUI::autosaveCmd ( )

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

References $_POST, $res, $result, canSaveResult(), exit, getAnswerChangedParameter(), getCurrentQuestionId(), isParticipantsAnswerFixed(), ilTestPlayerCommands\REDIRECT_ON_TIME_LIMIT, removeIntermediateSolution(), and saveQuestionSolution().

583  {
584  $canSaveResult = $this->canSaveResult();
585  $authorizedSolution = !$canSaveResult;
586 
587  $result = "";
588  if (is_array($_POST) && count($_POST) > 0)
589  {
590  if( $this->isParticipantsAnswerFixed($this->getCurrentQuestionId()) )
591  {
592  $result = '-IGNORE-';
593  }
594  else
595  {
596 // fau: testNav - delete intermediate solution if answer is unchanged
597  // answer is changed, so save the change as intermediate solution
598  if ($this->getAnswerChangedParameter())
599  {
600  $res = $this->saveQuestionSolution($authorizedSolution, true);
601  }
602  // answer is not changed, so delete an intermediate solution
603  else
604  {
605  $db_res = $this->removeIntermediateSolution();
606  $res = is_int($db_res);
607  }
608 // fau.
609  if ($res)
610  {
611  $result = $this->lng->txt("autosave_success");
612  }
613  else
614  {
615  $result = $this->lng->txt("autosave_failed");
616  }
617  }
618  }
619 // fau: testNav - simplify the redirection if time is reached
620  if (!$canSaveResult && !$this->ctrl->isAsynch())
621  {
622  // this was the last action in the test, saving is no longer allowed
623  // form was directly submitted in saveOnTimeReached()
624  // instead of ajax with autoSave()
625  $this->ctrl->redirect($this, ilTestPlayerCommands::REDIRECT_ON_TIME_LIMIT);
626  }
627 // fau.
628  echo $result;
629  exit;
630  }
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
removeIntermediateSolution()
remove an auto-saved solution of the current question
$result
getAnswerChangedParameter()
Get the &#39;answer changed&#39; status from the current request It may be set by ilTestPlayerNavigationContr...
$_POST["username"]
+ Here is the call graph for this function:

◆ backFromFinishingCmd()

ilTestPlayerAbstractGUI::backFromFinishingCmd ( )

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

References ilTestPlayerCommands\SHOW_QUESTION.

1650  {
1651  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1652  }

◆ backToInfoScreenCmd()

ilTestPlayerAbstractGUI::backToInfoScreenCmd ( )
protected

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

Referenced by ilTestOutputGUI\handleTearsAndAngerNoObjectiveOrientedQuestion(), and redirectBackCmd().

1049  {
1050  $this->ctrl->redirectByClass('ilObjTestGUI', 'redirectToInfoScreen');
1051  }
+ Here is the caller graph for this function:

◆ buildEditableStateQuestionNavigationGUI()

ilTestPlayerAbstractGUI::buildEditableStateQuestionNavigationGUI (   $questionId,
  $charSelectorAvailable 
)
protected

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

References $pass, ilObjTest\_getSolvedQuestions(), ilTestPlayerCommands\CONFIRM_HINT_REQUEST, ilTestPlayerCommands\MARK_QUESTION_SAVE, object, ilTestPlayerCommands\REVERT_CHANGES, ilTestPlayerCommands\SHOW_INSTANT_RESPONSE, ilTestPlayerCommands\SHOW_REQUESTED_HINTS_LIST, ilTestPlayerCommands\SUBMIT_SOLUTION, and ilTestPlayerCommands\UNMARK_QUESTION_SAVE.

Referenced by showQuestionEditable().

2078  {
2079  require_once 'Modules/Test/classes/class.ilTestQuestionNavigationGUI.php';
2080  $navigationGUI = new ilTestQuestionNavigationGUI($this->lng);
2081 
2082  if( $this->object->isForceInstantFeedbackEnabled() )
2083  {
2084  $navigationGUI->setSubmitSolutionCommand(ilTestPlayerCommands::SUBMIT_SOLUTION);
2085  }
2086  else
2087  {
2088 // fau: testNav - use simple "submitSolution" button instead of "submitSolutionAndNext"
2089  $navigationGUI->setSubmitSolutionCommand(ilTestPlayerCommands::SUBMIT_SOLUTION);
2090 // fau.
2091  }
2092 
2093 // fau: testNav - add a 'revert changes' link for editable question
2094  $navigationGUI->setRevertChangesLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::REVERT_CHANGES));
2095 // fau.
2096 
2097 
2098  // feedback
2099  switch( 1 )
2100  {
2101  case $this->object->getSpecificAnswerFeedback():
2102  case $this->object->getGenericAnswerFeedback():
2103  case $this->object->getAnswerFeedbackPoints():
2104  case $this->object->getInstantFeedbackSolution():
2105 
2106  $navigationGUI->setAnswerFreezingEnabled($this->object->isInstantFeedbackAnswerFixationEnabled());
2107 
2108  if( $this->object->isForceInstantFeedbackEnabled() )
2109  {
2110  $navigationGUI->setForceInstantResponseEnabled(true);
2111  $navigationGUI->setInstantFeedbackCommand(ilTestPlayerCommands::SUBMIT_SOLUTION);
2112  }
2113  else
2114  {
2115  $navigationGUI->setInstantFeedbackCommand(ilTestPlayerCommands::SHOW_INSTANT_RESPONSE);
2116  }
2117  }
2118 
2119  // hints
2120  if( $this->object->isOfferingQuestionHintsEnabled() )
2121  {
2122  $activeId = $this->testSession->getActiveId();
2123  $pass = $this->testSession->getPass();
2124 
2125  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
2126  $questionHintTracking = new ilAssQuestionHintTracking($questionId, $activeId, $pass);
2127 
2128  if( $questionHintTracking->requestsPossible() )
2129  {
2130  $navigationGUI->setRequestHintCommand(ilTestPlayerCommands::CONFIRM_HINT_REQUEST);
2131  }
2132 
2133  if( $questionHintTracking->requestsExist() )
2134  {
2135  $navigationGUI->setShowHintsCommand(ilTestPlayerCommands::SHOW_REQUESTED_HINTS_LIST);
2136  }
2137  }
2138 
2139  $navigationGUI->setCharSelectorEnabled($charSelectorAvailable);
2140 
2141  if($this->object->getShowMarker())
2142  {
2143  include_once "./Modules/Test/classes/class.ilObjTest.php";
2144  $solved_array = ilObjTest::_getSolvedQuestions($this->testSession->getActiveId(), $questionId);
2145  $solved = 0;
2146 
2147  if(count($solved_array) > 0)
2148  {
2149  $solved = array_pop($solved_array);
2150  $solved = $solved["solved"];
2151  }
2152 
2153 // fau: testNav - change question mark command to link target
2154  if($solved == 1)
2155  {
2156  $navigationGUI->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::UNMARK_QUESTION_SAVE));
2157  $navigationGUI->setQuestionMarked(true);
2158  }
2159  else
2160  {
2161  $navigationGUI->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::MARK_QUESTION_SAVE));
2162  $navigationGUI->setQuestionMarked(false);
2163  }
2164  }
2165 // fau.
2166  return $navigationGUI;
2167  }
static _getSolvedQuestions($active_id, $question_fi=null)
get solved questions
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFixedShufflerSeed()

ilTestPlayerAbstractGUI::buildFixedShufflerSeed (   $questionId)
protected
Parameters
$questionId
Returns
string

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

References FIXED_SHUFFLER_SEED_MIN_LENGTH.

Referenced by buildQuestionAnswerShuffler().

2827  {
2828  $fixedSeed = $questionId . $this->testSession->getActiveId() . $this->testSession->getPass();
2829 
2831  {
2832  $fixedSeed *= (
2834  );
2835  }
2836 
2837  return $fixedSeed;
2838  }
+ Here is the caller graph for this function:

◆ buildNextButtonInstance()

ilTestPlayerAbstractGUI::buildNextButtonInstance (   $disabled,
  $primaryNext 
)
private
Parameters
bool$disabled
bool$primaryNext
Returns
ilButtonBase|ilLinkButton|ilTestPlayerNavButton

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

References ilTestPlayerNavButton\getInstance(), and ilTestPlayerCommands\NEXT_QUESTION.

Referenced by populateLowerNextButtonBlock(), and populateUpperNextButtonBlock().

319  {
321 // fau: testNav - set glyphicon and primary
322  $button->setPrimary($primaryNext);
323  $button->setRightGlyph('glyphicon glyphicon-arrow-right');
324 // fau.
325  $button->setNextCommand(ilTestPlayerCommands::NEXT_QUESTION);
326  $button->setUrl($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::NEXT_QUESTION));
327  $button->setCaption('next_question');
328  $button->addCSSClass('ilTstNavElem');
329  //$button->setDisabled($disabled);
330  return $button;
331  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPreviousButtonInstance()

ilTestPlayerAbstractGUI::buildPreviousButtonInstance (   $disabled)
private
Parameters
$disabled
Returns
ilTestPlayerNavButton

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

References ilTestPlayerNavButton\getInstance(), and ilTestPlayerCommands\PREVIOUS_QUESTION.

Referenced by populateLowerPreviousButtonBlock(), and populateUpperPreviousButtonBlock().

338  {
340 // fau: testNav - set glyphicon and primary
341  $button->setLeftGlyph('glyphicon glyphicon-arrow-left');
342 // fau.
343  $button->setNextCommand(ilTestPlayerCommands::PREVIOUS_QUESTION);
344  $button->setUrl($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::PREVIOUS_QUESTION));
345  $button->setCaption('previous_question');
346  $button->addCSSClass('ilTstNavElem');
347  //$button->setDisabled($disabled);
348  return $button;
349  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildQuestionAnswerShuffler()

ilTestPlayerAbstractGUI::buildQuestionAnswerShuffler (   $questionId)
protected
Parameters
$questionId
Returns
ilArrayElementShuffler

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

References buildFixedShufflerSeed().

Referenced by getQuestionGuiInstance().

2546  {
2547  require_once 'Services/Randomization/classes/class.ilArrayElementShuffler.php';
2548  $shuffler = new ilArrayElementShuffler();
2549 
2550  $fixedSeed = $this->buildFixedShufflerSeed($questionId);
2551  $shuffler->setSeed($fixedSeed);
2552 
2553  return $shuffler;
2554  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildReadOnlyStateQuestionNavigationGUI()

ilTestPlayerAbstractGUI::buildReadOnlyStateQuestionNavigationGUI (   $questionId)
protected

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

References ilObjTest\_getSolvedQuestions(), ilTestPlayerCommands\EDIT_SOLUTION, isParticipantsAnswerFixed(), ilTestPlayerCommands\MARK_QUESTION, object, and ilTestPlayerCommands\UNMARK_QUESTION.

Referenced by showQuestionViewable().

2040  {
2041  require_once 'Modules/Test/classes/class.ilTestQuestionNavigationGUI.php';
2042  $navigationGUI = new ilTestQuestionNavigationGUI($this->lng);
2043 
2044  if( !$this->isParticipantsAnswerFixed($questionId) )
2045  {
2046  $navigationGUI->setEditSolutionCommand(ilTestPlayerCommands::EDIT_SOLUTION);
2047  }
2048 
2049  if($this->object->getShowMarker())
2050  {
2051  include_once "./Modules/Test/classes/class.ilObjTest.php";
2052  $solved_array = ilObjTest::_getSolvedQuestions($this->testSession->getActiveId(), $questionId);
2053  $solved = 0;
2054 
2055  if(count($solved_array) > 0)
2056  {
2057  $solved = array_pop($solved_array);
2058  $solved = $solved["solved"];
2059  }
2060 // fau: testNav - change question mark command to link target
2061  if($solved == 1)
2062  {
2063  $navigationGUI->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::UNMARK_QUESTION));
2064  $navigationGUI->setQuestionMarked(true);
2065  }
2066  else
2067  {
2068  $navigationGUI->setQuestionMarkLinkTarget($this->ctrl->getLinkTarget($this, ilTestPlayerCommands::MARK_QUESTION));
2069  $navigationGUI->setQuestionMarked(false);
2070  }
2071  }
2072 // fau.
2073 
2074  return $navigationGUI;
2075  }
static _getSolvedQuestions($active_id, $question_fi=null)
get solved questions
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTestPassQuestionList()

ilTestPlayerAbstractGUI::buildTestPassQuestionList ( )
abstractprotected

Referenced by handleSkillTriggering().

+ Here is the caller graph for this function:

◆ cancelAnswerOptionalQuestionsCmd()

ilTestPlayerAbstractGUI::cancelAnswerOptionalQuestionsCmd ( )
protected

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

References object.

1969  {
1970  if( $this->object->getListOfQuestions() )
1971  {
1972  $this->ctrl->setParameter($this, 'activecommand', 'summary');
1973  }
1974  else
1975  {
1976  $this->ctrl->setParameter($this, 'activecommand', 'previous');
1977  }
1978 
1979  $this->ctrl->redirect($this, 'redirectQuestion');
1980  }
Create new PHPExcel object
obj_idprivate

◆ canSaveResult()

ilTestPlayerAbstractGUI::canSaveResult ( )
abstractprotected

Referenced by autosaveCmd(), and removeIntermediateSolution().

+ Here is the caller graph for this function:

◆ checkOnlineTestAccess()

ilTestPlayerAbstractGUI::checkOnlineTestAccess ( )

check access restrictions like client ip, partipating user etc.

check access restrictions like client ip, partipating user etc.

public

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

References $_SERVER, $ilUser, and ilUtil\sendInfo().

1362  {
1363  global $ilUser;
1364 
1365  // check if user is invited to participate
1366  $user = $this->object->getInvitedUsers($ilUser->getId());
1367  if (!is_array ($user) || count($user)!=1)
1368  {
1369  ilUtil::sendInfo($this->lng->txt("user_not_invited"), true);
1370  $this->ctrl->redirectByClass("ilobjtestgui", "backToRepository");
1371  }
1372 
1373  $user = array_pop($user);
1374  // check if client ip is set and if current remote addr is equal to stored client-ip
1375  if (strcmp($user["clientip"],"")!=0 && strcmp($user["clientip"],$_SERVER["REMOTE_ADDR"])!=0)
1376  {
1377  ilUtil::sendInfo($this->lng->txt("user_wrong_clientip"), true);
1378  $this->ctrl->redirectByClass("ilobjtestgui", "backToRepository");
1379  }
1380  }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ checkReadAccess()

ilTestPlayerAbstractGUI::checkReadAccess ( )
protected

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

Referenced by ilTestOutputGUI\executeCommand().

84  {
85  global $rbacsystem;
86 
87  if(!$rbacsystem->checkAccess("read", $this->object->getRefId()))
88  {
89  // only with read access it is possible to run the test
90  $this->ilias->raiseError($this->lng->txt("cannot_execute_test"), $this->ilias->error_obj->MESSAGE);
91  }
92  }
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the caller graph for this function:

◆ checkTestExecutable()

ilTestPlayerAbstractGUI::checkTestExecutable ( )
protected

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

References ilUtil\sendInfo().

Referenced by ilTestOutputGUI\executeCommand().

95  {
96  $executable = $this->object->isExecutable($this->testSession, $this->testSession->getUserId());
97 
98  if( !$executable['executable'] )
99  {
100  ilUtil::sendInfo($executable['errormessage'], true);
101  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
102  }
103  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkTestSessionUser()

ilTestPlayerAbstractGUI::checkTestSessionUser ( ilTestSession  $testSession)
protected

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

References $DIC, and ilTestSession\getUserId().

Referenced by ilTestOutputGUI\executeCommand(), and ilTestPlayerDynamicQuestionSetGUI\executeCommand().

106  {
107  global $DIC; /* @var ILIAS\DI\Container $DIC */
108 
109  if( $testSession->getUserId() != $DIC->user()->getId() )
110  {
111  throw new ilTestException('active id given does not relate to current user!');
112  }
113  }
Base Exception for all Exceptions relating to Modules/Test.
global $DIC
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmAnswerOptionalQuestionsCmd()

ilTestPlayerAbstractGUI::confirmAnswerOptionalQuestionsCmd ( )
protected

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

1960  {
1961  $this->testSequence->setAnsweringOptionalQuestionsConfirmed(true);
1962  $this->testSequence->saveToDb();
1963 
1964  $this->ctrl->setParameter($this, 'activecommand', 'gotoquestion');
1965  $this->ctrl->redirect($this, 'redirectQuestion');
1966  }

◆ confirmFinishCmd()

ilTestPlayerAbstractGUI::confirmFinishCmd ( )
protected

The final submission of a test was confirmed.

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

References $ilUser, ilTestPlayerCommands\BACK_FROM_FINISHING, finishTestCmd(), and populateHelperGuiContent().

723  {
724  $this->finishTestCmd(false);
725  }
finishTestCmd($requires_confirmation=true)
+ Here is the call graph for this function:

◆ confirmHintRequestCmd()

ilTestPlayerAbstractGUI::confirmHintRequestCmd ( )
protected

Go to hint request confirmation.

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

References ilAssQuestionHintRequestGUI\CMD_CONFIRM_REQUEST, handleIntermediateSubmit(), handleQuestionActionCmd(), isFirstQuestionInSequence(), isLastQuestionInSequence(), nextQuestionCmd(), previousQuestionCmd(), and showInstantResponseCmd().

1811  {
1812 // fau: testNav - handle intermediate submit for confirming hint requests
1813  $this->handleIntermediateSubmit();
1814 // fau.
1815 
1816  $this->ctrl->setParameter($this, 'pmode', self::PRESENTATION_MODE_EDIT);
1817 
1818  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
1819  $this->ctrl->redirectByClass('ilAssQuestionHintRequestGUI', ilAssQuestionHintRequestGUI::CMD_CONFIRM_REQUEST);
1820  }
handleIntermediateSubmit()
Check the &#39;answer changed&#39; parameter when a question form is intermediately submitted.
+ 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 1434 of file class.ilTestPlayerAbstractGUI.php.

References getContentBlockName(), and object.

1435  {
1436  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_submit_answers_confirm.html", "Modules/Test");
1437  $this->tpl->setCurrentBlock("adm_content");
1438  if ($this->object->isTestFinished($this->testSession->getActiveId()))
1439  {
1440  $this->tpl->setCurrentBlock("not_submit_allowed");
1441  $this->tpl->setVariable("TEXT_ALREADY_SUBMITTED", $this->lng->txt("tst_already_submitted"));
1442  $this->tpl->setVariable("BTN_OK", $this->lng->txt("tst_show_answer_sheet"));
1443  } else
1444  {
1445  $this->tpl->setCurrentBlock("submit_allowed");
1446  $this->tpl->setVariable("TEXT_CONFIRM_SUBMIT_RESULTS", $this->lng->txt("tst_confirm_submit_answers"));
1447  $this->tpl->setVariable("BTN_OK", $this->lng->txt("tst_submit_results"));
1448  }
1449  $this->tpl->setVariable("BTN_BACK", $this->lng->txt("back"));
1450  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "finalSubmission"));
1451  $this->tpl->parseCurrentBlock();
1452  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
Create new PHPExcel object
obj_idprivate
+ 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 638 of file class.ilTestPlayerAbstractGUI.php.

References $result, array, exit, getCurrentQuestionId(), and getQuestionInstance().

639  {
640  $questionId = $this->getCurrentQuestionId();
641  $state = $this->getQuestionInstance($questionId)->lookupForExistingSolutions(
642  $this->testSession->getActiveId(),
643  $this->testSession->getPass()
644  );
645  $result = array();
646  $result['isAnswered'] = $state['authorized'];
647  $result['isAnswerChanged'] = $state['intermediate'];
648 
649  echo json_encode($result);
650  exit;
651  }
$result
Create styles array
The data for the language used.
getQuestionInstance($questionId, $fromCache=true)
+ Here is the call graph for this function:

◆ determineInlineScoreDisplay()

ilTestPlayerAbstractGUI::determineInlineScoreDisplay ( )
protected

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

References object.

Referenced by populateInstantResponseBlocks().

231  {
232  $show_question_inline_score = FALSE;
233  if ($this->object->getAnswerFeedbackPoints())
234  {
235  $show_question_inline_score = TRUE;
236  return $show_question_inline_score;
237  }
238  return $show_question_inline_score;
239  }
Create new PHPExcel object
obj_idprivate
+ Here is the caller graph for this function:

◆ determineSolutionPassIndex()

ilTestPlayerAbstractGUI::determineSolutionPassIndex ( assQuestionGUI  $questionGui)
protected

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

References ilObjTest\_getUsePreviousAnswers(), editSolutionCmd(), showQuestionCmd(), and submitSolutionCmd().

Referenced by showQuestionEditable().

1303  {
1304  require_once './Modules/Test/classes/class.ilObjTest.php';
1305 
1306  if( ilObjTest::_getUsePreviousAnswers($this->testSession->getActiveId(), true) )
1307  {
1308  $currentSolutionAvailable = $questionGui->object->authorizedOrIntermediateSolutionExists(
1309  $this->testSession->getActiveId(), $this->testSession->getPass()
1310  );
1311 
1312  if( !$currentSolutionAvailable )
1313  {
1314  $previousPass = $questionGui->object->getSolutionMaxPass(
1315  $this->testSession->getActiveId()
1316  );
1317 
1318  $previousSolutionAvailable = $questionGui->object->authorizedSolutionExists(
1319  $this->testSession->getActiveId(), $previousPass
1320  );
1321 
1322  if( $previousSolutionAvailable )
1323  {
1324  return $previousPass;
1325  }
1326  }
1327  }
1328 
1329  return $this->testSession->getPass();
1330  }
static _getUsePreviousAnswers($active_id, $user_active_user_setting=false)
Returns if the previous results should be hidden for a learner.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ discardSolutionCmd()

ilTestPlayerAbstractGUI::discardSolutionCmd ( )
abstractprotected

Referenced by revertChangesCmd().

+ Here is the caller graph for this function:

◆ displayAccessCodeCmd()

ilTestPlayerAbstractGUI::displayAccessCodeCmd ( )

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

References ilTestPlayerCommands\ACCESS_CODE_CONFIRMED, and getContentBlockName().

512  {
513  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_anonymous_code_presentation.html", "Modules/Test");
514  $this->tpl->setCurrentBlock("adm_content");
515  $this->tpl->setVariable("TEXT_ANONYMOUS_CODE_CREATED", $this->lng->txt("tst_access_code_created"));
516  $this->tpl->setVariable("TEXT_ANONYMOUS_CODE", $this->testSession->getAccessCodeFromSession());
517  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
518  $this->tpl->setVariable("CMD_CONFIRM", ilTestPlayerCommands::ACCESS_CODE_CONFIRMED);
519  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("continue_work"));
520  $this->tpl->parseCurrentBlock();
521  }
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 ( )
abstractprotected

Referenced by determineSolutionPassIndex().

+ Here is the caller graph for this function:

◆ endingTimeReached()

ilTestPlayerAbstractGUI::endingTimeReached ( )
private

handle endingTimeReached

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

References ilDatePresentation\formatDate(), IL_CAL_UNIX, object, redirectBackCmd(), and ilUtil\sendInfo().

Referenced by prepareTestPage().

1408  {
1409  ilUtil::sendInfo(sprintf($this->lng->txt("detail_ending_time_reached"), ilDatePresentation::formatDate(new ilDateTime($this->object->getEndingTime(), IL_CAL_UNIX))));
1410  $this->testSession->increasePass();
1411  $this->testSession->setLastSequence(0);
1412  $this->testSession->saveToDb();
1413 
1414  $this->redirectBackCmd();
1415  }
const IL_CAL_UNIX
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureExistingTestSession()

ilTestPlayerAbstractGUI::ensureExistingTestSession ( ilTestSession  $testSession)
protected

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

References $ilUser, ilTestSession\doesAccessCodeInSessionExists(), ilTestSession\getAccessCodeFromSession(), ilTestSession\getActiveId(), ilTestSession\isAnonymousUser(), ilTestSession\saveToDb(), ilTestSession\setAnonymousId(), and ilTestSession\setUserId().

Referenced by ilTestOutputGUI\executeCommand(), and ilTestPlayerDynamicQuestionSetGUI\executeCommand().

116  {
117  if( $testSession->getActiveId() )
118  {
119  return;
120  }
121 
122  global $ilUser;
123 
124  $testSession->setUserId($ilUser->getId());
125 
126  if( $testSession->isAnonymousUser() )
127  {
128  if( !$testSession->doesAccessCodeInSessionExists() )
129  {
130  return;
131  }
132 
133  $testSession->setAnonymousId($testSession->getAccessCodeFromSession());
134  }
135 
136  $testSession->saveToDb();
137  }
setAnonymousId($anonymous_id)
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ finishTestCmd()

ilTestPlayerAbstractGUI::finishTestCmd (   $requires_confirmation = true)

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

References $_GET, $_SESSION, ilObjTest\_getPass(), ilTestPlayerCommands\AFTER_TEST_PASS_FINISHED, ilObjTest\allObligationsAnswered(), object, performTestPassFinishedTasks(), ilTestPlayerCommands\QUESTION_SUMMARY_INC_OBLIGATIONS, and ilTestPlayerCommands\QUESTION_SUMMARY_OBLIGATIONS_ONLY.

Referenced by confirmFinishCmd().

748  {
749  global $ilAuth;
750 
751  unset($_SESSION["tst_next"]);
752 
753  $active_id = $this->testSession->getActiveId();
754  $actualpass = ilObjTest::_getPass($active_id);
755 
756  $allObligationsAnswered = ilObjTest::allObligationsAnswered($this->testSession->getTestId(), $active_id, $actualpass);
757 
758  /*
759  * The following "endgames" are possible prior to actually finishing the test:
760  * - Obligations (Ability to finish the test.)
761  * If not all obligatory questions are answered, the user is presented a list
762  * showing the deficits.
763  * - Examview (Will to finish the test.)
764  * With the examview, the participant can review all answers given in ILIAS or a PDF prior to
765  * commencing to the finished test.
766  * - Last pass allowed (Reassuring the will to finish the test.)
767  * If passes are limited, on the last pass, an additional confirmation is to be displayed.
768  */
769 
770 
771  if( $this->object->areObligationsEnabled() && !$allObligationsAnswered )
772  {
773  if( $this->object->getListOfQuestions() )
774  {
775  $this->ctrl->redirect($this, ilTestPlayerCommands::QUESTION_SUMMARY_INC_OBLIGATIONS);
776  }
777  else
778  {
779  $this->ctrl->redirect($this, ilTestPlayerCommands::QUESTION_SUMMARY_OBLIGATIONS_ONLY);
780  }
781 
782  return;
783  }
784 
785  // Examview enabled & !reviewed & requires_confirmation? test_submission_overview (review gui)
786  if ($this->object->getEnableExamview() && !isset($_GET['reviewed']) && $requires_confirmation)
787  {
788  $this->ctrl->redirectByClass('ilTestSubmissionReviewGUI', "show");
789  return;
790  }
791 
792  // Last try in limited tries & !confirmed
793  if (($requires_confirmation) && ($actualpass == $this->object->getNrOfTries() - 1))
794  {
795  // show confirmation page
796  return $this->confirmFinishTestCmd();
797  }
798 
799  // Last try in limited tries & confirmed?
800  if(($actualpass == $this->object->getNrOfTries() - 1) && (!$requires_confirmation))
801  {
802  // @todo: php7 ask mister test
803  #$ilAuth->setIdle(ilSession::getIdleValue(), false);
804  #$ilAuth->setExpire(0);
805  switch($this->object->getMailNotification())
806  {
807  case 1:
808  $this->object->sendSimpleNotification($active_id);
809  break;
810  case 2:
811  $this->object->sendAdvancedNotification($active_id);
812  break;
813  }
814  }
815 
816  // Non-last try finish
817  if(!$_SESSION['tst_pass_finish'])
818  {
819  if(!$_SESSION['tst_pass_finish']) $_SESSION['tst_pass_finish'] = 1;
820  if($this->object->getMailNotificationType() == 1)
821  {
822  switch($this->object->getMailNotification())
823  {
824  case 1:
825  $this->object->sendSimpleNotification($active_id);
826  break;
827  case 2:
828  $this->object->sendAdvancedNotification($active_id);
829  break;
830  }
831  }
832  }
833 
834  // no redirect request loops after test pass finished tasks has been performed
835 
836  $this->performTestPassFinishedTasks($actualpass);
837 
838  $this->ctrl->redirect($this, ilTestPlayerCommands::AFTER_TEST_PASS_FINISHED);
839  }
static allObligationsAnswered($test_id, $active_id, $pass)
checks wether all questions marked as obligatory were answered within the test pass with given testId...
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
$_SESSION["AccountId"]
$_GET["client_id"]
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAnswerChangedParameter()

ilTestPlayerAbstractGUI::getAnswerChangedParameter ( )
protected

Get the 'answer changed' status from the current request It may be set by ilTestPlayerNavigationControl.js or by a previousRequest.

Returns
bool

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

References $_GET.

Referenced by autosaveCmd(), ilTestOutputGUI\executeCommand(), ilTestPlayerDynamicQuestionSetGUI\executeCommand(), handleIntermediateSubmit(), populateNavWhenChangedModal(), and ilTestOutputGUI\showInstantResponseCmd().

2413  {
2414  return !empty($_GET['test_answer_changed']);
2415  }
$_GET["client_id"]
+ 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 1771 of file class.ilTestPlayerAbstractGUI.php.

References object.

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

1772  {
1773  if ($this->object->getKioskMode())
1774  {
1775  $this->tpl->setBodyClass("kiosk");
1776  $this->tpl->setAddFooter(FALSE);
1777  return "CONTENT";
1778  }
1779  else
1780  {
1781  return "ADM_CONTENT";
1782  }
1783  }
Create new PHPExcel object
obj_idprivate
+ Here is the caller graph for this function:

◆ getCurrentQuestionId()

ilTestPlayerAbstractGUI::getCurrentQuestionId ( )
abstractprotected

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

+ Here is the caller graph for this function:

◆ getCurrentSequenceElement()

ilTestPlayerAbstractGUI::getCurrentSequenceElement ( )
protected

◆ getFinishTestCommand()

ilTestPlayerAbstractGUI::getFinishTestCommand ( )
protected
Returns
string

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

References ilObjTest\allObligationsAnswered(), and object.

Referenced by getTestNavigationToolbarGUI().

2173  {
2174  if( !$this->object->getListOfQuestionsEnd() )
2175  {
2176  return 'finishTest';
2177  }
2178 
2179  if( $this->object->areObligationsEnabled() )
2180  {
2181  $allObligationsAnswered = ilObjTest::allObligationsAnswered(
2182  $this->testSession->getTestId(), $this->testSession->getActiveId(), $this->testSession->getPass()
2183  );
2184 
2185  if( !$allObligationsAnswered )
2186  {
2187  return 'outQuestionSummaryWithObligationsInfo';
2188  }
2189  }
2190 
2191  return 'outQuestionSummary';
2192  }
static allObligationsAnswered($test_id, $active_id, $pass)
checks wether all questions marked as obligatory were answered within the test pass with given testId...
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstantResponseParameter()

ilTestPlayerAbstractGUI::getInstantResponseParameter ( )
protected

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

References $_GET.

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2367  {
2368  if( isset($_GET['instresp']) )
2369  {
2370  return $_GET['instresp'];
2371  }
2372 
2373  return null;
2374  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ getIntroductionPageButtonLabel()

ilTestPlayerAbstractGUI::getIntroductionPageButtonLabel ( )
protected
Returns
string

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

1906  {
1907  return $this->lng->txt("save_introduction");
1908  }

◆ getKioskHead()

ilTestPlayerAbstractGUI::getKioskHead ( )

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

References $ilUser, ilObjTest\buildExamId(), and object.

Referenced by outQuestionSummaryCmd(), and populateKioskHead().

1067  {
1068  global $ilUser;
1069 
1070  $template = new ilTemplate('tpl.il_as_tst_kiosk_head.html', true, true, 'Modules/Test');
1071  if ($this->object->getShowKioskModeTitle())
1072  {
1073  $template->setCurrentBlock("kiosk_show_title");
1074  $template->setVariable("TEST_TITLE", $this->object->getTitle());
1075  $template->parseCurrentBlock();
1076  }
1077  if ($this->object->getShowKioskModeParticipant())
1078  {
1079  $template->setCurrentBlock("kiosk_show_participant");
1080  $template->setVariable("PARTICIPANT_NAME_TXT", $this->lng->txt("login_as"));
1081  $template->setVariable("PARTICIPANT_NAME", $ilUser->getFullname());
1082  $template->setVariable("PARTICIPANT_LOGIN", $ilUser->getLogin());
1083  $template->setVariable("PARTICIPANT_MATRICULATION", $ilUser->getMatriculation());
1084  $template->setVariable("PARTICIPANT_EMAIL", $ilUser->getEmail());
1085  $template->parseCurrentBlock();
1086  }
1087  if ($this->object->isShowExamIdInTestPassEnabled())
1088  {
1089  $exam_id = ilObjTest::buildExamId(
1090  $this->testSession->getActiveId() , $this->testSession->getPass(), $this->object->getId()
1091  );
1092 
1093  $template->setCurrentBlock("kiosk_show_exam_id");
1094  $template->setVariable("EXAM_ID_TXT", $this->lng->txt("exam_id"));
1095  $template->setVariable( "EXAM_ID", $exam_id);
1096  $template->parseCurrentBlock();
1097  }
1098  return $template->get();
1099  }
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
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:

◆ getLockParameter()

ilTestPlayerAbstractGUI::getLockParameter ( )

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

References $_GET, $_POST, and resumePlayerCmd().

Referenced by handlePasswordProtectionRedirect(), and startPlayerCmd().

468  {
469  if( isset($_POST['lock']) && strlen($_POST['lock']) )
470  {
471  return $_POST['lock'];
472  }
473  elseif( isset($_GET['lock']) && strlen($_GET['lock']) )
474  {
475  return $_GET['lock'];
476  }
477 
478  return null;
479  }
$_GET["client_id"]
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNavigationUrlParameter()

ilTestPlayerAbstractGUI::getNavigationUrlParameter ( )
protected

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

References $_POST.

Referenced by ilTestPlayerDynamicQuestionSetGUI\showInstantResponseCmd(), ilTestOutputGUI\showInstantResponseCmd(), ilTestPlayerDynamicQuestionSetGUI\submitSolutionCmd(), and ilTestOutputGUI\submitSolutionCmd().

2398  {
2399  if (isset($_POST['test_player_navigation_url'])) {
2400  return $_POST['test_player_navigation_url'];
2401  }
2402  return null;
2403  }
$_POST["username"]
+ Here is the caller graph for this function:

◆ getNextCommandParameter()

ilTestPlayerAbstractGUI::getNextCommandParameter ( )
protected

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

References $_POST.

Referenced by ilTestPlayerDynamicQuestionSetGUI\submitSolutionCmd(), and ilTestOutputGUI\submitSolutionCmd().

2377  {
2378  if( isset($_POST['nextcmd']) && strlen($_POST['nextcmd']) )
2379  {
2380  return $_POST['nextcmd'];
2381  }
2382 
2383  return null;
2384  }
$_POST["username"]
+ Here is the caller graph for this function:

◆ getNextSequenceParameter()

ilTestPlayerAbstractGUI::getNextSequenceParameter ( )
protected

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

References $_POST.

Referenced by ilTestPlayerDynamicQuestionSetGUI\submitSolutionCmd(), and ilTestOutputGUI\submitSolutionCmd().

2387  {
2388  if( isset($_POST['nextseq']) && is_numeric($_POST['nextseq']) )
2389  {
2390  return (int)$_POST['nextseq'];
2391  }
2392 
2393  return null;
2394  }
$_POST["username"]
+ Here is the caller graph for this function:

◆ getPresentationModeParameter()

ilTestPlayerAbstractGUI::getPresentationModeParameter ( )
protected

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

References $_GET.

2357  {
2358  if( isset($_GET['pmode']) )
2359  {
2360  return $_GET['pmode'];
2361  }
2362 
2363  return null;
2364  }
$_GET["client_id"]

◆ getQuestionGuiInstance()

ilTestPlayerAbstractGUI::getQuestionGuiInstance (   $questionId,
  $fromCache = true 
)
protected
Parameters
$questionId
$sequenceElement
Returns
object

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

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

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2470  {
2471  global $tpl;
2472 
2473  if( !$fromCache || !isset($this->cachedQuestionGuis[$questionId]) )
2474  {
2475  $questionGui = $this->object->createQuestionGUI("", $questionId);
2476  $questionGui->setTargetGui($this);
2477  $questionGui->setPresentationContext(assQuestionGUI::PRESENTATION_CONTEXT_TEST);
2478  $questionGui->object->setObligationsToBeConsidered($this->object->areObligationsEnabled());
2479  $questionGui->populateJavascriptFilesRequiredForWorkForm($tpl);
2480  $questionGui->object->setOutputType(OUTPUT_JAVASCRIPT);
2481  $questionGui->object->setShuffler($this->buildQuestionAnswerShuffler($questionId));
2482 
2483  // hey: prevPassSolutions - determine solution pass index and configure gui accordingly
2484  $this->initTestQuestionConfig($questionGui->object);
2485  // hey.
2486 
2487  $this->cachedQuestionGuis[$questionId] = $questionGui;
2488  }
2489 
2490  return $this->cachedQuestionGuis[$questionId];
2491  }
const OUTPUT_JAVASCRIPT
initTestQuestionConfig(assQuestion $questionOBJ)
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionInstance()

ilTestPlayerAbstractGUI::getQuestionInstance (   $questionId,
  $fromCache = true 
)
protected
Parameters
$questionId
Returns
assQuestion

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

References $assSettings, $ilDB, $ilUser, ilObjAssessmentFolder\_enabledAssessmentLogging(), assQuestion\_instantiateQuestion(), initTestQuestionConfig(), object, and OUTPUT_JAVASCRIPT.

Referenced by detectChangesCmd(), ilTestPlayerDynamicQuestionSetGUI\discardSolutionCmd(), ilTestOutputGUI\discardSolutionCmd(), removeIntermediateSolution(), ilTestOutputGUI\saveQuestionSolution(), ilTestPlayerDynamicQuestionSetGUI\submitSolutionAndNextCmd(), and ilTestPlayerDynamicQuestionSetGUI\submitSolutionCmd().

2503  {
2504  global $ilDB, $ilUser;
2505 
2506  if( !$fromCache || !isset($this->cachedQuestionObjects[$questionId]) )
2507  {
2508  $questionOBJ = assQuestion::_instantiateQuestion($questionId);
2509 
2510  $assSettings = new ilSetting('assessment');
2511  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionProcessLockerFactory.php';
2512  $processLockerFactory = new ilAssQuestionProcessLockerFactory($assSettings, $ilDB);
2513  $processLockerFactory->setQuestionId($questionOBJ->getId());
2514  $processLockerFactory->setUserId($ilUser->getId());
2515  include_once ("./Modules/Test/classes/class.ilObjAssessmentFolder.php");
2516  $processLockerFactory->setAssessmentLogEnabled(ilObjAssessmentFolder::_enabledAssessmentLogging());
2517  $questionOBJ->setProcessLocker($processLockerFactory->getLocker());
2518 
2519  $questionOBJ->setObligationsToBeConsidered($this->object->areObligationsEnabled());
2520  $questionOBJ->setOutputType(OUTPUT_JAVASCRIPT);
2521 
2522  // hey: prevPassSolutions - determine solution pass index and configure gui accordingly
2523  $this->initTestQuestionConfig($questionOBJ);
2524  // hey.
2525 
2526  $this->cachedQuestionObjects[$questionId] = $questionOBJ;
2527  }
2528 
2529  return $this->cachedQuestionObjects[$questionId];
2530  }
ILIAS Setting Class.
const OUTPUT_JAVASCRIPT
initTestQuestionConfig(assQuestion $questionOBJ)
static _enabledAssessmentLogging()
check wether assessment logging is enabled or not
$ilUser
Definition: imgupload.php:18
static _instantiateQuestion($question_id)
Create new PHPExcel object
obj_idprivate
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionsDefaultPresentationMode()

ilTestPlayerAbstractGUI::getQuestionsDefaultPresentationMode (   $isQuestionWorkedThrough)
protected

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

2816  {
2817 // fau: testNav - always set default presentation mode to "edit"
2818  return self::PRESENTATION_MODE_EDIT;
2819 // fau.
2820  }

◆ getRegisteredForcedFeedbackNavUrl()

ilTestPlayerAbstractGUI::getRegisteredForcedFeedbackNavUrl ( )
protected

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

References $_SESSION.

Referenced by isForcedFeedbackNavUrlRegistered(), ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2851  {
2852  if( !isset($_SESSION['forced_feedback_navigation_url']) )
2853  {
2854  return null;
2855  }
2856 
2857  if( !isset($_SESSION['forced_feedback_navigation_url'][$this->testSession->getActiveId()]) )
2858  {
2859  return null;
2860  }
2861 
2862  return $_SESSION['forced_feedback_navigation_url'][$this->testSession->getActiveId()];
2863  }
$_SESSION["AccountId"]
+ Here is the caller graph for this function:

◆ getSequenceElementParameter()

ilTestPlayerAbstractGUI::getSequenceElementParameter ( )
protected

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

References $_GET.

Referenced by getCurrentSequenceElement(), and ilTestPlayerDynamicQuestionSetGUI\getQuestionIdParameter().

2347  {
2348  if( isset($_GET['sequence']) )
2349  {
2350  return $_GET['sequence'];
2351  }
2352 
2353  return null;
2354  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ getTestNavigationToolbarGUI()

ilTestPlayerAbstractGUI::getTestNavigationToolbarGUI ( )
protected

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

References $ilUser, getFinishTestCommand(), and object.

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2024  {
2025  global $ilUser;
2026 
2027  require_once 'Modules/Test/classes/class.ilTestNavigationToolbarGUI.php';
2028  $navigationToolbarGUI = new ilTestNavigationToolbarGUI($this->ctrl, $this->lng, $this);
2029 
2030  $navigationToolbarGUI->setSuspendTestButtonEnabled($this->object->getShowCancel());
2031  $navigationToolbarGUI->setQuestionTreeButtonEnabled($this->object->getListOfQuestions());
2032  $navigationToolbarGUI->setQuestionTreeVisible($ilUser->getPref('side_list_of_questions'));
2033  $navigationToolbarGUI->setQuestionListButtonEnabled($this->object->getListOfQuestions());
2034  $navigationToolbarGUI->setFinishTestCommand($this->getFinishTestCommand());
2035 
2036  return $navigationToolbarGUI;
2037  }
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleIntermediateSubmit()

ilTestPlayerAbstractGUI::handleIntermediateSubmit ( )
protected

Check the 'answer changed' parameter when a question form is intermediately submitted.

  • save or delete the intermediate solution
  • save the parameter for the next request

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

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

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

2433  {
2434  if ($this->getAnswerChangedParameter())
2435  {
2436  $this->saveQuestionSolution(false);
2437  }
2438  else
2439  {
2440  $this->removeIntermediateSolution();
2441  }
2443  }
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
removeIntermediateSolution()
remove an auto-saved solution of the current question
setAnswerChangedParameter($changed=true)
Set the &#39;answer changed&#39; url parameter for generated links.
getAnswerChangedParameter()
Get the &#39;answer changed&#39; status from the current request It may be set by ilTestPlayerNavigationContr...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlePasswordProtectionRedirect()

ilTestPlayerAbstractGUI::handlePasswordProtectionRedirect ( )
protected

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

References getLockParameter().

Referenced by ilTestOutputGUI\executeCommand(), and ilTestPlayerDynamicQuestionSetGUI\executeCommand().

1869  {
1870  if( $this->ctrl->getNextClass() == 'iltestpasswordprotectiongui' )
1871  {
1872  return;
1873  }
1874 
1875  if( !$this->passwordChecker->isPasswordProtectionPageRedirectRequired() )
1876  {
1877  return;
1878  }
1879 
1880  $this->ctrl->setParameter($this, 'lock', $this->getLockParameter());
1881 
1882  $nextCommand = $this->ctrl->getCmdClass().'::'.$this->ctrl->getCmd();
1883  $this->ctrl->setParameterByClass('ilTestPasswordProtectionGUI', 'nextCommand', $nextCommand);
1884  $this->ctrl->redirectByClass('ilTestPasswordProtectionGUI', 'showPasswordForm');
1885  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleQuestionActionCmd()

ilTestPlayerAbstractGUI::handleQuestionActionCmd ( )
abstractprotected

Referenced by confirmHintRequestCmd().

+ Here is the caller graph for this function:

◆ handleSkillTriggering()

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

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

References buildTestPassQuestionList(), ilObjAssessmentFolder\DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER, ilTestSession\getActiveId(), ilTestSession\getPass(), ilTestSession\getUserId(), object, and ilTestSkillEvaluation\setUserId().

Referenced by ilTestOutputGUI\saveQuestionSolution(), and ilTestPlayerDynamicQuestionSetGUI\saveQuestionSolution().

1919  {
1920  $questionList = $this->buildTestPassQuestionList();
1921  $questionList->load();
1922 
1923  $testResults = $this->object->getTestResult($testSession->getActiveId(), $testSession->getPass(), true);
1924 
1925  require_once 'Modules/Test/classes/class.ilTestSkillEvaluation.php';
1926  $skillEvaluation = new ilTestSkillEvaluation($this->db, $this->object->getTestId(), $this->object->getRefId());
1927 
1928  $skillEvaluation->setUserId($testSession->getUserId());
1929  $skillEvaluation->setActiveId($testSession->getActiveId());
1930  $skillEvaluation->setPass($testSession->getPass());
1931 
1932  $skillEvaluation->setNumRequiredBookingsForSkillTriggering($this->assSettings->get(
1933  'ass_skl_trig_num_answ_barrier', ilObjAssessmentFolder::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
1934  ));
1935 
1936 
1937  $skillEvaluation->init($questionList);
1938  $skillEvaluation->evaluate($testResults);
1939 
1940  $skillEvaluation->handleSkillTriggering();
1941  }
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleTearsAndAngerQuestionIsNull()

ilTestPlayerAbstractGUI::handleTearsAndAngerQuestionIsNull (   $questionId,
  $sequenceElement 
)
protected
Parameters
$sequence
$questionId
$ilLog

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

References $ilLog, and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2562  {
2563  global $ilLog;
2564 
2565  $ilLog->write("INV SEQ:"
2566  ."active={$this->testSession->getActiveId()} "
2567  ."qId=$questionId seq=$sequenceElement "
2568  . serialize($this->testSequence)
2569  );
2570 
2571  $ilLog->logStack('INV SEQ');
2572 
2573  $this->ctrl->setParameter($this, 'sequence', $this->testSequence->getFirstSequence());
2574  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
2575  }
+ Here is the caller graph for this function:

◆ handleUserSettings()

ilTestPlayerAbstractGUI::handleUserSettings ( )

Handles some form parameters on starting and resuming a test.

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

References $_POST, $ilUser, and object.

Referenced by ilTestPlayerDynamicQuestionSetGUI\resumePlayerCmd(), ilTestOutputGUI\resumePlayerCmd(), and startPlayerCmd().

532  {
533  global $ilUser;
534 
535  if ($_POST["chb_javascript"])
536  {
537  $ilUser->writePref("tst_javascript", 1);
538  }
539  else
540  {
541  $ilUser->writePref("tst_javascript", 0);
542  }
543 
544  // hide previous results
545  if ($this->object->getNrOfTries() != 1)
546  {
547  if ($this->object->getUsePreviousAnswers() == 1)
548  {
549  if ($_POST["chb_use_previous_answers"])
550  {
551  $ilUser->writePref("tst_use_previous_answers", 1);
552  }
553  else
554  {
555  $ilUser->writePref("tst_use_previous_answers", 0);
556  }
557  }
558  }
559  }
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the caller graph for this function:

◆ initAssessmentSettings()

ilTestPlayerAbstractGUI::initAssessmentSettings ( )
protected

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

Referenced by ilTestOutputGUI\executeCommand(), and ilTestPlayerDynamicQuestionSetGUI\executeCommand().

1911  {
1912  $this->assSettings = new ilSetting('assessment');
1913  }
ILIAS Setting Class.
+ Here is the caller graph for this function:

◆ initProcessLocker()

ilTestPlayerAbstractGUI::initProcessLocker (   $activeId)
protected

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

References $ilDB.

Referenced by ilTestOutputGUI\executeCommand(), and ilTestPlayerDynamicQuestionSetGUI\executeCommand().

140  {
141  global $ilDB;
142 
143  require_once 'Modules/Test/classes/class.ilTestProcessLockerFactory.php';
144  $processLockerFactory = new ilTestProcessLockerFactory($this->assSettings, $ilDB);
145 
146  $processLockerFactory->setActiveId($activeId);
147 
148  $this->processLocker = $processLockerFactory->getLocker();
149  }
global $ilDB
+ 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 489 of file class.ilTestPlayerAbstractGUI.php.

References ilTestPlayerCommands\DISPLAY_ACCESS_CODE, object, showMaximumAllowedUsersReachedMessage(), and ilTestPlayerCommands\START_TEST.

490  {
491  if ($this->object->checkMaximumAllowedUsers() == FALSE)
492  {
494  }
495 
496  if( $this->testSession->isAnonymousUser() && !$this->testSession->getActiveId() )
497  {
498  $accessCode = $this->testSession->createNewAccessCode();
499 
500  $this->testSession->setAccessCodeToSession($accessCode);
501  $this->testSession->setAnonymousId($accessCode);
502  $this->testSession->saveToDb();
503 
504  $this->ctrl->redirect($this, ilTestPlayerCommands::DISPLAY_ACCESS_CODE);
505  }
506 
507  $this->testSession->unsetAccessCodeInSession();
508  $this->ctrl->redirect($this, ilTestPlayerCommands::START_TEST);
509  }
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ initTestPageTemplate()

ilTestPlayerAbstractGUI::initTestPageTemplate ( )
protected

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

References getContentBlockName().

Referenced by prepareTestPage().

1848  {
1849  $this->tpl->addBlockFile(
1850  $this->getContentBlockName(), 'adm_content', 'tpl.il_as_tst_output.html', 'Modules/Test'
1851  );
1852  }
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:

◆ initTestQuestionConfig()

ilTestPlayerAbstractGUI::initTestQuestionConfig ( assQuestion  $questionOBJ)
protected

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

References assQuestion\getTestPresentationConfig(), and object.

Referenced by getQuestionGuiInstance(), and getQuestionInstance().

2534  {
2535  $questionOBJ->getTestPresentationConfig()->setPreviousPassSolutionReuseAllowed(
2536  $this->object->isPreviousSolutionReuseEnabled( $this->testSession->getActiveId() )
2537  );
2538  }
Create new PHPExcel object
obj_idprivate
getTestPresentationConfig()
Get the test question configuration (initialised once)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFirstQuestionInSequence()

ilTestPlayerAbstractGUI::isFirstQuestionInSequence (   $sequenceElement)
abstractprotected

Referenced by confirmHintRequestCmd(), and populateQuestionNavigation().

+ Here is the caller graph for this function:

◆ isForcedFeedbackNavUrlRegistered()

ilTestPlayerAbstractGUI::isForcedFeedbackNavUrlRegistered ( )
protected

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

References getRegisteredForcedFeedbackNavUrl().

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2866  {
2867  return !empty($this->getRegisteredForcedFeedbackNavUrl());
2868  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isLastQuestionInSequence()

ilTestPlayerAbstractGUI::isLastQuestionInSequence (   $sequenceElement)
abstractprotected

Referenced by confirmHintRequestCmd(), and populateQuestionNavigation().

+ Here is the caller graph for this function:

◆ isMaxProcessingTimeReached()

ilTestPlayerAbstractGUI::isMaxProcessingTimeReached ( )

Checks wheather the maximum processing time is reached or not.

Checks wheather the maximum processing time is reached or not

Returns
bool TRUE if the maximum processing time is reached, FALSE otherwise

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

References $ilUser.

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

216  {
217  global $ilUser;
218  $active_id = $this->testSession->getActiveId();
219  $starting_time = $this->object->getStartingTimeOfUser($active_id);
220  if ($starting_time === FALSE)
221  {
222  return FALSE;
223  }
224  else
225  {
226  return $this->object->isMaxProcessingTimeReached($starting_time, $active_id);
227  }
228  }
$ilUser
Definition: imgupload.php:18
+ Here is the caller graph for this function:

◆ isNrOfTriesReached()

ilTestPlayerAbstractGUI::isNrOfTriesReached ( )

nr of tries exceeded

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

Referenced by ilTestOutputGUI\canSaveResult(), and isTestAccessible().

1398  {
1399  return $this->object->hasNrOfTriesRestriction() && $this->object->isNrOfTriesReached($this->testSession->getPass());
1400  }
+ Here is the caller graph for this function:

◆ isOptionalQuestionAnsweringConfirmationRequired()

ilTestPlayerAbstractGUI::isOptionalQuestionAnsweringConfirmationRequired (   $sequenceElement)
abstractprotected

Referenced by prepareTestPage().

+ Here is the caller graph for this function:

◆ isParticipantsAnswerFixed()

ilTestPlayerAbstractGUI::isParticipantsAnswerFixed (   $questionId)
protected

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

References object.

Referenced by autosaveCmd(), buildReadOnlyStateQuestionNavigationGUI(), ilTestOutputGUI\handleQuestionActionCmd(), ilTestPlayerDynamicQuestionSetGUI\handleQuestionActionCmd(), ilTestPlayerDynamicQuestionSetGUI\showInstantResponseCmd(), ilTestOutputGUI\showInstantResponseCmd(), ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

1888  {
1889  if( !$this->object->isInstantFeedbackAnswerFixationEnabled() )
1890  {
1891  return false;
1892  }
1893 
1894  if( !$this->testSequence->isQuestionChecked($questionId) )
1895  {
1896  return false;
1897  }
1898 
1899  return true;
1900  }
Create new PHPExcel object
obj_idprivate
+ Here is the caller graph for this function:

◆ isQuestionSummaryFinishTestButtonRequired()

ilTestPlayerAbstractGUI::isQuestionSummaryFinishTestButtonRequired ( )
abstractprotected

Referenced by outQuestionSummaryCmd(), and showSideList().

+ Here is the caller graph for this function:

◆ isShowingPostponeStatusReguired()

ilTestPlayerAbstractGUI::isShowingPostponeStatusReguired (   $questionId)
abstractprotected

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

+ 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 1386 of file class.ilTestPlayerAbstractGUI.php.

References isMaxProcessingTimeReached(), and isNrOfTriesReached().

1387  {
1388  return !$this->isNrOfTriesReached()
1390  and $this->object->startingTimeReached()
1391  and !$this->object->endingTimeReached();
1392  }
endingTimeReached()
handle endingTimeReached
isMaxProcessingTimeReached()
Checks wheather the maximum processing time is reached or not.
+ Here is the call graph for this function:

◆ isTestSignRedirectRequired()

ilTestPlayerAbstractGUI::isTestSignRedirectRequired (   $activeId,
  $lastFinishedPass 
)
protected

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

References ilSession\get(), IL_COMP_MODULE, and object.

Referenced by afterTestPassFinishedCmd().

892  {
893  if( !$this->object->getSignSubmission() )
894  {
895  return false;
896  }
897 
898  if( !is_null(ilSession::get("signed_{$activeId}_{$lastFinishedPass}")) )
899  {
900  return false;
901  }
902 
903  global $ilPluginAdmin;
904 
905  $activePlugins = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_MODULE, 'Test', 'tsig');
906 
907  if( !count($activePlugins) )
908  {
909  return false;
910  }
911 
912  return true;
913  }
static get($a_var)
Get a value.
const IL_COMP_MODULE
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ markQuestionAndSaveIntermediateCmd()

ilTestPlayerAbstractGUI::markQuestionAndSaveIntermediateCmd ( )
protected

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

References handleIntermediateSubmit(), and markQuestionCmd().

676  {
677 // fau: testNav - handle intermediate submit when marking the question
678  $this->handleIntermediateSubmit();
679 // fau.
680  $this->markQuestionCmd();
681  }
markQuestionCmd()
Set a question solved.
handleIntermediateSubmit()
Check the &#39;answer changed&#39; parameter when a question form is intermediately submitted.
+ Here is the call graph for this function:

◆ markQuestionCmd()

ilTestPlayerAbstractGUI::markQuestionCmd ( )
protected

Set a question solved.

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

References getCurrentSequenceElement(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by markQuestionAndSaveIntermediateCmd().

687  {
688  $questionId = $this->testSequence->getQuestionForSequence(
690  );
691 
692  $this->object->setQuestionSetSolved(1, $questionId, $this->testSession->getUserId());
693 
694  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
695  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maxProcessingTimeReached()

ilTestPlayerAbstractGUI::maxProcessingTimeReached ( )

Outputs a message when the maximum processing time is reached.

Outputs a message when the maximum processing time is reached

public

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

References suspendTestCmd().

Referenced by prepareTestPage().

1425  {
1426  $this->suspendTestCmd();
1427  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nextQuestionCmd()

ilTestPlayerAbstractGUI::nextQuestionCmd ( )
abstractprotected

Referenced by confirmHintRequestCmd().

+ Here is the caller graph for this function:

◆ outCorrectSolution()

ilTestPlayerAbstractGUI::outCorrectSolution ( )

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

public

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

References $_GET, ilObjStyleSheet\getContentStylePath(), ilTestServiceGUI\getCorrectSolutionOutput(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), and object.

1660  {
1661  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_correct_solution.html", "Modules/Test");
1662 
1663  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1664  $this->tpl->setCurrentBlock("ContentStyle");
1665  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
1666  $this->tpl->parseCurrentBlock();
1667 
1668  $this->tpl->setCurrentBlock("SyntaxStyle");
1669  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
1670  $this->tpl->parseCurrentBlock();
1671 
1672  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1673  if ($this->object->getShowSolutionAnswersOnly())
1674  {
1675  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1676  }
1677 
1678  $this->tpl->setCurrentBlock("adm_content");
1679  $solution = $this->getCorrectSolutionOutput($_GET["evaluation"], $_GET["active_id"], $_GET["pass"]);
1680  $this->tpl->setVariable("OUTPUT_SOLUTION", $solution);
1681  $this->tpl->setVariable("TEXT_BACK", $this->lng->txt("back"));
1682  $this->ctrl->saveParameter($this, "pass");
1683  $this->ctrl->saveParameter($this, "active_id");
1684  $this->tpl->setVariable("URL_BACK", $this->ctrl->getLinkTarget($this, "outUserResultsOverview"));
1685  $this->tpl->parseCurrentBlock();
1686  }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
getCorrectSolutionOutput($question_id, $active_id, $pass, ilTestQuestionRelatedObjectivesList $objectivesList=null)
Returns an output of the solution to an answer compared to the correct solution.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ outObligationsOnlySummaryCmd()

ilTestPlayerAbstractGUI::outObligationsOnlySummaryCmd ( )

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

References outQuestionSummaryCmd().

1633  {
1634  return $this->outQuestionSummaryCmd(true, true, true, true);
1635  }
outQuestionSummaryCmd($fullpage=true, $contextFinishTest=false, $obligationsNotAnswered=false, $obligationsFilter=false)
Output of a summary of all test questions for test participants.
+ Here is the call graph for this function:

◆ outProcessingTime()

ilTestPlayerAbstractGUI::outProcessingTime (   $active_id)

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

References $ilUser, ilDatePresentation\formatDate(), IL_CAL_FKT_GETDATE, IL_CAL_TIMESTAMP, IL_CAL_UNIX, object, and time.

Referenced by outQuestionSummaryCmd(), prepareTestPage(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionSelectionCmd().

1455  {
1456  global $ilUser;
1457 
1458  $starting_time = $this->object->getStartingTimeOfUser($active_id);
1459  $processing_time = $this->object->getProcessingTimeInSeconds($active_id);
1460  $processing_time_minutes = floor($processing_time / 60);
1461  $processing_time_seconds = $processing_time - $processing_time_minutes * 60;
1462  $str_processing_time = "";
1463  if ($processing_time_minutes > 0)
1464  {
1465  $str_processing_time = $processing_time_minutes . " " . ($processing_time_minutes == 1 ? $this->lng->txt("minute") : $this->lng->txt("minutes"));
1466  }
1467  if ($processing_time_seconds > 0)
1468  {
1469  if (strlen($str_processing_time) > 0) $str_processing_time .= " " . $this->lng->txt("and") . " ";
1470  $str_processing_time .= $processing_time_seconds . " " . ($processing_time_seconds == 1 ? $this->lng->txt("second") : $this->lng->txt("seconds"));
1471  }
1472  $time_left = $starting_time + $processing_time - time();
1473  $time_left_minutes = floor($time_left / 60);
1474  $time_left_seconds = $time_left - $time_left_minutes * 60;
1475  $str_time_left = "";
1476  if ($time_left_minutes > 0)
1477  {
1478  $str_time_left = $time_left_minutes . " " . ($time_left_minutes == 1 ? $this->lng->txt("minute") : $this->lng->txt("minutes"));
1479  }
1480  if ($time_left < 300)
1481  {
1482  if ($time_left_seconds > 0)
1483  {
1484  if (strlen($str_time_left) > 0) $str_time_left .= " " . $this->lng->txt("and") . " ";
1485  $str_time_left .= $time_left_seconds . " " . ($time_left_seconds == 1 ? $this->lng->txt("second") : $this->lng->txt("seconds"));
1486  }
1487  }
1488  $date = getdate($starting_time);
1489  $formattedStartingTime = ilDatePresentation::formatDate(new ilDateTime($date,IL_CAL_FKT_GETDATE));
1490  $datenow = getdate();
1491  $this->tpl->setCurrentBlock("enableprocessingtime");
1492  $this->tpl->setVariable("USER_WORKING_TIME",
1493  sprintf(
1494  $this->lng->txt("tst_time_already_spent"),
1495  $formattedStartingTime,
1496  $str_processing_time
1497  )
1498  );
1499  $this->tpl->setVariable("USER_REMAINING_TIME", sprintf($this->lng->txt("tst_time_already_spent_left"), $str_time_left));
1500  $this->tpl->parseCurrentBlock();
1501  $template = new ilTemplate("tpl.workingtime.js.html", TRUE, TRUE, 'Modules/Test');
1502  $template->setVariable("STRING_MINUTE", $this->lng->txt("minute"));
1503  $template->setVariable("STRING_MINUTES", $this->lng->txt("minutes"));
1504  $template->setVariable("STRING_SECOND", $this->lng->txt("second"));
1505  $template->setVariable("STRING_SECONDS", $this->lng->txt("seconds"));
1506  $template->setVariable("STRING_TIMELEFT", $this->lng->txt("tst_time_already_spent_left"));
1507  $template->setVariable("AND", strtolower($this->lng->txt("and")));
1508  $template->setVariable("YEAR", $date["year"]);
1509  $template->setVariable("MONTH", $date["mon"]-1);
1510  $template->setVariable("DAY", $date["mday"]);
1511  $template->setVariable("HOUR", $date["hours"]);
1512  $template->setVariable("MINUTE", $date["minutes"]);
1513  $template->setVariable("SECOND", $date["seconds"]);
1514  if ($this->object->isEndingTimeEnabled() )
1515  {
1516  $date_time = new ilDateTime($this->object->getEndingTime(), IL_CAL_UNIX);
1517  preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $date_time->get(IL_CAL_TIMESTAMP), $matches);
1518  $template->setVariable("ENDYEAR", $matches[1]);
1519  $template->setVariable("ENDMONTH", $matches[2]-1);
1520  $template->setVariable("ENDDAY", $matches[3]);
1521  $template->setVariable("ENDHOUR", $matches[4]);
1522  $template->setVariable("ENDMINUTE", $matches[5]);
1523  $template->setVariable("ENDSECOND", $matches[6]);
1524  }
1525  $template->setVariable("YEARNOW", $datenow["year"]);
1526  $template->setVariable("MONTHNOW", $datenow["mon"]-1);
1527  $template->setVariable("DAYNOW", $datenow["mday"]);
1528  $template->setVariable("HOURNOW", $datenow["hours"]);
1529  $template->setVariable("MINUTENOW", $datenow["minutes"]);
1530  $template->setVariable("SECONDNOW", $datenow["seconds"]);
1531  $template->setVariable("PTIME_M", $processing_time_minutes);
1532  $template->setVariable("PTIME_S", $processing_time_seconds);
1533 
1534  $this->tpl->setCurrentBlock("HeadContent");
1535  $this->tpl->setVariable("CONTENT_BLOCK", $template->get());
1536  $this->tpl->parseCurrentBlock();
1537  }
const IL_CAL_UNIX
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
$ilUser
Definition: imgupload.php:18
const IL_CAL_FKT_GETDATE
Create new PHPExcel object
obj_idprivate
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
const IL_CAL_TIMESTAMP
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionSummaryCmd()

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

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

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

References $_GET, getContentBlockName(), getKioskHead(), isQuestionSummaryFinishTestButtonRequired(), object, outProcessingTime(), and ilUtil\sendFailure().

Referenced by outObligationsOnlySummaryCmd(), and outQuestionSummaryWithObligationsInfoCmd().

1574  {
1575  if( $fullpage )
1576  {
1577  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_question_summary.html", "Modules/Test");
1578  }
1579 
1580  if( $obligationsNotAnswered )
1581  {
1582  ilUtil::sendFailure($this->lng->txt('not_all_obligations_answered'));
1583  }
1584 
1585  if( $this->object->getKioskMode() && $fullpage )
1586  {
1587  $head = $this->getKioskHead();
1588  if( strlen($head) )
1589  {
1590  $this->tpl->setCurrentBlock("kiosk_options");
1591  $this->tpl->setVariable("KIOSK_HEAD", $head);
1592  $this->tpl->parseCurrentBlock();
1593  }
1594  }
1595 
1596 
1597  $active_id = $this->testSession->getActiveId();
1598  $questionSummaryData = $this->service->getQuestionSummaryData($this->testSequence, $obligationsFilter);
1599 
1600  $this->ctrl->setParameter($this, "sequence", $_GET["sequence"]);
1601 
1602  if( $fullpage )
1603  {
1604  include_once "./Modules/Test/classes/tables/class.ilListOfQuestionsTableGUI.php";
1605  $table_gui = new ilListOfQuestionsTableGUI($this, 'showQuestion');
1606 
1607  $table_gui->setShowPointsEnabled( !$this->object->getTitleOutput() );
1608  $table_gui->setShowMarkerEnabled( $this->object->getShowMarker() );
1609  $table_gui->setObligationsNotAnswered( $obligationsNotAnswered );
1610  $table_gui->setShowObligationsEnabled( $this->object->areObligationsEnabled() );
1611  $table_gui->setObligationsFilterEnabled( $obligationsFilter );
1612  $table_gui->setFinishTestButtonEnabled($this->isQuestionSummaryFinishTestButtonRequired());
1613 
1614  $table_gui->init();
1615 
1616  $table_gui->setData($questionSummaryData);
1617 
1618  $this->tpl->setVariable('TABLE_LIST_OF_QUESTIONS', $table_gui->getHTML());
1619 
1620  if( $this->object->getEnableProcessingTime() )
1621  {
1622  $this->outProcessingTime($active_id);
1623  }
1624  }
1625  }
$_GET["client_id"]
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionSummaryWithObligationsInfoCmd()

ilTestPlayerAbstractGUI::outQuestionSummaryWithObligationsInfoCmd ( )

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

References outQuestionSummaryCmd().

1628  {
1629  return $this->outQuestionSummaryCmd(true, true, true, false);
1630  }
outQuestionSummaryCmd($fullpage=true, $contextFinishTest=false, $obligationsNotAnswered=false, $obligationsFilter=false)
Output of a summary of all test questions for test participants.
+ Here is the call graph for this function:

◆ outUserResultsOverviewCmd()

ilTestPlayerAbstractGUI::outUserResultsOverviewCmd ( )

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

References array.

1786  {
1787  $this->ctrl->redirectByClass(
1788  array('ilRepositoryGUI', 'ilObjTestGUI', 'ilTestEvaluationGUI'), "outUserResultsOverview"
1789  );
1790  }
Create styles array
The data for the language used.

◆ performTestPassFinishedTasks()

ilTestPlayerAbstractGUI::performTestPassFinishedTasks (   $finishedPass)
protected

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

References ilTestPassFinishTasks\performFinishTasks().

Referenced by finishTestCmd(), and redirectAfterAutosaveCmd().

842  {
843  require_once 'Modules/Test/classes/class.ilTestPassFinishTasks.php';
844 
845  $finishTasks = new ilTestPassFinishTasks($this->testSession->getActiveId(), $this->object->getId());
846  $finishTasks->performFinishTasks($this->processLocker);
847  }
Class ilTestPassFinishTasks.
performFinishTasks(ilTestProcessLocker $processLocker)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateCharSelectorIfRequired()

ilTestPlayerAbstractGUI::populateCharSelectorIfRequired ( )
protected
Returns
bool $charSelectorAvailable

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

References $ilSetting, ilCharSelectorGUI\_getCurrentGUI(), and ilCharSelectorConfig\ENABLED.

Referenced by showQuestionEditable().

2002  {
2003  global $ilSetting;
2004 
2005  if ($ilSetting->get('char_selector_availability') > 0)
2006  {
2007  require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
2008  $char_selector = ilCharSelectorGUI::_getCurrentGUI($this->object);
2009  if ($char_selector->getConfig()->getAvailability() == ilCharSelectorConfig::ENABLED)
2010  {
2011  $char_selector->addToPage();
2012  $this->tpl->setCurrentBlock('char_selector');
2013  $this->tpl->setVariable("CHAR_SELECTOR_TEMPLATE", $char_selector->getSelectorHtml());
2014  $this->tpl->parseCurrentBlock();
2015 
2016  return true;
2017  }
2018  }
2019 
2020  return false;
2021  }
static _getCurrentGUI(ilObjTest $a_test_obj=null)
Get the GUI that is used for the currently available selector (other GUI instances may exist for conf...
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateContentStyleBlock()

ilTestPlayerAbstractGUI::populateContentStyleBlock ( )
protected

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

References ilObjStyleSheet\getContentStylePath().

Referenced by prepareTestPage().

412  {
413  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
414  $this->tpl->setCurrentBlock( "ContentStyle" );
415  $this->tpl->setVariable( "LOCATION_CONTENT_STYLESHEET",
417  );
418  $this->tpl->parseCurrentBlock();
419  }
static getContentStylePath($a_style_id)
get content style path
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateDiscardSolutionModal()

ilTestPlayerAbstractGUI::populateDiscardSolutionModal ( )
protected

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

References ilTestServiceGUI\$tpl, ilTestPlayerCommands\DISCARD_SOLUTION, ilSubmitButton\getInstance(), ilLinkButton\getInstance(), and ilModalGUI\getInstance().

Referenced by populateModals().

2611  {
2612  $tpl = new ilTemplate('tpl.tst_player_confirmation_modal.html', true, true, 'Modules/Test');
2613 
2614  $tpl->setVariable('CONFIRMATION_TEXT', $this->lng->txt('discard_answer_confirmation'));
2615 
2616  $button = ilSubmitButton::getInstance();
2617  $button->setCommand(ilTestPlayerCommands::DISCARD_SOLUTION);
2618  $button->setCaption('discard_answer');
2619  $tpl->setCurrentBlock('buttons');
2620  $tpl->setVariable('BUTTON', $button->render());
2621  $tpl->parseCurrentBlock();
2622 
2623  $button = ilLinkButton::getInstance();
2624  $button->setId('tst_cancel_discard_button');
2625  $button->setCaption('cancel');
2626  $button->setPrimary(true);
2627  $tpl->setCurrentBlock('buttons');
2628  $tpl->setVariable('BUTTON', $button->render());
2629  $tpl->parseCurrentBlock();
2630 
2631  $modal = ilModalGUI::getInstance();
2632  $modal->setId('tst_discard_solution_modal');
2633  $modal->setHeading($this->lng->txt('discard_answer'));
2634  $modal->setBody($tpl->get());
2635 
2636  $this->tpl->setCurrentBlock('discard_solution_modal');
2637  $this->tpl->setVariable('DISCARD_SOLUTION_MODAL', $modal->getHTML());
2638  $this->tpl->parseCurrentBlock();
2639 
2640 // fau: testNav - the discard solution modal is now handled by ilTestPlayerNavigationControl.js
2641 // $this->tpl->addJavaScript('Modules/Test/js/ilTestPlayerDiscardSolutionModal.js', true);
2642 // fau.
2643  }
special template class to simplify handling of ITX/PEAR
static getInstance()
Get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateGenericFeedbackBlock()

ilTestPlayerAbstractGUI::populateGenericFeedbackBlock ( assQuestionGUI  $question_gui,
  $solutionCorrect 
)
protected

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

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

Referenced by populateInstantResponseBlocks().

364  {
365  $feedback = $question_gui->getGenericFeedbackOutput( $this->testSession->getActiveId(),NULL);
366 
367  if( strlen($feedback) )
368  {
369  $cssClass = ( $solutionCorrect ?
371  );
372 
373  $this->tpl->setCurrentBlock( "answer_feedback" );
374  $this->tpl->setVariable( "ANSWER_FEEDBACK", $feedback);
375  $this->tpl->setVariable( "ILC_FB_CSS_CLASS", $cssClass);
376  $this->tpl->parseCurrentBlock();
377  }
378  }
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
+ 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 1985 of file class.ilTestPlayerAbstractGUI.php.

References getContentBlockName(), and object.

Referenced by confirmFinishCmd(), and showAnswerOptionalQuestionsConfirmation().

1986  {
1987  if($this->object->getKioskMode())
1988  {
1989  $this->tpl->addBlockfile($this->getContentBlockName(), 'content', "tpl.il_as_tst_kiosk_mode_content.html", "Modules/Test");
1990  $this->tpl->setContent($this->ctrl->getHTML($helperGui));
1991  }
1992  else
1993  {
1994  $this->tpl->setVariable($this->getContentBlockName(), $this->ctrl->getHTML($helperGui));
1995  }
1996  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateInstantResponseBlocks()

ilTestPlayerAbstractGUI::populateInstantResponseBlocks ( assQuestionGUI  $questionGui,
  $authorizedSolution 
)
protected
Parameters
assQuestionGUI$questionGui

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

References determineInlineScoreDisplay(), assQuestionGUI\getSolutionOutput(), object, populateGenericFeedbackBlock(), populateScoreBlock(), populateSolutionBlock(), and populateSpecificFeedbackBlock().

Referenced by populateInstantResponseModal(), ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2279  {
2280  // This controls if the solution should be shown.
2281  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Solutions"
2282  if($this->object->getInstantFeedbackSolution())
2283  {
2284  $show_question_inline_score = $this->determineInlineScoreDisplay();
2285 
2286  // Notation of the params prior to getting rid of this crap in favor of a class
2287  $solutionoutput = $questionGui->getSolutionOutput($this->testSession->getActiveId(), #active_id
2288  NULL, #pass
2289  FALSE, #graphical_output
2290  $show_question_inline_score, #result_output
2291  FALSE, #show_question_only
2292  FALSE, #show_feedback
2293  TRUE, #show_correct_solution
2294  FALSE, #show_manual_scoring
2295  FALSE #show_question_text
2296  );
2297  $this->populateSolutionBlock($solutionoutput);
2298  }
2299 
2300  $reachedPoints = $questionGui->object->getAdjustedReachedPoints(
2301  $this->testSession->getActiveId(), NULL, $authorizedSolution
2302  );
2303 
2304  $maxPoints = $questionGui->object->getMaximumPoints();
2305 
2306  $solutionCorrect = ($reachedPoints == $maxPoints);
2307 
2308  // This controls if the score should be shown.
2309  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Results (Only Points)"
2310  if($this->object->getAnswerFeedbackPoints())
2311  {
2312  $this->populateScoreBlock($reachedPoints, $maxPoints);
2313  }
2314 
2315  // This controls if the generic feedback should be shown.
2316  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Solutions"
2317  if($this->object->getGenericAnswerFeedback())
2318  {
2319  $this->populateGenericFeedbackBlock($questionGui, $solutionCorrect);
2320  }
2321 
2322  // This controls if the specific feedback should be shown.
2323  // It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Answer-Specific Feedback"
2324  if($this->object->getSpecificAnswerFeedback())
2325  {
2326  $this->populateSpecificFeedbackBlock($questionGui);
2327  }
2328  }
getSolutionOutput( $active_id, $pass=NULL, $graphicalOutput=FALSE, $result_output=FALSE, $show_question_only=TRUE, $show_feedback=FALSE, $show_correct_solution=FALSE, $show_manual_scoring=FALSE, $show_question_text=TRUE)
populateGenericFeedbackBlock(assQuestionGUI $question_gui, $solutionCorrect)
Create new PHPExcel object
obj_idprivate
populateScoreBlock($reachedPoints, $maxPoints)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateInstantResponseModal()

ilTestPlayerAbstractGUI::populateInstantResponseModal ( assQuestionGUI  $questionGui,
  $navUrl 
)
protected
Parameters
assQuestionGUI$questionGui

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

References ilTestServiceGUI\$tpl, ilLinkButton\getInstance(), ilModalGUI\getInstance(), assQuestionGUI\getQuestionHeaderBlockBuilder(), assQuestionGUI\getSolutionOutput(), isShowingPostponeStatusReguired(), assQuestionGUI\outQuestionPage(), populateInstantResponseBlocks(), assQuestionGUI\setNavigationGUI(), and ilModalGUI\TYPE_LARGE.

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2219  {
2220  $questionGui->setNavigationGUI(null);
2221  $questionGui->getQuestionHeaderBlockBuilder()->setQuestionAnswered(true);
2222 
2223  $answerFeedbackEnabled = $this->object->getSpecificAnswerFeedback();
2224 
2225  $solutionoutput = $questionGui->getSolutionOutput(
2226  $this->testSession->getActiveId(), #active_id
2227  $this->testSession->getPass(), #pass
2228  false, #graphical_output
2229  false, #result_output
2230  true, #show_question_only
2231  $answerFeedbackEnabled, #show_feedback
2232  false, #show_correct_solution
2233  false, #show_manual_scoring
2234  true #show_question_text
2235  );
2236 
2237  $pageoutput = $questionGui->outQuestionPage(
2238  "",
2239  $this->isShowingPostponeStatusReguired($questionGui->object->getId()),
2240  $this->testSession->getActiveId(),
2241  $solutionoutput
2242  );
2243 
2244  $tpl = new ilTemplate('tpl.tst_player_response_modal.html', true, true, 'Modules/Test');
2245 
2246  // populate the instant response blocks in the
2247  $saved_tpl = $this->tpl;
2248  $this->tpl = $tpl;
2249  $this->populateInstantResponseBlocks($questionGui, true);
2250  $this->tpl = $saved_tpl;
2251 
2252  $tpl->setVariable('QUESTION_OUTPUT', $pageoutput);
2253 
2254  $button = ilLinkButton::getInstance();
2255  $button->setId('tst_confirm_feedback');
2256  $button->setUrl($navUrl);
2257  $button->setCaption('proceed');
2258  $button->setPrimary(true);
2259  $tpl->setVariable('BUTTON', $button->render());
2260 
2261 
2262  require_once('Services/UIComponent/Modal/classes/class.ilModalGUI.php');
2263  $modal = ilModalGUI::getInstance();
2264  $modal->setType(ilModalGUI::TYPE_LARGE);
2265  $modal->setId('tst_question_feedback_modal');
2266  $modal->setHeading($this->lng->txt('tst_instant_feedback'));
2267  $modal->setBody($tpl->get());
2268 
2269  $this->tpl->addOnLoadCode("$('#tst_question_feedback_modal').modal('show');");
2270  $this->tpl->setVariable('INSTANT_RESPONSE_MODAL', $modal->getHTML());
2271  }
getSolutionOutput( $active_id, $pass=NULL, $graphicalOutput=FALSE, $result_output=FALSE, $show_question_only=TRUE, $show_feedback=FALSE, $show_correct_solution=FALSE, $show_manual_scoring=FALSE, $show_question_text=TRUE)
populateInstantResponseBlocks(assQuestionGUI $questionGui, $authorizedSolution)
special template class to simplify handling of ITX/PEAR
isShowingPostponeStatusReguired($questionId)
static getInstance()
Get instance.
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
setNavigationGUI($navigationGUI)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateKioskHead()

ilTestPlayerAbstractGUI::populateKioskHead ( )
protected

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

References getKioskHead(), and ilUtil\sendInfo().

Referenced by prepareSummaryPage(), and prepareTestPage().

1855  {
1856  ilUtil::sendInfo(); // ???
1857 
1858  $head = $this->getKioskHead();
1859 
1860  if (strlen($head))
1861  {
1862  $this->tpl->setCurrentBlock("kiosk_options");
1863  $this->tpl->setVariable("KIOSK_HEAD", $head);
1864  $this->tpl->parseCurrentBlock();
1865  }
1866  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateLowerNextButtonBlock()

ilTestPlayerAbstractGUI::populateLowerNextButtonBlock (   $disabled,
  $primaryNext 
)
protected

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

References buildNextButtonInstance().

Referenced by populateNextButtons().

274  {
275  $button = $this->buildNextButtonInstance($disabled, $primaryNext);
276  $button->setId('bottomnextbutton');
277 
278  $this->tpl->setCurrentBlock( "next_bottom" );
279  $this->tpl->setVariable( "BTN_NEXT", $button->render());
280  $this->tpl->parseCurrentBlock();
281  }
buildNextButtonInstance($disabled, $primaryNext)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateLowerPreviousButtonBlock()

ilTestPlayerAbstractGUI::populateLowerPreviousButtonBlock (   $disabled)
protected

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

References buildPreviousButtonInstance().

Referenced by populatePreviousButtons().

294  {
295  $button = $this->buildPreviousButtonInstance($disabled);
296  $button->setId('bottomprevbutton');
297 
298  $this->tpl->setCurrentBlock( "prev_bottom" );
299  $this->tpl->setVariable("BTN_PREV", $button->render());
300  $this->tpl->parseCurrentBlock();
301  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateMessageContent()

ilTestPlayerAbstractGUI::populateMessageContent (   $contentHTML)
protected
Parameters
$contentHTML

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

References getContentBlockName(), and object.

Referenced by ilTestPlayerDynamicQuestionSetGUI\showCheckedQuestionResettingConfirmation().

2581  {
2582  if($this->object->getKioskMode())
2583  {
2584  $this->tpl->addBlockfile($this->getContentBlockName(), 'content', "tpl.il_as_tst_kiosk_mode_content.html", "Modules/Test");
2585  $this->tpl->setContent($contentHTML);
2586  }
2587  else
2588  {
2589  $this->tpl->setVariable($this->getContentBlockName(), $contentHTML);
2590  }
2591  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateModals()

ilTestPlayerAbstractGUI::populateModals ( )
protected

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

References object, populateDiscardSolutionModal(), and populateNavWhenChangedModal().

Referenced by showQuestionEditable().

2594  {
2595  require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
2596  require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
2597  require_once 'Services/UIComponent/Modal/classes/class.ilModalGUI.php';
2598 
2600 // fau: testNav - populateNavWhenChangedModal instead of populateNavWhileEditModal
2601  $this->populateNavWhenChangedModal();
2602 // fau.
2603 
2604  if( $this->object->getKioskMode() )
2605  {
2606  $this->tpl->addJavaScript('Services/UICore/lib/bootstrap-3.2.0/dist/js/bootstrap.min.js', true);
2607  }
2608  }
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateNavWhenChangedModal()

ilTestPlayerAbstractGUI::populateNavWhenChangedModal ( )
protected

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

References $_SESSION, $config, $text, ilTestServiceGUI\$tpl, array, ilTestPlayerCommands\AUTO_SAVE, ilTestPlayerCommands\DETECT_CHANGES, getAnswerChangedParameter(), ilLinkButton\getInstance(), ilModalGUI\getInstance(), and object.

Referenced by populateModals().

2704  {
2705  if (!empty($_SESSION['save_on_navigation_prevent_confirmation']))
2706  {
2707  return;
2708  }
2709 
2710  $tpl = new ilTemplate('tpl.tst_player_confirmation_modal.html', true, true, 'Modules/Test');
2711 
2712  if ($this->object->isInstantFeedbackAnswerFixationEnabled() && $this->object->isForceInstantFeedbackEnabled())
2713  {
2714  $text = $this->lng->txt('save_on_navigation_locked_confirmation');
2715  }
2716  else
2717  {
2718  $text = $this->lng->txt('save_on_navigation_confirmation');
2719  }
2720  if ($this->object->isForceInstantFeedbackEnabled())
2721  {
2722  $text .= " ". $this->lng->txt('save_on_navigation_forced_feedback_hint');
2723  }
2724  $tpl->setVariable('CONFIRMATION_TEXT', $text);
2725 
2726 
2727  $button = ilLinkButton::getInstance();
2728  $button->setId('tst_save_on_navigation_button');
2729  $button->setUrl('#');
2730  $button->setCaption('tst_save_and_proceed');
2731  $button->setPrimary(true);
2732  $tpl->setCurrentBlock('buttons');
2733  $tpl->setVariable('BUTTON', $button->render());
2734  $tpl->parseCurrentBlock();
2735 
2736  $button = ilLinkButton::getInstance();
2737  $button->setId('tst_cancel_on_navigation_button');
2738  $button->setUrl('#');
2739  $button->setCaption('cancel');
2740  $button->setPrimary(false);
2741  $tpl->setCurrentBlock('buttons');
2742  $tpl->setVariable('BUTTON', $button->render());
2743  $tpl->parseCurrentBlock();
2744 
2745  $tpl->setCurrentBlock('checkbox');
2746  $tpl->setVariable('CONFIRMATION_CHECKBOX_NAME','save_on_navigation_prevent_confirmation');
2747  $tpl->setVariable('CONFIRMATION_CHECKBOX_LABEL',$this->lng->txt('save_on_navigation_prevent_confirmation'));
2748  $tpl->parseCurrentBlock();
2749 
2750  $modal = ilModalGUI::getInstance();
2751  $modal->setId('tst_save_on_navigation_modal');
2752  $modal->setHeading($this->lng->txt('save_on_navigation'));
2753  $modal->setBody($tpl->get());
2754 
2755  $this->tpl->setCurrentBlock('nav_while_edit_modal');
2756  $this->tpl->setVariable('NAV_WHILE_EDIT_MODAL', $modal->getHTML());
2757  $this->tpl->parseCurrentBlock();
2758  }
$_SESSION["AccountId"]
special template class to simplify handling of ITX/PEAR
static getInstance()
Get instance.
Create new PHPExcel object
obj_idprivate
$text
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateNextButtons()

ilTestPlayerAbstractGUI::populateNextButtons (   $disabled,
  $primaryNext 
)
protected

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

References populateLowerNextButtonBlock(), and populateUpperNextButtonBlock().

Referenced by populateQuestionNavigation(), and ilTestPlayerDynamicQuestionSetGUI\populateQuestionNavigation().

268  {
269  $this->populateUpperNextButtonBlock($disabled, $primaryNext);
270  $this->populateLowerNextButtonBlock($disabled, $primaryNext);
271  }
populateLowerNextButtonBlock($disabled, $primaryNext)
populateUpperNextButtonBlock($disabled, $primaryNext)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populatePreviousButtons()

ilTestPlayerAbstractGUI::populatePreviousButtons (   $disabled)
protected

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

References populateLowerPreviousButtonBlock(), and populateUpperPreviousButtonBlock().

Referenced by populateQuestionNavigation().

262  {
263  $this->populateUpperPreviousButtonBlock($disabled);
264  $this->populateLowerPreviousButtonBlock($disabled);
265  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateQuestionNavigation()

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

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

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

Referenced by ilTestOutputGUI\showQuestionCmd().

249  {
250  if( !$this->isFirstQuestionInSequence($sequenceElement) )
251  {
252  $this->populatePreviousButtons($disabled);
253  }
254 
255  if( !$this->isLastQuestionInSequence($sequenceElement) )
256  {
257  $this->populateNextButtons($disabled, $primaryNext);
258  }
259  }
isFirstQuestionInSequence($sequenceElement)
isLastQuestionInSequence($sequenceElement)
populateNextButtons($disabled, $primaryNext)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateScoreBlock()

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

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

Referenced by populateInstantResponseBlocks().

381  {
382  $scoreInformation = sprintf(
383  $this->lng->txt( "you_received_a_of_b_points" ), $reachedPoints, $maxPoints
384  );
385 
386  $this->tpl->setCurrentBlock( "received_points_information" );
387  $this->tpl->setVariable("RECEIVED_POINTS_INFORMATION", $scoreInformation);
388  $this->tpl->parseCurrentBlock();
389  }
+ Here is the caller graph for this function:

◆ populateSolutionBlock()

ilTestPlayerAbstractGUI::populateSolutionBlock (   $solutionoutput)
protected

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

Referenced by populateInstantResponseBlocks().

392  {
393  if( strlen($solutionoutput) )
394  {
395  $this->tpl->setCurrentBlock( "solution_output" );
396  $this->tpl->setVariable( "CORRECT_SOLUTION", $this->lng->txt( "tst_best_solution_is" ) );
397  $this->tpl->setVariable( "QUESTION_FEEDBACK", $solutionoutput );
398  $this->tpl->parseCurrentBlock();
399  }
400  }
+ Here is the caller graph for this function:

◆ populateSpecificFeedbackBlock()

ilTestPlayerAbstractGUI::populateSpecificFeedbackBlock (   $question_gui)
protected

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

Referenced by populateInstantResponseBlocks().

352  {
353  $this->tpl->setCurrentBlock( "specific_feedback" );
354  $this->tpl->setVariable( "SPECIFIC_FEEDBACK",
355  $question_gui->getSpecificFeedbackOutput(
356  $this->testSession->getActiveId(),
357  NULL
358  )
359  );
360  $this->tpl->parseCurrentBlock();
361  }
+ Here is the caller graph for this function:

◆ populateSyntaxStyleBlock()

ilTestPlayerAbstractGUI::populateSyntaxStyleBlock ( )
protected

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

References ilObjStyleSheet\getSyntaxStylePath().

Referenced by prepareTestPage().

403  {
404  $this->tpl->setCurrentBlock( "SyntaxStyle" );
405  $this->tpl->setVariable( "LOCATION_SYNTAX_STYLESHEET",
407  );
408  $this->tpl->parseCurrentBlock();
409  }
static getSyntaxStylePath()
get syntax style path
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateTestNavigationToolbar()

ilTestPlayerAbstractGUI::populateTestNavigationToolbar ( ilTestNavigationToolbarGUI  $toolbarGUI)
protected

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

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

242  {
243  $this->tpl->setCurrentBlock('test_nav_toolbar');
244  $this->tpl->setVariable('TEST_NAV_TOOLBAR', $toolbarGUI->getHTML());
245  $this->tpl->parseCurrentBlock();
246  }
+ Here is the caller graph for this function:

◆ populateUpperNextButtonBlock()

ilTestPlayerAbstractGUI::populateUpperNextButtonBlock (   $disabled,
  $primaryNext 
)
protected

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

References buildNextButtonInstance().

Referenced by populateNextButtons().

284  {
285  $button = $this->buildNextButtonInstance($disabled, $primaryNext);
286  $button->setId('nextbutton');
287 
288  $this->tpl->setCurrentBlock( "next" );
289  $this->tpl->setVariable( "BTN_NEXT", $button->render());
290  $this->tpl->parseCurrentBlock();
291  }
buildNextButtonInstance($disabled, $primaryNext)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateUpperPreviousButtonBlock()

ilTestPlayerAbstractGUI::populateUpperPreviousButtonBlock (   $disabled)
protected

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

References buildPreviousButtonInstance().

Referenced by populatePreviousButtons().

304  {
305  $button = $this->buildPreviousButtonInstance($disabled);
306  $button->setId('prevbutton');
307 
308  $this->tpl->setCurrentBlock( "prev" );
309  $this->tpl->setVariable("BTN_PREV", $button->render());
310  $this->tpl->parseCurrentBlock();
311  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareSummaryPage()

ilTestPlayerAbstractGUI::prepareSummaryPage ( )
protected

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

References getContentBlockName(), object, and populateKioskHead().

Referenced by ilTestPlayerDynamicQuestionSetGUI\showQuestionSelectionCmd().

1836  {
1837  $this->tpl->addBlockFile(
1838  $this->getContentBlockName(), 'adm_content', 'tpl.il_as_tst_question_summary.html', 'Modules/Test'
1839  );
1840 
1841  if ($this->object->getKioskMode())
1842  {
1843  $this->populateKioskHead();
1844  }
1845  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareTestPage()

ilTestPlayerAbstractGUI::prepareTestPage (   $presentationMode,
  $sequenceElement,
  $questionId 
)
protected
Returns
string $formAction

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

References $ilUser, endingTimeReached(), initTestPageTemplate(), isMaxProcessingTimeReached(), isOptionalQuestionAnsweringConfirmationRequired(), isShowingPostponeStatusReguired(), ilObjTest\lookupExamId(), maxProcessingTimeReached(), object, outProcessingTime(), populateContentStyleBlock(), populateKioskHead(), populateSyntaxStyleBlock(), ilTestPlayerCommands\RESUME_PLAYER, showAnswerOptionalQuestionsConfirmation(), and showSideList().

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

1105  {
1106  global $ilUser, $ilNavigationHistory;
1107 
1108  $ilNavigationHistory->addItem($this->testSession->getRefId(),
1109  $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::RESUME_PLAYER), 'tst'
1110  );
1111 
1112  $this->initTestPageTemplate();
1113  $this->populateContentStyleBlock();
1114  $this->populateSyntaxStyleBlock();
1115 
1116  if ($this->isMaxProcessingTimeReached())
1117  {
1118  $this->maxProcessingTimeReached();
1119  return;
1120  }
1121 
1122  if ($this->object->endingTimeReached())
1123  {
1124  $this->endingTimeReached();
1125  return;
1126  }
1127 
1128  if( $this->isOptionalQuestionAnsweringConfirmationRequired($sequenceElement) )
1129  {
1130  $this->ctrl->setParameter($this, "sequence", $sequenceElement);
1132  return;
1133  }
1134 
1135  if ($this->object->getKioskMode())
1136  {
1137  $this->populateKioskHead();
1138  }
1139 
1140  $this->tpl->setVariable("TEST_ID", $this->object->getTestId());
1141  $this->tpl->setVariable("LOGIN", $ilUser->getLogin());
1142  $this->tpl->setVariable("SEQ_ID", $sequenceElement);
1143  $this->tpl->setVariable("QUEST_ID", $questionId);
1144 
1145  if ($this->object->getEnableProcessingTime())
1146  {
1147  $this->outProcessingTime($this->testSession->getActiveId());
1148  }
1149 
1150  $this->tpl->setVariable("PAGETITLE", "- " . $this->object->getTitle());
1151 
1152  if ($this->object->isShowExamIdInTestPassEnabled() && !$this->object->getKioskMode())
1153  {
1154  $this->tpl->setCurrentBlock('exam_id_footer');
1155  $this->tpl->setVariable('EXAM_ID_VAL', ilObjTest::lookupExamId(
1156  $this->testSession->getActiveId(), $this->testSession->getPass(), $this->object->getId()
1157  ));
1158  $this->tpl->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
1159  $this->tpl->parseCurrentBlock();
1160  }
1161 
1162  if ($this->object->getListOfQuestions())
1163  {
1164  $this->showSideList($presentationMode, $sequenceElement);
1165  }
1166  }
maxProcessingTimeReached()
Outputs a message when the maximum processing time is reached.
showSideList($presentationMode, $currentSequenceElement)
endingTimeReached()
handle endingTimeReached
$ilUser
Definition: imgupload.php:18
isOptionalQuestionAnsweringConfirmationRequired($sequenceElement)
Create new PHPExcel object
obj_idprivate
isMaxProcessingTimeReached()
Checks wheather the maximum processing time is reached or not.
static lookupExamId($active_id, $pass)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ previousQuestionCmd()

ilTestPlayerAbstractGUI::previousQuestionCmd ( )
abstractprotected

Referenced by confirmHintRequestCmd().

+ Here is the caller graph for this function:

◆ redirectAfterAutosaveCmd()

ilTestPlayerAbstractGUI::redirectAfterAutosaveCmd ( )

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

References $url, ilObjTest\_getPass(), ilTestPlayerCommands\AFTER_TEST_PASS_FINISHED, getContentBlockName(), getCurrentQuestionId(), and performTestPassFinishedTasks().

562  {
563  $active_id = $this->testSession->getActiveId();
564  $actualpass = ilObjTest::_getPass($active_id);
565 
566  $this->performTestPassFinishedTasks($actualpass);
567 
568  $this->testSession->setLastFinishedPass($this->testSession->getPass());
569  $this->testSession->increaseTestPass();
570 
571  $url = $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::AFTER_TEST_PASS_FINISHED);
572 
573  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_redirect_autosave.html", "Modules/Test");
574  $this->tpl->setVariable("TEXT_REDIRECT", $this->lng->txt("redirectAfterSave"));
575  $this->tpl->setCurrentBlock("HeadContent");
576  $this->tpl->setVariable("CONTENT_BLOCK", "<meta http-equiv=\"refresh\" content=\"5; url=" . $url . "\">");
577  $this->tpl->parseCurrentBlock();
578  }
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
$url
Definition: shib_logout.php:72
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
+ Here is the call graph for this function:

◆ redirectBackCmd()

ilTestPlayerAbstractGUI::redirectBackCmd ( )

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

References $GLOBALS, and backToInfoScreenCmd().

Referenced by afterTestPassFinishedCmd(), and endingTimeReached().

1034  {
1035  require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
1036  $testPassesSelector = new ilTestPassesSelector($GLOBALS['ilDB'], $this->object);
1037  $testPassesSelector->setActiveId($this->testSession->getActiveId());
1038  $testPassesSelector->setLastFinishedPass($this->testSession->getLastFinishedPass());
1039 
1040  if( count($testPassesSelector->getReportablePasses()) )
1041  {
1042  $this->ctrl->redirectByClass("ilTestEvaluationGUI", "outUserResultsOverview");
1043  }
1044 
1045  $this->backToInfoScreenCmd();
1046  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerForcedFeedbackNavUrl()

ilTestPlayerAbstractGUI::registerForcedFeedbackNavUrl (   $forcedFeedbackNavUrl)
protected

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

References $_SESSION, and array.

Referenced by ilTestPlayerDynamicQuestionSetGUI\showInstantResponseCmd(), and ilTestOutputGUI\showInstantResponseCmd().

2841  {
2842  if( !isset($_SESSION['forced_feedback_navigation_url']) )
2843  {
2844  $_SESSION['forced_feedback_navigation_url'] = array();
2845  }
2846 
2847  $_SESSION['forced_feedback_navigation_url'][$this->testSession->getActiveId()] = $forcedFeedbackNavUrl;
2848  }
$_SESSION["AccountId"]
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ removeIntermediateSolution()

ilTestPlayerAbstractGUI::removeIntermediateSolution ( )

remove an auto-saved solution of the current question

Returns
mixed number of rows or db error

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

References canSaveResult(), getCurrentQuestionId(), getQuestionInstance(), and saveQuestionSolution().

Referenced by autosaveCmd(), handleIntermediateSubmit(), revertChangesCmd(), ilTestPlayerDynamicQuestionSetGUI\showInstantResponseCmd(), ilTestOutputGUI\showInstantResponseCmd(), ilTestOutputGUI\submitSolutionAndNextCmd(), and ilTestOutputGUI\submitSolutionCmd().

187  {
188  $questionId = $this->getCurrentQuestionId();
189 
190  $this->getQuestionInstance($questionId)->removeIntermediateSolution(
191  $this->testSession->getActiveId(), $this->testSession->getPass()
192  );
193  }
getQuestionInstance($questionId, $fromCache=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetSequenceElementParameter()

ilTestPlayerAbstractGUI::resetSequenceElementParameter ( )
protected

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

References $_GET.

Referenced by ilTestPlayerDynamicQuestionSetGUI\resetQuestionIdParameter().

2341  {
2342  unset($_GET['sequence']);
2343  $this->ctrl->setParameter($this, 'sequence', null);
2344  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ resumePlayerCmd()

ilTestPlayerAbstractGUI::resumePlayerCmd ( )
abstractprotected

Resume a test at the last position.

Referenced by getLockParameter().

+ Here is the caller graph for this function:

◆ revertChangesCmd()

ilTestPlayerAbstractGUI::revertChangesCmd ( )
protected

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

References discardSolutionCmd(), removeIntermediateSolution(), setAnswerChangedParameter(), ilTestPlayerCommands\SHOW_QUESTION, skipQuestionCmd(), and startTestCmd().

1341  {
1342  $this->removeIntermediateSolution();
1343  $this->setAnswerChangedParameter(false);
1344  $this->ctrl->saveParameter($this, 'sequence');
1345  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
1346  }
removeIntermediateSolution()
remove an auto-saved solution of the current question
setAnswerChangedParameter($changed=true)
Set the &#39;answer changed&#39; url parameter for generated links.
+ Here is the call graph for this function:

◆ saveNavigationPreventConfirmation()

ilTestPlayerAbstractGUI::saveNavigationPreventConfirmation ( )
protected

Save the save the switch to prevent the navigation confirmation.

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

References $_POST, and $_SESSION.

Referenced by ilTestPlayerDynamicQuestionSetGUI\showInstantResponseCmd(), ilTestOutputGUI\showInstantResponseCmd(), ilTestPlayerDynamicQuestionSetGUI\submitSolutionCmd(), and ilTestOutputGUI\submitSolutionCmd().

2451  {
2452  if (!empty($_POST['save_on_navigation_prevent_confirmation']))
2453  {
2454  $_SESSION['save_on_navigation_prevent_confirmation'] = true;
2455  }
2456  }
$_SESSION["AccountId"]
$_POST["username"]
+ Here is the caller graph for this function:

◆ saveQuestionSolution()

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

saves the user input of a question

Referenced by autosaveCmd(), handleIntermediateSubmit(), removeIntermediateSolution(), and submitIntermediateSolutionCmd().

+ 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 157 of file class.ilTestPlayerAbstractGUI.php.

References object.

158  {
159  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
160  $tagging_gui = new ilTaggingGUI();
161  $tagging_gui->setObject($this->object->getId(), $this->object->getType());
162  $tagging_gui->saveInput();
163  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
164  }
Class ilTaggingGUI.
Create new PHPExcel object
obj_idprivate

◆ 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 426 of file class.ilTestPlayerAbstractGUI.php.

References $_POST.

427  {
428  if( $this->testSession->isAnonymousUser() )
429  {
430  $this->testSession->setAccessCodeToSession($_POST['anonymous_id']);
431  }
432 
433  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
434  }
$_POST["username"]

◆ setAnswerChangedParameter()

ilTestPlayerAbstractGUI::setAnswerChangedParameter (   $changed = true)
protected

Set the 'answer changed' url parameter for generated links.

Parameters
bool$changed

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

References $changed.

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

2422  {
2423  $this->ctrl->setParameter($this, 'test_answer_changed', $changed ? '1' : '0');
2424  }
+ Here is the caller graph for this function:

◆ showAnswerOptionalQuestionsConfirmation()

ilTestPlayerAbstractGUI::showAnswerOptionalQuestionsConfirmation ( )
protected

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

References object, and populateHelperGuiContent().

Referenced by prepareTestPage().

1946  {
1947  require_once 'Modules/Test/classes/confirmations/class.ilTestAnswerOptionalQuestionsConfirmationGUI.php';
1948  $confirmation = new ilTestAnswerOptionalQuestionsConfirmationGUI($this->lng);
1949 
1950  $confirmation->setFormAction($this->ctrl->getFormAction($this));
1951  $confirmation->setCancelCmd('cancelAnswerOptionalQuestions');
1952  $confirmation->setConfirmCmd('confirmAnswerOptionalQuestions');
1953 
1954  $confirmation->build($this->object->isFixedTest());
1955 
1956  $this->populateHelperGuiContent($confirmation);
1957  }
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showFinalStatementCmd()

ilTestPlayerAbstractGUI::showFinalStatementCmd ( )

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

References ilTestPlayerCommands\AFTER_TEST_PASS_FINISHED, getContentBlockName(), and object.

1057  {
1058  $template = new ilTemplate("tpl.il_as_tst_final_statement.html", TRUE, TRUE, "Modules/Test");
1059  $this->ctrl->setParameter($this, "skipfinalstatement", 1);
1060  $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, ilTestPlayerCommands::AFTER_TEST_PASS_FINISHED));
1061  $template->setVariable("FINALSTATEMENT", $this->object->prepareTextareaOutput($this->object->getFinalStatement(), true));
1062  $template->setVariable("BUTTON_CONTINUE", $this->lng->txt("btn_next"));
1063  $this->tpl->setVariable($this->getContentBlockName(), $template->get());
1064  }
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
special template class to simplify handling of ITX/PEAR
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ showInstantResponseCmd()

ilTestPlayerAbstractGUI::showInstantResponseCmd ( )
abstractprotected

Referenced by confirmHintRequestCmd().

+ Here is the caller 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 1697 of file class.ilTestPlayerAbstractGUI.php.

References $counter, $ilUser, $pass, ilTestServiceGUI\getAdditionalUsrDataHtmlAndPopulateWindowTitle(), getContentBlockName(), ilTestServiceGUI\getObjectiveOrientedContainer(), ilTestServiceGUI\getResultsSignature(), ilUtil\getStyleSheetLocation(), and object.

1698  {
1699  global $ilUser;
1700 
1701  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_finish_list_of_answers.html", "Modules/Test");
1702 
1703  $result_array =& $this->object->getTestResult(
1704  $active_id, $pass, false, !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()
1705  );
1706 
1707  $counter = 1;
1708  // output of questions with solutions
1709  foreach ($result_array as $question_data)
1710  {
1711  $question = $question_data["qid"];
1712  if (is_numeric($question))
1713  {
1714  $this->tpl->setCurrentBlock("printview_question");
1715  $question_gui = $this->object->createQuestionGUI("", $question);
1716  $template = new ilTemplate("tpl.il_as_qpl_question_printview.html", TRUE, TRUE, "Modules/TestQuestionPool");
1717  $template->setVariable("COUNTER_QUESTION", $counter.". ");
1718  $template->setVariable("QUESTION_TITLE", $question_gui->object->getTitle());
1719 
1720  $show_question_only = ($this->object->getShowSolutionAnswersOnly()) ? TRUE : FALSE;
1721  $result_output = $question_gui->getSolutionOutput($active_id, $pass, FALSE, FALSE, $show_question_only, $this->object->getShowSolutionFeedback());
1722  $template->setVariable("SOLUTION_OUTPUT", $result_output);
1723  $this->tpl->setVariable("QUESTION_OUTPUT", $template->get());
1724  $this->tpl->parseCurrentBlock();
1725  $counter ++;
1726  }
1727  }
1728 
1729  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
1730  if ($this->object->getShowSolutionAnswersOnly())
1731  {
1732  $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
1733  }
1734  if (strlen($top_data))
1735  {
1736  $this->tpl->setCurrentBlock("top_data");
1737  $this->tpl->setVariable("TOP_DATA", $top_data);
1738  $this->tpl->parseCurrentBlock();
1739  }
1740 
1741  if (strlen($bottom_data))
1742  {
1743  $this->tpl->setCurrentBlock("bottom_data");
1744  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1745  $this->tpl->setVariable("BOTTOM_DATA", $bottom_data);
1746  $this->tpl->parseCurrentBlock();
1747  }
1748 
1749  $this->tpl->setCurrentBlock("adm_content");
1750  $this->tpl->setVariable("TXT_ANSWER_SHEET", $this->lng->txt("tst_list_of_answers"));
1751  $user_data = $this->getAdditionalUsrDataHtmlAndPopulateWindowTitle($this->testSession, $active_id, TRUE);
1752  $signature = $this->getResultsSignature();
1753  $this->tpl->setVariable("USER_DETAILS", $user_data);
1754  $this->tpl->setVariable("SIGNATURE", $signature);
1755  $this->tpl->setVariable("TITLE", $this->object->getTitle());
1756  $this->tpl->setVariable("TXT_TEST_PROLOG", $this->lng->txt("tst_your_answers"));
1757  $invited_user =& $this->object->getInvitedUsers($ilUser->getId());
1758  $pagetitle = $this->object->getTitle() . " - " . $this->lng->txt("clientip") .
1759  ": " . $invited_user[$ilUser->getId()]["clientip"] . " - " .
1760  $this->lng->txt("matriculation") . ": " .
1761  $invited_user[$ilUser->getId()]["matriculation"];
1762  $this->tpl->setVariable("PAGETITLE", $pagetitle);
1763  $this->tpl->parseCurrentBlock();
1764  }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
getResultsSignature()
Returns HTML code for a signature field.
getContentBlockName()
Returns the name of the current content block (depends on the kiosk mode setting) ...
$counter
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
getAdditionalUsrDataHtmlAndPopulateWindowTitle($testSession, $active_id, $overwrite_anonymity=FALSE)
Returns the user data for a test results output.
+ Here is the call graph for this function:

◆ showMaximumAllowedUsersReachedMessage()

ilTestPlayerAbstractGUI::showMaximumAllowedUsersReachedMessage ( )

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

References ilTestPlayerCommands\BACK_TO_INFO_SCREEN, and getContentBlockName().

Referenced by initTestCmd(), and ilTestPlayerDynamicQuestionSetGUI\resumePlayerCmd().

1638  {
1639  $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_max_allowed_users_reached.html", "Modules/Test");
1640  $this->tpl->setCurrentBlock("adm_content");
1641  $this->tpl->setVariable("MAX_ALLOWED_USERS_MESSAGE", sprintf($this->lng->txt("tst_max_allowed_users_message"), $this->object->getAllowedUsersTimeGap()));
1642  $this->tpl->setVariable("MAX_ALLOWED_USERS_HEADING", sprintf($this->lng->txt("tst_max_allowed_users_heading"), $this->object->getAllowedUsersTimeGap()));
1643  $this->tpl->setVariable("CMD_BACK_TO_INFOSCREEN", ilTestPlayerCommands::BACK_TO_INFO_SCREEN);
1644  $this->tpl->setVariable("TXT_BACK_TO_INFOSCREEN", $this->lng->txt("tst_results_back_introduction"));
1645  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1646  $this->tpl->parseCurrentBlock();
1647  }
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:

◆ showQuestionCmd()

ilTestPlayerAbstractGUI::showQuestionCmd ( )
abstractprotected

Referenced by determineSolutionPassIndex().

+ Here is the caller graph for this function:

◆ showQuestionEditable()

ilTestPlayerAbstractGUI::showQuestionEditable ( assQuestionGUI  $questionGui,
  $formAction,
  $isQuestionWorkedThrough,
  $instantResponse 
)
protected

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

References $_GET, $_SESSION, buildEditableStateQuestionNavigationGUI(), determineSolutionPassIndex(), assQuestionGUI\getQuestionHeaderBlockBuilder(), isShowingPostponeStatusReguired(), object, assQuestionGUI\outQuestionForTest(), populateCharSelectorIfRequired(), populateModals(), assQuestionGUI\setNavigationGUI(), and ilTestPlayerCommands\SKIP_QUESTION.

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

1217  {
1218  $questionNavigationGUI = $this->buildEditableStateQuestionNavigationGUI(
1219  $questionGui->object->getId(), $this->populateCharSelectorIfRequired()
1220  );
1221  if( $isQuestionWorkedThrough )
1222  {
1223  $questionNavigationGUI->setDiscardSolutionButtonEnabled(true);
1224 // fau: testNav - set answere status in question header
1225  $questionGui->getQuestionHeaderBlockBuilder()->setQuestionAnswered(true);
1226 // fau.
1227  }
1228  elseif( $this->object->isPostponingEnabled() )
1229  {
1230  $questionNavigationGUI->setSkipQuestionLinkTarget(
1231  $this->ctrl->getLinkTarget($this, ilTestPlayerCommands::SKIP_QUESTION)
1232  );
1233  }
1234  $questionGui->setNavigationGUI($questionNavigationGUI);
1235 
1236  $isPostponed = $this->isShowingPostponeStatusReguired($questionGui->object->getId());
1237 
1238  $answerFeedbackEnabled = (
1239  $instantResponse && $this->object->getSpecificAnswerFeedback()
1240  );
1241 
1242  if( isset($_GET['save_error']) && $_GET['save_error'] == 1 && isset($_SESSION['previouspost']) )
1243  {
1244  $userPostSolution = $_SESSION['previouspost'];
1245  unset($_SESSION['previouspost']);
1246  }
1247  else
1248  {
1249  $userPostSolution = false;
1250  }
1251 
1252 // fau: testNav - add special checkbox for mc question
1253  if ($questionGui instanceof assMultipleChoiceGUI)
1254  {
1255  $questionGui->setWithNoneAbove($this->object->getMCScoring());
1256  $questionGui->setIsAnswered($isQuestionWorkedThrough);
1257  }
1258 // fau.
1259 
1260  // hey: prevPassSolutions - determine solution pass index and configure gui accordingly
1261  $qstConfig = $questionGui->object->getTestPresentationConfig();
1262  if( $qstConfig->isPreviousPassSolutionReuseAllowed() )
1263  {
1264  $passIndex = $this->determineSolutionPassIndex($questionGui); // last pass having solution stored
1265  if( $passIndex < $this->testSession->getPass() ) // it's the previous pass if current pass is higher
1266  {
1267  $qstConfig->setSolutionInitiallyPrefilled(true);
1268  }
1269  }
1270  else
1271  {
1272  $passIndex = $this->testSession->getPass();
1273  }
1274  // hey.
1275 
1276  // Answer specific feedback is rendered into the display of the test question with in the concrete question types outQuestionForTest-method.
1277  // Notation of the params prior to getting rid of this crap in favor of a class
1278  $questionGui->outQuestionForTest(
1279  $formAction, #form_action
1280  $this->testSession->getActiveId(), #active_id
1281  // hey: prevPassSolutions - prepared pass index having no, current or previous solution
1282  $passIndex, #pass
1283  // hey.
1284  $isPostponed, #is_postponed
1285  $userPostSolution, #user_post_solution
1286  $answerFeedbackEnabled #answer_feedback == inline_specific_feedback
1287  );
1288  // The display of specific inline feedback and specific feedback in an own block is to honor questions, which
1289  // have the possibility to embed the specific feedback into their output while maintaining compatibility to
1290  // questions, which do not have such facilities. E.g. there can be no "specific inline feedback" for essay
1291  // questions, while the multiple-choice questions do well.
1292 
1293 
1294  $this->populateModals();
1295 
1296 // fau: testNav - pouplate the new question edit control instead of the deprecated intermediate solution saver
1297  $this->populateQuestionEditControl($questionGui);
1298 // fau.
1299  }
$_SESSION["AccountId"]
determineSolutionPassIndex(assQuestionGUI $questionGui)
$_GET["client_id"]
buildEditableStateQuestionNavigationGUI($questionId, $charSelectorAvailable)
outQuestionForTest( $formaction, $active_id, $pass, $is_question_postponed=FALSE, $user_post_solutions=FALSE, $show_specific_inline_feedback=FALSE)
isShowingPostponeStatusReguired($questionId)
Multiple choice question GUI representation.
Create new PHPExcel object
obj_idprivate
setNavigationGUI($navigationGUI)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showQuestionViewable()

ilTestPlayerAbstractGUI::showQuestionViewable ( assQuestionGUI  $questionGui,
  $formAction,
  $isQuestionWorkedThrough,
  $instantResponse 
)
protected

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

References buildReadOnlyStateQuestionNavigationGUI(), assQuestionGUI\getFormEncodingType(), assQuestionGUI\getQuestionHeaderBlockBuilder(), assQuestionGUI\getSolutionOutput(), isShowingPostponeStatusReguired(), assQuestionGUI\outQuestionPage(), assQuestionGUI\setNavigationGUI(), and time.

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

1173  {
1174  $questionNavigationGUI = $this->buildReadOnlyStateQuestionNavigationGUI($questionGui->object->getId());
1175  $questionNavigationGUI->setQuestionWorkedThrough($isQuestionWorkedThrough);
1176  $questionGui->setNavigationGUI($questionNavigationGUI);
1177 
1178 // fau: testNav - set answere status in question header
1179  $questionGui->getQuestionHeaderBlockBuilder()->setQuestionAnswered($isQuestionWorkedThrough);
1180 // fau.
1181 
1182  $answerFeedbackEnabled = (
1183  $instantResponse && $this->object->getSpecificAnswerFeedback()
1184  );
1185 
1186  $solutionoutput = $questionGui->getSolutionOutput(
1187  $this->testSession->getActiveId(), #active_id
1188  $this->testSession->getPass(), #pass
1189  false, #graphical_output
1190  false, #result_output
1191  true, #show_question_only
1192  $answerFeedbackEnabled, #show_feedback
1193  false, #show_correct_solution
1194  false, #show_manual_scoring
1195  true #show_question_text
1196  );
1197 
1198  $pageoutput = $questionGui->outQuestionPage(
1199  "",
1200  $this->isShowingPostponeStatusReguired($questionGui->object->getId()),
1201  $this->testSession->getActiveId(),
1202  $solutionoutput
1203  );
1204 
1205  $this->tpl->setCurrentBlock('readonly_css_class');
1206  $this->tpl->touchBlock('readonly_css_class');
1207  $this->tpl->parseCurrentBlock();
1208 
1209  $this->tpl->setVariable('QUESTION_OUTPUT', $pageoutput);
1210 
1211  $this->tpl->setVariable("FORMACTION", $formAction);
1212  $this->tpl->setVariable("ENCTYPE", 'enctype="'.$questionGui->getFormEncodingType().'"');
1213  $this->tpl->setVariable("FORM_TIMESTAMP", time());
1214  }
getSolutionOutput( $active_id, $pass=NULL, $graphicalOutput=FALSE, $result_output=FALSE, $show_question_only=TRUE, $show_feedback=FALSE, $show_correct_solution=FALSE, $show_manual_scoring=FALSE, $show_question_text=TRUE)
isShowingPostponeStatusReguired($questionId)
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
setNavigationGUI($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 1795 of file class.ilTestPlayerAbstractGUI.php.

References ilAssQuestionHintRequestGUI\CMD_SHOW_LIST, and handleIntermediateSubmit().

1796  {
1797 // fau: testNav - handle intermediate submit for viewing requested hints
1798  $this->handleIntermediateSubmit();
1799 // fau.
1800 
1801  $this->ctrl->setParameter($this, 'pmode', self::PRESENTATION_MODE_EDIT);
1802 
1803  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
1804  $this->ctrl->redirectByClass('ilAssQuestionHintRequestGUI', ilAssQuestionHintRequestGUI::CMD_SHOW_LIST);
1805  }
handleIntermediateSubmit()
Check the &#39;answer changed&#39; parameter when a question form is intermediately submitted.
+ Here is the call graph for this function:

◆ showSideList()

ilTestPlayerAbstractGUI::showSideList (   $presentationMode,
  $currentSequenceElement 
)
protected

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

References $ilUser, ilUtil\getStyleSheetLocation(), isQuestionSummaryFinishTestButtonRequired(), and PRESENTATION_MODE_VIEW.

Referenced by prepareTestPage().

1540  {
1541  global $ilUser;
1542 
1543  $sideListActive = $ilUser->getPref('side_list_of_questions');
1544 
1545  if($sideListActive)
1546  {
1547  $this->tpl->addCss(
1548  ilUtil::getStyleSheetLocation("output", "ta_split.css", "Modules/Test"), "screen"
1549  );
1550 
1551  $questionSummaryData = $this->service->getQuestionSummaryData($this->testSequence, false);
1552 
1553  require_once 'Modules/Test/classes/class.ilTestQuestionSideListGUI.php';
1554  $questionSideListGUI = new ilTestQuestionSideListGUI($this->ctrl, $this->lng);
1555  $questionSideListGUI->setTargetGUI($this);
1556  $questionSideListGUI->setQuestionSummaryData($questionSummaryData);
1557  $questionSideListGUI->setCurrentSequenceElement($currentSequenceElement);
1558 // fau: testNav - set side list presentation mode to "view" to allow navigation when question is in edit mode
1559  $questionSideListGUI->setCurrentPresentationMode(ilTestPlayerAbstractGUI::PRESENTATION_MODE_VIEW);
1560  $questionSideListGUI->setDisabled(false);
1561 // $questionSideListGUI->setCurrentPresentationMode($presentationMode);
1562 // $questionSideListGUI->setDisabled($presentationMode == self::PRESENTATION_MODE_EDIT);
1563 // fau.
1564  $this->tpl->setVariable('LIST_OF_QUESTIONS', $questionSideListGUI->getHTML());
1565  }
1566  }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ skipQuestionCmd()

ilTestPlayerAbstractGUI::skipQuestionCmd ( )
abstractprotected

Referenced by revertChangesCmd().

+ Here is the caller 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 442 of file class.ilTestPlayerAbstractGUI.php.

References getLockParameter(), handleUserSettings(), and ilTestPlayerCommands\INIT_TEST.

443  {
444  $testStartLock = $this->getLockParameter();
445  $isFirstTestStartRequest = false;
446 
447  $this->processLocker->executeTestStartLockOperation(function() use ($testStartLock, &$isFirstTestStartRequest) {
448 
449  if($this->testSession->lookupTestStartLock() != $testStartLock)
450  {
451  $this->testSession->persistTestStartLock($testStartLock);
452  $isFirstTestStartRequest = true;
453  }
454 
455  });
456 
457  if( $isFirstTestStartRequest )
458  {
459  $this->handleUserSettings();
460  $this->ctrl->redirect($this, ilTestPlayerCommands::INIT_TEST);
461  }
462 
463  $this->ctrl->setParameterByClass('ilObjTestGUI', 'lock', $testStartLock);
464  $this->ctrl->redirectByClass("ilobjtestgui", "redirectToInfoScreen");
465  }
handleUserSettings()
Handles some form parameters on starting and resuming a test.
+ Here is the call graph for this function:

◆ startTestCmd()

ilTestPlayerAbstractGUI::startTestCmd ( )
abstractprotected

Referenced by revertChangesCmd().

+ Here is the caller graph for this function:

◆ submitIntermediateSolutionCmd()

ilTestPlayerAbstractGUI::submitIntermediateSolutionCmd ( )
protected

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

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

655  {
656  $this->saveQuestionSolution(false, true);
657 // fau: testNav - set the 'answer changed' parameter when an intermediate solution is submitted
658  $this->setAnswerChangedParameter(true);
659 // fau.
660  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
661  }
saveQuestionSolution($authorized=true, $force=false)
saves the user input of a question
setAnswerChangedParameter($changed=true)
Set the &#39;answer changed&#39; url parameter for generated links.
+ Here is the call graph for this function:

◆ submitSolutionCmd()

ilTestPlayerAbstractGUI::submitSolutionCmd ( )
abstractprotected

Referenced by determineSolutionPassIndex().

+ Here is the caller graph for this function:

◆ suspendTestCmd()

ilTestPlayerAbstractGUI::suspendTestCmd ( )

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

Referenced by maxProcessingTimeReached().

204  {
205  $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
206  }
+ Here is the caller graph for this function:

◆ toggleSideListCmd()

ilTestPlayerAbstractGUI::toggleSideListCmd ( )

Toggle side list.

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

References $ilUser, and ilTestPlayerCommands\SHOW_QUESTION.

667  {
668  global $ilUser;
669 
670  $show_side_list = $ilUser->getPref('side_list_of_questions');
671  $ilUser->writePref('side_list_of_questions', !$show_side_list);
672  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
673  }
$ilUser
Definition: imgupload.php:18

◆ unmarkQuestionAndSaveIntermediateCmd()

ilTestPlayerAbstractGUI::unmarkQuestionAndSaveIntermediateCmd ( )
protected

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

References handleIntermediateSubmit(), and unmarkQuestionCmd().

698  {
699 // fau: testNav - handle intermediate submit when unmarking the question
700  $this->handleIntermediateSubmit();
701 // fau.
702  $this->unmarkQuestionCmd();
703  }
handleIntermediateSubmit()
Check the &#39;answer changed&#39; parameter when a question form is intermediately submitted.
unmarkQuestionCmd()
Set a question unsolved.
+ Here is the call graph for this function:

◆ unmarkQuestionCmd()

ilTestPlayerAbstractGUI::unmarkQuestionCmd ( )
protected

Set a question unsolved.

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

References getCurrentSequenceElement(), and ilTestPlayerCommands\SHOW_QUESTION.

Referenced by unmarkQuestionAndSaveIntermediateCmd().

709  {
710  $questionId = $this->testSequence->getQuestionForSequence(
712  );
713 
714  $this->object->setQuestionSetSolved(0, $questionId, $this->testSession->getUserId());
715 
716  $this->ctrl->redirect($this, ilTestPlayerCommands::SHOW_QUESTION);
717  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unregisterForcedFeedbackNavUrl()

ilTestPlayerAbstractGUI::unregisterForcedFeedbackNavUrl ( )
protected

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

References $_SESSION.

Referenced by ilTestOutputGUI\showQuestionCmd(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

2871  {
2872  if( isset($_SESSION['forced_feedback_navigation_url'][$this->testSession->getActiveId()]) )
2873  {
2874  unset($_SESSION['forced_feedback_navigation_url'][$this->testSession->getActiveId()]);
2875  }
2876  }
$_SESSION["AccountId"]
+ 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 169 of file class.ilTestPlayerAbstractGUI.php.

References $_SESSION.

Referenced by ilTestOutputGUI\handleQuestionActionCmd(), ilTestOutputGUI\saveQuestionSolution(), and ilTestPlayerDynamicQuestionSetGUI\showQuestionCmd().

170  {
171  if ($_SESSION["active_time_id"])
172  {
173  $this->object->updateWorkingTime($_SESSION["active_time_id"]);
174  }
175 
176  $_SESSION["active_time_id"] = $this->object->startWorkingTime(
177  $this->testSession->getActiveId(), $this->testSession->getPass()
178  );
179  }
$_SESSION["AccountId"]
+ Here is the caller graph for this function:

Field Documentation

◆ $assSettings

ilTestPlayerAbstractGUI::$assSettings
protected

◆ $cachedQuestionGuis

ilTestPlayerAbstractGUI::$cachedQuestionGuis = array()
private

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

◆ $cachedQuestionObjects

ilTestPlayerAbstractGUI::$cachedQuestionObjects = array()
private

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

◆ $cmdCtrl

ilTestPlayerAbstractGUI::$cmdCtrl

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

◆ $endingTimeReached

ilTestPlayerAbstractGUI::$endingTimeReached

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

◆ $maxProcessingTimeReached

ilTestPlayerAbstractGUI::$maxProcessingTimeReached

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

◆ $passwordChecker

ilTestPlayerAbstractGUI::$passwordChecker
protected

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

◆ $processLocker

ilTestPlayerAbstractGUI::$processLocker
protected

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

◆ $ref_id

ilTestPlayerAbstractGUI::$ref_id

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

◆ $saveResult

ilTestPlayerAbstractGUI::$saveResult

◆ $sequence

ilTestPlayerAbstractGUI::$sequence

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

◆ $testSequence

ilTestPlayerAbstractGUI::$testSequence = null
protected

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

Referenced by archiveParticipantSubmission().

◆ $testSession

ilTestPlayerAbstractGUI::$testSession
protected

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

◆ FIXED_SHUFFLER_SEED_MIN_LENGTH

const ilTestPlayerAbstractGUI::FIXED_SHUFFLER_SEED_MIN_LENGTH = 8

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

Referenced by buildFixedShufflerSeed().

◆ PRESENTATION_MODE_EDIT

◆ PRESENTATION_MODE_VIEW


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