11include_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) {
 
   52            $user_criteria = 
'usr_id';
 
   55        if ($this->anonymized) {
 
   57                "SELECT * FROM tst_active WHERE test_fi = %s",
 
   63                "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) {
 
   85                $attrs[
'user_criteria'] = $user_criteria;
 
   86                $attrs[$user_criteria] = 
$row[$user_criteria];
 
   88            array_push($this->active_ids, 
$row[
'active_id']);
 
   98        $query = 
"SELECT * FROM tst_pass_result WHERE " . 
$ilDB->in(
'active_fi', $this->active_ids, 
false, 
'integer') . 
" ORDER BY active_fi, pass";
 
  103                'active_fi' => 
$row[
'active_fi'],
 
  104                'pass' => 
$row[
'pass'],
 
  105                'points' => 
$row[
'points'],
 
  106                'maxpoints' => 
$row[
'maxpoints'],
 
  107                'questioncount' => 
$row[
'questioncount'],
 
  108                'answeredquestions' => 
$row[
'answeredquestions'],
 
  109                'workingtime' => 
$row[
'workingtime'],
 
  110                'tstamp' => 
$row[
'tstamp']
 
  121        $query = 
"SELECT * FROM tst_result_cache WHERE " . 
$ilDB->in(
'active_fi', $this->active_ids, 
false, 
'integer') . 
" ORDER BY active_fi";
 
  126                'active_fi' => 
$row[
'active_fi'],
 
  127                'pass' => 
$row[
'pass'],
 
  128                'max_points' => 
$row[
'max_points'],
 
  129                'reached_points' => 
$row[
'reached_points'],
 
  130                'mark_short' => 
$row[
'mark_short'],
 
  131                'mark_official' => 
$row[
'mark_official'],
 
  132                'passed' => 
$row[
'passed'],
 
  133                'failed' => 
$row[
'failed'],
 
  134                'tstamp' => 
$row[
'tstamp']
 
  145        $query = 
"SELECT * FROM tst_sequence WHERE " . 
$ilDB->in(
'active_fi', $this->active_ids, 
false, 
'integer') . 
" ORDER BY active_fi, pass";
 
  150                'active_fi' => 
$row[
'active_fi'],
 
  151                'pass' => 
$row[
'pass'],
 
  152                'sequence' => 
$row[
'sequence'],
 
  153                'postponed' => 
$row[
'postponed'],
 
  154                'hidden' => 
$row[
'hidden'],
 
  155                'tstamp' => 
$row[
'tstamp']
 
  166        $query = 
"SELECT * FROM tst_solutions WHERE " . 
$ilDB->in(
'active_fi', $this->active_ids, 
false, 
'integer') . 
" ORDER BY solution_id";
 
  171                'solution_id' => 
$row[
'solution_id'],
 
  172                'active_fi' => 
$row[
'active_fi'],
 
  173                'question_fi' => 
$row[
'question_fi'],
 
  174                'points' => 
$row[
'points'],
 
  175                'pass' => 
$row[
'pass'],
 
  176                'value1' => 
$row[
'value1'],
 
  177                'value2' => 
$row[
'value2'],
 
  178                'tstamp' => 
$row[
'tstamp']
 
  190                          SELECT * FROM tst_test_rnd_qst 
  191                          WHERE {$ilDB->in('active_fi', $this->active_ids, false, 'integer')} 
  192                          ORDER BY test_random_question_id 
  199            foreach (
$row as $field => $value) {
 
  200                $attrs[$field] = $value;
 
  213        $query = 
"SELECT * FROM tst_test_result WHERE " . 
$ilDB->in(
'active_fi', $this->active_ids, 
false, 
'integer') . 
" ORDER BY active_fi";
 
  218                'test_result_id' => 
$row[
'test_result_id'],
 
  219                'active_fi' => 
$row[
'active_fi'],
 
  220                'question_fi' => 
$row[
'question_fi'],
 
  221                'points' => 
$row[
'points'],
 
  222                'pass' => 
$row[
'pass'],
 
  223                'manual' => 
$row[
'manual'],
 
  224                'tstamp' => 
$row[
'tstamp']
 
  235        $query = 
"SELECT * FROM tst_times WHERE " . 
$ilDB->in(
'active_fi', $this->active_ids, 
false, 
'integer') . 
" ORDER BY active_fi";
 
  240                'times_id' => 
$row[
'times_id'],
 
  241                'active_fi' => 
$row[
'active_fi'],
 
  242                'started' => 
$row[
'started'],
 
  243                'finished' => 
$row[
'finished'],
 
  244                'pass' => 
$row[
'pass'],
 
  245                'tstamp' => 
$row[
'tstamp']
 
  254        $this->active_ids = array();
 
  256        $attrs = array(
"version" => 
"4.1.0");
 
  276        return parent::xmlDumpMem(
$format);
 
An exception for terminatinating execution or to throw for unit testing.
static _getParticipantData($active_id)
Retrieves a participant name from active id.
Test results to XML class.
exportRandomTestQuestions()
xmlDumpMem($format=true)
Returns xml document from memory.
$includeRandomTestQuestionsEnabled
__construct($test_id, $anonymized=false)
isIncludeRandomTestQuestionsEnabled()
xmlDumpFile($file, $format=true)
Dumps xml document from memory into a file.
setIncludeRandomTestQuestionsEnabled($includeRandomTestQuestionsEnabled)
xmlEndTag($tag)
Writes an endtag.
xmlHeader()
Writes xml header @access public.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file