ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilLMBlockedUsersTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
20  protected $access;
21 
25  public function __construct($a_parent_obj, $a_parent_cmd, $a_lm)
26  {
27  global $DIC;
28 
29  $this->ctrl = $DIC->ctrl();
30  $this->lng = $DIC->language();
31  $this->access = $DIC->access();
32  $ilCtrl = $DIC->ctrl();
33  $lng = $DIC->language();
34  $ilAccess = $DIC->access();
35  $lng = $DIC->language();
36 
37  $this->lm = $a_lm;
38 
39  parent::__construct($a_parent_obj, $a_parent_cmd);
40  $this->setData($this->getBlockedUsers());
41  $this->setTitle($lng->txt(""));
42 
43  $this->addColumn("", "", "1px");
44  $this->addColumn($this->lng->txt("user"), "user");
45  $this->addColumn($this->lng->txt("question"), "");
46  $this->addColumn($this->lng->txt("page"), "page_title");
47  $this->addColumn($this->lng->txt("cont_last_try"), "last_try");
48  $this->addColumn($this->lng->txt("cont_unlocked"));
49 
50  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
51  $this->setRowTemplate("tpl.blocked_users.html", "Modules/LearningModule");
52 
53  $this->addMultiCommand("sendMailToBlockedUsers", $lng->txt("send_mail"));
54  $this->addMultiCommand("resetNumberOfTries", $lng->txt("cont_reset_nr_of_tries"));
55  $this->addMultiCommand("unlockQuestion", $lng->txt("cont_unlock_allow_continue"));
56  //$this->addCommandButton("", $lng->txt(""));
57  }
58 
64  protected function getBlockedUsers()
65  {
66  include_once("./Modules/LearningModule/classes/class.ilLMTracker.php");
68  $track = ilLMTracker::getInstance($this->lm->getRefId());
69 
70  return $bl_users = $track->getBlockedUsersInformation();
71  }
72 
76  protected function fillRow($a_set)
77  {
78  $lng = $this->lng;
79 
80  $this->tpl->setVariable("USER_QUEST_ID", $a_set["qst_id"] . ":" . $a_set["user_id"]);
81  $this->tpl->setVariable("USER_NAME", $a_set["user_name"]);
82  $this->tpl->setVariable("QUESTION", $a_set["question_text"]);
83  $this->tpl->setVariable("PAGE", $a_set["page_title"]);
84  $this->tpl->setVariable("LAST_TRY", $a_set["last_try"]);
85  $this->tpl->setVariable("IGNORE_FAIL", ($a_set["unlocked"] ? $lng->txt("yes") : $lng->txt("no")));
86  }
87 }
global $DIC
Definition: saml.php:7
__construct($a_parent_obj, $a_parent_cmd, $a_lm)
Constructor.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.