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

Output class for assessment test evaluation. More...

+ Inheritance diagram for ilTestEvaluationGUI:
+ Collaboration diagram for ilTestEvaluationGUI:

Public Member Functions

 __construct (ilObjTest $a_object)
 ilTestEvaluationGUI constructor
executeCommand ()
 execute command
getHeaderNames ()
getHeaderVars ()
 filterEvaluation ()
 resetfilterEvaluation ()
 detailedEvaluation ()
 Creates the detailed evaluation output for a selected participant.
 exportQuestionForAllParticipants ()
 Creates a PDF representation of the answers for a given question in a test.
 exportFileUploadsForAllParticipants ()
 Creates a ZIP file containing all file uploads for a given question in a test.
 exportEvaluation ()
 Exports the evaluation data to a selected file format.
 exportAggregatedResults ()
 Exports the aggregated results.
 exportCertificate ()
 Exports the user results as PDF certificates using XSL-FO via XML:RPC calls.
 getEvaluationQuestionId ($question_id, $original_id="")
 Returns the ID of a question for evaluation purposes.
 outParticipantsPassDetails ()
 Output of the pass details of an existing test pass for the test statistics.
 outParticipantsResultsOverview ()
 Output of the pass overview for a test called from the statistics.
 outUserPassDetailsSetTableFilter ()
 outUserPassDetailsResetTableFilter ()
 outUserPassDetails ()
 Output of the pass details of an existing test pass for the active test participant.
 outUserResultsOverview ()
 Output of the pass overview for a test called by a test participant.
 outUserListOfAnswerPasses ()
 Output of the pass overview for a user when he/she wants to see his/her list of answers.
 passDetails ()
 Output of the learners view of an existing test pass.
 outCorrectSolution ()
 Creates an output of the solution of an answer compared to the correct solution.
 singleResults ()
 Creates user results for single questions.
 outCertificate ()
 Output of a test certificate.
 confirmDeletePass ()
 cancelDeletePass ()
- Public Member Functions inherited from ilTestServiceGUI
 isContextWithinTestPass ()
 setContextWithinTestPass ($contextWithinTestPass)
 ilTestServiceGUI (ilObjTest $a_object)
 The constructor takes the test object reference as parameter.
 setParticipantData ($participantData)
 getParticipantData ()
 getCommand ($cmd)
 Retrieves the ilCtrl command.
 getPassOverview ($active_id, $targetclass="", $targetcommand="", $short=FALSE, $hide_details=FALSE, $adminMode=false)
 Returns the pass overview for a given active ID.
 getPassListOfAnswers (&$result_array, $active_id, $pass, $show_solutions=FALSE, $only_answered_questions=FALSE, $show_question_only=FALSE, $show_reached_points=FALSE, $anchorNav=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.
 getResultsSignature ()
 Returns HTML code for a signature field.
 getResultsUserdata ($testSession, $active_id, $overwrite_anonymity=FALSE)
 Returns the user data for a test results output.
 getCorrectSolutionOutput ($question_id, $active_id, $pass)
 Returns an output of the solution to an answer compared to the correct solution.
 getResultsOfUserOutput ($testSession, $active_id, $pass, $targetGUI, $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.

Protected Member Functions

 getFilteredTestResult ($active_id, $pass)
- Protected Member Functions inherited from ilTestServiceGUI
 isPdfDeliveryRequest ()
 getPassDetailsOverview ($result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav)
 buildPassDetailsOverviewTableGUI ($targetGUI, $targetCMD)
 isGradingMessageRequired ()
 getGradingMessage ($activeId)

Private Member Functions

 redirectToPassDeletionContext ($context)

Additional Inherited Members

- Data Fields inherited from ilTestServiceGUI
 $object = null
 $service = null
 $lng
 $tpl
 $ctrl
 $ilias
 $tree
 $ref_id
- Protected Attributes inherited from ilTestServiceGUI
 $db
 $testSessionFactory = null
 $testSequenceFactory = null
 $participantData

Detailed Description

Output class for assessment test evaluation.

The ilTestEvaluationGUI class creates the output for the ilObjTestGUI class when authors evaluate 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
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
Id:
class.ilTestEvaluationGUI.php 61403 2015-12-03 08:10:14Z gitmgr

ilTestEvaluationGUI: ilTestPassDetailsOverviewTableGUI ilTestEvaluationGUI: ilTestResultsToolbarGUI ilTestEvaluationGUI: ilTestPassDeletionConfirmationGUI

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

Constructor & Destructor Documentation

ilTestEvaluationGUI::__construct ( ilObjTest  $a_object)

ilTestEvaluationGUI constructor

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

Parameters
ilObjTest$a_objectAssociated ilObjTest class

Definition at line 37 of file class.ilTestEvaluationGUI.php.

References ilTestServiceGUI\ilTestServiceGUI().

{
}

+ Here is the call graph for this function:

Member Function Documentation

ilTestEvaluationGUI::cancelDeletePass ( )

Definition at line 1560 of file class.ilTestEvaluationGUI.php.

References $_POST, and redirectToPassDeletionContext().

{
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::confirmDeletePass ( )

Definition at line 1535 of file class.ilTestEvaluationGUI.php.

References $_GET, ilTestServiceGUI\$tpl, and ilTestPassDeletionConfirmationGUI\CONTEXT_PASS_OVERVIEW.

{
if( !$this->object->isPassDeletionAllowed() )
{
$this->ctrl->redirect($this, 'outUserResultsOverview');
}
require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
if( isset($_GET['context']) && strlen($_GET['context']) )
{
$context = $_GET['context'];
}
else
{
}
$confirm = new ilTestPassDeletionConfirmationGUI($this->ctrl, $this->lng, $this);
$confirm->build((int)$_GET['active_id'], (int)$_GET['pass'], $context);
global $tpl;
$tpl->setContent($this->ctrl->getHTML($confirm));
}
ilTestEvaluationGUI::detailedEvaluation ( )

Creates the detailed evaluation output for a selected participant.

Creates the detailed evaluation output for a selected participant

public

Definition at line 327 of file class.ilTestEvaluationGUI.php.

References $_GET, $pass, ilDatePresentation\formatDate(), ilUtil\getStyleSheetLocation(), IL_CAL_UNIX, SCORE_BEST_PASS, and ilUtil\sendInfo().

{
global $ilAccess;
if ((!$ilAccess->checkAccess("tst_statistics", "", $this->ref_id)) && (!$ilAccess->checkAccess("write", "", $this->ref_id)))
{
ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), TRUE);
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_evaluation_details.html", "Modules/Test");
$active_id = $_GET["active_id"];
if (strlen($active_id) == 0)
{
ilUtil::sendInfo($this->lng->txt("detailed_evaluation_missing_active_id"), TRUE);
$this->ctrl->redirect($this, "outEvaluation");
}
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
$data =& $this->object->getCompleteEvaluationData();
$this->tpl->setVariable("TEXT_BACK", $this->lng->txt("back"));
$this->tpl->setVariable("URL_BACK", $this->ctrl->getLinkTarget($this, "outEvaluation"));
$this->tpl->setVariable("HEADING_DETAILED_EVALUATION", sprintf($this->lng->txt("detailed_evaluation_for"),
$data->getParticipant($active_id)->getName())
);
$this->tpl->setVariable("STATISTICAL_DATA", $this->lng->txt("statistical_data"));
$this->tpl->setVariable("TXT_RESULTSPOINTS", $this->lng->txt("tst_stat_result_resultspoints"));
$this->tpl->setVariable("VALUE_RESULTSPOINTS", $data->getParticipant($active_id)->getReached() . " " . strtolower($this->lng->txt("of")) . " " . $data->getParticipant($active_id)->getMaxpoints() . " (" . sprintf("%2.2f", $data->getParticipant($active_id)->getReachedPointsInPercent()) . " %" . ")");
if (strlen($data->getParticipant($active_id)->getMark()))
{
$this->tpl->setVariable("TXT_RESULTSMARKS", $this->lng->txt("tst_stat_result_resultsmarks"));
$this->tpl->setVariable("VALUE_RESULTSMARKS", $data->getParticipant($active_id)->getMark());
if (strlen($data->getParticipant($active_id)->getECTSMark()))
{
$this->tpl->setVariable("TXT_ECTS", $this->lng->txt("ects_grade"));
$this->tpl->setVariable("VALUE_ECTS", $data->getParticipant($active_id)->getECTSMark());
}
}
if( $this->object->isOfferingQuestionHintsEnabled() )
{
$this->tpl->setVariable("TXT_REQUESTED_HINTS_COUNT", $this->lng->txt("tst_question_hints_requested_hint_count_header"));
$this->tpl->setVariable("VALUE_REQUESTED_HINTS_COUNT", $data->getParticipant($active_id)->getRequestedHintsCountFromScoredPass());
}
$this->tpl->setVariable("TXT_QWORKEDTHROUGH", $this->lng->txt("tst_stat_result_qworkedthrough"));
$this->tpl->setVariable("VALUE_QWORKEDTHROUGH", $data->getParticipant($active_id)->getQuestionsWorkedThrough() . " " . strtolower($this->lng->txt("of")) . " " . $data->getParticipant($active_id)->getNumberOfQuestions() . " (" . sprintf("%2.2f", $data->getParticipant($active_id)->getQuestionsWorkedThroughInPercent()) . " %" . ")");
$this->tpl->setVariable("TXT_TIMEOFWORK", $this->lng->txt("tst_stat_result_timeofwork"));
$time_seconds = $data->getParticipant($active_id)->getTimeOfWork();
$atime_seconds = $data->getParticipant($active_id)->getNumberOfQuestions() ? $time_seconds / $data->getParticipant($active_id)->getNumberOfQuestions() : 0;
$time_hours = floor($time_seconds/3600);
$time_seconds -= $time_hours * 3600;
$time_minutes = floor($time_seconds/60);
$time_seconds -= $time_minutes * 60;
$this->tpl->setVariable("VALUE_TIMEOFWORK", sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds));
$this->tpl->setVariable("TXT_ATIMEOFWORK", $this->lng->txt("tst_stat_result_atimeofwork"));
$time_hours = floor($atime_seconds/3600);
$atime_seconds -= $time_hours * 3600;
$time_minutes = floor($atime_seconds/60);
$atime_seconds -= $time_minutes * 60;
$this->tpl->setVariable("VALUE_ATIMEOFWORK", sprintf("%02d:%02d:%02d", $time_hours, $time_minutes, $atime_seconds));
$this->tpl->setVariable("TXT_FIRSTVISIT", $this->lng->txt("tst_stat_result_firstvisit"));
#$this->tpl->setVariable("VALUE_FIRSTVISIT",
# date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], $data->getParticipant($active_id)->getFirstVisit())
#);
$this->tpl->setVariable('VAL_FIRST_VISIT',ilDatePresentation::formatDate(
new ilDateTime($data->getParticipant($active_id)->getFirstVisit(),IL_CAL_UNIX)));
$this->tpl->setVariable("TXT_LASTVISIT", $this->lng->txt("tst_stat_result_lastvisit"));
#$this->tpl->setVariable("VALUE_LASTVISIT",
# date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], $data->getParticipant($active_id)->getLastVisit())
#);
$this->tpl->setVariable('VAL_FIRST_VISIT',ilDatePresentation::formatDate(
new ilDateTime($data->getParticipant($active_id)->getLastVisit(),IL_CAL_UNIX)));
$this->tpl->setVariable("TXT_NROFPASSES", $this->lng->txt("tst_nr_of_passes"));
$this->tpl->setVariable("VALUE_NROFPASSES", $data->getParticipant($active_id)->getLastPass() + 1);
$this->tpl->setVariable("TXT_SCOREDPASS", $this->lng->txt("scored_pass"));
if ($this->object->getPassScoring() == SCORE_BEST_PASS)
{
$this->tpl->setVariable("VALUE_SCOREDPASS", $data->getParticipant($active_id)->getBestPass() + 1);
}
else
{
$this->tpl->setVariable("VALUE_SCOREDPASS", $data->getParticipant($active_id)->getLastPass() + 1);
}
$median = $data->getStatistics()->getStatistics()->median();
$pct = $data->getParticipant($active_id)->getMaxpoints() ? ($median / $data->getParticipant($active_id)->getMaxpoints()) * 100.0 : 0;
$mark = $this->object->mark_schema->getMatchingMark($pct);
if (is_object($mark))
{
$this->tpl->setVariable("TXT_MARK_MEDIAN", $this->lng->txt("tst_stat_result_mark_median"));
$this->tpl->setVariable("VALUE_MARK_MEDIAN", $mark->getShortName());
}
$this->tpl->setVariable("TXT_RANK_PARTICIPANT", $this->lng->txt("tst_stat_result_rank_participant"));
$this->tpl->setVariable("VALUE_RANK_PARTICIPANT", $data->getStatistics()->getStatistics()->rank($data->getParticipant($active_id)->getReached()));
$this->tpl->setVariable("TXT_RANK_MEDIAN", $this->lng->txt("tst_stat_result_rank_median"));
$this->tpl->setVariable("VALUE_RANK_MEDIAN", $data->getStatistics()->getStatistics()->rank_median());
$this->tpl->setVariable("TXT_TOTAL_PARTICIPANTS", $this->lng->txt("tst_stat_result_total_participants"));
$this->tpl->setVariable("VALUE_TOTAL_PARTICIPANTS", $data->getStatistics()->getStatistics()->count());
$this->tpl->setVariable("TXT_RESULT_MEDIAN", $this->lng->txt("tst_stat_result_median"));
$this->tpl->setVariable("VALUE_RESULT_MEDIAN", $median);
for ($pass = 0; $pass <= $data->getParticipant($active_id)->getLastPass(); $pass++)
{
$finishdate = $this->object->getPassFinishDate($active_id, $pass);
if ($finishdate > 0)
{
$this->tpl->setCurrentBlock("question_header");
$this->tpl->setVariable("TXT_QUESTION_DATA", sprintf($this->lng->txt("tst_eval_question_points"), $pass+1));
$this->tpl->parseCurrentBlock();
global $ilAccess;
if (($ilAccess->checkAccess("write", "", $_GET["ref_id"])))
{
$this->tpl->setCurrentBlock("question_footer");
$this->tpl->setVariable("TEXT_TO_DETAILED_RESULTS", $this->lng->txt("tst_show_answer_sheet"));
$this->ctrl->setParameter($this, "statistics", "1");
$this->ctrl->setParameter($this, "active_id", $active_id);
$this->ctrl->setParameter($this, "pass", $pass);
$this->tpl->setVariable("URL_TO_DETAILED_RESULTS", $this->ctrl->getLinkTarget($this, "outParticipantsPassDetails"));
$this->tpl->parseCurrentBlock();
}
$questions = $data->getParticipant($active_id)->getQuestions($pass);
if (!is_array($questions))
{
$questions = $data->getParticipant($active_id)->getQuestions(0);
}
$counter = 1;
foreach ($questions as $question)
{
$this->tpl->setCurrentBlock("question_row");
$this->tpl->setVariable("QUESTION_COUNTER", $counter);
$this->tpl->setVariable("QUESTION_ID", $question["id"]);
$this->tpl->setVariable("QUESTION_ID_TXT", $this->lng->txt('question_id_short'));
$this->tpl->setVariable("QUESTION_TITLE", $data->getQuestionTitle($question["id"]));
$answeredquestion = $data->getParticipant($active_id)->getPass($pass)->getAnsweredQuestionByQuestionId($question["id"]);
if (is_array($answeredquestion))
{
$percent = $answeredquestion["points"] ? $answeredquestion["reached"] / $answeredquestion["points"] * 100.0 : 0;
$this->tpl->setVariable("QUESTION_POINTS", $answeredquestion["reached"] . " " . strtolower($this->lng->txt("of")) . " " . $answeredquestion["points"] . " (" . sprintf("%.2f", $percent) . " %)");
}
else
{
$this->tpl->setVariable("QUESTION_POINTS", "0 " . strtolower($this->lng->txt("of")) . " " . $question["points"] . " (" . sprintf("%.2f", 0) . " %) - " . $this->lng->txt("question_not_answered"));
}
$this->tpl->parseCurrentBlock();
$counter++;
}
$this->tpl->touchBlock("question_stats");
}
}
}

+ Here is the call graph for this function:

& ilTestEvaluationGUI::executeCommand ( )

execute command

Reimplemented from ilTestServiceGUI.

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

References $cmd, $ret, ilTestServiceGUI\getCommand(), and ilTestServiceGUI\isPdfDeliveryRequest().

{
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
$this->ctrl->saveParameter($this, "sequence");
$this->ctrl->saveParameter($this, "active_id");
$cmd = $this->getCommand($cmd);
switch($next_class)
{
case 'iltestpassdetailsoverviewtablegui':
require_once 'Modules/Test/classes/tables/class.ilTestPassDetailsOverviewTableGUI.php';
$tableGUI = new ilTestPassDetailsOverviewTableGUI($this->ctrl, $this, 'outUserPassDetails');
$tableGUI->setIsPdfGenerationRequest($this->isPdfDeliveryRequest());
$tableGUI->initFilter();
$this->ctrl->forwardCommand($tableGUI);
break;
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::exportAggregatedResults ( )

Exports the aggregated results.

public

Definition at line 721 of file class.ilTestEvaluationGUI.php.

References $_POST.

{
switch ($_POST["export_type"])
{
case "excel":
include_once "./Modules/Test/classes/class.ilTestExport.php";
$exportObj = new ilTestExport($this->object, "aggregated");
$exportObj->exportToExcel($deliver = TRUE);
break;
case "csv":
include_once "./Modules/Test/classes/class.ilTestExport.php";
$exportObj = new ilTestExport($this->object, "aggregated");
$exportObj->exportToCSV($deliver = TRUE);
break;
}
}
ilTestEvaluationGUI::exportCertificate ( )

Exports the user results as PDF certificates using XSL-FO via XML:RPC calls.

public

Definition at line 744 of file class.ilTestEvaluationGUI.php.

References $ilUser, and ilUtil\getASCIIFilename().

{
global $ilUser;
include_once "./Services/Utilities/classes/class.ilUtil.php";
include_once "./Services/Certificate/classes/class.ilCertificate.php";
include_once "./Modules/Test/classes/class.ilTestCertificateAdapter.php";
$certificate = new ilCertificate(new ilTestCertificateAdapter($this->object));
$archive_dir = $certificate->createArchiveDirectory();
$total_users = array();
$total_users =& $this->object->evalTotalPersonsArray();
if (count($total_users))
{
foreach ($total_users as $active_id => $name)
{
$user_id = $this->object->_getUserIdFromActiveId($active_id);
$pdf = $certificate->outCertificate(
array(
"active_id" => $active_id,
"userfilter" => $userfilter,
"passedonly" => $passedonly
),
FALSE
);
if (strlen($pdf))
{
$certificate->addPDFtoArchiveDirectory($pdf, $archive_dir, $user_id . "_" . str_replace(" ", "_", ilUtil::getASCIIFilename($name)) . ".pdf");
}
}
$zipArchive = $certificate->zipCertificatesInArchiveDirectory($archive_dir, TRUE);
}
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::exportEvaluation ( )

Exports the evaluation data to a selected file format.

Definition at line 665 of file class.ilTestEvaluationGUI.php.

References $_GET, and $_POST.

{
$filterby = "";
if (array_key_exists("g_filterby", $_GET))
{
$filterby = $_GET["g_filterby"];
}
$filtertext = "";
if (array_key_exists("g_userfilter", $_GET))
{
$filtertext = $_GET["g_userfilter"];
}
$passedonly = FALSE;
if (array_key_exists("g_passedonly", $_GET))
{
if ($_GET["g_passedonly"] == 1)
{
$passedonly = TRUE;
}
}
switch ($_POST["export_type"])
{
case "excel":
require_once './Modules/Test/classes/class.ilTestExport.php';
$exportObj = new ilTestExport($this->object, "results");
$exportObj->exportToExcel($deliver = TRUE, $filterby, $filtertext, $passedonly);
break;
case "csv":
require_once './Modules/Test/classes/class.ilTestExport.php';
$exportObj = new ilTestExport($this->object, "results");
$exportObj->exportToCSV($deliver = TRUE, $filterby, $filtertext, $passedonly);
break;
case "certificate":
if ($passedonly)
{
$this->ctrl->setParameterByClass("iltestcertificategui", "g_passedonly", "1");
}
if (strlen($filtertext))
{
$this->ctrl->setParameterByClass("iltestcertificategui", "g_userfilter", $filtertext);
}
$this->ctrl->redirect($this, "exportCertificate");
break;
}
}
ilTestEvaluationGUI::exportFileUploadsForAllParticipants ( )

Creates a ZIP file containing all file uploads for a given question in a test.

Definition at line 497 of file class.ilTestEvaluationGUI.php.

References $_GET, and assQuestion\_instanciateQuestion().

{
require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
$question_object = assQuestion::_instanciateQuestion($_GET["qid"]);
if ( $question_object instanceof ilObjFileHandlingQuestionType )
{
$question_object->getFileUploadZIPFile($this->object->getTestId());
}
else
{
$this->ctrl->redirect($this, "singleResults");
}
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::exportQuestionForAllParticipants ( )

Creates a PDF representation of the answers for a given question in a test.

Definition at line 488 of file class.ilTestEvaluationGUI.php.

References $_GET, and ilTestServiceGUI\getQuestionResultForTestUsers().

{
$this->getQuestionResultForTestUsers($_GET["qid"], $this->object->getTestId());
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::filterEvaluation ( )

Definition at line 125 of file class.ilTestEvaluationGUI.php.

{
include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
$table_gui = new ilEvaluationAllTableGUI($this, 'outEvaluation');
$table_gui->writeFilterToSession();
$this->ctrl->redirect($this, "outEvaluation");
}
ilTestEvaluationGUI::getEvaluationQuestionId (   $question_id,
  $original_id = "" 
)

Returns the ID of a question for evaluation purposes.

If a question id and the id of the original question are given, this function returns the original id, otherwise the question id

Returns
int question or original id

Definition at line 784 of file class.ilTestEvaluationGUI.php.

{
if ($original_id > 0)
{
return $original_id;
}
else
{
return $question_id;
}
}
ilTestEvaluationGUI::getFilteredTestResult (   $active_id,
  $pass 
)
protected

Definition at line 1858 of file class.ilTestEvaluationGUI.php.

References $ilDB, $pass, and ilTestServiceGUI\buildPassDetailsOverviewTableGUI().

Referenced by outUserPassDetails().

{
global $ilDB, $ilPluginAdmin;
$testResults = $this->object->getTestResult($active_id, $pass);
$questionIds = array();
foreach($testResults as $resultItemKey => $resultItemValue)
{
if($resultItemKey === 'test' || $resultItemKey === 'pass')
{
continue;
}
$questionIds[] = $resultItemValue['qid'];
}
$table_gui = $this->buildPassDetailsOverviewTableGUI($this, 'outUserPassDetails');
$table_gui->initFilter();
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
$questionList = new ilAssQuestionList($ilDB, $this->lng, $ilPluginAdmin, null);
$questionList->setQuestionIdsFilter($questionIds);
$questionList->setQuestionInstanceTypeFilter(null);
foreach ($table_gui->getFilterItems() as $item)
{
if( substr($item->getPostVar(), 0, strlen('tax_')) == 'tax_' )
{
$v = $item->getValue();
if( is_array($v) && count($v) && !(int)$v[0] )
{
continue;
}
$taxId = substr($item->getPostVar(), strlen('tax_'));
$questionList->addTaxonomyFilter($taxId, $item->getValue());
}
elseif( $item->getValue() !== false )
{
$questionList->addFieldFilter($item->getPostVar(), $item->getValue());
}
}
$questionList->load();
$filteredTestResult = array();
foreach($testResults as $resultItemKey => $resultItemValue)
{
if($resultItemKey === 'test' || $resultItemKey === 'pass')
{
continue;
}
if( !$questionList->isInList($resultItemValue['qid']) )
{
continue;
}
$filteredTestResult[] = $resultItemValue;
}
return $filteredTestResult;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilTestEvaluationGUI::getHeaderNames ( )

Definition at line 69 of file class.ilTestEvaluationGUI.php.

{
$headernames = array();
if ($this->object->getAnonymity())
{
array_push($headernames, $this->lng->txt("counter"));
}
else
{
array_push($headernames, $this->lng->txt("name"));
array_push($headernames, $this->lng->txt("login"));
}
$additionalFields = $this->object->getEvaluationAdditionalFields();
if (count($additionalFields))
{
foreach ($additionalFields as $fieldname)
{
array_push($headernames, $this->lng->txt($fieldname));
}
}
array_push($headernames, $this->lng->txt("tst_reached_points"));
array_push($headernames, $this->lng->txt("tst_mark"));
if ($this->object->getECTSOutput())
{
array_push($headernames, $this->lng->txt("ects_grade"));
}
array_push($headernames, $this->lng->txt("tst_answered_questions"));
array_push($headernames, $this->lng->txt("working_time"));
array_push($headernames, $this->lng->txt("detailed_evaluation"));
return $headernames;
}
& ilTestEvaluationGUI::getHeaderVars ( )

Definition at line 101 of file class.ilTestEvaluationGUI.php.

{
$headervars = array();
if ($this->object->getAnonymity())
{
array_push($headervars, "counter");
}
else
{
array_push($headervars, "name");
array_push($headervars, "login");
}
array_push($headervars, "resultspoints");
array_push($headervars, "resultsmarks");
if ($this->object->getECTSOutput())
{
array_push($headervars, "ects_grade");
}
array_push($headervars, "qworkedthrough");
array_push($headervars, "timeofwork");
array_push($headervars, "");
return $headervars;
}
ilTestEvaluationGUI::outCertificate ( )

Output of a test certificate.

Definition at line 1520 of file class.ilTestEvaluationGUI.php.

References ilObjTest\_getResultPass().

{
$testSession = $this->testSessionFactory->getSession();
require_once './Services/Certificate/classes/class.ilCertificate.php';
require_once './Modules/Test/classes/class.ilTestCertificateAdapter.php';
$certificate = new ilCertificate(new ilTestCertificateAdapter( $this->object ) );
$certificate->outCertificate(
array(
"active_id" => $testSession->getActiveId(),
"pass" => ilObjTest::_getResultPass( $testSession->getActiveId() )
)
);
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::outCorrectSolution ( )

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

public

Definition at line 1375 of file class.ilTestEvaluationGUI.php.

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

{
if( !$this->object->getShowSolutionDetails() )
{
ilUtil::sendInfo($this->lng->txt("no_permission"), true);
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$testSession = $this->testSessionFactory->getSession();
$activeId = $testSession->getActiveId();
if( !($activeId > 0) )
{
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
if( !$this->object->canShowTestResults($testSession, $testSession->getUserId()) )
{
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$this->ctrl->saveParameter($this, "pass");
$pass = (int)$_GET['pass'];
$testSequence = $this->testSequenceFactory->getSequenceByPass($testSession, $pass);
$testSequence->loadFromDb();
$testSequence->loadQuestions();
$questionId = (int)$_GET['evaluation'];
if( !$testSequence->questionExists($questionId) )
{
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
global $ilTabs;
$ilTabs->setBackTarget($this->lng->txt("tst_back_to_pass_details"), $this->ctrl->getLinkTarget($this, 'outUserPassDetails'));
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");
}
$solution = $this->getCorrectSolutionOutput($questionId, $activeId, $pass);
$this->tpl->setContent($solution);
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::outParticipantsPassDetails ( )

Output of the pass details of an existing test pass for the test statistics.

Output of the pass details of an existing test pass for the test statistics

public

Definition at line 803 of file class.ilTestEvaluationGUI.php.

References $_GET, $_SESSION, $pass, ilTestPDFGenerator\generatePDF(), ilTestServiceGUI\getGradingMessage(), ilTestServiceGUI\getPassDetailsOverview(), ilTestServiceGUI\getPassListOfAnswers(), ilTestServiceGUI\getResultsUserdata(), ilUtil\getStyleSheetLocation(), ilTestServiceGUI\isGradingMessageRequired(), ilTestServiceGUI\isPdfDeliveryRequest(), ilTestPDFGenerator\PDF_OUTPUT_DOWNLOAD, and ilUtil\sendInfo().

{
global $ilTabs, $ilAccess;
if (!$ilAccess->checkAccess('write', '', $this->ref_id))
{
// allow only write access
ilUtil::sendInfo($this->lng->txt('no_permission'), true);
$this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
}
$this->ctrl->saveParameter($this, "active_id");
$active_id = (int)$_GET["active_id"];
$testSession = $this->testSessionFactory->getSession($active_id);
// protect actives from other tests
if( $testSession->getTestId() != $this->object->getTestId() )
{
ilUtil::sendInfo($this->lng->txt('no_permission'), true);
$this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
}
$this->ctrl->saveParameter($this, "pass");
$pass = (int)$_GET["pass"];
if ( isset($_GET['statistics']) && $_GET['statistics'] == 1)
{
$this->ctrl->setParameterByClass("ilTestEvaluationGUI", "active_id", $active_id);
$ilTabs->setBackTarget(
$this->lng->txt('back'), $this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'detailedEvaluation')
);
}
elseif ($this->object->getNrOfTries() == 1)
{
$ilTabs->setBackTarget(
$this->lng->txt('back'), $this->ctrl->getLinkTargetByClass('ilobjtestgui', 'participants')
);
}
else
{
$ilTabs->setBackTarget(
$this->lng->txt('tst_results_back_overview'), $this->ctrl->getLinkTarget($this, 'outParticipantsResultsOverview')
);
}
$result_array =& $this->object->getTestResult($active_id, $pass);
$overview = $this->getPassDetailsOverview($result_array, $active_id, $pass, $this, "outParticipantsPassDetails", '', true);
$user_data = $this->getResultsUserdata($testSession, $active_id, FALSE);
$user_id = $this->object->_getUserIdFromActiveId($active_id);
$template = new ilTemplate("tpl.il_as_tst_pass_details_overview_participants.html", TRUE, TRUE, "Modules/Test");
require_once 'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
$toolbar = new ilTestResultsToolbarGUI($this->ctrl, $this->tpl, $this->lng);
$this->ctrl->setParameter($this, 'pdf', '1');
$toolbar->setPdfExportLinkTarget( $this->ctrl->getLinkTarget($this, 'outParticipantsPassDetails') );
$this->ctrl->setParameter($this, 'pdf', '');
if( isset($_GET['show_best_solutions']) )
{
$_SESSION['tst_results_show_best_solutions'] = true;
}
elseif( isset($_GET['hide_best_solutions']) )
{
$_SESSION['tst_results_show_best_solutions'] = false;
}
elseif( !isset($_SESSION['tst_results_show_best_solutions']) )
{
$_SESSION['tst_results_show_best_solutions'] = false;
}
if( $_SESSION['tst_results_show_best_solutions'] )
{
$this->ctrl->setParameter($this, 'hide_best_solutions', '1');
$toolbar->setHideBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, 'outParticipantsPassDetails'));
$this->ctrl->setParameter($this, 'hide_best_solutions', '');
}
else
{
$this->ctrl->setParameter($this, 'show_best_solutions', '1');
$toolbar->setShowBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, 'outParticipantsPassDetails'));
$this->ctrl->setParameter($this, 'show_best_solutions', '');
}
$toolbar->build();
$template->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
if( $this->isGradingMessageRequired() && $this->object->getNrOfTries() == 1 )
{
$template->setCurrentBlock('grading_message');
$template->setVariable('GRADING_MESSAGE', $this->getGradingMessage($active_id));
$template->parseCurrentBlock();
}
$list_of_answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, $_SESSION['tst_results_show_best_solutions'], false, false, false, true);
$template->setVariable("LIST_OF_ANSWERS", $list_of_answers);
$template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results"));
$template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$template->setVariable("PASS_DETAILS", $overview);
$template->setVariable("USER_DATA", $user_data);
$uname = $this->object->userLookupFullName($user_id);
$template->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name_pass"), $pass + 1, $uname));
$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( $this->isPdfDeliveryRequest() )
{
//$this->object->deliverPDFfromHTML($template->get());
require_once 'class.ilTestPDFGenerator.php';
ilTestPDFGenerator::generatePDF($template->get(), ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $this->object->getTitle());
}
else
{
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::outParticipantsResultsOverview ( )

Output of the pass overview for a test called from the statistics.

public

Definition at line 932 of file class.ilTestEvaluationGUI.php.

References $_GET, $filename, ilObjTest\_getResultPass(), ilObjUser\_lookupName(), ilTestPDFGenerator\generatePDF(), ilTestServiceGUI\getGradingMessage(), ilTestServiceGUI\getPassOverview(), ilTestServiceGUI\getResultsUserdata(), ilUtil\getStyleSheetLocation(), ilTestServiceGUI\isGradingMessageRequired(), ilTestPDFGenerator\PDF_OUTPUT_DOWNLOAD, and ilUtil\sendInfo().

{
global $ilTabs, $ilAccess;
if (!$ilAccess->checkAccess('write', '', $this->ref_id))
{
// allow only write access
ilUtil::sendInfo($this->lng->txt('no_permission'), true);
$this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
}
$active_id = (int)$_GET["active_id"];
$testSession = $this->testSessionFactory->getSession($active_id);
// protect actives from other tests
if( $testSession->getTestId() != $this->object->getTestId() )
{
ilUtil::sendInfo($this->lng->txt('no_permission'), true);
$this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
}
if ($this->object->getNrOfTries() == 1)
{
$this->ctrl->setParameter($this, "active_id", $active_id);
$this->ctrl->setParameter($this, "pass", ilObjTest::_getResultPass($active_id));
$this->ctrl->redirect($this, "outParticipantsPassDetails");
}
$ilTabs->setBackTarget(
$this->lng->txt('back'), $this->ctrl->getLinkTargetByClass('ilobjtestgui', 'participants')
);
$template = new ilTemplate("tpl.il_as_tst_pass_overview_participants.html", TRUE, TRUE, "Modules/Test");
require_once 'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
$toolbar = new ilTestResultsToolbarGUI($this->ctrl, $this->tpl, $this->lng);
$this->ctrl->setParameter($this, 'pdf', '1');
$toolbar->setPdfExportLinkTarget( $this->ctrl->getLinkTarget($this, __FUNCTION__) );
$this->ctrl->setParameter($this, 'pdf', '');
$toolbar->build();
$template->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
$overview = $this->getPassOverview($active_id, "iltestevaluationgui", "outParticipantsPassDetails", false, false, true);
$template->setVariable("PASS_OVERVIEW", $overview);
$user_id = $this->object->_getUserIdFromActiveId($active_id);
$user_data = $this->getResultsUserdata($testSession, $active_id);
$template->setVariable("USER_DATA", $user_data);
$template->setVariable("TEXT_OVERVIEW", $this->lng->txt("tst_results_overview"));
if( $this->isGradingMessageRequired() )
{
$template->setCurrentBlock('grading_message');
$template->setVariable('GRADING_MESSAGE', $this->getGradingMessage($active_id));
$template->parseCurrentBlock();
}
$template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results"));
$template->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");
}
if (array_key_exists("pdf", $_GET) && ($_GET["pdf"] == 1))
{
//$this->object->deliverPDFfromHTML($template->get(), $this->object->getTitle());
$name = ilObjUser::_lookupName($user_id);
$filename = $name['lastname'] . '_' . $name['firstname'] . '_' . $name['login'] . '__'. $this->object->getTitle();
require_once 'class.ilTestPDFGenerator.php';
//ilUtil::deliverData($file, ilUtil::getASCIIFilename($this->object->getTitle()) . ".pdf", "application/pdf", false, true);
//$template->setVariable("PDF_FILE_LOCATION", $filename);
}
else
{
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::outUserListOfAnswerPasses ( )

Output of the pass overview for a user when he/she wants to see his/her list of answers.

Output of the pass overview for a user when he/she wants to see his/her list of answers

public

Definition at line 1270 of file class.ilTestEvaluationGUI.php.

References $_GET, $ilUser, $pass, ilTestServiceGUI\getPassListOfAnswers(), ilTestServiceGUI\getPassOverview(), ilTestServiceGUI\getResultsSignature(), ilTestServiceGUI\getResultsUserdata(), ilUtil\getStyleSheetLocation(), and ilUtil\sendInfo().

{
global $ilUser;
if (!$this->object->getShowSolutionPrintview())
{
ilUtil::sendInfo($this->lng->txt("no_permission"), true);
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$template = new ilTemplate("tpl.il_as_tst_info_list_of_answers.html", TRUE, TRUE, "Modules/Test");
$pass = null;
if (array_key_exists("pass", $_GET))
{
if (strlen($_GET["pass"])) $pass = $_GET["pass"];
}
$user_id = $ilUser->getId();
$testSession = $this->testSessionFactory->getSession();
$active_id = $testSession->getActiveId();
$overview = "";
if ($this->object->getNrOfTries() == 1)
{
$pass = 0;
}
else
{
$overview = $this->getPassOverview($active_id, "iltestevaluationgui", "outUserListOfAnswerPasses", TRUE);
$template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_passes"));
$template->setVariable("PASS_OVERVIEW", $overview);
}
$signature = "";
if (strlen($pass))
{
$signature = $this->getResultsSignature();
$result_array =& $this->object->getTestResult($active_id, $pass);
$user_id =& $this->object->_getUserIdFromActiveId($active_id);
$showAllAnswers = TRUE;
if ($this->object->isExecutable($testSession, $user_id))
{
$showAllAnswers = FALSE;
}
$answers = $this->getPassListOfAnswers($result_array, $active_id, $pass, FALSE, $showAllAnswers);
$template->setVariable("PASS_DETAILS", $answers);
}
$template->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$template->setVariable("BACK_TEXT", $this->lng->txt("tst_results_back_introduction"));
$template->setVariable("BACK_URL", $this->ctrl->getLinkTargetByClass("ilobjtestgui", "infoScreen"));
$template->setVariable("PRINT_TEXT", $this->lng->txt("print"));
$template->setVariable("PRINT_URL", "javascript:window.print();");
$user_data = $this->getResultsUserdata($testSession, $active_id, TRUE);
$template->setVariable("USER_DATA", $user_data);
$template->setVariable("TEXT_LIST_OF_ANSWERS", $this->lng->txt("tst_list_of_answers"));
if (strlen($signature))
{
$template->setVariable("SIGNATURE", $signature);
}
if (!is_null($pass) && $this->object->isShowExamIdInTestResultsEnabled())
{
$template->setCurrentBlock('exam_id_footer');
$template->setVariable('EXAM_ID_VAL', $this->object->lookupExamId(
$testSession->getActiveId(), $pass
));
$template->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
$template->parseCurrentBlock();
}
$this->tpl->setVariable("ADM_CONTENT", $template->get());
$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");
}
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::outUserPassDetails ( )

Output of the pass details of an existing test pass for the active test participant.

public

Definition at line 1040 of file class.ilTestEvaluationGUI.php.

References $_GET, $ilUser, $pass, ilTestServiceGUI\$tpl, ilTestPDFGenerator\generatePDF(), getFilteredTestResult(), ilTestServiceGUI\getGradingMessage(), ilTestServiceGUI\getPassDetailsOverview(), ilTestServiceGUI\getPassListOfAnswers(), ilTestServiceGUI\getResultsSignature(), ilTestServiceGUI\getResultsUserdata(), ilUtil\getStyleSheetLocation(), ilTestServiceGUI\isGradingMessageRequired(), ilTestServiceGUI\isPdfDeliveryRequest(), and ilTestPDFGenerator\PDF_OUTPUT_DOWNLOAD.

Referenced by outUserPassDetailsResetTableFilter(), and outUserPassDetailsSetTableFilter().

{
global $ilTabs, $ilUser;
if ($this->object->getNrOfTries() == 1)
{
$ilTabs->setBackTarget($this->lng->txt('tst_results_back_introduction'), $this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'infoScreen'));
}
else
{
$ilTabs->setBackTarget($this->lng->txt('tst_results_back_overview'), $this->ctrl->getLinkTarget($this, 'outUserResultsOverview'));
}
$testSession = $this->testSessionFactory->getSession();
if( !$this->object->getShowPassDetails() )
{
#$executable = $this->object->isExecutable($testSession, $ilUser->getId());
#if($executable["executable"])
#{
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
#}
}
$active_id = $testSession->getActiveId();
$user_id = $testSession->getUserId();
$this->ctrl->saveParameter($this, "pass");
$pass = $_GET["pass"];
$result_array = $this->getFilteredTestResult($active_id, $pass);
$command_solution_details = "";
if ($this->object->getShowSolutionDetails())
{
$command_solution_details = "outCorrectSolution";
}
$questionAnchorNav = $this->object->canShowSolutionPrintview();
$tpl = new ilTemplate('tpl.il_as_tst_pass_details_overview_participants.html', true, true, "Modules/Test");
if( !$this->isPdfDeliveryRequest() )
{
require_once 'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
$toolbar = new ilTestResultsToolbarGUI($this->ctrl, $this->tpl, $this->lng);
$this->ctrl->setParameter($this, 'pdf', '1');
$toolbar->setPdfExportLinkTarget( $this->ctrl->getLinkTarget($this, 'outUserPassDetails') );
$this->ctrl->setParameter($this, 'pdf', '');
include_once './Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
if( $this->object->canShowCertificate($testSession, $user_id, $active_id) )
{
$toolbar->setCertificateLinkTarget($this->ctrl->getLinkTarget($this, 'outCertificate'));
}
$toolbar->build();
$tpl->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
$tpl->setCurrentBlock('signature');
$tpl->setVariable("SIGNATURE", $this->getResultsSignature());
$tpl->parseCurrentBlock();
if ($this->object->isShowExamIdInTestResultsEnabled())
{
$tpl->setCurrentBlock('exam_id');
$tpl->setVariable('EXAM_ID', $this->object->lookupExamId(
$testSession->getActiveId(), $pass
));
$tpl->setVariable('EXAM_ID_TXT', $this->lng->txt('exam_id'));
$tpl->parseCurrentBlock();
}
}
if( $this->isGradingMessageRequired() && $this->object->getNrOfTries() == 1 )
{
$tpl->setCurrentBlock('grading_message');
$tpl->setVariable('GRADING_MESSAGE', $this->getGradingMessage($active_id));
$tpl->parseCurrentBlock();
}
$overview = $this->getPassDetailsOverview(
$result_array, $active_id, $pass, $this, "outUserPassDetails", $command_solution_details, $questionAnchorNav
);
$tpl->setVariable("PASS_DETAILS", $overview);
if( $this->object->canShowSolutionPrintview() )
{
$list_of_answers = $this->getPassListOfAnswers(
$result_array, $active_id, $pass, $this->object->getShowSolutionListComparison(),
false, false, false, true
);
$tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
}
$tpl->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results"));
$tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$uname = $this->object->userLookupFullName($user_id, TRUE);
$user_data = $this->getResultsUserdata($testSession, $active_id, TRUE);
if ($this->object->getAnonymity())
{
$tpl->setVariable("TEXT_HEADING", $this->lng->txt("tst_result_pass"));
}
else
{
$tpl->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name_pass"), $pass + 1, $uname));
$tpl->setVariable("USER_DATA", $user_data);
}
$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( $this->isPdfDeliveryRequest() )
{
require_once 'class.ilTestPDFGenerator.php';
}
else
{
$this->tpl->setContent($tpl->get());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationGUI::outUserPassDetailsResetTableFilter ( )

Definition at line 1026 of file class.ilTestEvaluationGUI.php.

References ilTestServiceGUI\buildPassDetailsOverviewTableGUI(), and outUserPassDetails().

{
$tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'outUserPassDetails');
$tableGUI->initFilter();
$tableGUI->resetOffset();
$tableGUI->resetFilter();
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::outUserPassDetailsSetTableFilter ( )

Definition at line 1017 of file class.ilTestEvaluationGUI.php.

References ilTestServiceGUI\buildPassDetailsOverviewTableGUI(), and outUserPassDetails().

{
$tableGUI = $this->buildPassDetailsOverviewTableGUI($this, 'outUserPassDetails');
$tableGUI->initFilter();
$tableGUI->resetOffset();
$tableGUI->writeFilterToSession();
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::outUserResultsOverview ( )

Output of the pass overview for a test called by a test participant.

ilTabsGUI $ilTabs

Definition at line 1174 of file class.ilTestEvaluationGUI.php.

References $ilUser, ilTestPDFGenerator\generatePDF(), ilTestServiceGUI\getGradingMessage(), ilTestServiceGUI\getPassOverview(), ilTestServiceGUI\getResultsUserdata(), ilUtil\getStyleSheetLocation(), ilTestServiceGUI\isGradingMessageRequired(), ilTestServiceGUI\isPdfDeliveryRequest(), and ilTestPDFGenerator\PDF_OUTPUT_DOWNLOAD.

{
global $ilUser, $ilTabs;
$ilTabs->setBackTarget(
$this->lng->txt('tst_results_back_introduction'),
$this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'infoScreen')
);
$testSession = $this->testSessionFactory->getSession();
$active_id = $testSession->getActiveId();
$user_id = $ilUser->getId();
$uname = $this->object->userLookupFullName($user_id, TRUE);
if( !$this->object->canShowTestResults($testSession, $ilUser->getId()) )
{
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$templatehead = new ilTemplate("tpl.il_as_tst_results_participants.html", TRUE, TRUE, "Modules/Test");
$template = new ilTemplate("tpl.il_as_tst_results_participant.html", TRUE, TRUE, "Modules/Test");
require_once 'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
$toolbar = new ilTestResultsToolbarGUI($this->ctrl, $this->tpl, $this->lng);
$this->ctrl->setParameter($this, 'pdf', '1');
$toolbar->setPdfExportLinkTarget( $this->ctrl->getLinkTarget($this, 'outUserResultsOverview') );
$this->ctrl->setParameter($this, 'pdf', '');
include_once './Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
if( $this->object->canShowCertificate($testSession, $user_id, $active_id) )
{
$toolbar->setCertificateLinkTarget($this->ctrl->getLinkTarget($this, 'outCertificate'));
}
$toolbar->build();
$templatehead->setVariable('RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
$hide_details = !$this->object->getShowPassDetails();
#if ($hide_details)
#{
# $executable = $this->object->isExecutable($testSession, $ilUser->getId());
# if (!$executable["executable"]) $hide_details = FALSE;
#}
$template->setCurrentBlock("pass_overview");
$overview = $this->getPassOverview($active_id, "iltestevaluationgui", "outUserPassDetails", FALSE, $hide_details);
$template->setVariable("PASS_OVERVIEW", $overview);
$template->setVariable("TEXT_RESULTS", $this->lng->txt("tst_results_overview"));
$template->parseCurrentBlock();
$user_data = $this->getResultsUserdata($testSession, $active_id, TRUE);
if ($this->object->getAnonymity()) {
$template->setVariable("TEXT_HEADING", $this->lng->txt("tst_result"));
}
else {
$template->setVariable("TEXT_HEADING", sprintf($this->lng->txt("tst_result_user_name"), $uname));
$template->setVariable("USER_DATA", $user_data);
}
if( $this->isGradingMessageRequired() )
{
$template->setCurrentBlock('grading_message');
$template->setVariable('GRADING_MESSAGE', $this->getGradingMessage($active_id));
$template->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");
}
$templatehead->setVariable("RESULTS_PARTICIPANT", $template->get());
if( $this->isPdfDeliveryRequest() )
{
//$this->object->deliverPDFfromHTML($template->get(), $this->object->getTitle());
require_once 'class.ilTestPDFGenerator.php';
ilTestPDFGenerator::generatePDF($template->get(), ilTestPDFGenerator::PDF_OUTPUT_DOWNLOAD, $this->object->getTitle());
//$this->object->deliverPDFfromHTML($template->get(), sprintf($this->lng->txt("tst_result_user_name"), $uname));
}
else
{
$this->tpl->setContent($templatehead->get());
}
}

+ Here is the call graph for this function:

ilTestEvaluationGUI::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 1356 of file class.ilTestEvaluationGUI.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);
}
}
ilTestEvaluationGUI::redirectToPassDeletionContext (   $context)
private

Definition at line 1565 of file class.ilTestEvaluationGUI.php.

References ilTestPassDeletionConfirmationGUI\CONTEXT_DYN_TEST_PLAYER, ilTestPassDeletionConfirmationGUI\CONTEXT_INFO_SCREEN, and ilTestPassDeletionConfirmationGUI\CONTEXT_PASS_OVERVIEW.

Referenced by cancelDeletePass().

{
require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
switch($context)
{
$this->ctrl->redirect($this, 'outUserResultsOverview');
$this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
$this->ctrl->redirectByClass('ilTestPlayerDynamicQuestionSetGUI', 'startTest');
}
}

+ Here is the caller graph for this function:

ilTestEvaluationGUI::resetfilterEvaluation ( )

Definition at line 133 of file class.ilTestEvaluationGUI.php.

{
include_once "./Modules/Test/classes/tables/class.ilEvaluationAllTableGUI.php";
$table_gui = new ilEvaluationAllTableGUI($this, 'outEvaluation');
$table_gui->resetFilter();
$this->ctrl->redirect($this, "outEvaluation");
}
ilTestEvaluationGUI::singleResults ( )

Creates user results for single questions.

Definition at line 1438 of file class.ilTestEvaluationGUI.php.

References $pass, assQuestion\_instanciateQuestion(), and ilUtil\sendInfo().

{
global $ilAccess;
if ((!$ilAccess->checkAccess("tst_statistics", "", $this->ref_id)) && (!$ilAccess->checkAccess("write", "", $this->ref_id)))
{
// allow only evaluation access
ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true);
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
$data =& $this->object->getCompleteEvaluationData();
$color_class = array("tblrow1", "tblrow2");
$counter = 0;
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_eval_single_answers.html", "Modules/Test");
$foundParticipants =& $data->getParticipants();
if (count($foundParticipants) == 0)
{
ilUtil::sendInfo($this->lng->txt("tst_no_evaluation_data"));
return;
}
else
{
$rows = array();
foreach ($data->getQuestionTitles() as $question_id => $question_title)
{
$answered = 0;
$reached = 0;
$max = 0;
foreach ($foundParticipants as $userdata)
{
$pass = $userdata->getScoredPass();
if (is_object($userdata->getPass($pass)))
{
$question =& $userdata->getPass($pass)->getAnsweredQuestionByQuestionId($question_id);
if (is_array($question))
{
$answered++;
}
}
}
$counter++;
$this->ctrl->setParameter($this, "qid", $question_id);
require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
$question_object = assQuestion::_instanciateQuestion($question_id);
$download = "";
if ( $question_object instanceof ilObjFileHandlingQuestionType )
{
if ($question_object->hasFileUploads($this->object->getTestId()))
{
$download = "<a href=\"" . $this->ctrl->getLinkTarget($this, "exportFileUploadsForAllParticipants"). "\">" . $this->lng->txt("download") . "</a>";
}
}
array_push($rows,
array(
'qid' => $question_id,
'question_title' => $question_title,
'number_of_answers' => $answered,
'output' => "<a href=\"" . $this->ctrl->getLinkTarget($this, "exportQuestionForAllParticipants") . "\">" . $this->lng->txt("pdf_export") . "</a>",
'file_uploads' => $download
)
);
}
if (count($rows))
{
require_once './Modules/Test/classes/tables/class.ilResultsByQuestionTableGUI.php';
$table_gui = new ilResultsByQuestionTableGUI($this, "singleResults");
$table_gui->setTitle($this->lng->txt("tst_answered_questions_test"));
$table_gui->setData($rows);
$this->tpl->setVariable("TBL_SINGLE_ANSWERS", $table_gui->getHTML());
}
else
{
$this->tpl->setVariable("TBL_SINGLE_ANSWERS", $this->lng->txt("adm_no_special_users"));
}
}
}

+ Here is the call graph for this function:


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