19 declare(strict_types=1);
    34         protected string $filtertext = 
'',
    35         protected bool $passedonly = 
false,
    36         protected bool $scoredonly = 
false,
    41         $this->
lng = $lng ?? $DIC[
'lng'];
    42         $this->complete_data = $this->test_obj->getCompleteEvaluationData(
true, $this->filter_key_participants, $this->filtertext);
    43         $this->aggregated_data = $this->test_obj->getAggregatedResultsData();
    44         $this->additionalFields = $this->test_obj->getEvaluationAdditionalFields();
    47     abstract public function deliver(
string $title): void;
    59         foreach ($this->complete_data->getParticipants() as $active_id => $userdata) {
    60             $datarow = $headerrow;
    61             if ($this->passedonly && !$userdata->getPassed()) {
    66                 $datarow2[] = $counter;
    68                 $datarow2[] = $userdata->getName();
    69                 $datarow2[] = $userdata->getLogin();
    73             if ($userdata->getUserID() !== null) {
    76             foreach ($this->additionalFields as $fieldname) {
    77                 if ($fieldname === 
'gender') {
    78                     $datarow2[] = isset($userfields[$fieldname]) && $userfields[$fieldname] !== 
''    79                         ? $this->
lng->txt(
'gender_' . $userfields[$fieldname])
    81                 } elseif ($fieldname === 
'exam_id') {
    82                     $datarow2[] = $userdata->getExamIdFromScoredPass();
    84                     $datarow2[] = $userfields[$fieldname] ?? 
'';
    88             $datarow2[] = $userdata->getReached();
    89             $datarow2[] = $userdata->getMaxpoints();
    90             $datarow2[] = $userdata->getMark();
    91             $datarow2[] = $userdata->getQuestionsWorkedThrough();
    92             $datarow2[] = $userdata->getNumberOfQuestions();
    93             $datarow2[] = $userdata->getQuestionsWorkedThroughInPercent() / 100.0;
    94             $time = $userdata->getTimeOfWork();
    95             $time_seconds = $time;
    96             $time_hours = floor($time_seconds / 3600);
    97             $time_seconds -= $time_hours * 3600;
    98             $time_minutes = floor($time_seconds / 60);
    99             $time_seconds -= $time_minutes * 60;
   100             $datarow2[] = sprintf(
"%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds);
   101             $time = $userdata->getQuestionsWorkedThrough() ? $this->complete_data->getParticipant(
   103             )->getTimeOfWork() / $userdata->getQuestionsWorkedThrough() : 0;
   104             $time_seconds = $time;
   105             $time_hours = floor($time_seconds / 3600);
   106             $time_seconds -= $time_hours * 3600;
   107             $time_minutes = floor($time_seconds / 60);
   108             $time_seconds -= $time_minutes * 60;
   109             $datarow2[] = sprintf(
"%02d:%02d:%02d", $time_hours, $time_minutes, $time_seconds);
   111             $fv = $userdata->getFirstVisit();
   112             $lv = $userdata->getLastVisit();
   113             foreach ([$fv, $lv] as $ts) {
   116                     $datarow2[] = $visit;
   122             $median = $this->complete_data->getStatistics()->getStatistics()->median();
   123             $pct = $userdata->getMaxpoints() ? $median / $this->complete_data->getParticipant(
   125             )->getMaxpoints() * 100.0 : 0;
   127             $mark_short_name = 
"";
   128             if (is_object($mark)) {
   129                 $mark_short_name = $mark->getShortName();
   131             $datarow2[] = $mark_short_name;
   132             $datarow2[] = $this->complete_data->getStatistics()->getStatistics()->rank(
   133                 $userdata->getReached()
   135             $datarow2[] = $this->complete_data->getStatistics()->getStatistics()->rank_median();
   136             $datarow2[] = $this->complete_data->getStatistics()->getStatistics()->count();
   137             $datarow2[] = $median;
   139             $datarow2[] = $userdata->getPassCount();
   140             $datarow2[] = $userdata->getFinishedPasses();
   142                 $datarow2[] = $userdata->getBestPass() + 1;
   144                 $datarow2[] = $userdata->getLastPass() + 1;
   148                 $datarow = $datarow2;
   150                 $datarow2 = array_map(
static fn($entry) => 
'', $datarow2);
   153             for ($pass = 0; $pass <= $userdata->getLastPass(); $pass++) {
   157                     || $this->scoredonly && $pass !== $userdata->getScoredPass()) {
   161                 if ($shown_pass > 0) {
   162                     for ($i = 1, $iMax = count($headerrow); $i < $iMax; $i++) {
   168                 $datarow2[] = $pass + 1;
   169                 if (is_object($userdata)
   171                         $evaluated_questions = $userdata->getQuestions($pass)
   175                     foreach ($questions as $question) {
   176                         $question_data = $userdata->getPass(
   178                         )->getAnsweredQuestionByQuestionId($question[
"id"]);
   179                         if (is_null($question_data)) {
   180                             $question_data = [
'reached' => 0];
   182                         $datarow2[] = $question_data[
"reached"];
   183                         $datarow[] = preg_replace(
"/<.*?>/", 
"", $this->complete_data->getQuestionTitle($question[
"id"]));
   186                 if (($counter === 1 && $shown_pass === 0) || $test_obj->
isRandomTest()) {
   204             $datarow[] = $lng->
txt(
"counter");
   206             $datarow[] = $lng->
txt(
"name");
   207             $datarow[] = $lng->
txt(
"login");
   209         if (count($this->additionalFields)) {
   210             foreach ($this->additionalFields as $fieldname) {
   211                 if (strcmp($fieldname, 
"exam_id") === 0) {
   212                     $datarow[] = $lng->
txt(
'exam_id_label');
   215                 $datarow[] = $lng->
txt($fieldname);
   218         $datarow[] = $this->
lng->txt(
"tst_stat_result_resultspoints");
   219         $datarow[] = $lng->
txt(
"maximum_points");
   220         $datarow[] = $lng->
txt(
"tst_stat_result_resultsmarks");
   221         $datarow[] = $lng->
txt(
"tst_stat_result_qworkedthrough");
   222         $datarow[] = $lng->
txt(
"tst_stat_result_qmax");
   223         $datarow[] = $lng->
txt(
"tst_stat_result_pworkedthrough");
   224         $datarow[] = $lng->
txt(
"tst_stat_result_timeofwork");
   225         $datarow[] = $lng->
txt(
"tst_stat_result_atimeofwork");
   226         $datarow[] = $lng->
txt(
"tst_stat_result_firstvisit");
   227         $datarow[] = $lng->
txt(
"tst_stat_result_lastvisit");
   228         $datarow[] = $lng->
txt(
"tst_stat_result_mark_median");
   229         $datarow[] = $lng->
txt(
"tst_stat_result_rank_participant");
   230         $datarow[] = $lng->
txt(
"tst_stat_result_rank_median");
   231         $datarow[] = $lng->
txt(
"tst_stat_result_total_participants");
   232         $datarow[] = $lng->
txt(
"tst_stat_result_median");
   233         $datarow[] = $lng->
txt(
"tst_tbl_col_started_passes");
   234         $datarow[] = $lng->
txt(
"tst_tbl_col_finished_passes");
   235         $datarow[] = $lng->
txt(
"scored_pass");
   236         $datarow[] = $lng->
txt(
"pass");
   243         $key = $this->test_obj->isRandomTest() ? 
'qid' : 
'sequence';
   246             static function (
$a, 
$b) use (
$key) {
 buildStatisticsAccessFilteredParticipantList()
 
getDatarows(ilObjTest $test_obj)
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
static lookupPassResultsUpdateTimestamp($active_id, $pass)
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
orderQuestions(array $questions)
 
isRandomTest()
Returns the fact wether this test is a random questions test or not. 
 
getHeaderRow(ilLanguage $lng, ilObjTest $test_obj)
 
getMarkSchema()
{ASS_MarkSchema} 
 
ilTestEvaluationData $complete_data
 
static _lookupFields(int $a_user_id)
lookup fields (deprecated; use more specific methods instead) 
 
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples 
 
setAccessFilteredParticipantList(ilTestParticipantList $access_filtered_participant_list)
 
getPassScoring()
Gets the pass scoring type.