3 declare(strict_types=1);
32 $this->
setId(
'tst_top_list_' . $this->test->getRefId());
35 $this->
setRowTemplate(
'tpl.toplist_tbl_rows.html',
'Modules/Test');
46 $this->
addColumn($this->
lng->txt(
'toplist_col_participant'));
48 if ($this->test->getHighscoreAchievedTS()) {
49 $this->
addColumn($this->
lng->txt(
'toplist_col_achieved'));
52 if ($this->test->getHighscoreScore()) {
56 if ($this->test->getHighscorePercentage()) {
57 $this->
addColumn($this->
lng->txt(
'toplist_col_percentage'));
60 if ($this->test->getHighscoreHints()) {
64 if ($this->test->getHighscoreWTime()) {
69 protected function fillRow(array $a_set): void
71 $rowHighlightClass =
'';
73 if ($a_set[
'is_actor']) {
74 $rowHighlightClass =
'tblrowmarked';
76 $this->tpl->setVariable(
'VAL_HIGHLIGHT', $rowHighlightClass);
78 $this->tpl->setVariable(
'VAL_RANK', (
string) $a_set[
'rank']);
79 $this->tpl->setVariable(
'VAL_PARTICIPANT', (
string) $a_set[
'participant']);
81 if ($this->test->getHighscoreAchievedTS()) {
82 $this->tpl->setVariable(
88 if ($this->test->getHighscoreScore()) {
89 $this->tpl->setVariable(
'VAL_SCORE', (
string) $a_set[
'score']);
92 if ($this->test->getHighscorePercentage()) {
93 $this->tpl->setVariable(
'VAL_PERCENTAGE', (
string) $a_set[
'percentage']);
96 if ($this->test->getHighscoreHints()) {
97 $this->tpl->setVariable(
'VAL_HINTS', (
string) $a_set[
'hints']);
100 if ($this->test->getHighscoreWTime()) {
101 $this->tpl->setVariable(
'VAL_TIME', (
string) $a_set[
'time']);
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
__construct(ilTestToplistGUI $a_parent_obj, ilObjTest $test)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setEnableNumInfo(bool $a_val)
__construct(Container $dic, ilPlugin $plugin)
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)