Scoring class for tests.
More...
Scoring class for tests.
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
- Version
- $Id$
Definition at line 14 of file class.ilTestToplistGUI.php.
◆ __construct()
ilTestToplistGUI::__construct |
( |
ilObjTest |
$testOBJ | ) |
|
- Parameters
-
Definition at line 52 of file class.ilTestToplistGUI.php.
References $DIC, and user().
55 $this->ctrl = $DIC[
'ilCtrl'];
56 $this->tpl = $DIC[
'tpl'];
57 $this->lng = $DIC[
'lng'];
58 $this->
user = $DIC[
'ilUser'];
60 $this->
object = $testOBJ;
◆ buildTableGUI()
ilTestToplistGUI::buildTableGUI |
( |
| ) |
|
|
protected |
◆ executeCommand()
ilTestToplistGUI::executeCommand |
( |
| ) |
|
Definition at line 64 of file class.ilTestToplistGUI.php.
References ilUtil\sendFailure(), and showResultsToplistsCmd().
66 if (!$this->object->getHighscoreEnabled()) {
68 $this->ctrl->redirectByClass(
'ilObjTestGUI');
71 $this->ctrl->saveParameter($this,
'active_id');
73 $cmd = $this->ctrl->getCmd();
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ isOwnRankingTableRequired()
ilTestToplistGUI::isOwnRankingTableRequired |
( |
| ) |
|
|
protected |
◆ isTopTenRankingTableRequired()
ilTestToplistGUI::isTopTenRankingTableRequired |
( |
| ) |
|
|
protected |
◆ prepareTable()
ilTestToplistGUI::prepareTable |
( |
ilTable2GUI |
$table_gui | ) |
|
|
private |
- Parameters
-
Definition at line 180 of file class.ilTestToplistGUI.php.
References ilTable2GUI\addColumn(), ilTable2GUI\setEnableNumInfo(), and ilTable2GUI\setLimit().
Referenced by buildTableGUI().
182 $table_gui->
addColumn($this->lng->txt(
'toplist_col_rank'));
183 $table_gui->
addColumn($this->lng->txt(
'toplist_col_participant'));
184 if ($this->object->getHighscoreAchievedTS()) {
185 $table_gui->
addColumn($this->lng->txt(
'toplist_col_achieved'));
188 if ($this->object->getHighscoreScore()) {
189 $table_gui->
addColumn($this->lng->txt(
'toplist_col_score'));
192 if ($this->object->getHighscorePercentage()) {
193 $table_gui->
addColumn($this->lng->txt(
'toplist_col_percentage'));
196 if ($this->object->getHighscoreHints()) {
197 $table_gui->
addColumn($this->lng->txt(
'toplist_col_hints'));
200 if ($this->object->getHighscoreWTime()) {
201 $table_gui->
addColumn($this->lng->txt(
'toplist_col_wtime'));
setEnableNumInfo($a_val)
Set enable num info.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setLimit($a_limit=0, $a_default_limit=0)
◆ renderMedianMarkPanel()
ilTestToplistGUI::renderMedianMarkPanel |
( |
| ) |
|
|
protected |
Definition at line 90 of file class.ilTestToplistGUI.php.
References $data, $DIC, and $title.
Referenced by showResultsToplistsCmd().
94 $title = $DIC->language()->txt(
'tst_median_mark_panel');
97 $activeId = $this->
object->getActiveIdOfUser($DIC->user()->getId());
98 $data = $this->
object->getCompleteEvaluationData();
99 $median =
$data->getStatistics()->getStatistics()->median();
100 $pct =
$data->getParticipant($activeId)->getMaxpoints() ? ($median /
$data->getParticipant($activeId)->getMaxpoints()) * 100.0 : 0;
101 $mark = $this->
object->mark_schema->getMatchingMark($pct);
102 $content = $mark->getShortName();
104 $panel = $DIC->ui()->factory()->panel()->standard(
106 $DIC->ui()->factory()->legacy($content)
109 return $DIC->ui()->renderer()->render($panel);
◆ renderResultsToplistByScore()
ilTestToplistGUI::renderResultsToplistByScore |
( |
| ) |
|
|
protected |
◆ renderResultsToplistByTime()
ilTestToplistGUI::renderResultsToplistByTime |
( |
| ) |
|
|
protected |
◆ showResultsToplistsCmd()
ilTestToplistGUI::showResultsToplistsCmd |
( |
| ) |
|
|
protected |
◆ $ctrl
◆ $lng
◆ $object
ilTestToplistGUI::$object |
|
protected |
◆ $tabs
◆ $toplist
ilTestToplistGUI::$toplist |
|
protected |
◆ $tpl
◆ $user
The documentation for this class was generated from the following file: