ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestSubmissionReviewGUI Class Reference

Class ilTestSubmissionReviewGUI. More...

+ Collaboration diagram for ilTestSubmissionReviewGUI:

Public Member Functions

 __construct (ilTestOutputGUI $testOutputGUI, ilObjTest $test, ilTestSession $testSession)
 executeCommand ()
 show ()

Protected Member Functions

 dispatchCommand ()

Protected Attributes

 $testOutputGUI = null
 $test = null
 $lng
 $ilCtrl
 $tpl
 $testSession

Private Member Functions

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

Detailed Description

Constructor & Destructor Documentation

ilTestSubmissionReviewGUI::__construct ( ilTestOutputGUI  $testOutputGUI,
ilObjTest  $test,
ilTestSession  $testSession 
)

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

References $ilCtrl, $lng, $test, $testOutputGUI, $testSession, and $tpl.

{
global $lng, $ilCtrl, $tpl;
$this->lng = $lng;
$this->ilCtrl = $ilCtrl;
$this->tpl = $tpl;
$this->testOutputGUI = $testOutputGUI;
$this->test = $test;
$this->testSession = $testSession;
}

Member Function Documentation

ilTestSubmissionReviewGUI::dispatchCommand ( )
protected

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

References $cmd, $ret, ilCtrl\getCmd(), and show().

Referenced by executeCommand().

{
$cmd = $this->ilCtrl->getCmd();
switch ($cmd)
{
default:
$ret = $this->show();
}
return $ret;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSubmissionReviewGUI::executeCommand ( )

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

References $ret, dispatchCommand(), and ilCtrl\getNextClass().

{
$next_class = $this->ilCtrl->getNextClass($this);
switch($next_class)
{
default:
$ret = $this->dispatchCommand();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilTestSubmissionReviewGUI::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 75 of file class.ilTestSubmissionReviewGUI.php.

Referenced by show().

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

+ Here is the caller graph for this function:

ilTestSubmissionReviewGUI::show ( )

Definition at line 89 of file class.ilTestSubmissionReviewGUI.php.

References $filename, $ilSetting, $ilUser, $path, $results, ilTestPDFGenerator\generatePDF(), getContentBlockName(), ilCtrl\getFormAction(), ilUtil\getWebspaceDir(), ilUtil\makeDirParents(), ilTestPDFGenerator\PDF_OUTPUT_FILE, and ilCtrl\setParameter().

Referenced by dispatchCommand().

{
require_once 'class.ilTestEvaluationGUI.php';
require_once './Services/PDFGeneration/classes/class.ilPDFGeneration.php';
global $ilUser;
$template = new ilTemplate("tpl.il_as_tst_submission_review.html", TRUE, TRUE, "Modules/Test");
$this->ilCtrl->setParameter($this, "skipfinalstatement", 1);
$template->setVariable("FORMACTION", $this->ilCtrl->getFormAction($this->testOutputGUI, 'redirectBack').'&reviewed=1');
$template->setVariable("BUTTON_CONTINUE", $this->lng->txt("btn_next"));
$template->setVariable("BUTTON_BACK", $this->lng->txt("btn_previous"));
if($this->test->getListOfQuestionsEnd())
{
$template->setVariable("CANCEL_CMD", 'outQuestionSummary');
}
else
{
$template->setVariable("CANCEL_CMD", 'backFromSummary');
}
$active = $this->test->getActiveIdOfUser($ilUser->getId());
$testevaluationgui = new ilTestEvaluationGUI($this->test);
$testevaluationgui->setContextWithinTestPass(true);
$results = $this->test->getTestResult($active, $this->testSession->getPass());
$results_output = $testevaluationgui->getPassListOfAnswers(
$results, $active, $this->testSession->getPass(), false, false, false, false
);
if ($this->test->getShowExamviewPdf())
{
$template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
global $ilSetting;
$inst_id = $ilSetting->get('inst_id', null);
$path = ilUtil::getWebspaceDir() . '/assessment/'. $this->testOutputGUI->object->getId() . '/exam_pdf';
if (!is_dir($path))
{
}
$filename = $path . '/exam_N' . $inst_id . '-' . $this->testOutputGUI->object->getId() . '-' . $active . '-' . $this->testSession->getPass() . '.pdf';
require_once 'class.ilTestPDFGenerator.php';
$template->setVariable("PDF_FILE_LOCATION", $filename);
}
else
{
$template->setCurrentBlock('prevent_double_form_subm');
$template->touchBlock('prevent_double_form_subm');
$template->parseCurrentBlock();
}
if($this->test->getShowExamviewHtml())
{
if($this->test->getListOfQuestionsEnd())
{
$template->setVariable("CANCEL_CMD_BOTTOM", 'outQuestionSummary');
}
else
{
$template->setVariable("CANCEL_CMD_BOTTOM", 'backFromSummary');
}
$template->setVariable("BUTTON_CONTINUE_BOTTOM", $this->lng->txt("btn_next"));
$template->setVariable("BUTTON_BACK_BOTTOM", $this->lng->txt("btn_previous"));
$template->setVariable('HTML_REVIEW', $results_output);
}
$this->tpl->setVariable($this->getContentBlockName(), $template->get() );
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilTestSubmissionReviewGUI::$ilCtrl
protected

Definition at line 24 of file class.ilTestSubmissionReviewGUI.php.

Referenced by __construct().

ilTestSubmissionReviewGUI::$lng
protected

Definition at line 21 of file class.ilTestSubmissionReviewGUI.php.

Referenced by __construct().

ilTestSubmissionReviewGUI::$test = null
protected

Definition at line 18 of file class.ilTestSubmissionReviewGUI.php.

Referenced by __construct().

ilTestSubmissionReviewGUI::$testOutputGUI = null
protected

Definition at line 15 of file class.ilTestSubmissionReviewGUI.php.

Referenced by __construct().

ilTestSubmissionReviewGUI::$testSession
protected

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

Referenced by __construct().

ilTestSubmissionReviewGUI::$tpl
protected

Definition at line 27 of file class.ilTestSubmissionReviewGUI.php.

Referenced by __construct().


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