ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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  function __construct($a_parent_obj, $a_parent_cmd, $a_lm)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  $this->lm = $a_lm;
25 
26  parent::__construct($a_parent_obj, $a_parent_cmd);
27  $this->setData($this->getBlockedUsers());
28  $this->setTitle($lng->txt(""));
29 
30  $this->addColumn("", "", "1px");
31  $this->addColumn($this->lng->txt("user"), "user");
32  $this->addColumn($this->lng->txt("question"), "");
33  $this->addColumn($this->lng->txt("page"), "page_title");
34  $this->addColumn($this->lng->txt("cont_last_try"), "last_try");
35  $this->addColumn($this->lng->txt("cont_unlocked"));
36 
37  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
38  $this->setRowTemplate("tpl.blocked_users.html", "Modules/LearningModule");
39 
40  $this->addMultiCommand("sendMailToBlockedUsers", $lng->txt("send_mail"));
41  $this->addMultiCommand("resetNumberOfTries", $lng->txt("cont_reset_nr_of_tries"));
42  $this->addMultiCommand("unlockQuestion", $lng->txt("cont_unlock_allow_continue"));
43  //$this->addCommandButton("", $lng->txt(""));
44  }
45 
51  protected function getBlockedUsers()
52  {
53  include_once("./Modules/LearningModule/classes/class.ilLMTracker.php");
54  $track = ilLMTracker::getInstance($this->lm->getRefId());
55 
56  return $bl_users = $track->getBlockedUsersInformation();
57  }
58 
62  protected function fillRow($a_set)
63  {
64  global $lng;
65 
66  $this->tpl->setVariable("USER_QUEST_ID", $a_set["qst_id"].":".$a_set["user_id"]);
67  $this->tpl->setVariable("USER_NAME", $a_set["user_name"]);
68  $this->tpl->setVariable("QUESTION", $a_set["question_text"]);
69  $this->tpl->setVariable("PAGE", $a_set["page_title"]);
70  $this->tpl->setVariable("LAST_TRY", $a_set["last_try"]);
71  $this->tpl->setVariable("IGNORE_FAIL", ($a_set["unlocked"] ? $lng->txt("yes") : $lng->txt("no")));
72  }
73 
74 }
75 ?>