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';
29 $this->
object = $a_object->object;
33 public function executeCommand()
42 if(!$this->
object->getHighscoreEnabled())
45 $ilCtrl->redirectByClass(
'ilObjTestGUI');
48 $cmd = $ilCtrl->getCmd();
50 $ilCtrl->saveParameter($this,
'active_id');
54 case 'showResultsToplistByTime':
55 $this->
manageTabs($ilTabs, $ilCtrl, $lng,
'toplist_by_time');
59 case 'showResultsToplistByScore':
61 $this->
manageTabs($ilTabs, $ilCtrl, $lng,
'toplist_by_score');
75 'toplist_by_score', $lng->
txt(
'toplist_by_score'), $ctrl->
getLinkTarget($this,
'showResultsToplistByScore')
79 'toplist_by_time', $lng->
txt(
'toplist_by_time'), $ctrl->
getLinkTarget($this,
'showResultsToplistByTime')
96 $data = $this->toplist->getGeneralToplistByPercentage(
$_GET[
'ref_id'], $ilUser->getId());
98 $table_gui->setRowTemplate(
'tpl.toplist_tbl_rows.html',
'Modules/Test');
99 $table_gui->setData(
$data);
100 $table_gui->setTitle(sprintf($lng->txt(
'toplist_top_n_results'), $this->
object->getHighscoreTopNum()));
102 $html .= $table_gui->getHTML();
111 $data2 = $this->toplist->getUserToplistByPercentage(
$_GET[
'ref_id'], $ilUser->getID());
113 $table_gui2->setRowTemplate(
'tpl.toplist_tbl_rows.html',
'Modules/Test');
114 $table_gui2->setData($data2);
115 $table_gui2->setTitle($lng->txt(
'toplist_your_result'));
117 $html .= $table_gui2->getHTML();
120 $tpl->setVariable(
"ADM_CONTENT",
$html);
134 $data = $this->toplist->getGeneralToplistByWorkingtime(
$_GET[
'ref_id'], $ilUser->getId());
136 $table_gui->setRowTemplate(
'tpl.toplist_tbl_rows.html',
'Modules/Test');
137 $table_gui->setData(
$data);
138 $table_gui->setTitle(sprintf($lng->txt(
'toplist_top_n_results'), $this->
object->getHighscoreTopNum()));
140 $html .= $table_gui->getHTML();
149 $data2 = $this->toplist->getUserToplistByWorkingtime(
$_GET[
'ref_id'], $ilUser->getID());
151 $table_gui2->setRowTemplate(
'tpl.toplist_tbl_rows.html',
'Modules/Test');
152 $table_gui2->setData($data2);
153 $table_gui2->setTitle($lng->txt(
'toplist_your_result'));
155 $html .= $table_gui2->getHTML();
158 $tpl->setVariable(
"ADM_CONTENT",
$html);
169 $table_gui->
addColumn($lng->txt(
'toplist_col_rank'));
170 $table_gui->
addColumn($lng->txt(
'toplist_col_participant'));
171 if($this->
object->getHighscoreAchievedTS())
173 $table_gui->
addColumn($lng->txt(
'toplist_col_achieved'));
176 if($this->
object->getHighscoreScore())
178 $table_gui->
addColumn($lng->txt(
'toplist_col_score'));
181 if($this->
object->getHighscorePercentage())
183 $table_gui->
addColumn($lng->txt(
'toplist_col_percentage'));
186 if($this->
object->getHighscoreHints())
188 $table_gui->
addColumn($lng->txt(
'toplist_col_hints'));
191 if($this->
object->getHighscoreWTime())
193 $table_gui->
addColumn($lng->txt(
'toplist_col_wtime'));
This class provides processing control methods.
setTabActive($a_id)
DEPRECATED.
showResultsToplistByTime()
setEnableNumInfo($a_val)
Set enable num info.
getLinkTargetByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui class name.
setBackTarget($a_title, $a_target, $a_frame="")
back target for upper context
prepareTable(ilTable2GUI $table_gui)
showResultsToplistByScore()
clearTargets()
clear all targets
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
__construct(ilObjTestGUI $a_object)
const HIGHSCORE_SHOW_TOP_TABLE
Create new PHPExcel object
obj_idprivate
const HIGHSCORE_SHOW_OWN_TABLE
getLinkTarget($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui object.
manageTabs(ilTabsGUI $tabsGUI, ilCtrl $ctrl, ilLanguage $lng, $activeTabId)
addTab($a_id, $a_text, $a_link, $a_frame="")
Add a Tab.
txt($a_topic, $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
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)