38 $this->
setId(
'tst_pass_overview_' . $parent->getObject()->getId());
48 $this->
setRowTemplate(
'tpl.il_as_tst_pass_overview_row.html',
'Modules/Test');
51 public function init(): void
54 $ilCtrl =
$DIC[
'ilCtrl'];
56 $ilCtrl->setParameter($this->parent_obj,
'active_id', $this->
getActiveId());
63 $this->
disable(
'numinfo_header');
80 public function fillRow(array $a_set): void
82 if (array_key_exists(
'percentage', $a_set)) {
83 $a_set[
'percentage'] = sprintf(
'%.2f', $a_set[
'percentage']) .
'%';
90 $this->tpl->setVariable(
'VAL_SCORED', $a_set[
'scored'] ?
'⊗' :
'');
96 $this->tpl->setVariable(
'VAL_DATE', $this->
formatDate($a_set[
'date']));
99 $this->tpl->setVariable(
'VAL_LO_OBJECTIVES', $a_set[
'objectives']);
101 $this->tpl->setVariable(
'VAL_LO_TRY', sprintf(
102 $this->
lng->txt(
'tst_res_lo_try_n'),
103 $this->getPassNumberPresentation($a_set[
'pass'])
109 $a_set[
'num_workedthrough_questions'],
110 $a_set[
'num_questions_total']
114 $this->tpl->setVariable(
'VAL_HINTS', $a_set[
'hints']);
118 $a_set[
'reached_points'],
122 $this->tpl->setVariable(
'VAL_PERCENTAGE', $a_set[
'percentage']);
127 $this->tpl->setVariable(
'VAL_ACTIONS', $this->
buildActionsHtml($actions, $a_set[
'pass']));
134 $this->
addColumn($this->
lng->txt(
'scored_pass'),
'',
'150');
144 $this->
addColumn($this->
lng->txt(
'tst_res_lo_objectives_header'),
'');
145 $this->
addColumn($this->
lng->txt(
'tst_res_lo_try_header'),
'');
149 $this->
addColumn($this->
lng->txt(
'tst_answered_questions'));
151 $this->
addColumn($this->
lng->txt(
'tst_question_hints_requested_hint_count_header'));
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}";
260 $ilCtrl =
$DIC[
'ilCtrl'];
262 if (!count($actions)) {
266 $ilCtrl->setParameter($this->parent_obj,
'pass', $pass);
268 if (count($actions) > 1) {
270 $aslgui->setListTitle($this->
lng->txt(
'actions'));
271 $aslgui->setId($pass);
273 foreach ($actions as $cmd => $label) {
274 $aslgui->addItem($label, $cmd, $ilCtrl->getLinkTarget($this->parent_obj, $cmd));
277 $html = $aslgui->getHTML();
279 $cmd = key($actions);
280 $label = current($actions);
282 $href = $ilCtrl->getLinkTarget($this->parent_obj, $cmd);
283 $html =
'<a href="' . $href .
'">' . $label .
'</a>';
286 $ilCtrl->setParameter($this->parent_obj,
'pass',
'');
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
@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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildWorkedThroughQuestionsString($numQuestionsWorkedThrough, $numQuestionsTotal)
buildActionsHtml($actions, $pass)
bool $resultPresentationEnabled
getPassNumberPresentation($pass)
fillRow(array $a_set)
Standard Version of Fill Row.
string $passDeletionCommand
bool $objectiveOrientedPresentationEnabled
buildReachedPointsString($reachedPoints, $maxPoints)
setPassDeletionCommand(string $passDeletionCommand)
getRequiredActions(?bool $isScoredPass)
setResultPresentationEnabled(bool $resultPresentationEnabled)
setPdfPresentationEnabled(bool $pdfPresentationEnabled)
bool $pdfPresentationEnabled
__construct($parent, $cmd)
setObjectiveOrientedPresentationEnabled(bool $objectiveOrientedPresentationEnabled)
numericOrdering(string $a_field)
Should this field be sorted numeric?
isPdfPresentationEnabled()
isResultPresentationEnabled()
setPassDetailsCommand(string $passDetailsCommand)
string $passDetailsCommand
isObjectiveOrientedPresentationEnabled()
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc