19 declare(strict_types=1);
65 $f = $this->ui_factory->table();
69 self::COLUMN_NAME => $f->column()->text($this->
lng->txt(
'name'))->withIsSortable(
true),
70 self::COLUMN_ATTEMPT => $f->column()->number($this->
lng->txt(
'tst_attempt')),
71 self::COLUMN_POINTS_REACHED => $f
73 ->number($this->
lng->txt(
'tst_reached_points'))
75 ->withIsSortable(
true),
76 self::COLUMN_POINTS_AVAILABLE => $f
78 ->number($this->
lng->txt(
'tst_maximum_points'))
80 ->withIsSortable(
true),
81 self::COLUMN_FEEDBACK => $f->column()->text($this->
lng->txt(
'tst_feedback')),
82 self::COLUMN_FINALIZED => $f->column()->boolean(
83 $this->
lng->txt(
'finalized_evaluation'),
84 $this->ui_factory->symbol()->icon()->custom(
85 'assets/images/standard/icon_checked.svg',
86 $this->
lng->txt(
'yes'),
89 $this->ui_factory->symbol()->icon()->custom(
90 'assets/images/standard/icon_unchecked.svg',
91 $this->
lng->txt(
'no'),
94 )->withIsSortable(
true),
95 self::COLUMN_FINALIZED_BY => $f->column()->text($this->
lng->txt(
'finalized_by'))->withIsSortable(
true),
96 self::COLUMN_FINALIZED_ON => $f->column()->date($this->
lng->txt(
'finalized_on'), $date_format)->withIsSortable(
true)
101 self::ACTION_SCORING => $f->action()->single(
102 $this->
lng->txt(
'grade'),
103 $this->url_builder->withParameter($this->action_parameter_token, self::ACTION_SCORING),
107 )->withRequest($request);
109 return [$filter, $table];
117 $field_factory = $this->ui_factory->input()->field();
120 self::COLUMN_ATTEMPT => $field_factory->select(
121 $this->
lng->txt(
'tst_attempt'),
124 self::FILTER_FIELD_ONLY_ANSWERED => $field_factory->select(
125 $this->
lng->txt(
'tst_man_scoring_only_answered'),
127 0 => $this->
lng->txt(
'no'),
128 1 => $this->
lng->txt(
'yes')
130 )->withRequired(
true),
131 self::COLUMN_FINALIZED => $field_factory->select(
132 $this->
lng->txt(
'finalized_evaluation'),
134 0 => $this->
lng->txt(
'all_users'),
135 1 => $this->
lng->txt(
'evaluated_users'),
136 2 => $this->
lng->txt(
'not_evaluated_users')
138 )->withRequired(
true)
141 $active = array_fill(0, count($filter_inputs),
true);
143 $filter = $ui_service->
filter()->standard(
144 'scoring_by_qst_filter_id',
157 for ($i = 0;$i < $max_attempts;$i++) {
158 $attempts[$i] = $i + 1;
__construct(private readonly Language $lng, private readonly URLBuilder $url_builder, private URLBuilderToken $action_parameter_token, private URLBuilderToken $row_id_token, private readonly UIFactory $ui_factory)
getFilter(\ilUIService $ui_service, string $target_url, int $max_attempts)
const COLUMN_FINALIZED_ON
const FILTER_FIELD_ONLY_ANSWERED
buildTestAttemptsOptions(int $max_attempts)
getTable( $title, DateFormat $date_format, ServerRequestInterface $request, \ilUIService $ui_service, string $target_url, ScoringByQuestionTableBinder $data_retrieval,)
const COLUMN_FINALIZED_BY
const COLUMN_POINTS_AVAILABLE
withFilterData(array $filter_data)
const COLUMN_POINTS_REACHED