ILIAS  Release_4_4_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.
 showPasswordProtectionPageCmd ()
 Displays a password protection page when a test password is set.
 checkPasswordCmd ()
 Check the password, a user entered for test access.
 setAnonymousIdCmd ()
 Sets a session variable with the test access code for an anonymous test user.
 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 ()
 finishListOfAnswersCmd ()
 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
 ilTestServiceGUI (ilObjTest $a_object)
 The constructor takes the test object reference as parameter.
 getCommand ($cmd)
 Retrieves the ilCtrl command.
 getPassOverview ($active_id, $targetclass="", $targetcommand="", $short=FALSE, $hide_details=FALSE)
 Returns the pass overview for a given active ID.
 getFinalStatement ($active_id)
 Returns the final statement for a user.
 getPassListOfAnswers (&$result_array, $active_id, $pass, $show_solutions=FALSE, $only_answered_questions=FALSE, $show_question_only=FALSE, $show_reached_points=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.
 getPassDetailsOverview ($result_array, $active_id, $pass, $targetclass="", $targetcommandsort="", $targetcommanddetails="", $standard_header=TRUE)
 Returns the pass details overview for a given active ID and pass.
 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, $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.
 getLockParameter ()
 checkTestPassword ()
 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 ()

Protected Attributes

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

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 26 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

Member Function Documentation

ilTestPlayerDynamicQuestionSetGUI::buildFinishPagePassDeletionLink ( )
private
Returns
string

Definition at line 1130 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 997 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 1043 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 1056 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->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 1078 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 956 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 855 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 50 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $_GET, $cmd, ilTestServiceGUI\$lng, $ret, ilTestServiceGUI\$testSequenceFactory, ilTestServiceGUI\$testSessionFactory, ilTestServiceGUI\$tree, buildQuestionSetFilteredStatisticTableGUI(), ilTestPlayerAbstractGUI\calculateSequence(), ilTestPlayerAbstractGUI\ensureExistingTestSession(), 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;
default:
$cmd .= 'Cmd';
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilTestPlayerDynamicQuestionSetGUI::filterQuestionSelectionCmd ( )
protected

Definition at line 235 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 334 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 1091 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 1142 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 420 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 840 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 508 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $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 830 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 835 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 920 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 380 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $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 340 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $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 766 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->isTaxonomyFilterEnabled() )
{
}
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 532 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References $_GET, $_SESSION, $ilLog, $ilUser, ilObjTest\_getSolvedQuestions(), ilTestPlayerAbstractGUI\determineInlineScoreDisplay(), ilTestPlayerAbstractGUI\fillQuestionRelatedNavigation(), ilUtil\getImagePath(), ilUtil\getJSLocation(), isLastQuestionInSequence(), 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;
}
// 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->isTaxonomyFilterEnabled() )
{
}
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_IMAGE", ilUtil::getImagePath("javascript_disable.png"));
$this->tpl->setVariable("JAVASCRIPT_IMAGE_ALT", $this->lng->txt("disable_javascript"));
$this->tpl->setVariable("JAVASCRIPT_IMAGE_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_IMAGE", ilUtil::getImagePath("javascript.png"));
$this->tpl->setVariable("JAVASCRIPT_IMAGE_ALT", $this->lng->txt("enable_javascript"));
$this->tpl->setVariable("JAVASCRIPT_IMAGE_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 1101 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 936 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 359 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $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 329 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

{
}
ilTestPlayerDynamicQuestionSetGUI::resetCurrentQuestion ( )
private

Definition at line 1117 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 266 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 129 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
if ($this->object->checkMaximumAllowedUsers() == FALSE)
{
}
if( $this->dynamicQuestionSetConfig->isTaxonomyFilterEnabled() )
{
$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 863 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() || $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 475 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $questionId )
{
$this->testSequence->unsetQuestionPostponed($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 441 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() )
{
$this->testSession->setCurrentQuestionId(
$this->testSequence->getUpcomingQuestionId()
);
}
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 172 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
if( $this->testSession->getCurrentQuestionId() )
{
$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 281 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

References buildQuestionsTableDataArray(), ilTestPlayerAbstractGUI\getMarkedQuestions(), 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->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 146 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());
$_SESSION['active_time_id'] = $this->object->startWorkingTime(
$this->testSession->getActiveId(), $this->testSession->getPass()
);
$this->ctrl->saveParameter($this, 'tst_javascript');
if( $this->dynamicQuestionSetConfig->isTaxonomyFilterEnabled() )
{
$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 400 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

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

{
$questionId = $this->testSession->getCurrentQuestionId();
if( $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 35 of file class.ilTestPlayerDynamicQuestionSetGUI.php.

ilTestPlayerDynamicQuestionSetGUI::$testSequence
protected

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

ilTestPlayerDynamicQuestionSetGUI::$testSession
protected

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

const ilTestPlayerDynamicQuestionSetGUI::CMD_FROM_PASS_DELETION = 'fromPassDeletion'

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

const ilTestPlayerDynamicQuestionSetGUI::CMD_SHOW_QUESTION = 'showQuestion'

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

const ilTestPlayerDynamicQuestionSetGUI::CMD_SHOW_QUESTION_SELECTION = 'showQuestionSelection'

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


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