41 $this->
object = $a_object;
53 $passOverwiewData = array();
58 $scoredPass = $this->
object->_getResultPass($active_id);
62 $testReachedPoints = 0;
65 for ($pass = 0; $pass <= $lastPass; $pass++) {
68 if ($passFinishDate <= 0) {
73 $resultData = &$this->
object->getTestResult($active_id, $pass);
75 if (!$resultData[
"pass"][
"total_max_points"]) {
78 $passPercentage = ($resultData[
"pass"][
"total_reached_points"] / $resultData[
"pass"][
"total_max_points"]) * 100;
81 $passMaxPoints = $resultData[
"pass"][
"total_max_points"];
82 $passReachedPoints = $resultData[
"pass"][
"total_reached_points"];
84 $passAnsweredQuestions = $this->
object->getAnsweredQuestionCount($active_id, $pass);
85 $passTotalQuestions = count($resultData) - 2;
87 if ($pass == $scoredPass) {
90 if (!$resultData[
"test"][
"total_max_points"]) {
93 $testPercentage = ($resultData[
"test"][
"total_reached_points"] / $resultData[
"test"][
"total_max_points"]) * 100;
96 $testMaxPoints = $resultData[
"test"][
"total_max_points"];
97 $testReachedPoints = $resultData[
"test"][
"total_reached_points"];
99 $passOverwiewData[
'test'] = array(
100 'active_id' => $active_id,
101 'scored_pass' => $scoredPass,
102 'max_points' => $testMaxPoints,
103 'reached_points' => $testReachedPoints,
104 'percentage' => $testPercentage
107 $isScoredPass =
false;
110 $passOverwiewData[
'passes'][] = array(
111 'active_id' => $active_id,
113 'finishdate' => $passFinishDate,
114 'max_points' => $passMaxPoints,
115 'reached_points' => $passReachedPoints,
116 'percentage' => $passPercentage,
117 'answered_questions' => $passAnsweredQuestions,
118 'total_questions' => $passTotalQuestions,
119 'is_scored_pass' => $isScoredPass
124 return $passOverwiewData;
136 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
139 $testResultData = $this->
object->getTestResult($activeId, $pass);
141 $manScoringQuestionGuiList = array();
143 foreach ($testResultData as $questionData) {
144 if (!isset($questionData[
'qid'])) {
148 if (!isset($questionData[
'type'])) {
152 $questionGUI = $this->
object->createQuestionGUI(
"", $questionData[
'qid']);
154 if (!in_array($questionGUI->object->getQuestionTypeID(), $manScoringQuestionTypes)) {
158 $manScoringQuestionGuiList[ $questionData[
'qid'] ] = $questionGUI;
161 return $manScoringQuestionGuiList;
175 $assessmentSetting =
new ilSetting(
"assessment");
176 return $assessmentSetting->get(
"manscoring_done_" . $activeId,
false);
190 $assessmentSetting =
new ilSetting(
"assessment");
191 $assessmentSetting->set(
"manscoring_done_" . $activeId, (
bool) $manScoringDone);
197 $ilDB = $DIC[
'ilDB'];
200 $component_repository = $DIC[
'component.repository'];
204 if ($this->
object->isRandomTest()) {
210 $virtualSequence->setActiveId($testSession->
getActiveId());
212 $virtualSequence->init();
214 return $virtualSequence;
219 $resultsByPass = array();
222 $results = $this->
object->getTestResult(
233 $virtualPassResults = array();
236 foreach ($resultsByPass[$pass] as
$key => $questionResult) {
237 if (
$key ===
'test' ||
$key ===
'pass') {
241 if ($questionResult[
'qid'] == $questionId) {
242 $questionResult[
'pass'] = $pass;
243 $virtualPassResults[$questionId] = $questionResult;
249 return $virtualPassResults;
261 $marked_questions = array();
263 if ($this->
object->getShowMarker()) {
264 include_once
"./Modules/Test/classes/class.ilObjTest.php";
269 $firstQuestion =
true;
271 foreach ($result_array as
$key => $value) {
273 $this->
object->isFollowupQuestionAnswerFixationEnabled()
274 && !$value[
'presented'] && !$firstQuestion
278 if ($this->
object->getListOfQuestionsDescription()) {
279 $description = $value[
"description"];
283 if (!$this->
object->getTitleOutput()) {
284 $points = $value[
"points"];
288 if (count($marked_questions)) {
289 if (array_key_exists($value[
"qid"], $marked_questions)) {
290 $obj = $marked_questions[$value[
"qid"]];
291 if ($obj[
"solved"] == 1) {
299 'order' => $value[
"nr"],
300 'title' => $this->
object->getQuestionTitle($value[
"title"], $value[
"nr"]),
301 'description' => $description,
302 'disabled' => $disableLink,
303 'worked_through' => $value[
"worked_through"],
304 'postponed' => $value[
"postponed"],
307 'sequence' => $value[
"sequence"],
308 'obligatory' => $value[
'obligatory'],
309 'isAnswered' => $value[
'isAnswered']
312 $firstQuestion =
false;
getPassOverviewData($active_id, $short=false)
public ilObjUser $ilUser
static setManScoringDone($activeId, $manScoringDone)
stores the flag wether manscoring is done for the given test active or not within the global settings...
getVirtualSequenceUserResults(ilTestVirtualSequence $virtualSequence)
getQuestionSummaryData(ilTestSequenceSummaryProvider $testSequence, $obligationsFilterEnabled)
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
static lookupPassResultsUpdateTimestamp($active_id, $pass)
getSequenceSummary($obligationsFilterEnabled=false)
static isManScoringDone($activeId)
reads the flag wether manscoring is done for the given test active or not from the global settings (s...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildVirtualSequence(ilTestSession $testSession)
static _getSolvedQuestions($active_id, $question_fi=null)
get solved questions
getManScoringQuestionGuiList($activeId, $pass)
Returns the list of answers of a users test pass and offers a scoring option.
__construct(ilObjTest $a_object)
public
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getManualScoring()
Retrieve the manual scoring settings.
Refinery Factory $refinery