4 require_once
'Modules/Test/classes/inc.AssessmentConstants.php';
5 require_once
'Modules/Test/classes/class.ilTestTopList.php';
6 require_once
'Services/Table/classes/class.ilTable2GUI.php';
55 $this->ctrl = $DIC[
'ilCtrl'];
56 $this->tpl = $DIC[
'tpl'];
57 $this->lng = $DIC[
'lng'];
58 $this->
user = $DIC[
'ilUser'];
60 $this->
object = $testOBJ;
66 if (!$this->object->getHighscoreEnabled()) {
68 $this->ctrl->redirectByClass(
'ilObjTestGUI');
71 $this->ctrl->saveParameter($this,
'active_id');
73 $cmd = $this->ctrl->getCmd();
87 $this->tpl->setVariable(
"ADM_CONTENT",
$html);
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);
114 $title = $this->lng->txt(
'toplist_by_score');
118 $data = $this->toplist->getGeneralToplistByPercentage(
$_GET[
'ref_id'], $this->
user->getId());
122 $table_gui->setData(
$data);
123 $table_gui->setTitle(
$title);
125 $html .= $table_gui->getHTML();
132 $this->toplist->getUserToplistByPercentage(
$_GET[
'ref_id'], $this->user->getID())
136 $table_gui->setTitle(
$title);
139 $html .= $table_gui->getHTML();
147 $title = $this->lng->txt(
'toplist_by_time');
151 $topData = $this->toplist->getGeneralToplistByWorkingtime(
$_GET[
'ref_id'], $this->
user->getId());
154 $table_gui->setData($topData);
155 $table_gui->setTitle(
$title);
157 $html .= $table_gui->getHTML();
161 $ownData = $this->toplist->getUserToplistByWorkingtime(
$_GET[
'ref_id'], $this->
user->getID());
165 $table_gui->setData($ownData);
168 $table_gui->setTitle(
$title);
171 $html .= $table_gui->getHTML();
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'));
214 $table_gui->setRowTemplate(
'tpl.toplist_tbl_rows.html',
'Modules/Test');
isOwnRankingTableRequired()
__construct(ilObjTest $testOBJ)
setEnableNumInfo($a_val)
Set enable num info.
renderResultsToplistByScore()
prepareTable(ilTable2GUI $table_gui)
renderResultsToplistByTime()
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const HIGHSCORE_SHOW_TOP_TABLE
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.
const HIGHSCORE_SHOW_OWN_TABLE
isTopTenRankingTableRequired()
const HIGHSCORE_SHOW_ALL_TABLES
setLimit($a_limit=0, $a_default_limit=0)