11 include_once
'./Services/Xml/classes/class.ilXmlWriter.php';
23 parent::__construct();
48 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
49 $assessmentSetting =
new ilSetting(
"assessment");
50 $user_criteria = $assessmentSetting->get(
"user_criteria");
51 if (strlen($user_criteria) == 0) $user_criteria =
'usr_id';
53 if ($this->anonymized)
55 $result = $ilDB->queryF(
"SELECT * FROM tst_active WHERE test_fi = %s",
62 $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",
71 'active_id' =>
$row[
'active_id'],
72 'user_fi' =>
$row[
'user_fi'],
73 'anonymous_id' =>
$row[
'anonymous_id'],
74 'test_fi' =>
$row[
'test_fi'],
75 'lastindex' =>
$row[
'lastindex'],
76 'tries' =>
$row[
'tries'],
77 'last_started_pass' =>
$row[
'last_started_pass'],
78 'last_finished_pass' =>
$row[
'last_finished_pass'],
79 'submitted' =>
$row[
'submitted'],
80 'submittimestamp' =>
$row[
'submittimestamp'],
81 'tstamp' =>
$row[
'tstamp']
84 if (!$this->anonymized)
86 $attrs[
'user_criteria'] = $user_criteria;
87 $attrs[$user_criteria] =
$row[$user_criteria];
89 array_push($this->active_ids,
$row[
'active_id']);
99 $query =
"SELECT * FROM tst_pass_result WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi, pass";
105 'active_fi' =>
$row[
'active_fi'],
106 'pass' =>
$row[
'pass'],
107 'points' =>
$row[
'points'],
108 'maxpoints' =>
$row[
'maxpoints'],
109 'questioncount' =>
$row[
'questioncount'],
110 'answeredquestions' =>
$row[
'answeredquestions'],
111 'workingtime' =>
$row[
'workingtime'],
112 'tstamp' =>
$row[
'tstamp']
123 $query =
"SELECT * FROM tst_result_cache WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi";
129 'active_fi' =>
$row[
'active_fi'],
130 'pass' =>
$row[
'pass'],
131 'max_points' =>
$row[
'max_points'],
132 'reached_points' =>
$row[
'reached_points'],
133 'mark_short' =>
$row[
'mark_short'],
134 'mark_official' =>
$row[
'mark_official'],
135 'passed' =>
$row[
'passed'],
136 'failed' =>
$row[
'failed'],
137 'tstamp' =>
$row[
'tstamp']
148 $query =
"SELECT * FROM tst_sequence WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi, pass";
154 'active_fi' =>
$row[
'active_fi'],
155 'pass' =>
$row[
'pass'],
156 'sequence' =>
$row[
'sequence'],
157 'postponed' =>
$row[
'postponed'],
158 'hidden' =>
$row[
'hidden'],
159 'tstamp' =>
$row[
'tstamp']
170 $query =
"SELECT * FROM tst_solutions WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY solution_id";
176 'solution_id' =>
$row[
'solution_id'],
177 'active_fi' =>
$row[
'active_fi'],
178 'question_fi' =>
$row[
'question_fi'],
179 'points' =>
$row[
'points'],
180 'pass' =>
$row[
'pass'],
181 'value1' =>
$row[
'value1'],
182 'value2' =>
$row[
'value2'],
183 'tstamp' =>
$row[
'tstamp']
195 SELECT * FROM tst_test_rnd_qst 196 WHERE {$ilDB->in('active_fi', $this->active_ids, false, 'integer')} 197 ORDER BY test_random_question_id 205 foreach(
$row as $field => $value)
207 $attrs[$field] = $value;
220 $query =
"SELECT * FROM tst_test_result WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi";
226 'test_result_id' =>
$row[
'test_result_id'],
227 'active_fi' =>
$row[
'active_fi'],
228 'question_fi' =>
$row[
'question_fi'],
229 'points' =>
$row[
'points'],
230 'pass' =>
$row[
'pass'],
231 'manual' =>
$row[
'manual'],
232 'tstamp' =>
$row[
'tstamp']
243 $query =
"SELECT * FROM tst_times WHERE " . $ilDB->in(
'active_fi', $this->active_ids,
false,
'integer') .
" ORDER BY active_fi";
249 'times_id' =>
$row[
'times_id'],
250 'active_fi' =>
$row[
'active_fi'],
251 'started' =>
$row[
'started'],
252 'finished' =>
$row[
'finished'],
253 'pass' =>
$row[
'pass'],
254 'tstamp' =>
$row[
'tstamp']
263 $this->active_ids =
array();
265 $attrs =
array(
"version" =>
"4.1.0");
286 return parent::xmlDumpMem($format);
292 return parent::xmlDumpFile(
$file, $format);
setIncludeRandomTestQuestionsEnabled($includeRandomTestQuestionsEnabled)
__construct($test_id, $anonymized=false)
static _getParticipantData($active_id)
Retrieves a participant name from active id.
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
xmlElement($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
Writes a basic element (no children, just textual content)
Test results to XML class.
isIncludeRandomTestQuestionsEnabled()
xmlEndTag($tag)
Writes an endtag.
$includeRandomTestQuestionsEnabled
xmlHeader()
Writes xml header public.
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
exportRandomTestQuestions()
xmlDumpFile($file, $format=TRUE)