11 include_once
'./Services/Xml/classes/class.ilXmlWriter.php';
30 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
31 $assessmentSetting =
new ilSetting(
"assessment");
32 $user_criteria = $assessmentSetting->get(
"user_criteria");
33 if (strlen($user_criteria) == 0) $user_criteria =
'usr_id';
35 if ($this->anonymized)
37 $result = $ilDB->queryF(
"SELECT * FROM tst_active WHERE test_fi = %s",
44 $result = $ilDB->queryF(
"SELECT tst_active.*, usr_data." . $user_criteria .
" FROM tst_active, usr_data WHERE tst_active.test_fi = %s AND tst_active.user_fi = usr_data.usr_id",
53 'active_id' =>
$row[
'active_id'],
54 'user_fi' =>
$row[
'user_fi'],
55 'anonymous_id' =>
$row[
'anonymous_id'],
56 'test_fi' =>
$row[
'test_fi'],
57 'lastindex' =>
$row[
'lastindex'],
58 'tries' =>
$row[
'tries'],
59 'submitted' =>
$row[
'submitted'],
60 'submittimestamp' =>
$row[
'submittimestamp'],
61 'tstamp' =>
$row[
'tstamp']
64 if (!$this->anonymized)
66 $attrs[
'user_criteria'] = $user_criteria;
67 $attrs[$user_criteria] =
$row[$user_criteria];
69 array_push($this->active_ids,
$row[
'active_id']);
79 $query =
"SELECT * FROM tst_pass_result WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi, pass";
85 'active_fi' =>
$row[
'active_fi'],
86 'pass' =>
$row[
'pass'],
87 'points' =>
$row[
'points'],
88 'maxpoints' =>
$row[
'maxpoints'],
89 'questioncount' =>
$row[
'questioncount'],
90 'answeredquestions' =>
$row[
'answeredquestions'],
91 'workingtime' =>
$row[
'workingtime'],
92 'tstamp' =>
$row[
'tstamp']
103 $query =
"SELECT * FROM tst_result_cache WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi";
109 'active_fi' =>
$row[
'active_fi'],
110 'pass' =>
$row[
'pass'],
111 'max_points' =>
$row[
'max_points'],
112 'reached_points' =>
$row[
'reached_points'],
113 'mark_short' =>
$row[
'mark_short'],
114 'mark_official' =>
$row[
'mark_official'],
115 'passed' =>
$row[
'passed'],
116 'failed' =>
$row[
'failed'],
117 'tstamp' =>
$row[
'tstamp']
128 $query =
"SELECT * FROM tst_sequence WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi, pass";
134 'active_fi' =>
$row[
'active_fi'],
135 'pass' =>
$row[
'pass'],
136 'sequence' =>
$row[
'sequence'],
137 'postponed' =>
$row[
'postponed'],
138 'hidden' =>
$row[
'hidden'],
139 'tstamp' =>
$row[
'tstamp']
150 $query =
"SELECT * FROM tst_solutions WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY solution_id";
156 'solution_id' =>
$row[
'solution_id'],
157 'active_fi' =>
$row[
'active_fi'],
158 'question_fi' =>
$row[
'question_fi'],
159 'points' =>
$row[
'points'],
160 'pass' =>
$row[
'pass'],
161 'value1' =>
$row[
'value1'],
162 'value2' =>
$row[
'value2'],
163 'tstamp' =>
$row[
'tstamp']
174 $result = $ilDB->queryF(
"SELECT * FROM tst_test_question WHERE test_fi = %s",
176 array($this->test_id)
182 'test_question_id' =>
$row[
'test_question_id'],
183 'test_fi' =>
$row[
'test_fi'],
184 'question_fi' =>
$row[
'question_fi'],
185 'sequence' =>
$row[
'sequence'],
186 'tstamp' =>
$row[
'tstamp']
198 $query =
"SELECT * FROM tst_test_result WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi";
204 'test_result_id' =>
$row[
'test_result_id'],
205 'active_fi' =>
$row[
'active_fi'],
206 'question_fi' =>
$row[
'question_fi'],
207 'points' =>
$row[
'points'],
208 'pass' =>
$row[
'pass'],
209 'manual' =>
$row[
'manual'],
210 'tstamp' =>
$row[
'tstamp']
221 $query =
"SELECT * FROM tst_times WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi";
227 'times_id' =>
$row[
'times_id'],
228 'active_fi' =>
$row[
'active_fi'],
229 'started' =>
$row[
'started'],
230 'finished' =>
$row[
'finished'],
231 'pass' =>
$row[
'pass'],
232 'tstamp' =>
$row[
'tstamp']
241 $this->active_ids = array();
243 $attrs = array(
"version" =>
"4.1.0");