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'),
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'));
150 if ($this->
getParentObject()->object->isOfferingQuestionHintsEnabled()) {
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%');
200 $this->activeId = (
int) $activeId;
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',
'');
isPdfPresentationEnabled()
numericOrdering(string $a_field)
isObjectiveOrientedPresentationEnabled()
getRequiredActions(?bool $isScoredPass)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
string $passDeletionCommand
buildActionsHtml($actions, $pass)
buildReachedPointsString($reachedPoints, $maxPoints)
static useRelativeDates()
setDefaultOrderField(string $a_defaultorderfield)
setPdfPresentationEnabled(bool $pdfPresentationEnabled)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setPassDetailsCommand(string $passDetailsCommand)
setResultPresentationEnabled(bool $resultPresentationEnabled)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setObjectiveOrientedPresentationEnabled(bool $objectiveOrientedPresentationEnabled)
isResultPresentationEnabled()
__construct(Container $dic, ilPlugin $plugin)
__construct($parent, $cmd)
setLimit(int $a_limit=0, int $a_default_limit=0)
string $passDetailsCommand
bool $objectiveOrientedPresentationEnabled
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)
disable(string $a_module_name)
bool $resultPresentationEnabled
getPassNumberPresentation($pass)
bool $pdfPresentationEnabled
static setUseRelativeDates(bool $a_status)
set use relative dates
buildWorkedThroughQuestionsString($numQuestionsWorkedThrough, $numQuestionsTotal)
setPassDeletionCommand(string $passDeletionCommand)