358 : array
359 {
360 $column_factory = $this->ui_factory->table()->column();
361
362 $columns = [
363 'name' => $column_factory->text($this->
lng->txt(
'name'))
364 ->withIsSortable(!$this->test_object->getAnonymity())
365 ];
366 if (!$this->test_object->getAnonymity()) {
367 $columns[
'login'] = $column_factory->text($this->
lng->txt(
'login'))->withIsSortable(
true);
368 }
369
370 $columns += [
371 'matriculation' => $column_factory->text($this->
lng->txt(
'matriculation'))
372 ->withIsOptional(true, false)
373 ->withIsSortable(true),
374 'ip_range' => $column_factory->text($this->
lng->txt(
'client_ip_range'))
375 ->withIsOptional(true, false)
376 ->withIsSortable(true),
377 'attempt_started_at' => $column_factory->date(
378 $this->
lng->txt(
'tst_attempt_started'),
379 $this->current_user->getDateTimeFormat()
380 )->withIsSortable(true),
381 'total_time_on_task' => $column_factory->text($this->
lng->txt(
'working_time'))
382 ->withIsOptional(true, false),
383 'total_attempts' => $column_factory->number($this->
lng->txt(
'total_attempts'))
384 ->withIsOptional(true, false)
385 ->withIsSortable(true),
386 ];
387
388 $columns[
'status_of_attempt'] = $column_factory->text($this->
lng->txt(
'status_of_attempt'))
389 ->withIsSortable(true);
390
391 if ($this->test_object->getEnableProcessingTime()) {
392 $columns[
'remaining_duration'] = $column_factory->text($this->
lng->txt(
'remaining_duration'))
393 ->withIsOptional(true);
394 $columns[
'total_duration'] = $column_factory->text($this->
lng->txt(
'total_duration'))
395 ->withIsOptional(true, false);
396 $columns[
'extra_time'] = $column_factory->text($this->
lng->txt(
'extratime'))
397 ->withIsOptional(true, false);
398 }
399
400 if ($this->test_object->getMainSettings()->getTestBehaviourSettings()->getExamIdInTestAttemptEnabled()) {
401 $columns[
'id_of_attempt'] = $column_factory->text($this->
lng->txt(
'exam_id_of_attempt'))
402 ->withIsOptional(true, false)
403 ->withIsSortable(true);
404 }
405
406 if ($this->test_access->checkParticipantsResultsAccess()) {
407 $columns[
'reached_points'] = $column_factory->text($this->
lng->txt(
'tst_reached_points'))
408 ->withIsSortable(true);
409 $columns[
'nr_of_answered_questions'] = $column_factory->text($this->
lng->txt(
'tst_answered_questions'))
410 ->withIsOptional(true, false)
411 ->withIsSortable(true);
412 $columns[
'percent_of_available_points'] = $column_factory->number($this->
lng->txt(
'tst_percent_solved'))
413 ->withUnit('%')
414 ->withIsOptional(true, false)
415 ->withIsSortable(true);
416 $columns['test_passed'] = $column_factory->boolean(
417 $this->
lng->txt(
'tst_passed'),
418 $this->ui_factory->symbol()->icon()->custom(
419 'assets/images/standard/icon_checked.svg',
420 $this->lng->txt('yes'),
421 'small'
422 ),
423 $this->ui_factory->symbol()->icon()->custom(
424 'assets/images/standard/icon_unchecked.svg',
425 $this->lng->txt('no'),
426 'small'
427 )
428 )->withIsSortable(true)
429 ->withOrderingLabels(
430 "{$this->lng->txt('tst_passed')}, {$this->lng->txt('yes')} {$this->lng->txt('order_option_first')}",
431 "{$this->lng->txt('tst_passed')}, {$this->lng->txt('no')} {$this->lng->txt('order_option_first')}"
432 );
433 $columns[
'mark'] = $column_factory->text($this->
lng->txt(
'tst_mark'))
434 ->withIsOptional(true, false)
435 ->withIsSortable(true);
436 }
437 if ($this->scoring_enabled) {
438 $columns['scoring_finalized'] = $column_factory->boolean(
439 $this->
lng->txt(
'finalized_evaluation'),
440 $this->ui_factory->symbol()->icon()->custom(
441 'assets/images/standard/icon_checked.svg',
442 $this->lng->txt('yes'),
443 'small'
444 ),
445 $this->ui_factory->symbol()->icon()->custom(
446 'assets/images/standard/icon_unchecked.svg',
447 $this->lng->txt('no'),
448 'small'
449 )
450 )->withIsOptional(true, false)
451 ->withIsSortable(true);
452 }
453
454 $columns['last_access'] = $column_factory->date(
455 $this->
lng->txt(
'last_access'),
456 $this->current_user->getDateTimeFormat()
457 );
458
459 return $columns;
460 }