19declare(strict_types=1);
50 $this->
lng = $DIC->language();
51 $this->ui_factory =
$DIC->ui()->factory();
52 $this->ui_renderer =
$DIC->ui()->renderer();
53 $this->request =
$DIC->http()->request();
62 array $visible_column_ids,
65 mixed $additional_viewcontrol_data,
67 mixed $additional_parameters
69 foreach ($this->records as $record) {
70 $record[
'lti_timestamp'] =
new DateTimeImmutable($record[
'lti_timestamp']);
71 $record[
'score_given'] = $record[
'score_given'] .
' / ' . $record[
'score_maximum'];
72 $record[
'activity_progress'] = $this->
lng->txt(
'grade_activity_progress_' . strtolower($record[
'activity_progress']));
73 $record[
'grading_progress'] = $this->
lng->txt(
'grade_grading_progress_' . strtolower($record[
'grading_progress']));
74 $record[
'stored'] =
new DateTimeImmutable($record[
'stored']);
76 yield $row_builder->
buildDataRow((
string) $record[
'id'], $record);
81 mixed $additional_viewcontrol_data,
83 mixed $additional_parameters
85 return count($this->records);
90 $this->records = $records;
95 $table = $this->ui_factory->table()
96 ->data(
"", $this->getColumns(), $this)
97 ->withOrder(
new Order(
"lti_timestamp", Order::DESC))
98 ->withRequest($this->request);
100 return $this->ui_renderer->render($table);
106 $df = new \ILIAS\Data\Factory();
110 "lti_timestamp" => $this->ui_factory->table()->column()->date($this->
lng->txt(
'tbl_grade_date'), $df->dateFormat()->withTime24(
$DIC->user()->getDateFormat())),
111 "actor" => $this->ui_factory->table()->column()->text($this->
lng->txt(
'tbl_grade_actor')),
112 "score_given" => $this->ui_factory->table()->column()->text($this->
lng->txt(
'tbl_grade_score')),
113 "activity_progress" => $this->ui_factory->table()->column()->text($this->
lng->txt(
'tbl_grade_activity_progress')),
114 "grading_progress" => $this->ui_factory->table()->column()->text($this->
lng->txt(
'tbl_grade_grading_progress')),
115 "stored" => $this->ui_factory->table()->column()->date($this->
lng->txt(
'tbl_grade_stored'), $df->dateFormat()->withTime24(
$DIC->user()->getDateFormat()))
Builds a Color from either hex- or rgb values.
Both the subject and the direction need to be specified when expressing an order.
A simple class to express a naive range of whole positive numbers.
ILIAS UI Renderer $ui_renderer
__construct(bool $isMultiActorReport)
setRecords(array $records)
getTotalRowCount(mixed $additional_viewcontrol_data, mixed $filter_data, mixed $additional_parameters)
Mainly for the purpose of pagination-support, it is important to know about the total number of recor...
getRows(DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, mixed $additional_viewcontrol_data, mixed $filter_data, mixed $additional_parameters)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildDataRow(string $id, array $record)
This is how the factory for UI elements looks.