4require_once 
'./Modules/Test/classes/inc.AssessmentConstants.php';
 
    5require_once 
'./Services/Utilities/classes/class.ilFormat.php';
 
    7require_once 
'Modules/TestQuestionPool/classes/class.assQuestion.php';
 
   49                $this->test_obj =& $a_test_obj;
 
   54                $this->mode = $a_mode;
 
   57                $this->inst_id = IL_INST_ID;
 
   60                $this->export_dir = $this->test_obj->getExportDirectory();
 
   64                                $this->subdir = $date.
"__".$this->inst_id.
"__".
 
   65                                        "tst__results_".$this->test_obj->getId();
 
   68                                $this->subdir = $date.
"__".$this->inst_id.
"__".
 
   69                                        "test__aggregated__results_".$this->test_obj->getId();
 
   72                                $this->subdir = $date.
"__".$this->inst_id.
"__".
 
   73                                        "tst".
"_".$this->test_obj->getId();
 
   74                                $this->filename = $this->subdir.
".xml";
 
   75                                $this->resultsfile = $date.
"__".$this->inst_id.
"__".
 
   76                                        "results".
"_".$this->test_obj->getId().
".xml";
 
   77                                $this->qti_filename = $date.
"__".$this->inst_id.
"__".
 
   78                                        "qti".
"_".$this->test_obj->getId().
".xml";
 
   81                $this->filename = $this->subdir.
".".$this->
getExtension();
 
   97                $this->resultExportingEnabledForTestExport = $resultExprtingEnabledForTestExport;
 
  101                switch ($this->mode) {
 
  143                $expDir = $this->test_obj->getExportDirectory();
 
  146                $this->test_obj->createExportDirectory();
 
  147                include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
  150                $expLog = 
new ilLog($expDir, 
"export.log");
 
  152                $expLog->setLogFormat(
"");
 
  153                $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export Of Results");
 
  156                $file = fopen($this->export_dir.
"/".$this->filename, 
"w");
 
  161                @copy($excelfile, $this->export_dir . 
"/" . str_replace($this->
getExtension(), 
"xls", $this->filename));
 
  164                $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export of Results");
 
  176                $data = $this->test_obj->getAggregatedResultsData();
 
  177                include_once 
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
 
  180                $testname = 
ilUtil::getASCIIFilename(preg_replace(
"/\s/", 
"_", $this->test_obj->getTitle() . 
'_aggregated')) . 
".xls";
 
  181                $workbook = $adapter->getWorkbook();
 
  182                $workbook->setVersion(8); 
 
  184                $format_percent =& $workbook->addFormat();
 
  185                $format_percent->setNumFormat(
"0.00%");
 
  186                $format_title =& $workbook->addFormat();
 
  187                $format_title->setBold();
 
  188                $format_title->setColor(
'black');
 
  189                $format_title->setPattern(1);
 
  190                $format_title->setFgColor(
'silver');
 
  191                include_once 
"./Services/Excel/classes/class.ilExcelUtils.php";
 
  198                foreach (
$data[
"overview"] as $key => $value)
 
  214                foreach (
$data[
"questions"] as $key => $value)
 
  244                $data = $this->test_obj->getAggregatedResultsData();
 
  246                array_push($rows, array(
 
  247                        $this->lng->txt(
"result"),
 
  248                        $this->lng->txt(
"value")
 
  250                foreach (
$data[
"overview"] as $key => $value)
 
  252                        array_push($rows, array(
 
  257                array_push($rows, array(
 
  258                        $this->lng->txt(
"question_title"),
 
  259                        $this->lng->txt(
"average_reached_points"),
 
  260                        $this->lng->txt(
"points"),
 
  261                        $this->lng->txt(
"percentage"),
 
  262                        $this->lng->txt(
"number_of_answers")
 
  264                foreach (
$data[
"questions"] as $key => $value)
 
  266                        array_push($rows, array(
 
  276                foreach ($rows as $evalrow)
 
  278                        $csvrow =& $this->test_obj->processCSVRow($evalrow, TRUE, 
$separator);
 
  302        public function exportToExcel($deliver = TRUE, $filterby = 
"", $filtertext = 
"", $passedonly = FALSE)
 
  306                require_once 
'./Services/Excel/classes/class.ilExcelWriterAdapter.php';
 
  309                $testname = $this->test_obj->getTitle();
 
  313                                $testname .= 
'_results';
 
  317                $workbook = $adapter->getWorkbook();
 
  318                $workbook->setVersion(8); 
 
  320                $format_bold =& $workbook->addFormat();
 
  321                $format_bold->setBold();
 
  322                $format_percent =& $workbook->addFormat();
 
  323                $format_percent->setNumFormat(
"0.00%");
 
  324                $format_datetime =& $workbook->addFormat();
 
  325                $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
 
  326                $format_title =& $workbook->addFormat();
 
  327                $format_title->setBold();
 
  328                $format_title->setColor(
'black');
 
  329                $format_title->setPattern(1);
 
  330                $format_title->setFgColor(
'silver');
 
  331                require_once 
'./Services/Excel/classes/class.ilExcelUtils.php';
 
  333                $additionalFields = $this->test_obj->getEvaluationAdditionalFields();
 
  337                if ($this->test_obj->getAnonymity())
 
  346                if (count($additionalFields))
 
  348                        foreach ($additionalFields as $fieldname)
 
  356                if ($this->test_obj->getECTSOutput())
 
  378                $data =& $this->test_obj->getCompleteEvaluationData(TRUE, $filterby, $filtertext);
 
  379                $firstrowwritten = 
false;
 
  380                foreach (
$data->getParticipants() as $active_id => $userdata) 
 
  385                                if (
$data->getParticipant($active_id)->getPassed() == FALSE)
 
  393                                if ($this->test_obj->isRandomTest() || $this->test_obj->getShuffleQuestions())
 
  398                                if ($this->test_obj->getAnonymity())
 
  407                                if (count($additionalFields))
 
  410                                        foreach ($additionalFields as $fieldname)
 
  412                                                if (strcmp($fieldname, 
"gender") == 0)
 
  425                                if ($this->test_obj->getECTSOutput())
 
  431                                $worksheet->write(
$row, $col++, 
$data->getParticipant($active_id)->getQuestionsWorkedThroughInPercent() / 100.0, $format_percent);
 
  432                                $time = 
$data->getParticipant($active_id)->getTimeOfWork();
 
  433                                $time_seconds = $time;
 
  434                                $time_hours    = floor($time_seconds/3600);
 
  435                                $time_seconds -= $time_hours   * 3600;
 
  436                                $time_minutes  = floor($time_seconds/60);
 
  437                                $time_seconds -= $time_minutes * 60;
 
  439                                $time = 
$data->getParticipant($active_id)->getQuestionsWorkedThrough() ? 
$data->getParticipant($active_id)->getTimeOfWork() / 
$data->getParticipant($active_id)->getQuestionsWorkedThrough() : 0;
 
  440                                $time_seconds = $time;
 
  441                                $time_hours    = floor($time_seconds/3600);
 
  442                                $time_seconds -= $time_hours   * 3600;
 
  443                                $time_minutes  = floor($time_seconds/60);
 
  444                                $time_seconds -= $time_minutes * 60;
 
  446                                $fv = getdate(
$data->getParticipant($active_id)->getFirstVisit());
 
  455                                $worksheet->write(
$row, $col++, $firstvisit, $format_datetime);
 
  456                                $lv = getdate(
$data->getParticipant($active_id)->getLastVisit());
 
  465                                $worksheet->write(
$row, $col++, $lastvisit, $format_datetime);
 
  467                                $median = 
$data->getStatistics()->getStatistics()->median();
 
  468                                $pct = 
$data->getParticipant($active_id)->getMaxpoints() ? $median / 
$data->getParticipant($active_id)->getMaxpoints() * 100.0 : 0;
 
  469                                $mark = $this->test_obj->mark_schema->getMatchingMark($pct);
 
  470                                $mark_short_name = 
"";
 
  471                                if (is_object($mark))
 
  473                                        $mark_short_name = $mark->getShortName();
 
  482                                        $worksheet->write(
$row, $col++, 
$data->getParticipant($active_id)->getBestPass() + 1);
 
  486                                        $worksheet->write(
$row, $col++, 
$data->getParticipant($active_id)->getLastPass() + 1);
 
  492                                        $finishdate = $this->test_obj->getPassFinishDate($active_id, 
$pass);
 
  498                                                        if ($this->test_obj->isRandomTest() || $this->test_obj->getShuffleQuestions())
 
  504                                                if (is_object(
$data->getParticipant($active_id)) && is_array(
$data->getParticipant($active_id)->getQuestions(
$pass)))
 
  506                                                        foreach (
$data->getParticipant($active_id)->getQuestions(
$pass) as $question)
 
  508                                                                $question_data = 
$data->getParticipant($active_id)->getPass(
$pass)->getAnsweredQuestionByQuestionId($question[
"id"]);
 
  510                                                                if ($this->test_obj->isRandomTest() || $this->test_obj->getShuffleQuestions())
 
  516                                                                        if (
$pass == 0 && !$firstrowwritten)
 
  523                                                        $firstrowwritten = 
true;
 
  530                if ($this->test_obj->getExportSettingsSingleChoiceShort() && !$this->test_obj->isRandomTest() && $this->test_obj->hasSingleChoiceQuestions())
 
  533                        $titles =& $this->test_obj->getQuestionTitlesAndIndexes();
 
  534                        $positions = array();
 
  537                        foreach ($titles as $id => $title)
 
  539                                $positions[$id] = $pos;
 
  542                        $usernames = array();
 
  543                        $participantcount = count(
$data->getParticipants());
 
  544                        $allusersheet = 
false;
 
  546                        $resultsheet =& $workbook->addWorksheet($this->lng->txt(
"eval_all_users"));
 
  551                        if (count($additionalFields))
 
  553                                foreach ($additionalFields as $fieldname)
 
  555                                        if (strcmp($fieldname, 
"matriculation") == 0)
 
  562                        foreach ($titles as $title)
 
  568                        foreach (
$data->getParticipants() as $active_id => $userdata) 
 
  571                                if (array_key_exists($username, $usernames))
 
  573                                        $usernames[$username]++;
 
  574                                        $username .= 
" ($i)";
 
  578                                        $usernames[$username] = 1;
 
  581                                $resultsheet->write(
$row, $col++, $username);
 
  582                                $resultsheet->write(
$row, $col++, $userdata->getLogin());
 
  583                                if (count($additionalFields))
 
  586                                        foreach ($additionalFields as $fieldname)
 
  588                                                if (strcmp($fieldname, 
"matriculation") == 0)
 
  590                                                        if (strlen($userfields[$fieldname]))
 
  602                                $pass = $userdata->getScoredPass();
 
  603                                if (is_object($userdata) && is_array($userdata->getQuestions(
$pass)))
 
  605                                        foreach ($userdata->getQuestions(
$pass) as $question)
 
  608                                                if(is_object($objQuestion) && strcmp($objQuestion->getQuestionType(), 
'assSingleChoice') == 0)
 
  610                                                        $solution = $objQuestion->getSolutionValues($active_id, 
$pass);
 
  611                                                        $pos = $positions[$question[
"id"]];
 
  612                                                        $selectedanswer = 
"x";
 
  613                                                        foreach ($objQuestion->getAnswers() as $id => $answer)
 
  615                                                                if (strlen($solution[0][
"value1"]) && $id == $solution[0][
"value1"])
 
  617                                                                        $selectedanswer = $answer->getAnswertext();
 
  626                        if ($this->test_obj->isSingleChoiceTestWithoutShuffle())
 
  631                                $usernames = array();
 
  632                                $allusersheet = 
false;
 
  634                                $resultsheet =& $workbook->addWorksheet($this->lng->txt(
"eval_all_users") . 
" (2)");
 
  639                                if (count($additionalFields))
 
  641                                        foreach ($additionalFields as $fieldname)
 
  643                                                if (strcmp($fieldname, 
"matriculation") == 0)
 
  650                                foreach ($titles as $title)
 
  656                                foreach (
$data->getParticipants() as $active_id => $userdata) 
 
  659                                        if (array_key_exists($username, $usernames))
 
  661                                                $usernames[$username]++;
 
  662                                                $username .= 
" ($i)";
 
  666                                                $usernames[$username] = 1;
 
  669                                        $resultsheet->write(
$row, $col++, $username);
 
  670                                        $resultsheet->write(
$row, $col++, $userdata->getLogin());
 
  671                                        if (count($additionalFields))
 
  674                                                foreach ($additionalFields as $fieldname)
 
  676                                                        if (strcmp($fieldname, 
"matriculation") == 0)
 
  678                                                                if (strlen($userfields[$fieldname]))
 
  690                                        $pass = $userdata->getScoredPass();
 
  691                                        if (is_object($userdata) && is_array($userdata->getQuestions(
$pass)))
 
  693                                                foreach ($userdata->getQuestions(
$pass) as $question)
 
  695                                                        $objQuestion =& $this->test_obj->_instanciateQuestion($question[
"aid"]);
 
  696                                                        if (is_object($objQuestion) && strcmp($objQuestion->getQuestionType(), 
'assSingleChoice') == 0)
 
  698                                                                $solution = $objQuestion->getSolutionValues($active_id, 
$pass);
 
  699                                                                $pos = $positions[$question[
"aid"]];
 
  700                                                                $selectedanswer = chr(65+$solution[0][
"value1"]);
 
  712                        $usernames = array();
 
  713                        $participantcount = count(
$data->getParticipants());
 
  714                        $allusersheet = 
false;
 
  717                        foreach (
$data->getParticipants() as $active_id => $userdata) 
 
  722                                if (array_key_exists($username, $usernames))
 
  724                                        $usernames[$username]++;
 
  725                                        $username .= 
" ($i)";
 
  729                                        $usernames[$username] = 1;
 
  731                                if ($participantcount > 250) {
 
  732                                        if (!$allusersheet || ($pages-1) < floor(
$row / 64000)) {
 
  733                                                $resultsheet =& $workbook->addWorksheet($this->lng->txt(
"eval_all_users") . (($pages > 0) ? 
" (".($pages+1).
")" : 
""));
 
  734                                                $allusersheet = 
true;
 
  739                                        $resultsheet =& $workbook->addWorksheet(utf8_decode($username));
 
  741                                if (method_exists($resultsheet, 
"writeString"))
 
  743                                        $pass = $userdata->getScoredPass();
 
  747                                        if (is_object($userdata) && is_array($userdata->getQuestions(
$pass)))
 
  749                                                foreach ($userdata->getQuestions(
$pass) as $question)
 
  751                                                        require_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
  753                                                        if (is_object($question))
 
  755                                                                $row = $question->setExportDetailsXLS($resultsheet, 
$row, $active_id, 
$pass, $format_title, $format_bold);
 
  783        function exportToCSV($deliver = TRUE, $filterby = 
"", $filtertext = 
"", $passedonly = FALSE)
 
  792                if ($this->test_obj->getAnonymity())
 
  794                        array_push($datarow, $this->lng->txt(
"counter"));
 
  799                        array_push($datarow, $this->lng->txt(
"name"));
 
  801                        array_push($datarow, $this->lng->txt(
"login"));
 
  804                $additionalFields = $this->test_obj->getEvaluationAdditionalFields();
 
  805                if (count($additionalFields))
 
  807                        foreach ($additionalFields as $fieldname)
 
  809                                array_push($datarow, $this->lng->txt($fieldname));
 
  813                array_push($datarow, $this->lng->txt(
"tst_stat_result_resultspoints"));
 
  815                array_push($datarow, $this->lng->txt(
"maximum_points"));
 
  817                array_push($datarow, $this->lng->txt(
"tst_stat_result_resultsmarks"));
 
  819                if ($this->test_obj->getECTSOutput())
 
  821                        array_push($datarow, $this->lng->txt(
"ects_grade"));
 
  824                array_push($datarow, $this->lng->txt(
"tst_stat_result_qworkedthrough"));
 
  826                array_push($datarow, $this->lng->txt(
"tst_stat_result_qmax"));
 
  828                array_push($datarow, $this->lng->txt(
"tst_stat_result_pworkedthrough"));
 
  830                array_push($datarow, $this->lng->txt(
"tst_stat_result_timeofwork"));
 
  832                array_push($datarow, $this->lng->txt(
"tst_stat_result_atimeofwork"));
 
  834                array_push($datarow, $this->lng->txt(
"tst_stat_result_firstvisit"));
 
  836                array_push($datarow, $this->lng->txt(
"tst_stat_result_lastvisit"));
 
  839                array_push($datarow, $this->lng->txt(
"tst_stat_result_mark_median"));
 
  841                array_push($datarow, $this->lng->txt(
"tst_stat_result_rank_participant"));
 
  843                array_push($datarow, $this->lng->txt(
"tst_stat_result_rank_median"));
 
  845                array_push($datarow, $this->lng->txt(
"tst_stat_result_total_participants"));
 
  847                array_push($datarow, $this->lng->txt(
"tst_stat_result_median"));
 
  849                array_push($datarow, $this->lng->txt(
"scored_pass"));
 
  852                array_push($datarow, $this->lng->txt(
"pass"));
 
  855                $data =& $this->test_obj->getCompleteEvaluationData(TRUE, $filterby, $filtertext);
 
  856                $headerrow = $datarow;
 
  858                foreach (
$data->getParticipants() as $active_id => $userdata) 
 
  860                        $datarow = $headerrow;
 
  864                                if (
$data->getParticipant($active_id)->getPassed() == FALSE)
 
  872                                if ($this->test_obj->getAnonymity())
 
  874                                        array_push($datarow2, $counter);
 
  878                                        array_push($datarow2, 
$data->getParticipant($active_id)->getName());
 
  879                                        array_push($datarow2, 
$data->getParticipant($active_id)->getLogin());
 
  881                                if (count($additionalFields))
 
  884                                        foreach ($additionalFields as $fieldname)
 
  886                                                if (strcmp($fieldname, 
"gender") == 0)
 
  888                                                        array_push($datarow2, $this->lng->txt(
"gender_" . $userfields[$fieldname]));
 
  892                                                        array_push($datarow2, $userfields[$fieldname]);
 
  896                                array_push($datarow2, 
$data->getParticipant($active_id)->getReached());
 
  897                                array_push($datarow2, 
$data->getParticipant($active_id)->getMaxpoints());
 
  898                                array_push($datarow2, 
$data->getParticipant($active_id)->getMark());
 
  899                                if ($this->test_obj->getECTSOutput())
 
  901                                        array_push($datarow2, 
$data->getParticipant($active_id)->getECTSMark());
 
  903                                array_push($datarow2, 
$data->getParticipant($active_id)->getQuestionsWorkedThrough());
 
  904                                array_push($datarow2, 
$data->getParticipant($active_id)->getNumberOfQuestions());
 
  905                                array_push($datarow2, 
$data->getParticipant($active_id)->getQuestionsWorkedThroughInPercent() / 100.0);
 
  906                                $time = 
$data->getParticipant($active_id)->getTimeOfWork();
 
  907                                $time_seconds = $time;
 
  908                                $time_hours    = floor($time_seconds/3600);
 
  909                                $time_seconds -= $time_hours   * 3600;
 
  910                                $time_minutes  = floor($time_seconds/60);
 
  911                                $time_seconds -= $time_minutes * 60;
 
  912                                array_push($datarow2, sprintf(
"%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds));
 
  913                                $time = 
$data->getParticipant($active_id)->getQuestionsWorkedThrough() ? 
$data->getParticipant($active_id)->getTimeOfWork() / 
$data->getParticipant($active_id)->getQuestionsWorkedThrough() : 0;
 
  914                                $time_seconds = $time;
 
  915                                $time_hours    = floor($time_seconds/3600);
 
  916                                $time_seconds -= $time_hours   * 3600;
 
  917                                $time_minutes  = floor($time_seconds/60);
 
  918                                $time_seconds -= $time_minutes * 60;
 
  919                                array_push($datarow2, sprintf(
"%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds));
 
  921                                $fv = 
$data->getParticipant($active_id)->getFirstVisit();
 
  922                                $lv = 
$data->getParticipant($active_id)->getLastVisit();
 
  923                                foreach(array($fv, $lv) as $ts)
 
  928                                                array_push($datarow2, $visit);
 
  932                                                array_push($datarow2, 
"");
 
  936                                $median = 
$data->getStatistics()->getStatistics()->median();
 
  937                                $pct = 
$data->getParticipant($active_id)->getMaxpoints() ? $median / 
$data->getParticipant($active_id)->getMaxpoints() * 100.0 : 0;
 
  938                                $mark = $this->test_obj->mark_schema->getMatchingMark($pct);
 
  939                                $mark_short_name = 
"";
 
  940                                if (is_object($mark))
 
  942                                        $mark_short_name = $mark->getShortName();
 
  944                                array_push($datarow2, $mark_short_name);
 
  945                                array_push($datarow2, 
$data->getStatistics()->getStatistics()->rank(
$data->getParticipant($active_id)->getReached()));
 
  946                                array_push($datarow2, 
$data->getStatistics()->getStatistics()->rank_median());
 
  947                                array_push($datarow2, 
$data->getStatistics()->getStatistics()->count());
 
  948                                array_push($datarow2, $median);
 
  951                                        array_push($datarow2, 
$data->getParticipant($active_id)->getBestPass() + 1);
 
  955                                        array_push($datarow2, 
$data->getParticipant($active_id)->getLastPass() + 1);
 
  959                                        $finishdate = $this->test_obj->getPassFinishDate($active_id, 
$pass);
 
  964                                                        for ($i = 1; $i < $col-1; $i++) 
 
  966                                                                array_push($datarow2, 
"");
 
  967                                                                array_push($datarow, 
"");
 
  969                                                        array_push($datarow, 
"");
 
  971                                                array_push($datarow2, 
$pass+1);
 
  972                                                if (is_object(
$data->getParticipant($active_id)) && is_array(
$data->getParticipant($active_id)->getQuestions(
$pass)))
 
  974                                                        foreach (
$data->getParticipant($active_id)->getQuestions(
$pass) as $question)
 
  976                                                                $question_data = 
$data->getParticipant($active_id)->getPass(
$pass)->getAnsweredQuestionByQuestionId($question[
"id"]);
 
  977                                                                array_push($datarow2, $question_data[
"reached"]);
 
  978                                                                array_push($datarow, preg_replace(
"/<.*?>/", 
"", 
$data->getQuestionTitle($question[
"id"])));
 
  981                                                if ($this->test_obj->isRandomTest() || $this->test_obj->getShuffleQuestions() || ($counter == 1 && 
$pass == 0))
 
  983                                                        array_push($rows, $datarow);
 
  986                                                array_push($rows, $datarow2);
 
  995                foreach ($rows as $evalrow)
 
  997                        $csvrow =& $this->test_obj->processCSVRow($evalrow, TRUE, 
$separator);
 
 1018                $ilBench->start(
"TestExport", 
"buildExportFile");
 
 1020                include_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
 
 1024                $this->xml->
xmlSetDtdDef(
"<!DOCTYPE Test SYSTEM \"http://www.ilias.uni-koeln.de/download/dtd/ilias_co.dtd\">");
 
 1027                $this->xml->xmlSetGenCmt(
"Export of ILIAS Test ".
 
 1028                        $this->test_obj->getId().
" of installation ".$this->inst.
".");
 
 1031                $this->xml->xmlHeader();
 
 1034                $this->test_obj->createExportDirectory();
 
 1035                include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
 1040                $expDir = $this->test_obj->getExportDirectory();
 
 1041                include_once 
"./Services/Logging/classes/class.ilLog.php";
 
 1042                $expLog = 
new ilLog($expDir, 
"export.log");
 
 1044                $expLog->setLogFormat(
"");
 
 1045                $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export");
 
 1048                $qti_file = fopen($this->export_dir.
"/".$this->subdir.
"/".$this->qti_filename, 
"w");
 
 1049                fwrite($qti_file, $this->test_obj->toXML());
 
 1053                $ilBench->start(
"TestExport", 
"buildExportFile_getXML");
 
 1054                $this->test_obj->exportPagesXML($this->xml, $this->inst_id,
 
 1055                        $this->export_dir.
"/".$this->subdir, $expLog);
 
 1056                $ilBench->stop(
"TestExport", 
"buildExportFile_getXML");
 
 1066                $ilBench->start(
"TestExport", 
"buildExportFile_dumpToFile");
 
 1067                $this->xml->xmlDumpFile($this->export_dir.
"/".$this->subdir.
"/".$this->filename
 
 1069                $ilBench->stop(
"TestExport", 
"buildExportFile_dumpToFile");
 
 1074                        include_once 
"./Modules/Test/classes/class.ilTestResultsToXML.php";
 
 1075                        $resultwriter = 
new ilTestResultsToXML($this->test_obj->getTestId(), $this->test_obj->getAnonymity());
 
 1076                        $ilBench->start(
"TestExport", 
"buildExportFile_results");
 
 1077                        $resultwriter->xmlDumpFile($this->export_dir.
"/".$this->subdir.
"/".$this->resultsfile, 
false);
 
 1078                        $ilBench->stop(
"TestExport", 
"buildExportFile_results");
 
 1082                $ilBench->start(
"QuestionpoolExport", 
"buildExportFile_saveAdditionalMobs");
 
 1084                $ilBench->stop(
"QuestionpoolExport", 
"buildExportFile_saveAdditionalMobs");
 
 1087                $ilBench->start(
"TestExport", 
"buildExportFile_zipFile");
 
 1089                        $this->export_dir.
"/".$this->subdir.
".zip");
 
 1090                $ilBench->stop(
"TestExport", 
"buildExportFile_zipFile");
 
 1093                $this->xml->_XmlWriter;
 
 1095                $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export");
 
 1096                $ilBench->stop(
"TestExport", 
"buildExportFile");
 
 1098                return $this->export_dir.
"/".$this->subdir.
".zip";
 
 1103                include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 1106                foreach (
$mobs as $mob)
 
 1111                                $mob_obj->exportFiles($a_export_dir);
 
 1115                foreach ($this->test_obj->questions as $question_id)
 
 1118                        foreach (
$mobs as $mob)
 
 1123                                        $mob_obj->exportFiles($a_export_dir);
 
static _instantiateQuestion($question_id)
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
_convert_text($a_text, $a_target="has been removed")
Class ilExcelWriterAdapter.
_lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
__construct(&$a_test_obj, $a_mode="xml")
Constructor.
aggregatedResultsToExcel($deliver=TRUE)
Exports the aggregated results to the Microsoft Excel file format.
exportToExcel($deliver=TRUE, $filterby="", $filtertext="", $passedonly=FALSE)
Exports the evaluation data to the Microsoft Excel file format.
exportXHTMLMediaObjects($a_export_dir)
buildExportResultFile()
build xml export file
buildExportFile()
build export file (complete zip file)
aggregatedResultsToCSV($deliver=TRUE)
Exports the aggregated results to CSV.
isResultExportingEnabledForTestExport()
buildExportFileXML()
build xml export file
exportToCSV($deliver=TRUE, $filterby="", $filtertext="", $passedonly=FALSE)
Exports the evaluation data to the CSV file format.
$resultExportingEnabledForTestExport
setResultExportingEnabledForTestExport($resultExprtingEnabledForTestExport)
Test results to XML class.
static excelTime($year="", $month="", $day="", $hour="", $minute="", $second="")
Calculates a Microsoft Excel date/time value.
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static zip($a_dir, $a_file, $compress_content=false)
static ilTempnam()
Create a temporary file in an ILIAS writable directory.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
xmlSetDtdDef($dtdDef)
Sets dtd definition.
redirection script todo: (a better solution should control the processing via a xml file)