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