19 declare(strict_types=1);
44 bool $has_general_lp_access,
45 bool $has_rbac_or_position_access
50 if ($lp->isActive()) {
51 $this->has_active_lp =
true;
57 $this->
setRowTemplate(
'tpl.statistics_table_row.html',
'Modules/Forum');
64 ((
string) ceil((100 / count($columns)))) .
'%s' 68 if ($this->has_active_lp && $this->has_general_lp_access) {
69 $this->
lng->loadLanguageModule(
'trac');
93 'txt' => $this->
lng->txt(
'frm_statistics_ranking'),
98 'txt' => $this->
lng->txt(
'login'),
102 'field' =>
'lastname',
103 'txt' => $this->
lng->txt(
'lastname'),
107 'field' =>
'firstname',
108 'txt' => $this->
lng->txt(
'firstname'),
111 if ($this->has_active_lp && $this->has_general_lp_access) {
113 'field' =>
'progress',
114 'txt' => $this->
lng->txt(
'learning_progress'),
122 protected function fillRow(array $a_set): void
124 parent::fillRow($a_set);
128 if ($this->has_active_lp && $this->has_general_lp_access) {
129 if ($this->has_rbac_or_position_access || $this->actor->getId() === (
int) $a_set[
'usr_id']) {
130 $this->tpl->setCurrentBlock(
'val_lp');
132 case in_array($a_set[
'usr_id'], $this->completed,
false):
134 $this->tpl->setVariable(
140 case in_array($a_set[
'usr_id'], $this->in_progress,
false):
142 $this->tpl->setVariable(
148 case in_array($a_set[
'usr_id'], $this->failed,
false):
150 $this->tpl->setVariable(
158 $this->tpl->setVariable(
164 $this->tpl->parseCurrentBlock();
166 $this->tpl->touchBlock(
'no_lp');
const LP_STATUS_COMPLETED_NUM
Class ilForumStatisticsTableGUI.
__construct(ilObjForumGUI $a_parent_obj, string $a_parent_cmd, ilObjForum $forum, ilObjUser $actor, bool $has_general_lp_access, bool $has_rbac_or_position_access)
enable(string $a_module_name)
const LP_STATUS_NOT_ATTEMPTED
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
const LP_STATUS_IN_PROGRESS_NUM
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
const LP_STATUS_IN_PROGRESS
bool $has_rbac_or_position_access
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
numericOrdering(string $a_field)
const LP_STATUS_NOT_ATTEMPTED_NUM
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
bool $has_general_lp_access
const LP_STATUS_COMPLETED
static getInstance(int $obj_id)
const LP_STATUS_FAILED_NUM