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