ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestOutputGUI Class Reference

Output class for assessment test execution. More...

+ Inheritance diagram for ilTestOutputGUI:
+ Collaboration diagram for ilTestOutputGUI:

Public Member Functions

 __construct ($a_object)
 ilTestOutputGUI constructor
 saveTags ()
 executeCommand ()
 execute command
 outResultsToplist ()
 ilCtrl $iCtrl
 updateWorkingTime ()
 updates working time and stores state saveresult to see if question has to be stored or not
 saveQuestionSolution ($force=FALSE)
 saves the user input of a question
 canSaveResult ()
 Returns TRUE if the answers of the current user could be saved.
 outIntroductionPage ()
 Creates the introduction page for a test.
 isMaxProcessingTimeReached ()
 Checks wheather the maximum processing time is reached or not.
 outWorkingForm ($sequence="", $test_id, $postpone_allowed, $directfeedback=0)
 Creates the learners output of a question.
 showPasswordProtectionPage ()
 Displays a password protection page when a test password is set.
 checkPassword ()
 Check the password, a user entered for test access.
 setAnonymousId ()
 Sets a session variable with the test access code for an anonymous test user.
 start ()
 Start a test for the first time.
 startTest ()
 Start a test for the first time after a redirect.
 displayCode ()
 codeConfirmed ()
 resume ()
 Resume a test at the last position.
 handleStartCommands ()
 Handles some form parameters on starting and resuming a test.
 redirectQuestion ()
 Called when a user answered a question to perform a redirect after POST.
 calculateSequence ()
 Calculates the sequence to determine the next question.
 redirectAfterAutosave ()
 autosave ()
 togglesidelist ()
 Toggle side list.
 next ()
 Go to the next question.
 previous ()
 Go to the previous question.
 postpone ()
 Postpone a question to the end of the test.
 summary ()
 Show the question summary in online exams.
 summaryWithoutSaving ()
 setmarked ()
 Set a question solved.
 resetmarked ()
 Set a question unsolved.
 directfeedback ()
 The direct feedback button was hit to show an instant feedback.
 selectImagemapRegion ()
 Select an image map region in an image map question.
 gotoQuestion ()
 Go to the question with the active sequence.
 backFromSummary ()
 Go back to the last active question from the summary.
 confirmFinish ()
 The final submission of a test was confirmed.
 finishTest ($confirm=true)
 Finish the test.
 redirectBack ()
 showFinalStatement ()
 getKioskHead ()
 outTestPage ()
 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)
 outQuestionSummary ($fullpage=true, $contextFinishTest=false, $obligationsNotAnswered=false, $obligationsFilter=false)
 Output of a summary of all test questions for test participants.
 outQuestionSummaryWithObligationsInfo ()
 outObligationsOnlySummary ()
 showMaximumAllowedUsersReachedMessage ()
 backConfirmFinish ()
 finishListOfAnswers ()
 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)
 outUserResultsOverview ()
 outUserListOfAnswerPasses ()
- 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 ($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 ($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

 $ref_id
 $saveResult
 $sequence
 $cmdCtrl
 $maxProcessingTimeReached
 $endingTimeReached
- Data Fields inherited from ilTestServiceGUI
 $object = null
 $service = null
 $lng
 $tpl
 $ctrl
 $ilias
 $tree
 $ref_id

Private Member Functions

 determineInlineScoreDisplay ()
 populatePreviousButtons ($sequence)
 populateQuestionMarkingBlockAsUnmarked ()
 populateQuestionMarkingBlockAsMarked ()
 populateNextButtonsLeadingToQuestion ()
 populateLowerNextButtonBlockLeadingToQuestion ()
 populateUpperNextButtonBlockLeadingToQuestion ()
 isLastQuestionInSequence ($question_gui)
 populateNextButtonsLeadingToEndOfTest ()
 populateLowerNextButtonBlockLeadingToEndOfTest ()
 populateUpperNextButtonBlockLeadingToEndOfTest ()
 populateNextButtonsLeadingToSummary ()
 populateLowerNextButtonBlockLeadingToSummary ()
 populateUpperNextButtonBlockLeadingToSummary ()
 populateCancelButtonBlock ()
 populateSummaryButtons ()
 populateLowerSummaryButtonBlock ()
 populateUpperSummaryButtonBlock ()
 populatePostponeButtons ()
 populateLowerPostponeButtonBlock ()
 populateUpperPostponeButtonBlock ()
 isFirstPageInSequence ($sequence)
 populatePreviousButtonLeadingToQuestion ()
 populateLowerPreviousButtonBlockLeadingToQuestion ()
 populateUpperPreviousButtonBlockLeadingToQuestion ()
 populatePreviousButtonsLeadingToIntroduction ()
 populateLowerPreviousButtonBlockLeadingToIntroduction ()
 populateUpperPreviousButtonBlockLeadingToIntroduction ()
 populateSpecificFeedbackBlock ($question_gui)
 populateGenericFeedbackBlock ($question_gui)
 populateScoreBlock ($reachedPoints, $maxPoints)
 populateSolutionBlock ($solutionoutput)
 showSideList ()
 populateSyntaxStyleBlock ()
 populateContentStyleBlock ()
 endingTimeReached ()
 handle endingTimeReached
 getContentBlockName ()
 Returns the name of the current content block (depends on the kiosk mode setting)
 showRequestedHintList ()
 Go to requested hint list.
 confirmHintRequest ()
 Go to hint request confirmation.
 fillQuestionRelatedNavigation (assQuestionGUI $questionGUI)
 renders the elements for the question related navigation

Detailed Description

Output class for assessment test execution.

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

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Björn Heyser bheys.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

ilTestOutputGUI: ilAssQuestionHintRequestGUI

Definition at line 26 of file class.ilTestOutputGUI.php.

Constructor & Destructor Documentation

ilTestOutputGUI::__construct (   $a_object)

ilTestOutputGUI constructor

Parameters
object$a_objectAssociated ilObjSurvey class public

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

References $_GET, and ilTestServiceGUI\ilTestServiceGUI().

{
$this->ref_id = $_GET["ref_id"];
}

+ Here is the call graph for this function:

Member Function Documentation

ilTestOutputGUI::autosave ( )

Definition at line 1213 of file class.ilTestOutputGUI.php.

References $_POST, $ilLog, $res, $result, canSaveResult(), exit, and saveQuestionSolution().

{
global $ilLog;
$result = "";
if (is_array($_POST) && count($_POST) > 0)
{
$res = $this->saveQuestionSolution(TRUE);
if ($res)
{
$this->object->getTestSession()->saveToDb();
$result = $this->lng->txt("autosave_success");
}
else
{
$result = $this->lng->txt("autosave_failed");
}
}
if (!$this->canSaveResult())
{
// this was the last action in the test, saving is no longer allowed
$result = $this->ctrl->getLinkTarget($this, "redirectAfterAutosave", "", true);
}
echo $result;
}

+ Here is the call graph for this function:

ilTestOutputGUI::backConfirmFinish ( )

Definition at line 2069 of file class.ilTestOutputGUI.php.

References $ilUser, and showListOfAnswers().

{
global $ilUser;
if ($this->object->canShowSolutionPrintview($ilUser->getId()))
{
$template = new ilTemplate("tpl.il_as_tst_finish_navigation.html", TRUE, TRUE, "Modules/Test");
$template->setVariable("BUTTON_FINISH", $this->lng->txt("btn_next"));
$template->setVariable("BUTTON_CANCEL", $this->lng->txt("btn_previous"));
$template_top = new ilTemplate("tpl.il_as_tst_list_of_answers_topbuttons.html", TRUE, TRUE, "Modules/Test");
$template_top->setCurrentBlock("button_print");
$template_top->setVariable("BUTTON_PRINT", $this->lng->txt("print"));
$template_top->parseCurrentBlock();
$active_id = $this->object->getTestSession()->getActiveId();
return $this->showListOfAnswers($active_id, NULL, $template_top->get(), $template->get());
}
else
{
$this->ctrl->redirect($this, 'gotoQuestion');
}
}

+ Here is the call graph for this function:

ilTestOutputGUI::backFromSummary ( )

Go back to the last active question from the summary.

Go back to the last active question from the summary

public

Definition at line 1422 of file class.ilTestOutputGUI.php.

{
$this->ctrl->setParameter($this, "activecommand", "back");
$this->ctrl->redirect($this, "redirectQuestion");
}
ilTestOutputGUI::calculateSequence ( )

Calculates the sequence to determine the next question.

public

Definition at line 1181 of file class.ilTestOutputGUI.php.

References $_GET, and $sequence.

Referenced by executeCommand(), and redirectQuestion().

{
$sequence = $_GET["sequence"];
if (!$sequence) $sequence = $this->object->getTestSequence()->getFirstSequence();
if (array_key_exists("save_error", $_GET))
{
if ($_GET["save_error"] == 1)
{
return $sequence;
}
}
switch ($_GET["activecommand"])
{
case "next":
$sequence = $this->object->getTestSequence()->getNextSequence($sequence);
break;
case "previous":
$sequence = $this->object->getTestSequence()->getPreviousSequence($sequence);
break;
}
return $sequence;
}

+ Here is the caller graph for this function:

ilTestOutputGUI::canSaveResult ( )

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

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

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

Definition at line 216 of file class.ilTestOutputGUI.php.

References isMaxProcessingTimeReached(), and isNrOfTriesReached().

Referenced by autosave(), and saveQuestionSolution().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::checkOnlineTestAccess ( )

check access restrictions like client ip, partipating user etc.

check access restrictions like client ip, partipating user etc.

public

Definition at line 1701 of file class.ilTestOutputGUI.php.

References $ilUser, and ilUtil\sendInfo().

{
global $ilUser;
// check if user is invited to participate
$user = $this->object->getInvitedUsers($ilUser->getId());
if (!is_array ($user) || count($user)!=1)
{
ilUtil::sendInfo($this->lng->txt("user_not_invited"), true);
$this->ctrl->redirectByClass("ilobjtestgui", "backToRepository");
}
$user = array_pop($user);
// check if client ip is set and if current remote addr is equal to stored client-ip
if (strcmp($user["clientip"],"")!=0 && strcmp($user["clientip"],$_SERVER["REMOTE_ADDR"])!=0)
{
ilUtil::sendInfo($this->lng->txt("user_wrong_clientip"), true);
$this->ctrl->redirectByClass("ilobjtestgui", "backToRepository");
}
}

+ Here is the call graph for this function:

ilTestOutputGUI::checkPassword ( )

Check the password, a user entered for test access.

public

Definition at line 787 of file class.ilTestOutputGUI.php.

References $_POST, $_SESSION, $ilUser, and ilUtil\sendFailure().

{
if (strcmp($this->object->getPassword(), $_POST["password"]) == 0)
{
global $ilUser;
if ($_SESSION["AccountId"] != ANONYMOUS_USER_ID)
{
$ilUser->setPref("tst_password_".$this->object->getTestId(), $this->object->getPassword());
$ilUser->writePref("tst_password_".$this->object->getTestId(), $this->object->getPassword());
}
else
{
$_SESSION['tst_password_'.$this->object->getTestId()] = $this->object->getPassword();
}
$this->ctrl->redirect($this, "start");
}
else
{
ilUtil::sendFailure($this->lng->txt("tst_password_entered_wrong_password"), true);
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
}

+ Here is the call graph for this function:

ilTestOutputGUI::codeConfirmed ( )

Definition at line 909 of file class.ilTestOutputGUI.php.

{
$this->ctrl->setParameter($this, "activecommand", "start");
$this->ctrl->redirect($this, "redirectQuestion");
}
ilTestOutputGUI::confirmFinish ( )

The final submission of a test was confirmed.

The final submission of a test was confirmed

public

Definition at line 1435 of file class.ilTestOutputGUI.php.

References finishTest().

{
$this->finishTest(false);
}

+ Here is the call graph for this function:

ilTestOutputGUI::confirmHintRequest ( )
private

Go to hint request confirmation.

private

Definition at line 2254 of file class.ilTestOutputGUI.php.

References ilAssQuestionHintRequestGUI\CMD_CONFIRM_REQUEST, and saveQuestionSolution().

{
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
$this->ctrl->redirectByClass('ilAssQuestionHintRequestGUI', ilAssQuestionHintRequestGUI::CMD_CONFIRM_REQUEST);
}

+ Here is the call graph for this function:

ilTestOutputGUI::confirmSubmitAnswers ( )

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

Definition at line 1801 of file class.ilTestOutputGUI.php.

References getContentBlockName().

{
$this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_submit_answers_confirm.html", "Modules/Test");
$this->tpl->setCurrentBlock("adm_content");
if ($this->object->isTestFinished($this->object->getTestSession()->getActiveId()))
{
$this->tpl->setCurrentBlock("not_submit_allowed");
$this->tpl->setVariable("TEXT_ALREADY_SUBMITTED", $this->lng->txt("tst_already_submitted"));
$this->tpl->setVariable("BTN_OK", $this->lng->txt("tst_show_answer_sheet"));
} else
{
$this->tpl->setCurrentBlock("submit_allowed");
$this->tpl->setVariable("TEXT_CONFIRM_SUBMIT_RESULTS", $this->lng->txt("tst_confirm_submit_answers"));
$this->tpl->setVariable("BTN_OK", $this->lng->txt("tst_submit_results"));
}
$this->tpl->setVariable("BTN_BACK", $this->lng->txt("back"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "finalSubmission"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilTestOutputGUI::determineInlineScoreDisplay ( )
private

Definition at line 478 of file class.ilTestOutputGUI.php.

Referenced by outWorkingForm().

{
$show_question_inline_score = FALSE;
if ($this->object->getAnswerFeedbackPoints())
{
$show_question_inline_score = TRUE;
return $show_question_inline_score;
}
return $show_question_inline_score;
}

+ Here is the caller graph for this function:

ilTestOutputGUI::directfeedback ( )

The direct feedback button was hit to show an instant feedback.

The direct feedback button was hit to show an instant feedback

public

Definition at line 1357 of file class.ilTestOutputGUI.php.

References saveQuestionSolution().

{
$this->ctrl->setParameter($this, "activecommand", "directfeedback");
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::displayCode ( )

Definition at line 898 of file class.ilTestOutputGUI.php.

References getContentBlockName().

{
$this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_anonymous_code_presentation.html", "Modules/Test");
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("TEXT_ANONYMOUS_CODE_CREATED", $this->lng->txt("tst_access_code_created"));
$this->tpl->setVariable("TEXT_ANONYMOUS_CODE", $this->object->getAccessCodeSession());
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("CONTINUE", $this->lng->txt("continue_work"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilTestOutputGUI::endingTimeReached ( )
private

handle endingTimeReached

Definition at line 1768 of file class.ilTestOutputGUI.php.

References ilFormat\ftimestamp2datetimeDB(), outIntroductionPage(), and ilUtil\sendInfo().

Referenced by outTestPage().

{
ilUtil::sendInfo(sprintf($this->lng->txt("detail_ending_time_reached"), ilFormat::ftimestamp2datetimeDB($this->object->getEndingTime())));
$this->object->getTestSession()->increasePass();
$this->object->getTestSession()->setLastSequence(0);
$this->object->getTestSession()->saveToDb();
if (!$this->object->canViewResults())
{
}
else
{
$this->ctrl->redirectByClass("ilTestEvaluationGUI", "outUserResultsOverview");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::executeCommand ( )

execute command

Reimplemented from ilTestServiceGUI.

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

References $_GET, $cmd, $ilUser, $ret, calculateSequence(), ilTestServiceGUI\getCommand(), ilYuiUtil\initConnectionWithAnimation(), and iljQueryUtil\initjQuery().

{
global $ilUser;
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
$this->ctrl->saveParameter($this, "sequence");
$this->ctrl->saveParameter($this, "active_id");
if (preg_match("/^gotoquestion_(\\d+)$/", $cmd, $matches))
{
$cmd = "gotoquestion";
if (strlen($matches[1]))
{
$this->ctrl->setParameter($this, 'gotosequence', $matches[1]);
}
}
if ($_GET["active_id"])
{
$this->object->setTestSession($_GET["active_id"]);
}
else
{
$this->object->setTestSession();
}
include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
include_once "./Services/YUI/classes/class.ilYuiUtil.php";
$cmd = $this->getCommand($cmd);
switch($next_class)
{
case 'ilassquestionhintrequestgui':
$questionGUI = $this->object->createQuestionGUI(
"", $this->object->getTestSequence()->getQuestionForSequence( $this->calculateSequence() )
);
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
$gui = new ilAssQuestionHintRequestGUI($this, $this->object->getTestSession(), $questionGUI);
$ret = $this->ctrl->forwardCommand($gui);
break;
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilTestOutputGUI::fillQuestionRelatedNavigation ( assQuestionGUI  $questionGUI)
private

renders the elements for the question related navigation

private ilTemplate $tpl ilLanguage $lng

Parameters
assQuestionGUI$questionGUI

Definition at line 2270 of file class.ilTestOutputGUI.php.

References ilTestServiceGUI\$lng, $pass, ilTestServiceGUI\$tpl, ilAssQuestionHintTracking\requestsExist(), and ilAssQuestionHintTracking\requestsPossible().

Referenced by outWorkingForm().

{
global $tpl, $lng;
$parseQuestionRelatedNavigation = false;
switch( 1 )
{
case $this->object->getSpecificAnswerFeedback():
case $this->object->getGenericAnswerFeedback():
case $this->object->getAnswerFeedbackPoints():
case $this->object->getInstantFeedbackSolution():
$tpl->setCurrentBlock("direct_feedback");
$tpl->setVariable("TEXT_DIRECT_FEEDBACK", $lng->txt("check"));
$tpl->parseCurrentBlock();
$parseQuestionRelatedNavigation = true;
}
if( $this->object->isOfferingQuestionHintsEnabled() )
{
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
$questionId = $questionGUI->object->getId();
$activeId = $this->object->getTestSession()->getActiveId();
$pass = $this->object->getTestSession()->getPass();
$requestsExist = ilAssQuestionHintTracking::requestsExist($questionId, $activeId, $pass);
$requestsPossible = ilAssQuestionHintTracking::requestsPossible($questionId, $activeId, $pass);
if( $requestsPossible )
{
if( $requestsExist )
{
$buttonText = $lng->txt("button_request_next_question_hint");
}
else
{
$buttonText = $lng->txt("button_request_question_hint");
}
$tpl->setCurrentBlock("button_request_next_question_hint");
$tpl->setVariable("CMD_REQUEST_NEXT_QUESTION_HINT", 'confirmHintRequest');
$tpl->setVariable("TEXT_REQUEST_NEXT_QUESTION_HINT", $buttonText);
$tpl->parseCurrentBlock();
$parseQuestionRelatedNavigation = true;
}
if( $requestsExist )
{
$tpl->setCurrentBlock("button_show_requested_question_hints");
$tpl->setVariable("CMD_SHOW_REQUESTED_QUESTION_HINTS", 'showRequestedHintList');
$tpl->setVariable("TEXT_SHOW_REQUESTED_QUESTION_HINTS", $lng->txt("button_show_requested_question_hints"));
$tpl->parseCurrentBlock();
$parseQuestionRelatedNavigation = true;
}
}
if( $parseQuestionRelatedNavigation )
{
$tpl->setCurrentBlock("question_related_navigation");
$tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::finishListOfAnswers ( )

Definition at line 2091 of file class.ilTestOutputGUI.php.

{
$this->confirmFinishTest();
}
ilTestOutputGUI::finishTest (   $confirm = true)

Finish the test.

Finish the test

public

Definition at line 1485 of file class.ilTestOutputGUI.php.

References $_GET, $_SESSION, ilTestServiceGUI\$ilias, $ilUser, ilObjTest\allObligationsAnswered(), ilSession\getIdleValue(), redirectBack(), redirectQuestion(), and showListOfAnswers().

Referenced by confirmFinish().

{
global $ilUser;
global $ilias;
global $ilAuth;
unset($_SESSION["tst_next"]);
$active_id = $this->object->getTestSession()->getActiveId();
$actualpass = $this->object->_getPass($active_id);
$allObligationsAnswered = ilObjTest::allObligationsAnswered($this->object->getTestSession()->getTestId(), $active_id, $actualpass);
if( $this->object->areObligationsEnabled() && !$allObligationsAnswered )
{
if( $this->object->getListOfQuestions() )
{
$_GET['activecommand'] = 'summary_obligations';
}
else
{
$_GET['activecommand'] = 'summary_obligations_only';
}
$this->redirectQuestion();
return;
}
if (($actualpass == $this->object->getNrOfTries() - 1) && (!$confirm))
{
$ilAuth->setIdle(ilSession::getIdleValue(), false);
$ilAuth->setExpire(0);
switch ($this->object->getMailNotification())
{
case 1:
$this->object->sendSimpleNotification($active_id);
break;
case 2:
$this->object->sendAdvancedNotification($active_id);
break;
}
}
if (($confirm) && ($actualpass == $this->object->getNrOfTries() - 1))
{
if ($this->object->canShowSolutionPrintview($ilUser->getId()))
{
$template = new ilTemplate("tpl.il_as_tst_finish_navigation.html", TRUE, TRUE, "Modules/Test");
$template->setVariable("BUTTON_FINISH", $this->lng->txt("btn_next"));
$template->setVariable("BUTTON_CANCEL", $this->lng->txt("btn_previous"));
$template_top = new ilTemplate("tpl.il_as_tst_list_of_answers_topbuttons.html", TRUE, TRUE, "Modules/Test");
$template_top->setCurrentBlock("button_print");
$template_top->setVariable("BUTTON_PRINT", $this->lng->txt("print"));
$template_top->parseCurrentBlock();
$this->showListOfAnswers($active_id, NULL, $template_top->get(), $template->get());
return;
}
else
{
// show confirmation page
return $this->confirmFinishTest();
}
}
if (!$_SESSION['tst_pass_finish'])
{
if (!$_SESSION['tst_pass_finish']) $_SESSION['tst_pass_finish'] = 1;
if ($this->object->getMailNotificationType() == 1)
{
switch ($this->object->getMailNotification())
{
case 1:
$this->object->sendSimpleNotification($active_id);
break;
case 2:
$this->object->sendAdvancedNotification($active_id);
break;
}
}
if( !$this->object->getTestSession()->isSubmitted() )
{
$this->object->setActiveTestSubmitted($ilUser->getId());
}
$this->object->getTestSession()->increaseTestPass();
}
$this->redirectBack();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::getContentBlockName ( )
private

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

Returns
string The name of the content block public

Definition at line 2212 of file class.ilTestOutputGUI.php.

Referenced by confirmSubmitAnswers(), displayCode(), outQuestionSummary(), outTestPage(), redirectAfterAutosave(), showFinalStatement(), showListOfAnswers(), showMaximumAllowedUsersReachedMessage(), and showPasswordProtectionPage().

{
if ($this->object->getKioskMode())
{
$this->tpl->setBodyClass("kiosk");
$this->tpl->setAddFooter(FALSE);
return "CONTENT";
}
else
{
return "ADM_CONTENT";
}
}

+ Here is the caller graph for this function:

ilTestOutputGUI::getKioskHead ( )

Definition at line 1613 of file class.ilTestOutputGUI.php.

References $ilUser.

Referenced by outQuestionSummary(), and outTestPage().

{
global $ilUser;
$template = new ilTemplate('tpl.il_as_tst_kiosk_head.html', true, true, 'Modules/Test');
if ($this->object->getShowKioskModeTitle())
{
$template->setCurrentBlock("kiosk_show_title");
$template->setVariable("TEST_TITLE", $this->object->getTitle());
$template->parseCurrentBlock();
}
if ($this->object->getShowKioskModeParticipant())
{
$template->setCurrentBlock("kiosk_show_participant");
$template->setVariable("PARTICIPANT_NAME", $this->lng->txt("login_as") . " " . $ilUser->getFullname());
$template->parseCurrentBlock();
}
return $template->get();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::gotoQuestion ( )

Go to the question with the active sequence.

Go to the question with the active sequence

public

Definition at line 1405 of file class.ilTestOutputGUI.php.

References $_GET, $_POST, $_SESSION, and saveQuestionSolution().

{
if (is_array($_POST) && count($_POST) > 0) $this->saveQuestionSolution();
$this->ctrl->setParameter($this, "sequence", $_GET["sequence"]);
$this->ctrl->setParameter($this, "activecommand", "gotoquestion");
$this->ctrl->saveParameter($this, "tst_javascript");
if (strlen($_GET['qst_selection'])) $_SESSION['qst_selection'] = $_GET['qst_selection'];
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::handleStartCommands ( )

Handles some form parameters on starting and resuming a test.

Definition at line 936 of file class.ilTestOutputGUI.php.

References $_POST, and $ilUser.

Referenced by resume(), and start().

{
global $ilUser;
if ($_POST["chb_javascript"])
{
$ilUser->writePref("tst_javascript", 1);
}
else
{
$ilUser->writePref("tst_javascript", 0);
}
// hide previous results
if ($this->object->getNrOfTries() != 1)
{
if ($this->object->getUsePreviousAnswers() == 1)
{
if ($_POST["chb_use_previous_answers"])
{
$ilUser->writePref("tst_use_previous_answers", 1);
}
else
{
$ilUser->writePref("tst_use_previous_answers", 0);
}
}
}
/* if ($this->object->getTestType() == TYPE_ONLINE_TEST)
{
global $ilias;
$ilias->auth->setIdle(0, false);
}*/
}

+ Here is the caller graph for this function:

ilTestOutputGUI::isFirstPageInSequence (   $sequence)
private

Definition at line 642 of file class.ilTestOutputGUI.php.

References $sequence.

Referenced by populatePreviousButtons().

{
return $sequence == $this->object->getTestSequence()->getFirstSequence();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::isLastQuestionInSequence (   $question_gui)
private

Definition at line 537 of file class.ilTestOutputGUI.php.

Referenced by outWorkingForm().

{
return $this->object->getTestSequence()->getQuestionForSequence( $this->object->getTestSequence()
->getLastSequence()
) == $question_gui->object->getId();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::isMaxProcessingTimeReached ( )

Checks wheather the maximum processing time is reached or not.

Checks wheather the maximum processing time is reached or not

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

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

References $ilUser.

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

{
global $ilUser;
$active_id = $this->object->getTestSession()->getActiveId();
$starting_time = $this->object->getStartingTimeOfUser($active_id);
if ($starting_time === FALSE)
{
return FALSE;
}
else
{
return $this->object->isMaxProcessingTimeReached($starting_time);
}
}

+ Here is the caller graph for this function:

ilTestOutputGUI::isNrOfTriesReached ( )

nr of tries exceeded

Definition at line 1737 of file class.ilTestOutputGUI.php.

Referenced by canSaveResult(), and isTestAccessible().

{
return $this->object->hasNrOfTriesRestriction() && $this->object->isNrOfTriesReached($this->object->getTestSession()->getPass());
}

+ Here is the caller graph for this function:

ilTestOutputGUI::isTestAccessible ( )

test accessible returns true if the user can perform the test

Definition at line 1726 of file class.ilTestOutputGUI.php.

References isMaxProcessingTimeReached(), and isNrOfTriesReached().

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

+ Here is the call graph for this function:

ilTestOutputGUI::maxProcessingTimeReached ( )

Outputs a message when the maximum processing time is reached.

Outputs a message when the maximum processing time is reached

public

Definition at line 1791 of file class.ilTestOutputGUI.php.

References outIntroductionPage().

Referenced by outTestPage().

{
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::next ( )

Go to the next question.

Go to the next question

public

Definition at line 1259 of file class.ilTestOutputGUI.php.

References saveQuestionSolution().

{
$this->ctrl->setParameter($this, "activecommand", "next");
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::outCorrectSolution ( )

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

public

Definition at line 2101 of file class.ilTestOutputGUI.php.

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

{
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_correct_solution.html", "Modules/Test");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
$this->tpl->parseCurrentBlock();
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
if ($this->object->getShowSolutionAnswersOnly())
{
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
}
$this->tpl->setCurrentBlock("adm_content");
$solution = $this->getCorrectSolutionOutput($_GET["evaluation"], $_GET["active_id"], $_GET["pass"]);
$this->tpl->setVariable("OUTPUT_SOLUTION", $solution);
$this->tpl->setVariable("TEXT_BACK", $this->lng->txt("back"));
$this->ctrl->saveParameter($this, "pass");
$this->ctrl->saveParameter($this, "active_id");
$this->tpl->setVariable("URL_BACK", $this->ctrl->getLinkTarget($this, "outUserResultsOverview"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilTestOutputGUI::outIntroductionPage ( )

Creates the introduction page for a test.

Creates the introduction page for a test

public

Definition at line 228 of file class.ilTestOutputGUI.php.

Referenced by endingTimeReached(), maxProcessingTimeReached(), and redirectBack().

{
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}

+ Here is the caller graph for this function:

ilTestOutputGUI::outObligationsOnlySummary ( )

Definition at line 2053 of file class.ilTestOutputGUI.php.

References outQuestionSummary().

{
return $this->outQuestionSummary(true, true, true, true);
}

+ Here is the call graph for this function:

ilTestOutputGUI::outProcessingTime (   $active_id)

Definition at line 1821 of file class.ilTestOutputGUI.php.

References $ilUser, ilDatePresentation\formatDate(), and IL_CAL_FKT_GETDATE.

Referenced by outQuestionSummary(), and outTestPage().

{
global $ilUser;
$starting_time = $this->object->getStartingTimeOfUser($active_id);
$processing_time = $this->object->getProcessingTimeInSeconds();
$processing_time_minutes = floor($processing_time / 60);
$processing_time_seconds = $processing_time - $processing_time_minutes * 60;
$str_processing_time = "";
if ($processing_time_minutes > 0)
{
$str_processing_time = $processing_time_minutes . " " . ($processing_time_minutes == 1 ? $this->lng->txt("minute") : $this->lng->txt("minutes"));
}
if ($processing_time_seconds > 0)
{
if (strlen($str_processing_time) > 0) $str_processing_time .= " " . $this->lng->txt("and") . " ";
$str_processing_time .= $processing_time_seconds . " " . ($processing_time_seconds == 1 ? $this->lng->txt("second") : $this->lng->txt("seconds"));
}
$time_left = $starting_time + $processing_time - mktime();
$time_left_minutes = floor($time_left / 60);
$time_left_seconds = $time_left - $time_left_minutes * 60;
$str_time_left = "";
if ($time_left_minutes > 0)
{
$str_time_left = $time_left_minutes . " " . ($time_left_minutes == 1 ? $this->lng->txt("minute") : $this->lng->txt("minutes"));
}
if ($time_left < 300)
{
if ($time_left_seconds > 0)
{
if (strlen($str_time_left) > 0) $str_time_left .= " " . $this->lng->txt("and") . " ";
$str_time_left .= $time_left_seconds . " " . ($time_left_seconds == 1 ? $this->lng->txt("second") : $this->lng->txt("seconds"));
}
}
$date = getdate($starting_time);
$formattedStartingTime = ilDatePresentation::formatDate(new ilDateTime($date,IL_CAL_FKT_GETDATE));
/*
$formattedStartingTime = ilFormat::formatDate(
$date["year"]."-".
sprintf("%02d", $date["mon"])."-".
sprintf("%02d", $date["mday"])." ".
sprintf("%02d", $date["hours"]).":".
sprintf("%02d", $date["minutes"]).":".
sprintf("%02d", $date["seconds"])
);
*/
$datenow = getdate();
$this->tpl->setCurrentBlock("enableprocessingtime");
$this->tpl->setVariable("USER_WORKING_TIME",
sprintf(
$this->lng->txt("tst_time_already_spent"),
$formattedStartingTime,
$str_processing_time
)
);
$this->tpl->setVariable("USER_REMAINING_TIME", sprintf($this->lng->txt("tst_time_already_spent_left"), $str_time_left));
$this->tpl->parseCurrentBlock();
$template = new ilTemplate("tpl.workingtime.js.html", TRUE, TRUE, TRUE);
$template->setVariable("STRING_MINUTE", $this->lng->txt("minute"));
$template->setVariable("STRING_MINUTES", $this->lng->txt("minutes"));
$template->setVariable("STRING_SECOND", $this->lng->txt("second"));
$template->setVariable("STRING_SECONDS", $this->lng->txt("seconds"));
$template->setVariable("STRING_TIMELEFT", $this->lng->txt("tst_time_already_spent_left"));
$template->setVariable("AND", strtolower($this->lng->txt("and")));
$template->setVariable("YEAR", $date["year"]);
$template->setVariable("MONTH", $date["mon"]-1);
$template->setVariable("DAY", $date["mday"]);
$template->setVariable("HOUR", $date["hours"]);
$template->setVariable("MINUTE", $date["minutes"]);
$template->setVariable("SECOND", $date["seconds"]);
if (preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $this->object->getEndingTime(), $matches))
{
$template->setVariable("ENDYEAR", $matches[1]);
$template->setVariable("ENDMONTH", $matches[2]-1);
$template->setVariable("ENDDAY", $matches[3]);
$template->setVariable("ENDHOUR", $matches[4]);
$template->setVariable("ENDMINUTE", $matches[5]);
$template->setVariable("ENDSECOND", $matches[6]);
}
$template->setVariable("YEARNOW", $datenow["year"]);
$template->setVariable("MONTHNOW", $datenow["mon"]-1);
$template->setVariable("DAYNOW", $datenow["mday"]);
$template->setVariable("HOURNOW", $datenow["hours"]);
$template->setVariable("MINUTENOW", $datenow["minutes"]);
$template->setVariable("SECONDNOW", $datenow["seconds"]);
$template->setVariable("PTIME_M", $processing_time_minutes);
$template->setVariable("PTIME_S", $processing_time_seconds);
$this->tpl->setCurrentBlock("HeadContent");
$this->tpl->setVariable("CONTENT_BLOCK", $template->get());
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::outQuestionSummary (   $fullpage = true,
  $contextFinishTest = false,
  $obligationsNotAnswered = false,
  $obligationsFilter = false 
)

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

Definition at line 1917 of file class.ilTestOutputGUI.php.

References $_GET, $data, $row, $sequence, ilObjTest\_getSolvedQuestions(), getContentBlockName(), getKioskHead(), outProcessingTime(), ilUtil\prepareFormOutput(), ilUtil\sendFailure(), and ilTable2GUI\setData().

Referenced by outObligationsOnlySummary(), outQuestionSummaryWithObligationsInfo(), redirectQuestion(), and showSideList().

{
if( $fullpage )
{
$this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_question_summary.html", "Modules/Test");
}
if( $obligationsNotAnswered )
{
ilUtil::sendFailure($this->lng->txt('not_all_obligations_answered'));
}
$active_id = $this->object->getTestSession()->getActiveId();
$result_array = & $this->object->getTestSequence()->getSequenceSummary($obligationsFilter);
$marked_questions = array();
if( $this->object->getKioskMode() && $fullpage )
{
$head = $this->getKioskHead();
if( strlen($head) )
{
$this->tpl->setCurrentBlock("kiosk_options");
$this->tpl->setVariable("KIOSK_HEAD", $head);
$this->tpl->parseCurrentBlock();
}
}
if( $this->object->getShowMarker() )
{
include_once "./Modules/Test/classes/class.ilObjTest.php";
$marked_questions = ilObjTest::_getSolvedQuestions($active_id);
}
$data = array();
foreach( $result_array as $key => $value )
{
$this->ctrl->setParameter($this, "sequence", $value["sequence"]);
$href = $this->ctrl->getLinkTargetByClass(get_class($this), "gotoQuestion");
$this->tpl->setVariable("VALUE_QUESTION_TITLE", "<a href=\"".$this->ctrl->getLinkTargetByClass(get_class($this), "gotoQuestion")."\">" . $this->object->getQuestionTitle($value["title"]) . "</a>");
$this->ctrl->setParameter($this, "sequence", $_GET["sequence"]);
$description = "";
if( $this->object->getListOfQuestionsDescription() )
{
$description = $value["description"];
}
$points = "";
if( !$this->object->getTitleOutput() )
{
$points = $value["points"]."&nbsp;".$this->lng->txt("points_short");
}
$marked = false;
if( count($marked_questions) )
{
if( array_key_exists($value["qid"], $marked_questions) )
{
$obj = $marked_questions[$value["qid"]];
if( $obj["solved"] == 1 )
{
$marked = true;
}
}
}
array_push($data, array(
'order' => $value["nr"],
'href' => $href,
'title' => $this->object->getQuestionTitle($value["title"]),
'description' => $description,
'worked_through' => ($value["worked_through"]) ? true : false,
'postponed' => ($value["postponed"]) ? $this->lng->txt("postponed") : '',
'points' => $points,
'marked' => $marked,
'sequence' => $value["sequence"],
'obligatory' => $value['obligatory']
));
}
$this->ctrl->setParameter($this, "sequence", $_GET["sequence"]);
if( $fullpage )
{
include_once "./Modules/Test/classes/tables/class.ilListOfQuestionsTableGUI.php";
$table_gui = new ilListOfQuestionsTableGUI(
$this, 'backFromSummary', !$this->object->getTitleOutput(), $this->object->getShowMarker(),
$obligationsNotAnswered, $obligationsFilter
);
$table_gui->setData($data);
$this->tpl->setVariable('TABLE_LIST_OF_QUESTIONS', $table_gui->getHTML());
if( $this->object->getEnableProcessingTime() )
{
$this->outProcessingTime($active_id);
}
}
else
{
$template = new ilTemplate('tpl.il_as_tst_list_of_questions_short.html', true, true, 'Modules/Test');
foreach( $data as $row )
{
if( strlen($row['description']) )
{
$template->setCurrentBlock('description');
$template->setVariable("DESCRIPTION", $row['description']);
$template->parseCurrentBlock();
}
$active = ($row['sequence'] == $this->sequence) ? ' active' : '';
$template->setCurrentBlock('item');
$template->setVariable('CLASS', ($row['walked_through']) ? ('answered'.$active) : ('unanswered'.$active));
$template->setVariable('ITEM', ilUtil::prepareFormOutput($row['title']));
$template->setVariable('SEQUENCE', $row['sequence']);
$template->parseCurrentBlock();
}
$template->setVariable('LIST_OF_QUESTIONS', $this->lng->txt('list_of_questions'));
$this->tpl->setVariable('LIST_OF_QUESTIONS', $template->get());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::outQuestionSummaryWithObligationsInfo ( )

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

References outQuestionSummary().

{
return $this->outQuestionSummary(true, true, true, false);
}

+ Here is the call graph for this function:

ilTestOutputGUI::outResultsToplist ( )

ilCtrl $iCtrl

Returns
type

Definition at line 129 of file class.ilTestOutputGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass('ilTestToplistGUI', 'outResultsToplist');
#require_once 'Modules/Test/classes/class.ilTestToplistGUI.php';
#$gui = new ilTestToplistGUI($this);
#return $this->ctrl->forwardCommand($gui);
}
ilTestOutputGUI::outTestPage ( )

Outputs the question of the active sequence.

Definition at line 1636 of file class.ilTestOutputGUI.php.

References $_GET, $ilUser, endingTimeReached(), getContentBlockName(), getKioskHead(), isMaxProcessingTimeReached(), maxProcessingTimeReached(), outProcessingTime(), outWorkingForm(), ilUtil\sendInfo(), and TEST_POSTPONE.

Referenced by redirectQuestion().

{
global $rbacsystem, $ilUser;
$this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_output.html", "Modules/Test");
if (!$rbacsystem->checkAccess("read", $this->object->getRefId()))
{
// only with read access it is possible to run the test
$this->ilias->raiseError($this->lng->txt("cannot_execute_test"),$this->ilias->error_obj->MESSAGE);
}
{
return;
}
if ($this->object->endingTimeReached())
{
return;
}
if ($this->object->getKioskMode())
{
$head = $this->getKioskHead();
if (strlen($head))
{
$this->tpl->setCurrentBlock("kiosk_options");
$this->tpl->setVariable("KIOSK_HEAD", $head);
$this->tpl->parseCurrentBlock();
}
}
if ($this->object->getEnableProcessingTime())
{
$this->outProcessingTime($this->object->getTestSession()->getActiveId());
}
$this->tpl->setVariable("FORM_TIMESTAMP", time());
$this->tpl->setVariable("PAGETITLE", "- " . $this->object->getTitle());
$postpone = false;
if ($this->object->getSequenceSettings() == TEST_POSTPONE)
{
$postpone = true;
}
$directfeedback = 0;
if (strcmp($_GET["activecommand"], "directfeedback") == 0)
{
$directfeedback = 1;
}
$this->outWorkingForm($this->sequence, $this->object->getTestId(), $postpone, $directfeedback, $show_summary);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::outUserListOfAnswerPasses ( )

Definition at line 2231 of file class.ilTestOutputGUI.php.

{
$this->ctrl->redirectByClass("iltestevaluationgui", "outUserListOfAnswerPasses");
}
ilTestOutputGUI::outUserResultsOverview ( )

Definition at line 2226 of file class.ilTestOutputGUI.php.

{
$this->ctrl->redirectByClass("iltestevaluationgui", "outUserResultsOverview");
}
ilTestOutputGUI::outWorkingForm (   $sequence = "",
  $test_id,
  $postpone_allowed,
  $directfeedback = 0 
)

Creates the learners output of a question.

Definition at line 259 of file class.ilTestOutputGUI.php.

References $_GET, $_SESSION, $ilUser, $sequence, ilObjTest\_getSolvedQuestions(), determineInlineScoreDisplay(), fillQuestionRelatedNavigation(), ilUtil\getImagePath(), ilUtil\getJSLocation(), isLastQuestionInSequence(), ilObjTest\isQuestionObligatory(), OUTPUT_JAVASCRIPT, populateCancelButtonBlock(), populateContentStyleBlock(), populateGenericFeedbackBlock(), populateNextButtonsLeadingToEndOfTest(), populateNextButtonsLeadingToQuestion(), populateNextButtonsLeadingToSummary(), populatePostponeButtons(), populatePreviousButtons(), populateQuestionMarkingBlockAsMarked(), populateQuestionMarkingBlockAsUnmarked(), populateScoreBlock(), populateSolutionBlock(), populateSpecificFeedbackBlock(), populateSummaryButtons(), populateSyntaxStyleBlock(), and showSideList().

Referenced by outTestPage().

{
global $ilUser;
if ($sequence < 1) $sequence = $this->object->getTestSequence()->getFirstSequence();
$_SESSION["active_time_id"]= $this->object->startWorkingTime($this->object->getTestSession()->getActiveId(),
$this->object->getTestSession()->getPass()
);
if ($this->object->getListOfQuestions())
{
$this->showSideList();
}
$question_gui = $this->object->createQuestionGUI("", $this->object->getTestSequence()->getQuestionForSequence($sequence));
if ($this->object->getJavaScriptOutput())
{
$question_gui->object->setOutputType(OUTPUT_JAVASCRIPT);
}
$is_postponed = $this->object->getTestSequence()->isPostponedQuestion($question_gui->object->getId());
$this->ctrl->setParameter($this, "sequence", "$sequence");
$formaction = $this->ctrl->getFormAction($this, "gotoQuestion");
$question_gui->setSequenceNumber($this->object->getTestSequence()->getPositionOfSequence($sequence));
$question_gui->setQuestionCount($this->object->getTestSequence()->getUserQuestionCount());
// output question
$user_post_solution = FALSE;
if (array_key_exists("previouspost", $_SESSION))
{
$user_post_solution = $_SESSION["previouspost"];
unset($_SESSION["previouspost"]);
}
global $ilNavigationHistory;
$ilNavigationHistory->addItem($_GET["ref_id"], $this->ctrl->getLinkTarget($this, "resume"), "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->object->getTestSession()->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->object->getTestSession()->getActiveId(), #active_id
NULL, #pass
FALSE, #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->object->getTestSession()->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 );
}
}
if ($postpone_allowed && !$is_postponed)
{
}
if ($this->object->getListOfQuestions())
{
if (!(($finish) && ($this->object->getListOfQuestionsEnd())))
{
}
}
if ($this->object->getShowCancel())
{
}
if ($this->isLastQuestionInSequence( $question_gui ))
{
if ($this->object->getListOfQuestionsEnd())
{
}
else
{
}
}
else
{
}
if ($this->object->getShowMarker())
{
include_once "./Modules/Test/classes/class.ilObjTest.php";
$solved_array = ilObjTest::_getSolvedQuestions($this->object->getTestSession()->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->object->getForceJS())
{
$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:

+ Here is the caller graph for this function:

ilTestOutputGUI::passDetails ( )

Output of the learners view of an existing test pass.

Output of the learners view of an existing test pass

public

Definition at line 1749 of file class.ilTestOutputGUI.php.

References $_GET.

{
if (array_key_exists("pass", $_GET) && (strlen($_GET["pass"]) > 0))
{
$this->ctrl->saveParameter($this, "pass");
$this->ctrl->saveParameter($this, "active_id");
$this->outTestResults(false, $_GET["pass"]);
}
else
{
$this->outTestResults(false);
}
}
ilTestOutputGUI::populateCancelButtonBlock ( )
private

Definition at line 584 of file class.ilTestOutputGUI.php.

References ilUtil\getImagePath().

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "cancel_test" );
$this->tpl->setVariable( "TEXT_CANCELTEST", $this->lng->txt( "cancel_test" ) );
$this->tpl->setVariable( "TEXT_ALTCANCELTEXT", $this->lng->txt( "cancel_test" ) );
$this->tpl->setVariable( "TEXT_TITLECANCELTEXT", $this->lng->txt( "cancel_test" ) );
$this->tpl->setVariable( "HREF_IMGCANCELTEST",
$this->ctrl->getLinkTargetByClass( get_class( $this ), "outIntroductionPage"
) . "&cancelTest=true"
);
$this->tpl->setVariable( "HREF_CANCELTEXT",
$this->ctrl->getLinkTargetByClass( get_class( $this ), "outIntroductionPage"
) . "&cancelTest=true"
);
$this->tpl->setVariable( "IMAGE_CANCEL", ilUtil::getImagePath( "cancel.png" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateContentStyleBlock ( )
private

Definition at line 757 of file class.ilTestOutputGUI.php.

References ilObjStyleSheet\getContentStylePath().

Referenced by outWorkingForm().

{
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setCurrentBlock( "ContentStyle" );
$this->tpl->setVariable( "LOCATION_CONTENT_STYLESHEET",
);
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateGenericFeedbackBlock (   $question_gui)
private

Definition at line 699 of file class.ilTestOutputGUI.php.

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "answer_feedback" );
$this->tpl->setVariable( "ANSWER_FEEDBACK",
$question_gui->getAnswerFeedbackOutput( $this->object->getTestSession()->getActiveId(),
NULL
)
);
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateLowerNextButtonBlockLeadingToEndOfTest ( )
private

Definition at line 550 of file class.ilTestOutputGUI.php.

Referenced by populateNextButtonsLeadingToEndOfTest().

{
$this->tpl->setCurrentBlock( "next_bottom" );
$this->tpl->setVariable( "BTN_NEXT", $this->lng->txt( "save_finish" ) . " &gt;&gt;" );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateLowerNextButtonBlockLeadingToQuestion ( )
private

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

Referenced by populateNextButtonsLeadingToQuestion().

{
$this->tpl->setCurrentBlock( "next_bottom" );
$this->tpl->setVariable( "BTN_NEXT", $this->lng->txt( "save_next" ) . " &gt;&gt;" );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateLowerNextButtonBlockLeadingToSummary ( )
private

Definition at line 570 of file class.ilTestOutputGUI.php.

Referenced by populateNextButtonsLeadingToSummary().

{
$this->tpl->setCurrentBlock( "next_bottom" );
$this->tpl->setVariable( "BTN_NEXT", $this->lng->txt( "question_summary" ) . " &gt;&gt;" );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateLowerPostponeButtonBlock ( )
private

Definition at line 628 of file class.ilTestOutputGUI.php.

Referenced by populatePostponeButtons().

{
$this->tpl->setCurrentBlock( "postpone_bottom" );
$this->tpl->setVariable( "BTN_POSTPONE", $this->lng->txt( "postpone" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateLowerPreviousButtonBlockLeadingToIntroduction ( )
private

Definition at line 673 of file class.ilTestOutputGUI.php.

Referenced by populatePreviousButtonsLeadingToIntroduction().

{
$this->tpl->setCurrentBlock( "prev_bottom" );
$this->tpl->setVariable( "BTN_PREV", "&lt;&lt; " . $this->lng->txt( "save_introduction" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateLowerPreviousButtonBlockLeadingToQuestion ( )
private

Definition at line 653 of file class.ilTestOutputGUI.php.

Referenced by populatePreviousButtonLeadingToQuestion().

{
$this->tpl->setCurrentBlock( "prev_bottom" );
$this->tpl->setVariable( "BTN_PREV", "&lt;&lt; " . $this->lng->txt( "save_previous" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateLowerSummaryButtonBlock ( )
private

Definition at line 608 of file class.ilTestOutputGUI.php.

Referenced by populateSummaryButtons().

{
$this->tpl->setCurrentBlock( "summary_bottom" );
$this->tpl->setVariable( "BTN_SUMMARY", $this->lng->txt( "question_summary" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateNextButtonsLeadingToEndOfTest ( )
private

Definition at line 544 of file class.ilTestOutputGUI.php.

References populateLowerNextButtonBlockLeadingToEndOfTest(), and populateUpperNextButtonBlockLeadingToEndOfTest().

Referenced by outWorkingForm().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateNextButtonsLeadingToQuestion ( )
private

Definition at line 517 of file class.ilTestOutputGUI.php.

References populateLowerNextButtonBlockLeadingToQuestion(), and populateUpperNextButtonBlockLeadingToQuestion().

Referenced by outWorkingForm().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateNextButtonsLeadingToSummary ( )
private

Definition at line 564 of file class.ilTestOutputGUI.php.

References populateLowerNextButtonBlockLeadingToSummary(), and populateUpperNextButtonBlockLeadingToSummary().

Referenced by outWorkingForm().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populatePostponeButtons ( )
private

Definition at line 622 of file class.ilTestOutputGUI.php.

References populateLowerPostponeButtonBlock(), and populateUpperPostponeButtonBlock().

Referenced by outWorkingForm().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populatePreviousButtonLeadingToQuestion ( )
private

Definition at line 647 of file class.ilTestOutputGUI.php.

References populateLowerPreviousButtonBlockLeadingToQuestion(), and populateUpperPreviousButtonBlockLeadingToQuestion().

Referenced by populatePreviousButtons().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populatePreviousButtons (   $sequence)
private

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

References $sequence, isFirstPageInSequence(), populatePreviousButtonLeadingToQuestion(), and populatePreviousButtonsLeadingToIntroduction().

Referenced by outWorkingForm().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populatePreviousButtonsLeadingToIntroduction ( )
private
ilTestOutputGUI::populateQuestionMarkingBlockAsMarked ( )
private

Definition at line 509 of file class.ilTestOutputGUI.php.

References ilUtil\getImagePath().

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "ismarked" );
$this->tpl->setVariable( "IMAGE_SET", ilUtil::getImagePath( "marked.png" ) );
$this->tpl->setVariable( "TEXT_SET", $this->lng->txt( "tst_remove_mark" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateQuestionMarkingBlockAsUnmarked ( )
private

Definition at line 501 of file class.ilTestOutputGUI.php.

References ilUtil\getImagePath().

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "isnotmarked" );
$this->tpl->setVariable( "IMAGE_UNSET", ilUtil::getImagePath( "marked_.png" ) );
$this->tpl->setVariable( "TEXT_UNSET", $this->lng->txt( "tst_question_mark" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateScoreBlock (   $reachedPoints,
  $maxPoints 
)
private

Definition at line 710 of file class.ilTestOutputGUI.php.

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "solution_output" );
$this->tpl->setVariable( "RECEIVED_POINTS_INFORMATION",
sprintf( $this->lng->txt( "you_received_a_of_b_points" ), $reachedPoints, $maxPoints )
);
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateSolutionBlock (   $solutionoutput)
private

Definition at line 719 of file class.ilTestOutputGUI.php.

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "solution_output" );
$this->tpl->setVariable( "CORRECT_SOLUTION", $this->lng->txt( "tst_best_solution_is" ) );
$this->tpl->setVariable( "QUESTION_FEEDBACK", $solutionoutput );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateSpecificFeedbackBlock (   $question_gui)
private

Definition at line 687 of file class.ilTestOutputGUI.php.

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "specific_feedback" );
$this->tpl->setVariable( "SPECIFIC_FEEDBACK",
$question_gui->getSpecificFeedbackOutput(
$this->object->getTestSession()->getActiveId(),
NULL
)
);
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateSummaryButtons ( )
private

Definition at line 602 of file class.ilTestOutputGUI.php.

References populateLowerSummaryButtonBlock(), and populateUpperSummaryButtonBlock().

Referenced by outWorkingForm().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateSyntaxStyleBlock ( )
private

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

References ilObjStyleSheet\getSyntaxStylePath().

Referenced by outWorkingForm().

{
$this->tpl->setCurrentBlock( "SyntaxStyle" );
$this->tpl->setVariable( "LOCATION_SYNTAX_STYLESHEET",
);
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::populateUpperNextButtonBlockLeadingToEndOfTest ( )
private

Definition at line 557 of file class.ilTestOutputGUI.php.

Referenced by populateNextButtonsLeadingToEndOfTest().

{
$this->tpl->setCurrentBlock( "next" );
$this->tpl->setVariable( "BTN_NEXT", $this->lng->txt( "save_finish" ) . " &gt;&gt;" );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateUpperNextButtonBlockLeadingToQuestion ( )
private

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

Referenced by populateNextButtonsLeadingToQuestion().

{
$this->tpl->setCurrentBlock( "next" );
$this->tpl->setVariable( "BTN_NEXT", $this->lng->txt( "save_next" ) . " &gt;&gt;" );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateUpperNextButtonBlockLeadingToSummary ( )
private

Definition at line 577 of file class.ilTestOutputGUI.php.

Referenced by populateNextButtonsLeadingToSummary().

{
$this->tpl->setCurrentBlock( "next" );
$this->tpl->setVariable( "BTN_NEXT", $this->lng->txt( "question_summary" ) . " &gt;&gt;" );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateUpperPostponeButtonBlock ( )
private

Definition at line 635 of file class.ilTestOutputGUI.php.

Referenced by populatePostponeButtons().

{
$this->tpl->setCurrentBlock( "postpone" );
$this->tpl->setVariable( "BTN_POSTPONE", $this->lng->txt( "postpone" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateUpperPreviousButtonBlockLeadingToIntroduction ( )
private

Definition at line 680 of file class.ilTestOutputGUI.php.

Referenced by populatePreviousButtonsLeadingToIntroduction().

{
$this->tpl->setCurrentBlock( "prev" );
$this->tpl->setVariable( "BTN_PREV", "&lt;&lt; " . $this->lng->txt( "save_introduction" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateUpperPreviousButtonBlockLeadingToQuestion ( )
private

Definition at line 660 of file class.ilTestOutputGUI.php.

Referenced by populatePreviousButtonLeadingToQuestion().

{
$this->tpl->setCurrentBlock( "prev" );
$this->tpl->setVariable( "BTN_PREV", "&lt;&lt; " . $this->lng->txt( "save_previous" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::populateUpperSummaryButtonBlock ( )
private

Definition at line 615 of file class.ilTestOutputGUI.php.

Referenced by populateSummaryButtons().

{
$this->tpl->setCurrentBlock( "summary" );
$this->tpl->setVariable( "BTN_SUMMARY", $this->lng->txt( "question_summary" ) );
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilTestOutputGUI::postpone ( )

Postpone a question to the end of the test.

Postpone a question to the end of the test

public

Definition at line 1287 of file class.ilTestOutputGUI.php.

References saveQuestionSolution().

{
$this->ctrl->setParameter($this, "activecommand", "postpone");
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::previous ( )

Go to the previous question.

Go to the previous question

public

Definition at line 1273 of file class.ilTestOutputGUI.php.

References saveQuestionSolution().

{
$this->ctrl->setParameter($this, "activecommand", "previous");
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::redirectAfterAutosave ( )

Definition at line 1204 of file class.ilTestOutputGUI.php.

References getContentBlockName().

{
$this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_redirect_autosave.html", "Modules/Test");
$this->tpl->setVariable("TEXT_REDIRECT", $this->lng->txt("redirectAfterSave"));
$this->tpl->setCurrentBlock("HeadContent");
$this->tpl->setVariable("CONTENT_BLOCK", "<meta http-equiv=\"refresh\" content=\"5; url=" . $this->ctrl->getLinkTarget($this, "redirectBack") . "\">");
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilTestOutputGUI::redirectBack ( )

Definition at line 1575 of file class.ilTestOutputGUI.php.

References $_GET, and outIntroductionPage().

Referenced by finishTest().

{
if (!$_GET["skipfinalstatement"])
{
if ($this->object->getShowFinalStatement())
{
$this->ctrl->redirect($this, "showFinalStatement");
}
}
if($_GET['crs_show_result'])
{
$this->ctrl->redirectByClass("ilobjtestgui", "backToCourse");
}
if (!$this->object->canViewResults())
{
}
else
{
$this->ctrl->redirectByClass("ilTestEvaluationGUI", "outUserResultsOverview");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::redirectQuestion ( )

Called when a user answered a question to perform a redirect after POST.

This is called for security reasons to prevent users sending a form twice.

public

Definition at line 977 of file class.ilTestOutputGUI.php.

References $_GET, $_SESSION, $ilUser, assQuestion\_updateTestPassResults(), ilObjTest\allObligationsAnswered(), calculateSequence(), outQuestionSummary(), outTestPage(), and ilUtil\sendInfo().

Referenced by finishTest().

{
global $ilUser;
// check the test restrictions to access the test in case one
// of the test navigation commands was called by an external script
// e.g. $ilNavigationHistory
$executable = $this->object->isExecutable($ilUser->getId());
if (!$executable["executable"])
{
ilUtil::sendInfo($executable["errormessage"], TRUE);
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
switch ($_GET["activecommand"])
{
case "next":
$this->sequence = $this->calculateSequence();
if ($this->sequence === FALSE)
{
if ($this->object->getListOfQuestionsEnd())
{
$allObligationsAnswered = ilObjTest::allObligationsAnswered(
$this->object->getTestSession()->getTestId(),
$this->object->getTestSession()->getActiveId(),
$this->object->getTestSession()->getPass()
);
if( $this->object->areObligationsEnabled() && !$allObligationsAnswered )
{
$this->ctrl->redirect($this, "outQuestionSummaryWithObligationsInfo");
}
}
else
{
$this->ctrl->redirect($this, "finishTest");
}
}
else
{
$this->object->getTestSession()->setLastSequence($this->sequence);
$this->object->getTestSession()->saveToDb();
$this->outTestPage();
}
break;
case "previous":
$this->sequence = $this->calculateSequence();
$this->object->getTestSession()->setLastSequence($this->sequence);
$this->object->getTestSession()->saveToDb();
if ($this->sequence === FALSE)
{
$this->ctrl->redirect($this, "outIntroductionPage");
}
else
{
$this->outTestPage();
}
break;
case "postpone":
$this->sequence = $this->calculateSequence();
$nextSequence = $this->object->getTestSequence()->getNextSequence($this->sequence);
$this->object->getTestSequence()->postponeSequence($this->sequence);
$this->object->getTestSequence()->saveToDb();
$this->object->getTestSession()->setLastSequence($nextSequence);
$this->object->getTestSession()->saveToDb();
$this->sequence = $nextSequence;
$this->outTestPage();
break;
case "setmarked":
$this->sequence = $this->calculateSequence();
$this->object->getTestSession()->setLastSequence($this->sequence);
$this->object->getTestSession()->saveToDb();
$q_id = $this->object->getTestSequence()->getQuestionForSequence($_GET["sequence"]);
$this->object->setQuestionSetSolved(1, $q_id, $ilUser->getId());
$this->outTestPage();
break;
case "resetmarked":
$this->sequence = $this->calculateSequence();
$this->object->getTestSession()->setLastSequence($this->sequence);
$this->object->getTestSession()->saveToDb();
$q_id = $this->object->getTestSequence()->getQuestionForSequence($_GET["sequence"]);
$this->object->setQuestionSetSolved(0, $q_id, $ilUser->getId());
$this->outTestPage();
break;
case "directfeedback":
$this->sequence = $this->calculateSequence();
$this->object->getTestSession()->setLastSequence($this->sequence);
$this->object->getTestSession()->saveToDb();
$this->outTestPage();
break;
case "selectImagemapRegion":
$this->sequence = $this->calculateSequence();
$this->object->getTestSession()->setLastSequence($this->sequence);
$this->object->getTestSession()->saveToDb();
$this->outTestPage();
break;
case "summary":
$this->ctrl->redirect($this, "outQuestionSummary");
break;
case "summary_obligations":
$this->ctrl->redirect($this, "outQuestionSummaryWithObligationsInfo");
break;
case "summary_obligations_only":
$this->ctrl->redirect($this, "outObligationsOnlySummary");
break;
case "start":
$_SESSION['tst_pass_finish'] = 0;
$this->object->createTestSession();
$active_id = $this->object->getTestSession()->getActiveId();
$this->ctrl->setParameter($this, "active_id", $active_id);
$shuffle = $this->object->getShuffleQuestions();
if ($this->object->isRandomTest())
{
$this->object->generateRandomQuestions($this->object->getTestSession()->getActiveId());
$this->object->loadQuestions();
$shuffle = FALSE; // shuffle is already done during the creation of the random questions
}
$active_id, $this->object->getTestSession()->getPass(), $this->object->areObligationsEnabled()
);
$this->object->createTestSequence($active_id, 0, $shuffle);
$active_time_id = $this->object->startWorkingTime($this->object->getTestSession()->getActiveId(), $this->object->getTestSession()->getPass());
$_SESSION["active_time_id"] = $active_time_id;
if ($this->object->getListOfQuestionsStart())
{
$this->ctrl->setParameter($this, "activecommand", "summary");
$this->ctrl->redirect($this, "redirectQuestion");
}
else
{
$this->ctrl->setParameter($this, "sequence", $this->sequence);
$this->ctrl->setParameter($this, "activecommand", "gotoquestion");
$this->ctrl->saveParameter($this, "tst_javascript");
$this->ctrl->redirect($this, "redirectQuestion");
}
break;
case "resume":
$_SESSION['tst_pass_finish'] = 0;
$active_id = $this->object->getTestSession()->getActiveId();
$this->ctrl->setParameter($this, "active_id", $active_id);
if ($this->object->isRandomTest())
{
if (!$this->object->hasRandomQuestionsForPass($active_id, $this->object->getTestSession()->getPass()))
{
// create a new set of random questions
$this->object->generateRandomQuestions($active_id, $this->object->getTestSession()->getPass());
}
}
$shuffle = $this->object->getShuffleQuestions();
if ($this->object->isRandomTest())
{
$shuffle = FALSE;
}
$active_id, $this->object->getTestSession()->getPass(), $this->object->areObligationsEnabled()
);
$this->object->createTestSequence($active_id, $this->object->getTestSession()->getPass(), $shuffle);
$this->sequence = $this->object->getTestSession()->getLastSequence();
$active_time_id = $this->object->startWorkingTime($active_id, $this->object->getTestSession()->getPass());
$_SESSION["active_time_id"] = $active_time_id;
if ($this->object->getListOfQuestionsStart())
{
$this->ctrl->setParameter($this, "activecommand", "summary");
$this->ctrl->redirect($this, "redirectQuestion");
}
else
{
$this->ctrl->setParameter($this, "sequence", $this->sequence);
$this->ctrl->setParameter($this, "activecommand", "gotoquestion");
$this->ctrl->saveParameter($this, "tst_javascript");
$this->ctrl->redirect($this, "redirectQuestion");
}
break;
case "back":
case "gotoquestion":
default:
$_SESSION['tst_pass_finish'] = 0;
if (array_key_exists("tst_javascript", $_GET))
{
$ilUser->writePref("tst_javascript", $_GET["tst_javascript"]);
}
$this->sequence = $this->calculateSequence();
if (strlen($_GET['gotosequence'])) $this->sequence = $_GET['gotosequence'];
$this->object->getTestSession()->setLastSequence($this->sequence);
$this->object->getTestSession()->saveToDb();
$this->outTestPage();
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::resetmarked ( )

Set a question unsolved.

Set a question unsolved

public

Definition at line 1343 of file class.ilTestOutputGUI.php.

References saveQuestionSolution().

{
$this->ctrl->setParameter($this, "activecommand", "resetmarked");
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::resume ( )

Resume a test at the last position.

Resume a test at the last position

public

Definition at line 922 of file class.ilTestOutputGUI.php.

References handleStartCommands(), and showMaximumAllowedUsersReachedMessage().

{
if ($this->object->checkMaximumAllowedUsers() == FALSE)
{
}
$this->ctrl->setParameter($this, "activecommand", "resume");
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::saveQuestionSolution (   $force = FALSE)

saves the user input of a question

Definition at line 154 of file class.ilTestOutputGUI.php.

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

Referenced by autosave(), confirmHintRequest(), directfeedback(), gotoQuestion(), next(), postpone(), previous(), resetmarked(), selectImagemapRegion(), setmarked(), showRequestedHintList(), summary(), and togglesidelist().

{
$this->saveResult = FALSE;
if (!$force)
{
$formtimestamp = $_POST["formtimestamp"];
if (strlen($formtimestamp) == 0) $formtimestamp = $_GET["formtimestamp"];
if ($formtimestamp != $_SESSION["formtimestamp"])
{
$_SESSION["formtimestamp"] = $formtimestamp;
}
else
{
return FALSE;
}
}
// save question solution
if ($this->canSaveResult() || $force)
{
// but only if the ending time is not reached
$q_id = $this->object->getTestSequence()->getQuestionForSequence($_GET["sequence"]);
if (is_numeric($q_id) && (int)$q_id)
{
global $ilUser;
$question_gui = $this->object->createQuestionGUI("", $q_id);
if ($this->object->getJavaScriptOutput())
{
$question_gui->object->setOutputType(OUTPUT_JAVASCRIPT);
}
$pass = NULL;
$active_id = $this->object->getTestSession()->getActiveId();
if ($this->object->isRandomTest())
{
$pass = $this->object->_getPass($active_id);
}
$this->saveResult = $question_gui->object->persistWorkingState(
$active_id, $pass, $this->object->areObligationsEnabled()
);
// update learning progress (is done in ilTestSession)
//include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
//ilLPStatusWrapper::_updateStatus($this->object->getId(), $ilUser->getId());
}
}
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:

ilTestOutputGUI::saveTags ( )

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

{
include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
$tagging_gui = new ilTaggingGUI();
$tagging_gui->setObject($this->object->getId(), $this->object->getType());
$tagging_gui->saveInput();
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
ilTestOutputGUI::selectImagemapRegion ( )

Select an image map region in an image map question.

Select an image map region in an image map question

public

Definition at line 1371 of file class.ilTestOutputGUI.php.

References $_POST, saveQuestionSolution(), and togglesidelist().

{
$activecommand = "selectImagemapRegion";
if (array_key_exists('cmd', $_POST))
{
$activecommand = key($_POST["cmd"]);
}
if (preg_match("/^gotoquestion_(\\d+)$/", $activecommand, $matches))
{
$activecommand = "gotoquestion";
if (strlen($matches[1]))
{
$this->ctrl->setParameter($this, 'gotosequence', $matches[1]);
}
}
if (strcmp($activecommand, "togglesidelist") == 0)
{
$this->togglesidelist();
}
else
{
$this->ctrl->setParameter($this, "activecommand", $activecommand);
$this->ctrl->redirect($this, "redirectQuestion");
}
}

+ Here is the call graph for this function:

ilTestOutputGUI::setAnonymousId ( )

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

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

public

Definition at line 817 of file class.ilTestOutputGUI.php.

References $_POST, and $_SESSION.

{
if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
{
$this->object->setAccessCodeSession($_POST["anonymous_id"]);
}
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
ilTestOutputGUI::setmarked ( )

Set a question solved.

Set a question solved

public

Definition at line 1329 of file class.ilTestOutputGUI.php.

References saveQuestionSolution().

{
$this->ctrl->setParameter($this, "activecommand", "setmarked");
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

ilTestOutputGUI::showFinalStatement ( )

Definition at line 1602 of file class.ilTestOutputGUI.php.

References $_GET, and getContentBlockName().

{
$template = new ilTemplate("tpl.il_as_tst_final_statement.html", TRUE, TRUE, "Modules/Test");
$this->ctrl->setParameter($this, "crs_show_result", $_GET['crs_show_result']);
$this->ctrl->setParameter($this, "skipfinalstatement", 1);
$template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "redirectBack"));
$template->setVariable("FINALSTATEMENT", $this->object->getFinalStatement());
$template->setVariable("BUTTON_CONTINUE", $this->lng->txt("btn_next"));
$this->tpl->setVariable($this->getContentBlockName(), $template->get());
}

+ Here is the call graph for this function:

ilTestOutputGUI::showListOfAnswers (   $active_id,
  $pass = NULL,
  $top_data = "",
  $bottom_data = "" 
)

Creates an output of the list of answers for a test participant during the test (only the actual pass will be shown)

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

Definition at line 2139 of file class.ilTestOutputGUI.php.

References $ilUser, $pass, getContentBlockName(), ilTestServiceGUI\getResultsSignature(), ilTestServiceGUI\getResultsUserdata(), and ilUtil\getStyleSheetLocation().

Referenced by backConfirmFinish(), and finishTest().

{
global $ilUser;
$this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_finish_list_of_answers.html", "Modules/Test");
$result_array =& $this->object->getTestResult($active_id, $pass);
$counter = 1;
// output of questions with solutions
foreach ($result_array as $question_data)
{
$question = $question_data["qid"];
if (is_numeric($question))
{
$this->tpl->setCurrentBlock("printview_question");
$question_gui = $this->object->createQuestionGUI("", $question);
$template = new ilTemplate("tpl.il_as_qpl_question_printview.html", TRUE, TRUE, "Modules/TestQuestionPool");
$template->setVariable("COUNTER_QUESTION", $counter.". ");
$template->setVariable("QUESTION_TITLE", $question_gui->object->getTitle());
$show_question_only = ($this->object->getShowSolutionAnswersOnly()) ? TRUE : FALSE;
$result_output = $question_gui->getSolutionOutput($active_id, $pass, FALSE, FALSE, $show_question_only, $this->object->getShowSolutionFeedback());
$template->setVariable("SOLUTION_OUTPUT", $result_output);
$this->tpl->setVariable("QUESTION_OUTPUT", $template->get());
$this->tpl->parseCurrentBlock();
$counter ++;
}
}
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
if ($this->object->getShowSolutionAnswersOnly())
{
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print");
}
if (strlen($top_data))
{
$this->tpl->setCurrentBlock("top_data");
$this->tpl->setVariable("TOP_DATA", $top_data);
$this->tpl->parseCurrentBlock();
}
if (strlen($bottom_data))
{
$this->tpl->setCurrentBlock("bottom_data");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("BOTTOM_DATA", $bottom_data);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("TXT_ANSWER_SHEET", $this->lng->txt("tst_list_of_answers"));
$user_data = $this->getResultsUserdata($active_id, TRUE);
$signature = $this->getResultsSignature();
$this->tpl->setVariable("USER_DETAILS", $user_data);
$this->tpl->setVariable("SIGNATURE", $signature);
$this->tpl->setVariable("TITLE", $this->object->getTitle());
$this->tpl->setVariable("TXT_TEST_PROLOG", $this->lng->txt("tst_your_answers"));
$invited_user =& $this->object->getInvitedUsers($ilUser->getId());
$pagetitle = $this->object->getTitle() . " - " . $this->lng->txt("clientip") .
": " . $invited_user[$ilUser->getId()]["clientip"] . " - " .
$this->lng->txt("matriculation") . ": " .
$invited_user[$ilUser->getId()]["matriculation"];
$this->tpl->setVariable("PAGETITLE", $pagetitle);
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::showMaximumAllowedUsersReachedMessage ( )

Definition at line 2058 of file class.ilTestOutputGUI.php.

References getContentBlockName().

Referenced by resume(), and startTest().

{
$this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_max_allowed_users_reached.html", "Modules/Test");
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("MAX_ALLOWED_USERS_MESSAGE", sprintf($this->lng->txt("tst_max_allowed_users_message"), $this->object->getAllowedUsersTimeGap()));
$this->tpl->setVariable("MAX_ALLOWED_USERS_HEADING", sprintf($this->lng->txt("tst_max_allowed_users_heading"), $this->object->getAllowedUsersTimeGap()));
$this->tpl->setVariable("BACK_TO_INTRODUCTION", $this->lng->txt("tst_results_back_introduction"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::showPasswordProtectionPage ( )

Displays a password protection page when a test password is set.

public

Definition at line 772 of file class.ilTestOutputGUI.php.

References getContentBlockName().

Referenced by startTest().

{
$template = new ilTemplate("tpl.il_as_tst_password_protection.html", TRUE, TRUE, "Modules/Test");
$template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "checkPassword"));
$template->setVariable("PASSWORD_INTRODUCTION", $this->lng->txt("tst_password_introduction"));
$template->setVariable("TEXT_PASSWORD", $this->lng->txt("tst_password"));
$template->setVariable("SUBMIT", $this->lng->txt("submit"));
$this->tpl->setVariable($this->getContentBlockName(), $template->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::showRequestedHintList ( )
private

Go to requested hint list.

private

Definition at line 2241 of file class.ilTestOutputGUI.php.

References ilAssQuestionHintRequestGUI\CMD_SHOW_LIST, and saveQuestionSolution().

{
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
$this->ctrl->redirectByClass('ilAssQuestionHintRequestGUI', ilAssQuestionHintRequestGUI::CMD_SHOW_LIST);
}

+ Here is the call graph for this function:

ilTestOutputGUI::showSideList ( )
private

Definition at line 727 of file class.ilTestOutputGUI.php.

References $ilUser, ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), and outQuestionSummary().

Referenced by outWorkingForm().

{
global $ilUser;
$show_side_list = $ilUser->getPref( 'side_list_of_questions' );
$this->tpl->setCurrentBlock( 'view_sidelist' );
$this->tpl->setVariable( 'IMAGE_SIDELIST',
($show_side_list) ? ilUtil::getImagePath( 'view_remove.png'
) : ilUtil::getImagePath( 'view_choose.png' )
);
$this->tpl->setVariable( 'TEXT_SIDELIST',
($show_side_list) ? $this->lng->txt( 'tst_hide_side_list'
) : $this->lng->txt( 'tst_show_side_list' )
);
$this->tpl->parseCurrentBlock();
if ($show_side_list)
{
$this->tpl->addCss( ilUtil::getStyleSheetLocation( "output", "ta_split.css", "Modules/Test" ), "screen" );
$this->outQuestionSummary( false );
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::start ( )

Start a test for the first time.

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

public

Definition at line 834 of file class.ilTestOutputGUI.php.

References $_POST, $_SESSION, and handleStartCommands().

{
if (strcmp($_SESSION["lock"], $_POST["lock"]) != 0)
{
$_SESSION["lock"] = $_POST["lock"];
$this->ctrl->redirect($this, "startTest");
}
else
{
$this->ctrl->redirectByClass("ilobjtestgui", "redirectToInfoScreen");
}
}

+ Here is the call graph for this function:

ilTestOutputGUI::startTest ( )

Start a test for the first time after a redirect.

public

Definition at line 853 of file class.ilTestOutputGUI.php.

References $_SESSION, $ilUser, showMaximumAllowedUsersReachedMessage(), and showPasswordProtectionPage().

{
if ($this->object->checkMaximumAllowedUsers() == FALSE)
{
}
if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
{
$this->object->setAccessCodeSession($this->object->createNewAccessCode());
}
else
{
$this->object->unsetAccessCodeSession();
}
if (strlen($this->object->getPassword()))
{
global $ilUser;
global $rbacsystem;
$pwd = '';
if( $_SESSION["AccountId"] != ANONYMOUS_USER_ID )
{
$pwd = $ilUser->getPref("tst_password_".$this->object->getTestId());
}
elseif( isset($_SESSION['tst_password_'.$this->object->getTestId()]) )
{
$pwd = $_SESSION['tst_password_'.$this->object->getTestId()];
}
if ((strcmp($pwd, $this->object->getPassword()) != 0) && (!$rbacsystem->checkAccess("write", $this->object->getRefId())))
{
return $this->showPasswordProtectionPage();
}
}
if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
{
$this->ctrl->redirect($this, "displayCode");
}
else
{
$this->ctrl->setParameter($this, "activecommand", "start");
$this->ctrl->redirect($this, "redirectQuestion");
}
}

+ Here is the call graph for this function:

ilTestOutputGUI::summary ( )

Show the question summary in online exams.

Show the question summary in online exams

public

Definition at line 1301 of file class.ilTestOutputGUI.php.

References saveQuestionSolution().

{
if ($this->saveResult == FALSE)
{
$this->ctrl->setParameter($this, "activecommand", "");
$this->ctrl->redirect($this, "redirectQuestion");
}
else
{
$this->ctrl->setParameter($this, "activecommand", "summary");
$this->ctrl->redirect($this, "redirectQuestion");
}
}

+ Here is the call graph for this function:

ilTestOutputGUI::summaryWithoutSaving ( )

Definition at line 1316 of file class.ilTestOutputGUI.php.

{
$this->ctrl->setParameter($this, "activecommand", "summary");
$this->ctrl->redirect($this, "redirectQuestion");
}
ilTestOutputGUI::togglesidelist ( )

Toggle side list.

Definition at line 1242 of file class.ilTestOutputGUI.php.

References $ilUser, and saveQuestionSolution().

Referenced by selectImagemapRegion().

{
global $ilUser;
$show_side_list = $ilUser->getPref('side_list_of_questions');
$ilUser->writePref('side_list_of_questions', !$show_side_list);
$this->ctrl->redirect($this, "redirectQuestion");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::updateWorkingTime ( )

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

Definition at line 143 of file class.ilTestOutputGUI.php.

References $_SESSION.

Referenced by saveQuestionSolution().

{
if ($_SESSION["active_time_id"])
{
$this->object->updateWorkingTime($_SESSION["active_time_id"]);
}
}

+ Here is the caller graph for this function:

Field Documentation

ilTestOutputGUI::$cmdCtrl

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

ilTestOutputGUI::$endingTimeReached

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

ilTestOutputGUI::$maxProcessingTimeReached

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

ilTestOutputGUI::$ref_id

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

ilTestOutputGUI::$saveResult

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

Referenced by saveQuestionSolution().


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