ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
14{
18 protected $access;
19
23 public function __construct($a_parent_obj, $a_parent_cmd, $a_lm)
24 {
25 global $DIC;
26
27 $this->ctrl = $DIC->ctrl();
28 $this->lng = $DIC->language();
29 $this->access = $DIC->access();
30 $ilCtrl = $DIC->ctrl();
31 $lng = $DIC->language();
32 $ilAccess = $DIC->access();
33 $lng = $DIC->language();
34
35 $this->lm = $a_lm;
36
37 parent::__construct($a_parent_obj, $a_parent_cmd);
38 $this->setData($this->getBlockedUsers());
39 $this->setTitle($lng->txt(""));
40
41 $this->addColumn("", "", "1px");
42 $this->addColumn($this->lng->txt("user"), "user");
43 $this->addColumn($this->lng->txt("question"), "");
44 $this->addColumn($this->lng->txt("page"), "page_title");
45 $this->addColumn($this->lng->txt("cont_last_try"), "last_try");
46 $this->addColumn($this->lng->txt("cont_unlocked"));
47
48 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
49 $this->setRowTemplate("tpl.blocked_users.html", "Modules/LearningModule");
50
51 $this->addMultiCommand("sendMailToBlockedUsers", $lng->txt("send_mail"));
52 $this->addMultiCommand("resetNumberOfTries", $lng->txt("cont_reset_nr_of_tries"));
53 $this->addMultiCommand("unlockQuestion", $lng->txt("cont_unlock_allow_continue"));
54 //$this->addCommandButton("", $lng->txt(""));
55 }
56
62 protected function getBlockedUsers()
63 {
65 $track = ilLMTracker::getInstance($this->lm->getRefId());
66
67 return $bl_users = $track->getBlockedUsersInformation();
68 }
69
73 protected function fillRow($a_set)
74 {
76
77 $this->tpl->setVariable("USER_QUEST_ID", $a_set["qst_id"] . ":" . $a_set["user_id"]);
78 $this->tpl->setVariable("USER_NAME", $a_set["user_name"]);
79 $this->tpl->setVariable("QUESTION", $a_set["question_text"]);
80 $this->tpl->setVariable("PAGE", $a_set["page_title"]);
81 $this->tpl->setVariable("LAST_TRY", $a_set["last_try"]);
82 $this->tpl->setVariable("IGNORE_FAIL", ($a_set["unlocked"] ? $lng->txt("yes") : $lng->txt("no")));
83 }
84}
An exception for terminatinating execution or to throw for unit testing.
__construct($a_parent_obj, $a_parent_cmd, $a_lm)
Constructor.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46