ILIAS  Release_4_0_x_branch Revision 61816
 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

 ilTestOutputGUI ($a_object)
 ilSurveyExecutionGUI constructor
 saveTags ()
executeCommand ()
 execute command
 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.
 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.
 confirmFinishTest ()
 Confirmation of the tests final submission.
 finishTest ($confirm=true)
 Finish the test.
 redirectBack ()
 showFinalStatement ()
 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)
 Output of a summary of all test questions for test participants.
 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 ($a_object)
 ilTestScoringGUI constructor
 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
 $lng
 $tpl
 $ctrl
 $ilias
 $tree
 $ref_id

Private Member Functions

 getKioskHead ()
 endingTimeReached ()
 handle endingTimeReached
 getContentBlockName ()
 Returns the name of the current content block (depends on the kiosk mode setting)

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
Version
Id:
class.ilTestOutputGUI.php 27379 2011-01-12 21:28:16Z hschottm

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

Member Function Documentation

ilTestOutputGUI::autosave ( )

Definition at line 869 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)
{
$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");
}
echo $result;
}

+ Here is the call graph for this function:

ilTestOutputGUI::backConfirmFinish ( )

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

References 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 1056 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.

Calculates the sequence to determine the next question

public

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

References $_GET, and $sequence.

Referenced by 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 188 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 1292 of file class.ilTestOutputGUI.php.

References $user, 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 481 of file class.ilTestOutputGUI.php.

References $_POST, $_SESSION, 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());
}
$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 590 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 1069 of file class.ilTestOutputGUI.php.

References finishTest().

{
$this->finishTest(false);
}

+ Here is the call graph for this function:

ilTestOutputGUI::confirmFinishTest ( )

Confirmation of the tests final submission.

Confirmation of the tests final submission

public

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

References getContentBlockName().

Referenced by finishListOfAnswers(), and finishTest().

{
global $ilUser;
$template = new ilTemplate("tpl.il_as_tst_finish_confirmation.html", TRUE, TRUE, "Modules/Test");
$template->setVariable("FINISH_QUESTION", $this->lng->txt("tst_finish_confirmation_question"));
$template->setVariable("BUTTON_CONFIRM", $this->lng->txt("tst_finish_confirm_button"));
if ($this->object->canShowSolutionPrintview($ilUser->getId()))
{
$template->setVariable("BUTTON_CANCEL", $this->lng->txt("tst_finish_confirm_list_of_answers_button"));
}
else
{
$template->setVariable("BUTTON_CANCEL", $this->lng->txt("tst_finish_confirm_cancel_button"));
}
$template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable($this->getContentBlockName(), $template->get());
}

+ Here is the call graph for this function:

+ Here is the caller 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 1392 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::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 1006 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 579 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 1359 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 81 of file class.ilTestOutputGUI.php.

References $_GET, $cmd, $ret, ilTestServiceGUI\getCommand(), and ilYuiUtil\initConnectionWithAnimation().

{
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/YUI/classes/class.ilYuiUtil.php";
$cmd = $this->getCommand($cmd);
switch($next_class)
{
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilTestOutputGUI::finishListOfAnswers ( )

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

References confirmFinishTest().

{
}

+ Here is the call graph for this function:

ilTestOutputGUI::finishTest (   $confirm = true)

Finish the test.

Finish the test

public

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

References $_SESSION, $ilAuth, ilTestServiceGUI\$ilias, confirmFinishTest(), redirectBack(), 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);
if (($actualpass == $this->object->getNrOfTries() - 1) && (!$confirm))
{
$this->object->setActiveTestSubmitted($ilUser->getId());
$ilAuth->setIdle($ilias->ini->readVariable("session","expire"), 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;
$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 1756 of file class.ilTestOutputGUI.php.

Referenced by confirmFinishTest(), 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 ( )
private

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

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 1039 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 617 of file class.ilTestOutputGUI.php.

References $_POST.

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::ilTestOutputGUI (   $a_object)

ilSurveyExecutionGUI constructor

The constructor takes possible arguments an creates an instance of the ilSurveyExecutionGUI object.

Parameters
object$a_objectAssociated ilObjSurvey class public

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

References $_GET, and ilTestServiceGUI\ilTestServiceGUI().

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

+ Here is the call 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 213 of file class.ilTestOutputGUI.php.

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 1328 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 1317 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 1382 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 914 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 1645 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 200 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::outProcessingTime (   $active_id)

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

References 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 . " " . $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 . " " . $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 . " " . $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 . " " . $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)

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

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

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

Referenced by outWorkingForm(), and redirectQuestion().

{
if ($fullpage) $this->tpl->addBlockFile($this->getContentBlockName(), "adm_content", "tpl.il_as_tst_question_summary.html", "Modules/Test");
$active_id = $this->object->getTestSession()->getActiveId();
$result_array = & $this->object->getTestSequence()->getSequenceSummary();
$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"]
));
}
$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());
$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();
}
$template->setCurrentBlock('item');
$active = ($row['sequence'] == $this->sequence) ? ' active' : '';
$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::outTestPage ( )

Outputs the question of the active sequence.

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

References $_GET, 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->getInstantFeedbackSolution() == 1) || ($this->object->getAnswerFeedback() == 1) || ($this->object->getAnswerFeedbackPoints() == 1))
{
$this->tpl->setCurrentBlock("direct_feedback");
$this->tpl->setVariable("TEXT_DIRECT_FEEDBACK", $this->lng->txt("check"));
$this->tpl->parseCurrentBlock();
}
$postpone = false;
if ($this->object->getSequenceSettings() == TEST_POSTPONE)
{
$postpone = true;
}
if ($this->object->getEnableProcessingTime())
{
$this->outProcessingTime($this->object->getTestSession()->getActiveId());
}
$this->tpl->setVariable("FORM_TIMESTAMP", time());
$directfeedback = 0;
if (strcmp($_GET["activecommand"], "directfeedback") == 0) $directfeedback = 1;
$this->outWorkingForm($this->sequence, $this->object->getTestId(), $postpone, $directfeedback, $show_summary);
$this->tpl->setVariable("PAGETITLE", "- " . $this->object->getTitle());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestOutputGUI::outUserListOfAnswerPasses ( )

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

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

Definition at line 1770 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 231 of file class.ilTestOutputGUI.php.

References $_GET, $_SESSION, $sequence, ilObjTest\_getSolvedQuestions(), ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), ilUtil\getJSLocation(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), OUTPUT_JAVASCRIPT, and outQuestionSummary().

Referenced by outTestPage().

{
global $ilUser;
if ($sequence < 1) $sequence = $this->object->getTestSequence()->getFirstSequence();
$active_time_id = $this->object->startWorkingTime($this->object->getTestSession()->getActiveId(), $this->object->getTestSession()->getPass());
$_SESSION["active_time_id"] = $active_time_id;
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
if ($this->object->getListOfQuestions())
{
$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);
}
}
$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"]);
}
$answer_feedback = FALSE;
if (($directfeedback) && ($this->object->getAnswerFeedback()))
{
$answer_feedback = TRUE;
}
global $ilNavigationHistory;
$ilNavigationHistory->addItem($_GET["ref_id"], $this->ctrl->getLinkTarget($this, "resume"), "tst");
$question_gui->outQuestionForTest($formaction, $this->object->getTestSession()->getActiveId(), NULL, $is_postponed, $user_post_solution, $answer_feedback);
if ($directfeedback)
{
if ($this->object->getInstantFeedbackSolution())
{
$solutionoutput = $question_gui->getSolutionOutput($this->object->getTestSession()->getActiveId(), NULL, FALSE, FALSE, FALSE, FALSE, TRUE);
$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();
}
if ($this->object->getAnswerFeedbackPoints())
{
$this->tpl->setCurrentBlock("solution_output");
$this->tpl->setVariable("RECEIVED_POINTS_INFORMATION", sprintf($this->lng->txt("you_received_a_of_b_points"), $question_gui->object->calculateReachedPoints($this->object->getTestSession()->getActiveId(), NULL), $question_gui->object->getMaximumPoints()));
$this->tpl->parseCurrentBlock();
}
if ($this->object->getAnswerFeedback())
{
$this->tpl->setCurrentBlock("answer_feedback");
$this->tpl->setVariable("ANSWER_FEEDBACK", $question_gui->getAnswerFeedbackOutput($this->object->getTestSession()->getActiveId(), NULL));
$this->tpl->parseCurrentBlock();
}
}
if ($sequence == $this->object->getTestSequence()->getFirstSequence())
{
$this->tpl->setCurrentBlock("prev");
$this->tpl->setVariable("BTN_PREV", "&lt;&lt; " . $this->lng->txt("save_introduction"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("prev_bottom");
$this->tpl->setVariable("BTN_PREV", "&lt;&lt; " . $this->lng->txt("save_introduction"));
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("prev");
$this->tpl->setVariable("BTN_PREV", "&lt;&lt; " . $this->lng->txt("save_previous"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("prev_bottom");
$this->tpl->setVariable("BTN_PREV", "&lt;&lt; " . $this->lng->txt("save_previous"));
$this->tpl->parseCurrentBlock();
}
if ($postpone_allowed)
{
if (!$is_postponed)
{
if (!$finish)
{
$this->tpl->setCurrentBlock("postpone");
$this->tpl->setVariable("BTN_POSTPONE", $this->lng->txt("postpone"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("postpone_bottom");
$this->tpl->setVariable("BTN_POSTPONE", $this->lng->txt("postpone"));
$this->tpl->parseCurrentBlock();
}
}
}
if ($this->object->getListOfQuestions())
{
if (!(($finish) && ($this->object->getListOfQuestionsEnd())))
{
$this->tpl->setCurrentBlock("summary");
$this->tpl->setVariable("BTN_SUMMARY", $this->lng->txt("question_summary"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("summary_bottom");
$this->tpl->setVariable("BTN_SUMMARY", $this->lng->txt("question_summary"));
$this->tpl->parseCurrentBlock();
}
}
if ($this->object->getShowCancel())
{
$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.gif"));
$this->tpl->parseCurrentBlock();
}
if ($this->object->getTestSequence()->getQuestionForSequence($this->object->getTestSequence()->getLastSequence()) == $question_gui->object->getId())
{
if ($this->object->getListOfQuestionsEnd())
{
$this->tpl->setCurrentBlock("next");
$this->tpl->setVariable("BTN_NEXT", $this->lng->txt("question_summary") . " &gt;&gt;");
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("next_bottom");
$this->tpl->setVariable("BTN_NEXT", $this->lng->txt("question_summary") . " &gt;&gt;");
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("next");
$this->tpl->setVariable("BTN_NEXT", $this->lng->txt("save_finish") . " &gt;&gt;");
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("next_bottom");
$this->tpl->setVariable("BTN_NEXT", $this->lng->txt("save_finish") . " &gt;&gt;");
$this->tpl->parseCurrentBlock();
}
}
else
{
$this->tpl->setCurrentBlock("next");
$this->tpl->setVariable("BTN_NEXT", $this->lng->txt("save_next") . " &gt;&gt;");
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("next_bottom");
$this->tpl->setVariable("BTN_NEXT", $this->lng->txt("save_next") . " &gt;&gt;");
$this->tpl->parseCurrentBlock();
}
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)
{
$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();
}
else
{
$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();
}
}
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->getLinkTarget($this, "autosave"));
}

+ 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 1340 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::postpone ( )

Postpone a question to the end of the test.

Postpone a question to the end of the test

public

Definition at line 942 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 928 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 860 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 1164 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.

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 660 of file class.ilTestOutputGUI.php.

References $_GET, $_SESSION, calculateSequence(), outQuestionSummary(), outTestPage(), and ilUtil\sendInfo().

{
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())
{
}
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 "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
}
$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;
}
$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:

ilTestOutputGUI::resetmarked ( )

Set a question unsolved.

Set a question unsolved

public

Definition at line 992 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 603 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 132 of file class.ilTestOutputGUI.php.

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

Referenced by autosave(), directfeedback(), gotoQuestion(), next(), postpone(), previous(), resetmarked(), selectImagemapRegion(), setmarked(), 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))
{
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->saveWorkingData($active_id, $pass);
}
}
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 69 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 1020 of file class.ilTestOutputGUI.php.

References $_POST, and saveQuestionSolution().

{
$activecommand = "selectImagemapRegion";
if (array_key_exists("cmd", $_POST))
{
$activecommand = key($_POST["cmd"]);
}
$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 507 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 978 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 1191 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 1683 of file class.ilTestOutputGUI.php.

References $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 1602 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 466 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::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 524 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 543 of file class.ilTestOutputGUI.php.

References $_SESSION, 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 = $ilUser->getPref("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 956 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::togglesidelist ( )

Toggle side list.

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

References saveQuestionSolution().

{
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:

ilTestOutputGUI::updateWorkingTime ( )

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

Definition at line 121 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 45 of file class.ilTestOutputGUI.php.

ilTestOutputGUI::$endingTimeReached

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

ilTestOutputGUI::$maxProcessingTimeReached

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

ilTestOutputGUI::$ref_id

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

ilTestOutputGUI::$saveResult

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

Referenced by saveQuestionSolution().

ilTestOutputGUI::$sequence

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

Referenced by calculateSequence(), outQuestionSummary(), and outWorkingForm().


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