ILIAS  Release_4_4_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)
 executeCommand ()
 show ()

Protected Member Functions

 dispatchCommand ()
 getTestEvaluationGUI ()

Protected Attributes

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

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 
)

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

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

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

Member Function Documentation

ilTestSubmissionReviewGUI::dispatchCommand ( )
protected

Definition at line 60 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 41 of file class.ilTestSubmissionReviewGUI.php.

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

{
$next_class = $this->ilCtrl->getNextClass($this);
switch($next_class)
{
case 'iltestoutputgui':
$this->ilCtrl->forwardCommand($this->testOutputGUI);
break;
case 'iltestevaluationgui':
break;
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 86 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::getTestEvaluationGUI ( )
protected

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

Referenced by executeCommand().

{
require_once 'class.ilTestEvaluationGUI.php';
$eval_gui = new ilTestEvaluationGUI($this->test);
return $eval_gui;
}

+ Here is the caller graph for this function:

ilTestSubmissionReviewGUI::show ( )

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

References $_GET, $filename, $ilSetting, $ilUser, $pass, $path, $results, ilTestPDFGenerator\generatePDF(), getContentBlockName(), ilCtrl\getFormAction(), ilUtil\getHtmlPath(), ilUtil\getImagePath(), 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;
if ( ( array_key_exists("pass", $_GET) && (strlen($_GET["pass"]) > 0) ) || (!is_null($pass) ) )
{
if ( is_null($pass) )
{
$pass = $_GET["pass"];
}
}
$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');
}
$this->ilCtrl->setParameter($this, "pass", "");
$this->ilCtrl->setParameter($this, "pdf", "");
$active = $this->test->getActiveIdOfUser($ilUser->getId());
$testevaluationgui = new ilTestEvaluationGUI($this->test);
$results = $this->test->getTestResult($active,$pass);
$results_output = $testevaluationgui->getPassListOfAnswers($results, $active, $pass, false, false, false, false);
if ($this->test->getShowExamviewPdf())
{
$template->setCurrentBlock("pdf_export");
$template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
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 . '-' . $pass . '.pdf';
require_once 'class.ilTestPDFGenerator.php';
$template->setVariable("PDF_FILE_LOCATION", $filename);
}
if ($this->test->getShowExamviewHtml())
{
$template->setCurrentBlock('html_review');
$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 25 of file class.ilTestSubmissionReviewGUI.php.

Referenced by __construct().

ilTestSubmissionReviewGUI::$lng
protected

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

Referenced by __construct().

ilTestSubmissionReviewGUI::$testOutputGUI = null
protected

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

Referenced by __construct().

ilTestSubmissionReviewGUI::$testSession = null
protected

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

ilTestSubmissionReviewGUI::$tpl
protected

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

Referenced by __construct().


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