42 $this->
setId(self::TABLE_ID . $tableId);
44 $this->_parent = $a_parent_obj;
46 $DIC->language()->loadLanguageModule(
'assessment');
48 $this->
setRowTemplate(
'tpl.lti_consumer_scoring_table_row.html',
'Modules/LTIConsumer');
50 if ($tableId ===
'highscore') {
51 $this->
setTitle(sprintf($DIC->language()->txt(
'toplist_top_n_results'), (int) $this->_parent->getObject()->getHighscoreTopNum()));
53 $this->
setTitle($DIC->language()->txt(
'toplist_your_result'));
65 $this->hasOutcomeAccess = $hasOutcomeAccess;
72 $this->
addColumn($DIC->language()->txt(
'toplist_col_rank'));
73 $this->
addColumn($DIC->language()->txt(
'toplist_col_participant'));
75 if ($this->_parent->getObject()->getHighscoreAchievedTS()) {
76 $this->
addColumn($DIC->language()->txt(
'toplist_col_achieved'));
79 if ($this->_parent->getObject()->getHighscorePercentage()) {
80 $this->
addColumn($DIC->language()->txt(
'toplist_col_percentage'));
83 if ($this->_parent->getObject()->getHighscoreWTime()) {
84 $this->
addColumn($DIC->language()->txt(
'toplist_col_wtime'));
88 $this->
setLimit((
int) $this->_parent->getObject()->getHighscoreTopNum());
95 $this->tpl->setVariable(
'SCORE_RANK',
$data[
'rank']);
97 $this->tpl->setCurrentBlock(
'personal');
99 $this->tpl->parseCurrentBlock();
101 if ($this->_parent->getObject()->getHighscoreAchievedTS()) {
102 $this->tpl->setCurrentBlock(
'achieved');
103 $this->tpl->setVariable(
'SCORE_ACHIEVED',
$data[
'date']);
104 $this->tpl->parseCurrentBlock();
108 if ($this->_parent->getObject()->getHighscorePercentage()) {
109 $this->tpl->setCurrentBlock(
'percentage');
110 $this->tpl->setVariable(
'SCORE_PERCENTAGE', (
float)
$data[
'score'] * 100);
111 $this->tpl->parseCurrentBlock();
114 if ($this->_parent->getObject()->getHighscoreWTime()) {
115 $this->tpl->setCurrentBlock(
'wtime');
116 $this->tpl->setVariable(
'SCORE_DURATION',
$data[
'duration']);
117 $this->tpl->parseCurrentBlock();
120 $highlight =
$data[
'ilias_user_id'] == $DIC->user()->getId() ?
'tblrowmarked' :
'';
121 $this->tpl->setVariable(
'HIGHLIGHT', $highlight);
128 if ($this->hasOutcomeAccess) {
132 return $user->getFullname();
135 return $DIC->language()->txt(
'deleted_user');
138 return $data[
'user'];
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setEnableNumInfo($a_val)
Set enable num info.
setExternalSegmentation($a_val)
Set external segmentation.
resetOffset($a_in_determination=false)
Reset offset.
__construct(ilLTIConsumerScoringGUI $a_parent_obj, $a_parent_cmd, $isMultiActorReport, $tableId, $hasOutcomeAccess)
ilLTIConsumerScoringTableGUI constructor.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
setRowTemplate($a_template, $a_template_dir="")
Set row template.
__construct(Container $dic, ilPlugin $plugin)
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.
setMaxCount($a_max_count)
set max.
setLimit($a_limit=0, $a_default_limit=0)