26 $this->
object = $a_object;
38 $passOverwiewData =
array();
42 $scoredPass = $this->
object->_getResultPass($active_id);
46 $testReachedPoints = 0;
52 if ($passFinishDate <= 0) {
57 $resultData =&$this->
object->getTestResult($active_id,
$pass);
59 if (!$resultData[
"pass"][
"total_max_points"]) {
62 $passPercentage = ($resultData[
"pass"][
"total_reached_points"]/$resultData[
"pass"][
"total_max_points"])*100;
65 $passMaxPoints = $resultData[
"pass"][
"total_max_points"];
66 $passReachedPoints = $resultData[
"pass"][
"total_reached_points"];
68 $passAnsweredQuestions = $this->
object->getAnsweredQuestionCount($active_id,
$pass);
69 $passTotalQuestions = count($resultData) - 2;
71 if (
$pass == $scoredPass) {
74 if (!$resultData[
"test"][
"total_max_points"]) {
77 $testPercentage = ($resultData[
"test"][
"total_reached_points"]/$resultData[
"test"][
"total_max_points"])*100;
80 $testMaxPoints = $resultData[
"test"][
"total_max_points"];
81 $testReachedPoints = $resultData[
"test"][
"total_reached_points"];
83 $passOverwiewData[
'test'] =
array(
84 'active_id' => $active_id,
85 'scored_pass' => $scoredPass,
86 'max_points' => $testMaxPoints,
87 'reached_points' => $testReachedPoints,
88 'percentage' => $testPercentage
91 $isScoredPass =
false;
94 $passOverwiewData[
'passes'][] =
array(
95 'active_id' => $active_id,
97 'finishdate' => $passFinishDate,
98 'max_points' => $passMaxPoints,
99 'reached_points' => $passReachedPoints,
100 'percentage' => $passPercentage,
101 'answered_questions' => $passAnsweredQuestions,
102 'total_questions' => $passTotalQuestions,
103 'is_scored_pass' => $isScoredPass
108 return $passOverwiewData;
121 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
124 $testResultData = $this->
object->getTestResult($activeId,
$pass);
126 $manScoringQuestionGuiList =
array();
128 foreach ($testResultData as $questionData) {
129 if (!isset($questionData[
'qid'])) {
133 if (!isset($questionData[
'type'])) {
137 $questionGUI = $this->
object->createQuestionGUI(
"", $questionData[
'qid']);
139 if (!in_array($questionGUI->object->getQuestionTypeID(), $manScoringQuestionTypes)) {
143 $manScoringQuestionGuiList[ $questionData[
'qid'] ] = $questionGUI;
146 return $manScoringQuestionGuiList;
160 $assessmentSetting =
new ilSetting(
"assessment");
161 return $assessmentSetting->get(
"manscoring_done_" . $activeId,
false);
175 $assessmentSetting =
new ilSetting(
"assessment");
176 $assessmentSetting->set(
"manscoring_done_" . $activeId, (
bool) $manScoringDone);
183 require_once
'Modules/Test/classes/class.ilTestVirtualSequence.php';
186 if ($this->
object->isRandomTest()) {
187 require_once
'Modules/Test/classes/class.ilTestVirtualSequenceRandomQuestionSet.php';
190 require_once
'Modules/Test/classes/class.ilTestVirtualSequence.php';
194 $virtualSequence->setActiveId($testSession->
getActiveId());
196 $virtualSequence->init();
198 return $virtualSequence;
203 $resultsByPass =
array();
206 $results = $this->
object->getTestResult(
217 $virtualPassResults =
array();
220 foreach ($resultsByPass[
$pass] as
$key => $questionResult) {
221 if (
$key ===
'test' ||
$key ===
'pass') {
225 if ($questionResult[
'qid'] == $questionId) {
226 $questionResult[
'pass'] =
$pass;
227 $virtualPassResults[$questionId] = $questionResult;
233 return $virtualPassResults;
245 $marked_questions =
array();
247 if ($this->
object->getShowMarker()) {
248 include_once
"./Modules/Test/classes/class.ilObjTest.php";
254 foreach ($result_array as
$key => $value) {
256 if ($this->
object->getListOfQuestionsDescription()) {
261 if (!$this->
object->getTitleOutput()) {
262 $points = $value[
"points"];
266 if (count($marked_questions)) {
267 if (array_key_exists($value[
"qid"], $marked_questions)) {
268 $obj = $marked_questions[$value[
"qid"]];
269 if ($obj[
"solved"] == 1) {
276 $data[] =
array(
'order' => $value[
"nr"],
'title' => $this->
object->getQuestionTitle($value[
"title"], $value[
"nr"]),
'description' =>
$description,
'worked_through' => $value[
"worked_through"],
'postponed' => $value[
"postponed"],
'points' => $points,
'marked' => $marked,
'sequence' => $value[
"sequence"],
'obligatory' => $value[
'obligatory'],
'isAnswered' => $value[
'isAnswered']);
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...
Base Exception for all Exceptions relating to Modules/Test.
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.
Create styles array
The data for the language used.
__construct(ilObjTest $a_object)
public
Create new PHPExcel object
obj_idprivate
static _getManualScoring()
Retrieve the manual scoring settings.