ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLMBlockedUsersTableGUI.php
Go to the documentation of this file.
1<?php
2
25{
28
29 public function __construct(
30 object $a_parent_obj,
31 string $a_parent_cmd,
33 ) {
34 global $DIC;
35
36 $this->ctrl = $DIC->ctrl();
37 $this->lng = $DIC->language();
38 $this->access = $DIC->access();
39 $ilCtrl = $DIC->ctrl();
40 $lng = $DIC->language();
41
42 $this->lm = $a_lm;
43
44 parent::__construct($a_parent_obj, $a_parent_cmd);
45 $this->setData($this->getBlockedUsers());
46 $this->setTitle($lng->txt(""));
47
48 $this->addColumn("", "", "1px");
49 $this->addColumn($this->lng->txt("user"), "user");
50 $this->addColumn($this->lng->txt("question"), "");
51 $this->addColumn($this->lng->txt("page"), "page_title");
52 $this->addColumn($this->lng->txt("cont_last_try"), "last_try");
53 $this->addColumn($this->lng->txt("cont_unlocked"));
54
55 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
56 $this->setRowTemplate("tpl.blocked_users.html", "components/ILIAS/LearningModule");
57
58 $this->addMultiCommand("sendMailToBlockedUsers", $lng->txt("send_mail"));
59 $this->addMultiCommand("resetNumberOfTries", $lng->txt("cont_reset_nr_of_tries"));
60 $this->addMultiCommand("unlockQuestion", $lng->txt("cont_unlock_allow_continue"));
61 }
62
63 protected function getBlockedUsers(): array
64 {
66 $track = ilLMTracker::getInstance($this->lm->getRefId());
67
68 return $track->getBlockedUsersInformation();
69 }
70
71 protected function fillRow(array $a_set): void
72 {
74
75 $this->tpl->setVariable("USER_QUEST_ID", $a_set["qst_id"] . ":" . $a_set["user_id"]);
76 $this->tpl->setVariable("USER_NAME", $a_set["user_name"]);
77 $this->tpl->setVariable("QUESTION", $a_set["question_text"]);
78 $this->tpl->setVariable("PAGE", $a_set["page_title"]);
79 $this->tpl->setVariable("LAST_TRY", $a_set["last_try"] ?? "");
80 $this->tpl->setVariable(
81 "IGNORE_FAIL",
82 (($a_set["unlocked"] ?? false)
83 ? $lng->txt("yes")
84 : $lng->txt("no"))
85 );
86 }
87}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
Standard Version of Fill Row.
__construct(object $a_parent_obj, string $a_parent_cmd, ilObjLearningModule $a_lm)
static getInstance(int $a_ref_id, int $a_user_id=0)
txt(string $a_topic, string $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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addMultiCommand(string $a_cmd, string $a_text)
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
ilLanguage $lng
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26