◆ __construct()
ilTestToplistGUI::__construct |
( |
ilObjTest |
$testOBJ | ) |
|
- Parameters
-
Definition at line 36 of file class.ilTestToplistGUI.php.
References $DIC, and user().
41 $this->ctrl = $DIC[
'ilCtrl'];
42 $this->tpl = $DIC[
'tpl'];
43 $this->lng = $DIC[
'lng'];
44 $this->
user = $DIC[
'ilUser'];
45 $this->uiFactory = $DIC->ui()->factory();
46 $this->uiRenderer = $DIC->ui()->renderer();
48 $this->
object = $testOBJ;
◆ buildTableGUI()
ilTestToplistGUI::buildTableGUI |
( |
| ) |
|
|
protected |
◆ executeCommand()
ilTestToplistGUI::executeCommand |
( |
| ) |
|
Definition at line 55 of file class.ilTestToplistGUI.php.
References ilUtil\sendFailure(), and showResultsToplistsCmd().
57 if (!$this->object->getHighscoreEnabled()) {
59 $this->ctrl->redirectByClass(ilObjTestGUI::class);
62 $this->ctrl->saveParameter($this,
'active_id');
64 $cmd = $this->ctrl->getCmd();
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ isOwnRankingTableRequired()
ilTestToplistGUI::isOwnRankingTableRequired |
( |
| ) |
|
|
protected |
◆ isTopTenRankingTableRequired()
ilTestToplistGUI::isTopTenRankingTableRequired |
( |
| ) |
|
|
protected |
◆ renderMedianMarkPanel()
ilTestToplistGUI::renderMedianMarkPanel |
( |
| ) |
|
|
protected |
- Returns
- string
Definition at line 84 of file class.ilTestToplistGUI.php.
References $data, and user().
Referenced by showResultsToplistsCmd().
86 $title = $this->lng->txt(
'tst_median_mark_panel');
89 $activeId = $this->
object->getActiveIdOfUser($this->
user->getId());
90 $data = $this->
object->getCompleteEvaluationData();
91 $median =
$data->getStatistics()->getStatistics()->median();
92 $pct =
$data->getParticipant($activeId)->getMaxpoints() ? ($median /
$data->getParticipant($activeId)->getMaxpoints()) * 100.0 : 0;
93 $mark = $this->
object->mark_schema->getMatchingMark($pct);
94 $content = $mark->getShortName();
96 $panel = $this->uiFactory->panel()->standard(
98 $this->uiFactory->legacy($content)
101 return $this->uiRenderer->render($panel);
◆ renderResultsToplistByScore()
ilTestToplistGUI::renderResultsToplistByScore |
( |
| ) |
|
|
protected |
- Returns
- string
Definition at line 107 of file class.ilTestToplistGUI.php.
References buildTableGUI(), isOwnRankingTableRequired(), isTopTenRankingTableRequired(), and user().
Referenced by showResultsToplistsCmd().
109 $title = $this->lng->txt(
'toplist_by_score');
113 $topData = $this->toplist->getGeneralToplistByPercentage(
114 (
int) $this->object->getRefId(),
115 (int) $this->
user->getId()
119 $table->setData($topData);
120 $table->setTitle($title);
122 $html .= $table->getHTML();
126 $ownData = $this->toplist->getUserToplistByPercentage(
127 (
int) $this->object->getRefId(),
128 (int) $this->
user->getId()
132 $table->setData($ownData);
134 $table->setTitle($title);
137 $html .= $table->getHTML();
isOwnRankingTableRequired()
isTopTenRankingTableRequired()
◆ renderResultsToplistByTime()
ilTestToplistGUI::renderResultsToplistByTime |
( |
| ) |
|
|
protected |
- Returns
- string
Definition at line 146 of file class.ilTestToplistGUI.php.
References buildTableGUI(), isOwnRankingTableRequired(), isTopTenRankingTableRequired(), and user().
Referenced by showResultsToplistsCmd().
148 $title = $this->lng->txt(
'toplist_by_time');
152 $topData = $this->toplist->getGeneralToplistByWorkingtime(
153 $this->object->getRefId(),
158 $table->setData($topData);
159 $table->setTitle($title);
161 $html .= $table->getHTML();
165 $ownData = $this->toplist->getUserToplistByWorkingtime(
166 (
int) $this->object->getRefId(),
167 (int) $this->
user->getId()
171 $table->setData($ownData);
174 $table->setTitle($title);
177 $html .= $table->getHTML();
isOwnRankingTableRequired()
isTopTenRankingTableRequired()
◆ showResultsToplistsCmd()
ilTestToplistGUI::showResultsToplistsCmd |
( |
| ) |
|
|
protected |
◆ $ctrl
◆ $lng
◆ $object
ilTestToplistGUI::$object |
|
protected |
◆ $tabs
◆ $toplist
ilTestToplistGUI::$toplist |
|
protected |
◆ $tpl
◆ $uiFactory
ilTestToplistGUI::$uiFactory |
|
private |
◆ $uiRenderer
ilTestToplistGUI::$uiRenderer |
|
private |
◆ $user
The documentation for this class was generated from the following file: