19declare(strict_types=1);
45 $this->
setId(
'tst_pass_overview_' . $parent->
getObject()->getId());
56 $this->ui_factory =
$DIC->ui()->factory();
57 $this->ui_renderer =
$DIC->ui()->renderer();
59 $this->
setRowTemplate(
'tpl.il_as_tst_pass_overview_row.html',
'components/ILIAS/Test');
62 public function init(): void
64 $this->
ctrl->setParameter($this->parent_obj,
'active_id', $this->
getActiveId());
71 $this->
disable(
'numinfo_header');
88 public function fillRow(array $a_set): void
90 if (array_key_exists(
'percentage', $a_set)) {
91 $a_set[
'percentage'] = sprintf(
'%.2f', $a_set[
'percentage']) .
'%';
98 $this->tpl->setVariable(
'VAL_SCORED', $a_set[
'scored'] ?
'⊗' :
'');
104 $this->tpl->setVariable(
'VAL_DATE', $this->
formatDate($a_set[
'date']));
107 $this->tpl->setVariable(
'VAL_LO_OBJECTIVES', $a_set[
'objectives']);
109 $this->tpl->setVariable(
'VAL_LO_TRY', sprintf(
110 $this->
lng->txt(
'tst_res_lo_try_n'),
111 $this->getPassNumberPresentation($a_set[
'pass'])
117 $a_set[
'num_workedthrough_questions'],
118 $a_set[
'num_questions_total']
121 $a_set[
'reached_points'],
125 $this->tpl->setVariable(
'VAL_PERCENTAGE', $a_set[
'percentage']);
130 $this->tpl->setVariable(
'VAL_ACTIONS', $this->
buildActionsHtml($actions, $a_set[
'pass']));
137 $this->
addColumn($this->
lng->txt(
'scored_pass'),
'',
'150');
147 $this->
addColumn($this->
lng->txt(
'tst_res_lo_objectives_header'),
'');
148 $this->
addColumn($this->
lng->txt(
'tst_res_lo_try_header'),
'');
152 $this->
addColumn($this->
lng->txt(
'tst_answered_questions'));
153 $this->
addColumn($this->
lng->txt(
'tst_reached_points'));
154 $this->
addColumn($this->
lng->txt(
'tst_percent_solved'));
159 $this->
addColumn($this->
lng->txt(
'actions'),
'',
'10%');
234 return "{$numQuestionsWorkedThrough} {$this->lng->txt('of')} {$numQuestionsTotal}";
239 return "{$reachedPoints} {$this->lng->txt('of')} {$maxPoints}";
259 if (!count($actions)) {
263 $this->
ctrl->setParameter($this->parent_obj,
'pass', $pass);
265 if (count($actions) > 1) {
266 foreach ($actions as $cmd => $label) {
267 $action_links[] = $this->ui_factory->link()->standard($label, $this->
ctrl->getLinkTarget($this->parent_obj, $cmd));
269 $dropdown = $this->ui_factory->dropdown()->standard($action_links)->withLabel($this->
lng->txt(
'actions'));
270 $html = $this->ui_renderer->render($dropdown);
272 $cmd = key($actions);
273 $label = current($actions);
275 $href = $this->
ctrl->getLinkTarget($this->parent_obj, $cmd);
276 $html =
'<a href="' . $href .
'">' . $label .
'</a>';
279 $this->
ctrl->setParameter($this->parent_obj,
'pass',
'');
Builds a Color from either hex- or rgb values.
static useRelativeDates()
static setUseRelativeDates(bool $a_status)
set use relative dates
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
disable(string $a_module_name)
Output class for assessment test evaluation.
Class ilTestPassOverviewTableGUI.
buildWorkedThroughQuestionsString($numQuestionsWorkedThrough, $numQuestionsTotal)
buildActionsHtml($actions, $pass)
bool $resultPresentationEnabled
getPassNumberPresentation($pass)
fillRow(array $a_set)
Standard Version of Fill Row.
string $passDeletionCommand
bool $objectiveOrientedPresentationEnabled
__construct(ilTestEvaluationGUI $parent, string $cmd)
buildReachedPointsString($reachedPoints, $maxPoints)
setPassDeletionCommand(string $passDeletionCommand)
getRequiredActions(?bool $isScoredPass)
setResultPresentationEnabled(bool $resultPresentationEnabled)
setPdfPresentationEnabled(bool $pdfPresentationEnabled)
bool $pdfPresentationEnabled
setObjectiveOrientedPresentationEnabled(bool $objectiveOrientedPresentationEnabled)
numericOrdering(string $a_field)
Should this field be sorted numeric?
isPdfPresentationEnabled()
isResultPresentationEnabled()
setPassDetailsCommand(string $passDetailsCommand)
string $passDetailsCommand
isObjectiveOrientedPresentationEnabled()
An entity that renders components to a string output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc