ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestPlayerDynamicQuestionSetGUI Class Reference
+ Inheritance diagram for ilTestPlayerDynamicQuestionSetGUI:
+ Collaboration diagram for ilTestPlayerDynamicQuestionSetGUI:

Public Member Functions

 executeCommand ()
 execute command
 saveQuestionSolution ($force=FALSE)
 saves the user input of a question
- Public Member Functions inherited from ilTestPlayerAbstractGUI
 __construct ($a_object)
 ilTestOutputGUI constructor
 saveTagsCmd ()
 Save tags for tagging gui.
 outResultsToplistCmd ()
 updateWorkingTime ()
 updates working time and stores state saveresult to see if question has to be stored or not
 outIntroductionPageCmd ()
 Creates the introduction page for a test.
 isMaxProcessingTimeReached ()
 Checks wheather the maximum processing time is reached or not.
 setAnonymousIdCmd ()
 Sets a session variable with the test access code for an anonymous test user.
 getLockParameter ()
 displayCodeCmd ()
 codeConfirmedCmd ()
 handleUserSettings ()
 Handles some form parameters on starting and resuming a test.
 calculateSequence ()
 Calculates the sequence to determine the next question.
 redirectAfterAutosaveCmd ()
 autosaveCmd ()
 togglesidelistCmd ()
 Toggle side list.
 backFromSummaryCmd ()
 Go back to the last active question from the summary.
 finishTestCmd ($requires_confirmation=true)
 redirectBackCmd ()
 showFinalStatementCmd ()
 getKioskHead ()
 outTestPage ($directfeedback)
 Outputs the question of the active sequence.
 checkOnlineTestAccess ()
 check access restrictions like client ip, partipating user etc.
 isTestAccessible ()
 test accessible returns true if the user can perform the test
 isNrOfTriesReached ()
 nr of tries exceeded
 passDetails ()
 Output of the learners view of an existing test pass.
 maxProcessingTimeReached ()
 Outputs a message when the maximum processing time is reached.
 confirmSubmitAnswers ()
 confirm submit results if confirm then results are submitted and the screen will be redirected to the startpage of the test public
 outProcessingTime ($active_id)
 outQuestionSummaryCmd ($fullpage=true, $contextFinishTest=false, $obligationsNotAnswered=false, $obligationsFilter=false)
 Output of a summary of all test questions for test participants.
 outQuestionSummaryWithObligationsInfoCmd ()
 outObligationsOnlySummaryCmd ()
 showMaximumAllowedUsersReachedMessage ()
 backConfirmFinishCmd ()
 outCorrectSolution ()
 Creates an output of the solution of an answer compared to the correct solution.
 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)
 getContentBlockName ()
 Returns the name of the current content block (depends on the kiosk mode setting)
 outUserResultsOverviewCmd ()
 outUserListOfAnswerPassesCmd ()
- Public Member Functions inherited from ilTestServiceGUI
 isContextWithinTestPass ()
 setContextWithinTestPass ($contextWithinTestPass)
 ilTestServiceGUI (ilObjTest $a_object)
 The constructor takes the test object reference as parameter.
 setParticipantData ($participantData)
 getParticipantData ()
 getCommand ($cmd)
 Retrieves the ilCtrl command.
 getPassOverview ($active_id, $targetclass="", $targetcommand="", $short=FALSE, $hide_details=FALSE, $adminMode=false)
 Returns the pass overview for a given active ID.
 getPassListOfAnswers (&$result_array, $active_id, $pass, $show_solutions=FALSE, $only_answered_questions=FALSE, $show_question_only=FALSE, $show_reached_points=FALSE, $anchorNav=false)
 Returns the list of answers of a users test pass.
 getPassListOfAnswersWithScoring (&$result_array, $active_id, $pass, $show_solutions=FALSE)
 Returns the list of answers of a users test pass and offers a scoring option.
 getResultsSignature ()
 Returns HTML code for a signature field.
 getResultsUserdata ($testSession, $active_id, $overwrite_anonymity=FALSE)
 Returns the user data for a test results output.
 getCorrectSolutionOutput ($question_id, $active_id, $pass)
 Returns an output of the solution to an answer compared to the correct solution.
 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.
 getResultsHeadUserAndPass ($active_id, $pass)
 Returns the user and pass data for a test results output.
 getQuestionResultForTestUsers ($question_id, $test_id)
 Creates a HTML representation for the results of a given question in a test.

Data Fields

const CMD_SHOW_QUESTION_SELECTION = 'showQuestionSelection'
const CMD_SHOW_QUESTION = 'showQuestion'
const CMD_FROM_PASS_DELETION = 'fromPassDeletion'
- Data Fields inherited from ilTestPlayerAbstractGUI
 $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

 resumePlayerCmd ()
 Resume a test at the last position.
 startTestCmd ()
 showQuestionSelectionCmd ()
 filterQuestionSelectionCmd ()
 resetQuestionSelectionCmd ()
 showTrackedQuestionListCmd ()
 previousQuestionCmd ()
 fromPassDeletionCmd ()
 nextQuestionCmd ()
 postponeQuestionCmd ()
 markQuestionCmd ()
 Set a question solved.
 unmarkQuestionCmd ()
 Set a question unsolved.
 gotoQuestionCmd ()
 Go to the question with the active sequence.
 showQuestionCmd ()
 showInstantResponseCmd ()
 handleQuestionActionCmd ()
 outWorkingForm ($sequence="", $test_id, $postpone_allowed, $directfeedback=false)
 Creates the learners output of a question.
 isFirstPageInSequence ($sequence)
 isLastQuestionInSequence (assQuestionGUI $questionGUI)
 handleJavascriptActivationStatus ()
 canSaveResult ()
 Returns TRUE if the answers of the current user could be saved.
 populatePreviousButtons ($sequence)
 buildQuestionsTableDataArray ($questions, $marked_questions)
 buildQuestionSetAnswerStatisticRowArray ($questions, $marked_questions)
 persistQuestionAnswerStatus ()
- Protected Member Functions inherited from ilTestPlayerAbstractGUI
 ensureExistingTestSession (ilTestSession $testSession)
 initProcessLocker ($activeId)
 determineInlineScoreDisplay ()
 populateQuestionMarkingBlockAsUnmarked ()
 populateQuestionMarkingBlockAsMarked ()
 populateNextButtonsLeadingToQuestion ()
 populateLowerNextButtonBlockLeadingToQuestion ()
 populateUpperNextButtonBlockLeadingToQuestion ()
 populateNextButtonsLeadingToEndOfTest ()
 populateLowerNextButtonBlockLeadingToEndOfTest ()
 populateUpperNextButtonBlockLeadingToEndOfTest ()
 populateNextButtonsLeadingToSummary ()
 populateLowerNextButtonBlockLeadingToSummary ()
 populateUpperNextButtonBlockLeadingToSummary ()
 populateCancelButtonBlock ()
 populateSummaryButtons ()
 populateLowerSummaryButtonBlock ()
 populateUpperSummaryButtonBlock ()
 populateQuestionSelectionButtons ()
 populateLowerQuestionSelectionButtonBlock ()
 populateUpperQuestionSelectionButtonBlock ()
 populatePostponeButtons ()
 populateLowerPostponeButtonBlock ()
 populateUpperPostponeButtonBlock ()
 populatePreviousButtonsLeadingToQuestion ()
 populatePreviousButtonsLeadingToIntroduction ()
 populateLowerPreviousButtonBlock ($cmd, $label)
 populateUpperPreviousButtonBlock ($cmd, $label)
 populateSpecificFeedbackBlock ($question_gui)
 populateGenericFeedbackBlock ($question_gui)
 populateScoreBlock ($reachedPoints, $maxPoints)
 populateSolutionBlock ($solutionoutput)
 populateCharSelector ()
 showSideList ()
 populateSyntaxStyleBlock ()
 populateContentStyleBlock ()
 startPlayerCmd ()
 Start a test for the first time.
 initTestCmd ()
 Start a test for the first time after a redirect.
 confirmFinishCmd ()
 The final submission of a test was confirmed.
 performTestPassFinishedTasks ($finishedPass)
 afterTestPassFinishedCmd ()
 isTestSignRedirectRequired ($activeId, $lastFinishedPass)
 archiveParticipantSubmission ($active, $pass)
 showRequestedHintListCmd ()
 Go to requested hint list.
 confirmHintRequestCmd ()
 Go to hint request confirmation.
 fillQuestionRelatedNavigation (assQuestionGUI $questionGUI)
 renders the elements for the question related navigation
 getMarkedQuestions ()
 prepareSummaryPage ()
 prepareTestPageOutput ()
 populateKioskHead ()
 handlePasswordProtectionRedirect ()
 isParticipantsAnswerFixed ($questionId)
 customRedirectRequired ()
 performCustomRedirect ()
 getIntroductionPageButtonLabel ()
- Protected Member Functions inherited from ilTestServiceGUI
 isPdfDeliveryRequest ()
 getPassDetailsOverview ($result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav)
 buildPassDetailsOverviewTableGUI ($targetGUI, $targetCMD)
 isGradingMessageRequired ()
 getGradingMessage ($activeId)

Protected Attributes

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

Private Member Functions

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

Private Attributes

 $dynamicQuestionSetConfig = null

Detailed Description

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

Member Function Documentation

ilTestPlayerDynamicQuestionSetGUI::buildFinishPagePassDeletionLink ( )
private
Returns
string

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

References getPassDeletionTarget().

{
$href = $this->getPassDeletionTarget();
$label = $this->lng->txt('tst_dyn_test_msg_pass_deletion_link');
return "<a href=\"{$href}\">{$label}</a>";
}

+ Here is the call graph for this function:

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

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

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

Referenced by showQuestionSelectionCmd().

{
$questionAnswerStats = array(
'total_all' => count($questions),
'total_open' => 0,
'non_answered' => 0,
'wrong_answered' => 0,
'correct_answered' => 0,
'postponed' => 0,
'marked' => 0
);
foreach($questions as $key => $value )
{
switch( $value['question_answer_status'] )
{
$questionAnswerStats['non_answered']++;
$questionAnswerStats['total_open']++;
break;
$questionAnswerStats['wrong_answered']++;
$questionAnswerStats['total_open']++;
break;
$questionAnswerStats['correct_answered']++;
break;
}
if( $this->testSequence->isPostponedQuestion($value["question_id"]) )
{
$questionAnswerStats['postponed']++;
}
if( isset($marked_questions[$value["question_id"]]) )
{
if( $marked_questions[$value["question_id"]]["solved"] == 1 )
{
$questionAnswerStats['marked']++;
}
}
}
return $questionAnswerStats;
}

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::buildQuestionSetCompleteStatisticTableGUI ( )
private

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

References buildQuestionSetStatisticTableGUI(), and ilTestDynamicQuestionSetStatisticTableGUI\COMPLETE_TABLE_ID.

Referenced by showQuestionSelectionCmd().

{
require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
);
$gui->initTitle('tst_dynamic_question_set_complete');
$gui->initColumns('tst_num_all_questions');
return $gui;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::buildQuestionSetFilteredStatisticTableGUI ( )
private

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

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

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

{
require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
);
$gui->initTitle('tst_dynamic_question_set_selection');
$gui->initColumns('tst_num_selected_questions');
require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
$this->dynamicQuestionSetConfig->getSourceQuestionPoolId()
));
$gui->setTaxonomyFilterEnabled($this->dynamicQuestionSetConfig->isTaxonomyFilterEnabled());
$gui->setAnswerStatusFilterEnabled($this->dynamicQuestionSetConfig->isAnswerStatusFilterEnabled());
$gui->initFilter();
$gui->setFilterCommand('filterQuestionSelection');
$gui->setResetCommand('resetQuestionSelection');
return $gui;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::buildQuestionSetStatisticTableGUI (   $tableId)
private

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

Referenced by buildQuestionSetCompleteStatisticTableGUI(), and buildQuestionSetFilteredStatisticTableGUI().

{
require_once 'Modules/Test/classes/tables/class.ilTestDynamicQuestionSetStatisticTableGUI.php';
$this->ctrl, $this->lng, $this, 'showQuestionSelection', $tableId
);
$gui->setShowNumMarkedQuestionsEnabled($this->object->getShowMarker());
$gui->setShowNumPostponedQuestionsEnabled($this->object->getSequenceSettings());
return $gui;
}

+ Here is the caller graph for this function:

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

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

Referenced by showTrackedQuestionListCmd().

{
$data = array();
foreach($questions as $key => $value )
{
$this->ctrl->setParameter($this, 'sequence', $value['question_id']);
$href = $this->ctrl->getLinkTarget($this, 'gotoQuestion');
$this->ctrl->setParameter($this, 'sequence', '');
$description = "";
if( $this->object->getListOfQuestionsDescription() )
{
$description = $value["description"];
}
$marked = false;
if( count($marked_questions) )
{
if( isset($marked_questions[$value["question_id"]]) )
{
if( $marked_questions[$value["question_id"]]["solved"] == 1 )
{
$marked = true;
}
}
}
array_push($data, array(
'href' => $href,
'title' => $this->object->getQuestionTitle($value["title"]),
'description' => $description,
'worked_through' => $this->testSequence->isAnsweredQuestion($value["question_id"]),
'postponed' => $this->testSequence->isPostponedQuestion($value["question_id"]),
'marked' => $marked
));
}
return $data;
}

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::canSaveResult ( )
protected

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

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

Reimplemented from ilTestPlayerAbstractGUI.

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

Referenced by saveQuestionSolution().

{
return !$this->object->endingTimeReached();
}

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::executeCommand ( )

execute command

Reimplemented from ilTestServiceGUI.

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

References $_GET, $cmd, $ilDB, ilTestServiceGUI\$lng, $ret, ilTestServiceGUI\$testSequenceFactory, ilTestServiceGUI\$testSessionFactory, ilTestServiceGUI\$tree, buildQuestionSetFilteredStatisticTableGUI(), ilTestPlayerAbstractGUI\calculateSequence(), ilTestPlayerAbstractGUI\ensureExistingTestSession(), ilTestPlayerAbstractGUI\handlePasswordProtectionRedirect(), ilYuiUtil\initConnectionWithAnimation(), ilOverlayGUI\initJavascript(), iljQueryUtil\initjQuery(), and ilTestPlayerAbstractGUI\initProcessLocker().

{
global $ilDB, $lng, $ilPluginAdmin, $ilTabs, $tree;
$ilTabs->clearTargets();
$this->ctrl->saveParameter($this, "sequence");
$this->ctrl->saveParameter($this, "active_id");
require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
$this->dynamicQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig($tree, $ilDB, $ilPluginAdmin, $this->object);
$this->dynamicQuestionSetConfig->loadFromDb();
$this->testSession = $testSessionFactory->getSession($_GET['active_id']);
$this->ensureExistingTestSession($this->testSession);
$this->initProcessLocker($this->testSession->getActiveId());
$testSequenceFactory = new ilTestSequenceFactory($ilDB, $lng, $ilPluginAdmin, $this->object);
$this->testSequence = $testSequenceFactory->getSequence($this->testSession);
$this->testSequence->loadFromDb();
include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
include_once "./Services/YUI/classes/class.ilYuiUtil.php";
if( $this->object->getKioskMode() )
{
include_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
}
$cmd = $this->ctrl->getCmd();
$nextClass = $this->ctrl->getNextClass($this);
switch($nextClass)
{
case 'ilassquestionpagegui':
$questionId = $this->testSequence->getQuestionForSequence( $this->calculateSequence() );
require_once "./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
$page_gui = new ilAssQuestionPageGUI($questionId);
$ret = $this->ctrl->forwardCommand($page_gui);
break;
case 'ilassquestionhintrequestgui':
$questionGUI = $this->object->createQuestionGUI(
"", $this->testSequenceFactory->getSequence()->getQuestionForSequence( $this->calculateSequence() )
);
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
$gui = new ilAssQuestionHintRequestGUI($this, self::CMD_SHOW_QUESTION, $this->testSession, $questionGUI);
$this->ctrl->forwardCommand($gui);
break;
case 'ildynamicquestionsetstatistictablegui':
$this->ctrl->forwardCommand( $this->buildQuestionSetFilteredStatisticTableGUI() );
break;
case 'iltestpasswordprotectiongui':
require_once 'Modules/Test/classes/class.ilTestPasswordProtectionGUI.php';
$gui = new ilTestPasswordProtectionGUI($this->ctrl, $this->tpl, $this->lng, $this, $this->passwordChecker);
$ret = $this->ctrl->forwardCommand($gui);
break;
default:
$cmd .= 'Cmd';
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::filterQuestionSelectionCmd ( )
protected

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

References ilAssQuestionList\ANSWER_STATUS_FILTER_ALL_NON_CORRECT, and buildQuestionSetFilteredStatisticTableGUI().

{
$tableGUI->writeFilterToSession();
$taxFilterSelection = array();
foreach( $tableGUI->getFilterItems() as $item )
{
if( strpos($item->getPostVar(), 'tax_') !== false )
{
$taxId = substr( $item->getPostVar(), strlen('tax_') );
$taxFilterSelection[$taxId] = $item->getValue();
}
elseif( $item->getPostVar() == 'question_answer_status' )
{
$answerStatusFilterSelection = $item->getValue();
}
}
$this->testSession->getQuestionSetFilterSelection()->setTaxonomySelection($taxFilterSelection);
$this->testSession->getQuestionSetFilterSelection()->setAnswerStatusSelection($answerStatusFilterSelection);
$this->testSession->saveToDb();
$this->testSequence->resetTrackedQuestionList();
$this->testSequence->saveToDb();
$this->ctrl->redirect($this, 'showQuestionSelection');
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::fromPassDeletionCmd ( )
protected

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

References resetCurrentQuestion().

{
$this->ctrl->redirect($this, 'showQuestion');
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::getEnterTestButtonLangVar ( )
private

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

Referenced by showQuestionSelectionCmd().

{
if( $this->testSequence->trackedQuestionExists() )
{
return $this->lng->txt('tst_resume_dyn_test_with_cur_quest_sel');
}
return $this->lng->txt('tst_start_dyn_test_with_cur_quest_sel');
}

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::getPassDeletionTarget ( )
private
Returns
string

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

References ilTestPassDeletionConfirmationGUI\CONTEXT_DYN_TEST_PLAYER.

Referenced by buildFinishPagePassDeletionLink(), and showQuestionSelectionCmd().

{
require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
$this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'context', ilTestPassDeletionConfirmationGUI::CONTEXT_DYN_TEST_PLAYER);
$this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'active_id', $this->testSession->getActiveId());
$this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'pass', $this->testSession->getPass());
return $this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'confirmDeletePass');
}

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::gotoQuestionCmd ( )
protected

Go to the question with the active sequence.

Reimplemented from ilTestPlayerAbstractGUI.

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

References $_GET.

{
$this->testSequence->loadQuestions(
$this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
);
$this->testSequence->cleanupQuestions($this->testSession);
if( isset($_GET['sequence']) && (int)$_GET['sequence'] )
{
$this->testSession->setCurrentQuestionId( (int)$_GET['sequence'] );
$this->testSession->saveToDb();
$this->ctrl->setParameter(
$this, 'sequence', $this->testSession->getCurrentQuestionId()
);
}
$this->ctrl->redirect($this, 'showQuestion');
}
ilTestPlayerDynamicQuestionSetGUI::handleJavascriptActivationStatus ( )
protected

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

References $_GET, and $ilUser.

Referenced by showInstantResponseCmd(), and showQuestionCmd().

{
global $ilUser;
if( isset($_GET['tst_javascript']) )
{
$ilUser->writePref('tst_javascript', $_GET['tst_javascript']);
}
}

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::handleQuestionActionCmd ( )
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

References ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), persistQuestionAnswerStatus(), saveQuestionSolution(), and ilTestPlayerAbstractGUI\updateWorkingTime().

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->unsetQuestionPostponed($questionId);
$this->testSequence->saveToDb();
}
$this->ctrl->setParameter(
$this, 'sequence', $this->testSession->getCurrentQuestionId()
);
$this->ctrl->redirect($this, 'showQuestion');
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::isFirstPageInSequence (   $sequence)
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

Referenced by populatePreviousButtons().

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

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::isLastQuestionInSequence ( assQuestionGUI  $questionGUI)
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

Referenced by outWorkingForm().

{
return false; // always
}

+ Here is the caller graph for this function:

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

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

References $pass, and assQuestion\_getReachedPoints().

Referenced by persistQuestionAnswerStatus().

{
$questionGUI = $this->object->createQuestionGUI("", $questionId);
$reachedPoints = assQuestion::_getReachedPoints($activeId, $questionId, $pass);
$maxPoints = $questionGUI->object->getMaximumPoints();
if($reachedPoints < $maxPoints)
{
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::markQuestionCmd ( )
protected

Set a question solved.

Reimplemented from ilTestPlayerAbstractGUI.

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

References $ilUser, ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), persistQuestionAnswerStatus(), saveQuestionSolution(), and ilTestPlayerAbstractGUI\updateWorkingTime().

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->unsetQuestionPostponed($questionId);
$this->testSequence->saveToDb();
}
global $ilUser;
$this->object->setQuestionSetSolved(1, $this->testSession->getCurrentQuestionId(), $ilUser->getId());
$this->ctrl->redirect($this, 'showQuestion');
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::nextQuestionCmd ( )
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

References ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), persistQuestionAnswerStatus(), resetCurrentQuestion(), saveQuestionSolution(), and ilTestPlayerAbstractGUI\updateWorkingTime().

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->unsetQuestionPostponed($questionId);
$this->testSequence->saveToDb();
}
$this->ctrl->redirect($this, 'showQuestion');
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::outCurrentlyFinishedPage ( )
private

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

References ilObjTest\lookupExamId(), ilTestPlayerAbstractGUI\outProcessingTime(), ilTestPlayerAbstractGUI\populateCancelButtonBlock(), ilTestPlayerAbstractGUI\populateKioskHead(), populatePreviousButtons(), ilTestPlayerAbstractGUI\populateQuestionSelectionButtons(), and ilTestPlayerAbstractGUI\prepareTestPageOutput().

Referenced by showQuestionCmd().

{
$this->populatePreviousButtons( $this->testSession->getCurrentQuestionId() );
if ($this->object->getKioskMode())
{
}
if ($this->object->getEnableProcessingTime())
{
$this->outProcessingTime($this->testSession->getActiveId());
}
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("FORM_TIMESTAMP", time());
$this->tpl->setVariable("PAGETITLE", "- " . $this->object->getTitle());
if ($this->object->isShowExamIdInTestPassEnabled() && !$this->object->getKioskMode())
{
$this->tpl->setCurrentBlock('exam_id');
$this->tpl->setVariable('EXAM_ID', ilObjTest::lookupExamId(
$this->testSession->getActiveId(), $this->testSession->getPass(), $this->object->getId()
));
$this->tpl->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
$this->tpl->parseCurrentBlock();
}
if ($this->object->getShowCancel())
{
}
if( $this->dynamicQuestionSetConfig->isAnyQuestionFilterEnabled() )
{
}
if( $this->testSequence->openQuestionExists() )
{
$message = $this->lng->txt('tst_dyn_test_msg_currently_finished_selection');
}
else
{
$message = $this->lng->txt('tst_dyn_test_msg_currently_finished_completely');
$message .= "<br /><br />{$this->buildFinishPagePassDeletionLink()}";
}
$msgHtml = $this->tpl->getMessageHTML($message);
$this->tpl->addBlockFile(
'QUESTION_OUTPUT', 'test_currently_finished_msg_block',
'tpl.test_currently_finished_msg.html', 'Modules/Test'
);
$this->tpl->setCurrentBlock('test_currently_finished_msg_block');
$this->tpl->setVariable('TEST_CURRENTLY_FINISHED_MSG', $msgHtml);
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::outWorkingForm (   $sequence = "",
  $test_id,
  $postpone_allowed,
  $directfeedback = false 
)
protected

Creates the learners output of a question.

Reimplemented from ilTestPlayerAbstractGUI.

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

References $_GET, $_SESSION, $ilLog, $ilUser, ilObjTest\_getSolvedQuestions(), ilTestPlayerAbstractGUI\determineInlineScoreDisplay(), ilTestPlayerAbstractGUI\fillQuestionRelatedNavigation(), ilUtil\getJSLocation(), isLastQuestionInSequence(), ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), ilObjTest\isQuestionObligatory(), OUTPUT_JAVASCRIPT, ilTestPlayerAbstractGUI\populateCancelButtonBlock(), ilTestPlayerAbstractGUI\populateCharSelector(), ilTestPlayerAbstractGUI\populateContentStyleBlock(), ilTestPlayerAbstractGUI\populateGenericFeedbackBlock(), ilTestPlayerAbstractGUI\populateNextButtonsLeadingToEndOfTest(), ilTestPlayerAbstractGUI\populateNextButtonsLeadingToQuestion(), ilTestPlayerAbstractGUI\populateNextButtonsLeadingToSummary(), ilTestPlayerAbstractGUI\populatePostponeButtons(), populatePreviousButtons(), ilTestPlayerAbstractGUI\populateQuestionMarkingBlockAsMarked(), ilTestPlayerAbstractGUI\populateQuestionMarkingBlockAsUnmarked(), ilTestPlayerAbstractGUI\populateQuestionSelectionButtons(), ilTestPlayerAbstractGUI\populateScoreBlock(), ilTestPlayerAbstractGUI\populateSolutionBlock(), ilTestPlayerAbstractGUI\populateSpecificFeedbackBlock(), ilTestPlayerAbstractGUI\populateSyntaxStyleBlock(), and resetCurrentQuestion().

{
global $ilUser;
$_SESSION["active_time_id"] = $this->object->startWorkingTime(
$this->testSession->getActiveId(), $this->testSession->getPass()
);
$question_gui = $this->object->createQuestionGUI(
"", $this->testSession->getCurrentQuestionId()
);
if( !is_object($question_gui) )
{
global $ilLog;
$ilLog->write(
"INV SEQ: active={$this->testSession->getActiveId()} qId={$this->testSession->getCurrentQuestionId()} "
.serialize($this->testSequence)
);
$ilLog->logStack('INV SEQ');
$this->ctrl->redirect($this, 'showQuestion');
}
$question_gui->setTargetGui($this);
$question_gui->setQuestionCount(
$this->testSequence->getLastPositionIndex()
);
$question_gui->setSequenceNumber( $this->testSequence->getCurrentPositionIndex(
$this->testSession->getCurrentQuestionId()
));
$this->ctrl->setParameter($this, 'sequence', $this->testSession->getCurrentQuestionId());
if ($this->object->getJavaScriptOutput())
{
$question_gui->object->setOutputType(OUTPUT_JAVASCRIPT);
}
$is_postponed = $this->testSequence->isPostponedQuestion($question_gui->object->getId());
$formaction = $this->ctrl->getFormAction($this);
// output question
$user_post_solution = FALSE;
if( isset($_SESSION['previouspost']) )
{
$user_post_solution = $_SESSION['previouspost'];
unset($_SESSION['previouspost']);
}
global $ilNavigationHistory;
$ilNavigationHistory->addItem($_GET["ref_id"], $this->ctrl->getLinkTarget($this, "resumePlayer"), "tst");
// Determine $answer_feedback: It should hold a boolean stating if answer-specific-feedback is to be given.
// It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Answer-Specific Feedback"
// $directfeedback holds a boolean stating if the instant feedback was requested using the "Check" button.
$answer_feedback = FALSE;
if (($directfeedback) && ($this->object->getSpecificAnswerFeedback()))
{
$answer_feedback = TRUE;
}
if( $this->isParticipantsAnswerFixed($this->testSession->getCurrentQuestionId()) )
{
$solutionoutput = $question_gui->getSolutionOutput(
$this->testSession->getActiveId(), #active_id
NULL, #pass
FALSE, #graphical_output
false, #result_output
true, #show_question_only
$answer_feedback, #show_feedback
false, #show_correct_solution
FALSE, #show_manual_scoring
true #show_question_text
);
$pageoutput = $question_gui->outQuestionPage(
"", $this->testSequence->isPostponedQuestion($this->testSession->getCurrentQuestionId()),
$this->testSession->getActiveId(),
$solutionoutput
);
$this->tpl->setVariable("QUESTION_OUTPUT", $pageoutput);
$this->tpl->setVariable("FORMACTION", $formaction);
$directfeedback = true;
}
else
{
// Answer specific feedback is rendered into the display of the test question with in the concrete question types outQuestionForTest-method.
// Notation of the params prior to getting rid of this crap in favor of a class
$question_gui->outQuestionForTest(
$formaction, #form_action
$this->testSession->getActiveId(), #active_id
NULL, #pass
$is_postponed, #is_postponed
$user_post_solution, #user_post_solution
$answer_feedback #answer_feedback == inline_specific_feedback
);
// The display of specific inline feedback and specific feedback in an own block is to honor questions, which
// have the possibility to embed the specific feedback into their output while maintaining compatibility to
// questions, which do not have such facilities. E.g. there can be no "specific inline feedback" for essay
// questions, while the multiple-choice questions do well.
$this->fillQuestionRelatedNavigation($question_gui);
}
if ($directfeedback)
{
// This controls if the solution should be shown.
// It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Solutions"
if ($this->object->getInstantFeedbackSolution())
{
$show_question_inline_score = $this->determineInlineScoreDisplay();
// Notation of the params prior to getting rid of this crap in favor of a class
$solutionoutput = $question_gui->getSolutionOutput(
$this->testSession->getActiveId(), #active_id
NULL, #pass
TRUE, #graphical_output
$show_question_inline_score, #result_output
FALSE, #show_question_only
FALSE, #show_feedback
TRUE, #show_correct_solution
FALSE, #show_manual_scoring
FALSE #show_question_text
);
$this->populateSolutionBlock( $solutionoutput );
}
// This controls if the score should be shown.
// It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Results (Only Points)"
if ($this->object->getAnswerFeedbackPoints())
{
$reachedPoints = $question_gui->object->getAdjustedReachedPoints($this->testSession->getActiveId(), NULL);
$maxPoints = $question_gui->object->getMaximumPoints();
$this->populateScoreBlock( $reachedPoints, $maxPoints );
}
// This controls if the generic feedback should be shown.
// It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Solutions"
if ($this->object->getGenericAnswerFeedback())
{
$this->populateGenericFeedbackBlock( $question_gui );
}
// This controls if the specific feedback should be shown.
// It gets the parameter "Scoring and Results" -> "Instant Feedback" -> "Show Answer-Specific Feedback"
if ($this->object->getSpecificAnswerFeedback())
{
$this->populateSpecificFeedbackBlock( $question_gui );
}
}
$this->populatePreviousButtons( $this->testSession->getCurrentQuestionId() );
if( $postpone_allowed )
{
}
if ($this->object->getShowCancel())
{
}
if ($this->isLastQuestionInSequence( $question_gui ))
{
if ($this->object->getListOfQuestionsEnd())
{
}
else
{
}
}
else
{
}
if( $this->dynamicQuestionSetConfig->isAnyQuestionFilterEnabled() )
{
}
if ($this->object->getShowMarker())
{
include_once "./Modules/Test/classes/class.ilObjTest.php";
$solved_array = ilObjTest::_getSolvedQuestions($this->testSession->getActiveId(), $question_gui->object->getId());
$solved = 0;
if (count ($solved_array) > 0)
{
$solved = array_pop($solved_array);
$solved = $solved["solved"];
}
if ($solved==1)
{
}
else
{
}
}
if ($this->object->getJavaScriptOutput())
{
$this->tpl->setVariable("JAVASCRIPT_TITLE", $this->lng->txt("disable_javascript"));
$this->ctrl->setParameter($this, "tst_javascript", "0");
$this->tpl->setVariable("JAVASCRIPT_URL", $this->ctrl->getLinkTarget($this, "gotoQuestion"));
}
else
{
$this->tpl->setVariable("JAVASCRIPT_TITLE", $this->lng->txt("enable_javascript"));
$this->ctrl->setParameter($this, "tst_javascript", "1");
$this->tpl->setVariable("JAVASCRIPT_URL", $this->ctrl->getLinkTarget($this, "gotoQuestion"));
}
if ($question_gui->object->supportsJavascriptOutput())
{
$this->tpl->touchBlock("jsswitch");
}
$this->tpl->addJavaScript(ilUtil::getJSLocation("autosave.js", "Modules/Test"));
$this->tpl->setVariable("AUTOSAVE_URL", $this->ctrl->getFormAction($this, "autosave", "", true));
if ($question_gui->isAutosaveable()&& $this->object->getAutosave())
{
$this->tpl->touchBlock('autosave');
//$this->tpl->setVariable("BTN_SAVE", "Zwischenspeichern");
//$this->tpl->setVariable("CMD_SAVE", "gotoquestion_{$sequence}");
//$this->tpl->setVariable("AUTOSAVEFORMACTION", str_replace("&amp;", "&", $this->ctrl->getFormAction($this)));
$this->tpl->setVariable("AUTOSAVEFORMACTION", str_replace("&amp;", "&", $this->ctrl->getLinkTarget($this, "autosave")));
$this->tpl->setVariable("AUTOSAVEINTERVAL", $this->object->getAutosaveIval());
}
if( $this->object->areObligationsEnabled() && ilObjTest::isQuestionObligatory($question_gui->object->getId()) )
{
$this->tpl->touchBlock('question_obligatory');
$this->tpl->setVariable('QUESTION_OBLIGATORY', $this->lng->txt('required_field'));
}
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::persistQuestionAnswerStatus ( )
protected

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

References $pass, and isQuestionAnsweredCorrect().

Referenced by handleQuestionActionCmd(), markQuestionCmd(), nextQuestionCmd(), postponeQuestionCmd(), showInstantResponseCmd(), showQuestionSelectionCmd(), showTrackedQuestionListCmd(), and unmarkQuestionCmd().

{
$questionId = $this->testSession->getCurrentQuestionId();
$activeId = $this->testSession->getActiveId();
$pass = $this->testSession->getPass();
if($this->isQuestionAnsweredCorrect($questionId, $activeId, $pass))
{
$this->testSequence->setQuestionAnsweredCorrect($questionId);
}
else
{
$this->testSequence->setQuestionAnsweredWrong($questionId);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::populatePreviousButtons (   $sequence)
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

References ilTestPlayerAbstractGUI\$sequence, isFirstPageInSequence(), ilTestPlayerAbstractGUI\populateLowerPreviousButtonBlock(), and ilTestPlayerAbstractGUI\populateUpperPreviousButtonBlock().

Referenced by outCurrentlyFinishedPage(), and outWorkingForm().

{
if( !$this->dynamicQuestionSetConfig->isPreviousQuestionsListEnabled() )
{
return;
}
{
return;
}
'showTrackedQuestionList', "&lt;&lt; " . $this->lng->txt( "save_previous" )
);
'showTrackedQuestionList', "&lt;&lt; " . $this->lng->txt( "save_previous" )
);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::postponeQuestionCmd ( )
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

References ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), persistQuestionAnswerStatus(), saveQuestionSolution(), and ilTestPlayerAbstractGUI\updateWorkingTime().

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->setQuestionPostponed($questionId);
}
$this->testSession->setCurrentQuestionId(null);
$this->testSequence->saveToDb();
$this->testSession->saveToDb();
$this->ctrl->redirect($this, 'showQuestion');
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::previousQuestionCmd ( )
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

{
}
ilTestPlayerDynamicQuestionSetGUI::resetCurrentQuestion ( )
private

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

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

{
$this->testSession->setCurrentQuestionId(null);
$this->testSequence->saveToDb();
$this->testSession->saveToDb();
$this->ctrl->setParameter($this, 'sequence', $this->testSession->getCurrentQuestionId());
}

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::resetQuestionSelectionCmd ( )
protected

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

References buildQuestionSetFilteredStatisticTableGUI().

{
$tableGUI->resetFilter();
$this->testSession->getQuestionSetFilterSelection()->setTaxonomySelection( array() );
$this->testSession->getQuestionSetFilterSelection()->setAnswerStatusSelection( null );
$this->testSession->saveToDb();
$this->testSequence->resetTrackedQuestionList();
$this->testSequence->saveToDb();
$this->ctrl->redirect($this, 'showQuestionSelection');
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::resumePlayerCmd ( )
protected

Resume a test at the last position.

Reimplemented from ilTestPlayerAbstractGUI.

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

References ilTestPlayerAbstractGUI\handleUserSettings(), and ilTestPlayerAbstractGUI\showMaximumAllowedUsersReachedMessage().

{
if ($this->object->checkMaximumAllowedUsers() == FALSE)
{
}
if( $this->dynamicQuestionSetConfig->isAnyQuestionFilterEnabled() )
{
$this->ctrl->redirect($this, self::CMD_SHOW_QUESTION_SELECTION);
}
$this->ctrl->redirect($this, self::CMD_SHOW_QUESTION);
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::saveQuestionSolution (   $force = FALSE)

saves the user input of a question

Reimplemented from ilTestPlayerAbstractGUI.

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

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

Referenced by handleQuestionActionCmd(), markQuestionCmd(), nextQuestionCmd(), postponeQuestionCmd(), showInstantResponseCmd(), showQuestionSelectionCmd(), showTrackedQuestionListCmd(), and unmarkQuestionCmd().

{
// what is this formtimestamp ??
if (!$force)
{
$formtimestamp = $_POST["formtimestamp"];
if (strlen($formtimestamp) == 0) $formtimestamp = $_GET["formtimestamp"];
if ($formtimestamp != $_SESSION["formtimestamp"])
{
$_SESSION["formtimestamp"] = $formtimestamp;
}
else
{
return FALSE;
}
}
// determine current question
$qId = $this->testSession->getCurrentQuestionId();
if( !$qId || $qId != $_GET["sequence"])
{
return false;
}
// save question solution
$this->saveResult = FALSE;
if ($this->canSaveResult($qId) || $force)
{
global $ilUser;
$questionGUI = $this->object->createQuestionGUI("", $qId);
if( $this->object->getJavaScriptOutput() )
{
$questionGUI->object->setOutputType(OUTPUT_JAVASCRIPT);
}
$activeId = $this->testSession->getActiveId();
$this->saveResult = $questionGUI->object->persistWorkingState(
$activeId, $pass = null, $this->object->areObligationsEnabled()
);
}
if ($this->saveResult == FALSE)
{
$this->ctrl->setParameter($this, "save_error", "1");
$_SESSION["previouspost"] = $_POST;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestPlayerDynamicQuestionSetGUI::showInstantResponseCmd ( )
protected

Reimplemented from ilTestPlayerAbstractGUI.

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

References handleJavascriptActivationStatus(), ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), ilTestPlayerAbstractGUI\outTestPage(), persistQuestionAnswerStatus(), saveQuestionSolution(), and ilTestPlayerAbstractGUI\updateWorkingTime().

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->unsetQuestionPostponed($questionId);
$this->testSequence->setQuestionChecked($questionId);
}
$filterSelection = $this->testSession->getQuestionSetFilterSelection();
$filterSelection->setForcedQuestionIds(array($this->testSession->getCurrentQuestionId()));
$this->testSequence->loadQuestions($this->dynamicQuestionSetConfig, $filterSelection);
$this->testSequence->cleanupQuestions($this->testSession);
$this->ctrl->setParameter(
$this, 'sequence', $this->testSession->getCurrentQuestionId()
);
$this->outTestPage(true);
$this->testSequence->saveToDb();
$this->testSession->saveToDb();
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::showQuestionCmd ( )
protected

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

References handleJavascriptActivationStatus(), outCurrentlyFinishedPage(), and ilTestPlayerAbstractGUI\outTestPage().

{
$this->testSequence->loadQuestions(
$this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
);
$this->testSequence->cleanupQuestions($this->testSession);
if( !$this->testSession->getCurrentQuestionId() )
{
$upComingQuestionId = $this->testSequence->getUpcomingQuestionId();
$this->testSession->setCurrentQuestionId($upComingQuestionId);
if( $this->testSequence->isQuestionChecked($upComingQuestionId) )
{
$this->testSequence->setQuestionUnchecked($upComingQuestionId);
}
}
if( $this->testSession->getCurrentQuestionId() )
{
$this->ctrl->setParameter(
$this, 'sequence', $this->testSession->getCurrentQuestionId()
);
$this->outTestPage(false);
}
else
{
}
$this->testSequence->saveToDb();
$this->testSession->saveToDb();
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::showQuestionSelectionCmd ( )
protected

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

References buildQuestionSetAnswerStatisticRowArray(), buildQuestionSetCompleteStatisticTableGUI(), buildQuestionSetFilteredStatisticTableGUI(), ilTestPassDeletionConfirmationGUI\CONTEXT_DYN_TEST_PLAYER, getEnterTestButtonLangVar(), ilTestPlayerAbstractGUI\getMarkedQuestions(), getPassDeletionTarget(), ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), ilTestPlayerAbstractGUI\outProcessingTime(), persistQuestionAnswerStatus(), ilTestPlayerAbstractGUI\prepareSummaryPage(), saveQuestionSolution(), ilTestPlayerAbstractGUI\updateWorkingTime(), and vd().

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->unsetQuestionPostponed($questionId);
}
$this->testSequence->loadQuestions(
$this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
);
$this->testSequence->cleanupQuestions($this->testSession);
$this->testSequence->saveToDb();
require_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
$toolbarGUI = new ilToolbarGUI();
$toolbarGUI->addButton(
$this->getEnterTestButtonLangVar(), $this->ctrl->getLinkTarget($this, self::CMD_SHOW_QUESTION),
'', '', '', '', 'submit emphsubmit'
);
if( $this->object->isPassDeletionAllowed() )
{
require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
$toolbarGUI->addButton(
$this->lng->txt('tst_dyn_test_pass_deletion_button'),
);
}
$filteredData = array($this->buildQuestionSetAnswerStatisticRowArray(
$this->testSequence->getFilteredQuestionsData(), $this->getMarkedQuestions()
)); #vd($filteredData);
$filteredTableGUI = $this->buildQuestionSetFilteredStatisticTableGUI();
$filteredTableGUI->setData($filteredData);
$completeData = array($this->buildQuestionSetAnswerStatisticRowArray(
$this->testSequence->getCompleteQuestionsData(), $this->getMarkedQuestions()
)); #vd($completeData);
$completeTableGUI = $this->buildQuestionSetCompleteStatisticTableGUI();
$completeTableGUI->setData($completeData);
$content = $this->ctrl->getHTML($toolbarGUI);
$content .= $this->ctrl->getHTML($filteredTableGUI);
$content .= $this->ctrl->getHTML($completeTableGUI);
$this->tpl->setVariable('TABLE_LIST_OF_QUESTIONS', $content);
if( $this->object->getEnableProcessingTime() )
{
$this->outProcessingTime($this->testSession->getActiveId());
}
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::showTrackedQuestionListCmd ( )
protected

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

References buildQuestionsTableDataArray(), ilTestPlayerAbstractGUI\getMarkedQuestions(), ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), ilTestPlayerAbstractGUI\outProcessingTime(), persistQuestionAnswerStatus(), ilTestPlayerAbstractGUI\prepareSummaryPage(), saveQuestionSolution(), ilTable2GUI\setData(), and ilTestPlayerAbstractGUI\updateWorkingTime().

{
if( !$this->dynamicQuestionSetConfig->isPreviousQuestionsListEnabled() )
{
$this->ctrl->redirect($this, self::CMD_SHOW_QUESTION);
}
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->unsetQuestionPostponed($questionId);
}
$this->testSequence->loadQuestions(
$this->dynamicQuestionSetConfig, $this->testSession->getQuestionSetFilterSelection()
);
$this->testSequence->cleanupQuestions($this->testSession);
$this->testSequence->saveToDb();
$this->testSequence->getTrackedQuestionList( $this->testSession->getCurrentQuestionId() ),
);
include_once "./Modules/Test/classes/tables/class.ilTrackedQuestionsTableGUI.php";
$table_gui = new ilTrackedQuestionsTableGUI(
$this, 'showTrackedQuestionList', $this->object->getSequenceSettings(), $this->object->getShowMarker()
);
$table_gui->setData($data);
$this->tpl->setVariable('TABLE_LIST_OF_QUESTIONS', $table_gui->getHTML());
if( $this->object->getEnableProcessingTime() )
{
$this->outProcessingTime($this->testSession->getActiveId());
}
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::startTestCmd ( )
protected

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

References $_SESSION, and $ilUser.

{
global $ilUser;
$this->testSession->setCurrentQuestionId(null); // no question "came up" yet
$this->testSession->saveToDb();
$this->ctrl->setParameter($this, 'active_id', $this->testSession->getActiveId());
assQuestion::_updateTestPassResults($this->testSession->getActiveId(), $this->testSession->getPass(), false, null, $this->object->id);
$_SESSION['active_time_id'] = $this->object->startWorkingTime(
$this->testSession->getActiveId(), $this->testSession->getPass()
);
$this->ctrl->saveParameter($this, 'tst_javascript');
if( $this->dynamicQuestionSetConfig->isAnyQuestionFilterEnabled() )
{
$this->ctrl->redirect($this, self::CMD_SHOW_QUESTION_SELECTION);
}
$this->ctrl->redirect($this, self::CMD_SHOW_QUESTION);
}
ilTestPlayerDynamicQuestionSetGUI::unmarkQuestionCmd ( )
protected

Set a question unsolved.

Reimplemented from ilTestPlayerAbstractGUI.

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

References $ilUser, ilTestPlayerAbstractGUI\isParticipantsAnswerFixed(), persistQuestionAnswerStatus(), saveQuestionSolution(), and ilTestPlayerAbstractGUI\updateWorkingTime().

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId && !$this->isParticipantsAnswerFixed($questionId) )
{
$this->testSequence->unsetQuestionPostponed($questionId);
$this->testSequence->saveToDb();
}
global $ilUser;
$this->object->setQuestionSetSolved(0, $this->testSession->getCurrentQuestionId(), $ilUser->getId());
$this->ctrl->redirect($this, 'showQuestion');
}

+ Here is the call graph for this function:

Field Documentation

ilTestPlayerDynamicQuestionSetGUI::$dynamicQuestionSetConfig = null
private

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

ilTestPlayerDynamicQuestionSetGUI::$testSequence
protected

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

ilTestPlayerDynamicQuestionSetGUI::$testSession
protected

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

const ilTestPlayerDynamicQuestionSetGUI::CMD_FROM_PASS_DELETION = 'fromPassDeletion'

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

const ilTestPlayerDynamicQuestionSetGUI::CMD_SHOW_QUESTION = 'showQuestion'

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

const ilTestPlayerDynamicQuestionSetGUI::CMD_SHOW_QUESTION_SELECTION = 'showQuestionSelection'

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


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