ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilOrgUnitStaffGUI Class Reference

Class ilOrgUnitStaffGUI. More...

+ Collaboration diagram for ilOrgUnitStaffGUI:

Public Member Functions

 __construct (ilObjOrgUnitGUI $parent_gui)
 
 executeCommand ()
 
 showStaff ()
 
 showOtherRoles ()
 
 showStaffRec ()
 
 addStaff ()
 
 addOtherRoles ()
 
 getStaffTableHTML ($recursive=false, $table_cmd="showStaff")
 
 getOtherRolesTableHTML ()
 
 fromSuperiorToEmployee ()
 
 fromEmployeeToSuperior ()
 
 confirmRemoveUser ($cmd)
 
 removeFromSuperiors ()
 
 removeFromEmployees ()
 
 removeFromRole ()
 
 setTabs ()
 

Protected Member Functions

 addStaffToolbar ()
 
 addOtherRolesToolbar ()
 

Protected Attributes

 $tabs_gui
 
 $toolbar
 
 $ctrl
 
 $tpl
 
 $parent_gui
 
 $parent_obj
 
 $lng
 
 $ilAccess
 
 $rbacreview
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitStaffGUI::__construct ( ilObjOrgUnitGUI  $parent_gui)
Parameters
ilObjOrgUnitGUI$parent_gui

Definition at line 58 of file class.ilOrgUnitStaffGUI.php.

References $DIC, $ilAccess, $ilCtrl, $lng, $parent_gui, $rbacreview, $tpl, and setTabs().

59  {
60  global $DIC;
61  $tpl = $DIC['tpl'];
62  $ilCtrl = $DIC['ilCtrl'];
63  $ilTabs = $DIC['ilTabs'];
64  $lng = $DIC['lng'];
65  $ilAccess = $DIC['ilAccess'];
66  $ilToolbar = $DIC['ilToolbar'];
67  $rbacreview = $DIC['rbacreview'];
68 
69  $this->tpl = $tpl;
70  $this->ctrl = $ilCtrl;
71  $this->parent_gui = $parent_gui;
72  $this->parent_object = $parent_gui->object;
73  $this->tabs_gui = $this->parent_gui->tabs_gui;
74  $this->toolbar = $ilToolbar;
75  $this->lng = $lng;
76  $this->ilAccess = $ilAccess;
77  $this->toolbar = $ilToolbar;
78  $this->rbacreview = $rbacreview;
79 
80  $this->tabs_gui->setTabActive("orgu_staff");
81  $this->setTabs();
82  }
Class ilAccessHandler.
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ addOtherRoles()

ilOrgUnitStaffGUI::addOtherRoles ( )

Definition at line 247 of file class.ilOrgUnitStaffGUI.php.

References $_POST, ilObjUser\_lookupId(), ilAccess\checkAccess(), and ilUtil\sendFailure().

248  {
249  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
250  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
251  $this->ctrl->redirect($this->parent_gui, "");
252  }
253 
254  $users = explode(',', $_POST['user_login']);
255  $user_ids = array();
256  foreach ($users as $user) {
257  $user_id = ilObjUser::_lookupId($user);
258  if ($user_id) {
259  $user_ids[] = $user_id;
260  }
261  }
262  $role_id = isset($_POST['user_type']) ? $_POST['user_type'] : 0;
263  foreach ($user_ids as $user_id) {
264  $this->parent_object->assignUserToLocalRole($role_id, $user_id);
265  }
266  ilUtil::sendSuccess($this->lng->txt("users_successfuly_added"), true);
267  $this->ctrl->redirect($this, "showOtherRoles");
268  }
static _lookupId($a_user_str)
Lookup id by login.
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ addOtherRolesToolbar()

ilOrgUnitStaffGUI::addOtherRolesToolbar ( )
protected

Definition at line 193 of file class.ilOrgUnitStaffGUI.php.

References ilRepositorySearchGUI\fillAutoCompleteToolbar().

Referenced by showOtherRoles().

194  {
195  $arrLocalRoles = $this->rbacreview->getLocalRoles($this->parent_object->getRefId());
196  $types = array();
197  foreach ($arrLocalRoles as $role_id) {
198  $ilObjRole = new ilObjRole($role_id);
199  if (!preg_match("/il_orgu_/", $ilObjRole->getUntranslatedTitle())) {
200  $types[$role_id] = $ilObjRole->getPresentationTitle();
201  }
202  }
203  $this->ctrl->setParameterByClass('ilRepositorySearchGUI', 'addusertype', 'other');
204  ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $this->toolbar, array(
205  'auto_complete_name' => $this->lng->txt('user'),
206  'user_type' => $types,
207  'submit_name' => $this->lng->txt('add'),
208  ));
209  }
Class ilObjRole.
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addStaff()

ilOrgUnitStaffGUI::addStaff ( )

Definition at line 212 of file class.ilOrgUnitStaffGUI.php.

References $_POST, ilObjUser\_lookupId(), ilAccess\checkAccess(), and ilUtil\sendFailure().

213  {
214  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
215  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
216  $this->ctrl->redirect($this->parent_gui, "");
217  }
218 
219  $users = explode(',', $_POST['user_login']);
220  $user_ids = array();
221  foreach ($users as $user) {
222  $user_id = ilObjUser::_lookupId($user);
223  if ($user_id) {
224  $user_ids[] = $user_id;
225  }
226  }
227 
228  if (!count($user_ids)) {
229  ilUtil::sendFailure($this->lng->txt("user_not_found"), true);
230  $this->ctrl->redirect($this, "showStaff");
231  }
232 
233  $user_type = isset($_POST['user_type']) ? $_POST['user_type'] : 0;
234  if ($user_type == "employee") {
235  $this->parent_object->assignUsersToEmployeeRole($user_ids);
236  } elseif ($user_type == "superior") {
237  $this->parent_object->assignUsersToSuperiorRole($user_ids);
238  } else {
239  throw new Exception("The post request didn't specify wether the user_ids should be assigned to the employee or the superior role.");
240  }
241 
242  ilUtil::sendSuccess($this->lng->txt("users_successfuly_added"), true);
243  $this->ctrl->redirect($this, "showStaff");
244  }
static _lookupId($a_user_str)
Lookup id by login.
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ addStaffToolbar()

ilOrgUnitStaffGUI::addStaffToolbar ( )
protected

Definition at line 178 of file class.ilOrgUnitStaffGUI.php.

References ilRepositorySearchGUI\fillAutoCompleteToolbar().

Referenced by showStaff().

179  {
180  $types = array(
181  "employee" => $this->lng->txt("employee"),
182  "superior" => $this->lng->txt("superior"),
183  );
184  $this->ctrl->setParameterByClass('ilRepositorySearchGUI', 'addusertype', 'staff');
185  ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $this->toolbar, array(
186  'auto_complete_name' => $this->lng->txt('user'),
187  'user_type' => $types,
188  'submit_name' => $this->lng->txt('add'),
189  ));
190  }
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmRemoveUser()

ilOrgUnitStaffGUI::confirmRemoveUser (   $cmd)

Definition at line 342 of file class.ilOrgUnitStaffGUI.php.

References $_GET, $param, ilObjUser\_lookupName(), ilAccess\checkAccess(), ilUtil\getImagePath(), and ilUtil\sendFailure().

Referenced by executeCommand().

343  {
344  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
345  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
346  $this->ctrl->redirect($this->parent_gui, "");
347  }
348  switch ($cmd) {
349  case "confirmRemoveFromRole":
350  $this->tabs_gui->activateSubTab("show_other_roles");
351  $nextcmd = "removeFromRole";
352  $paramname = "obj_id-role_id";
353  $param = $_GET["obj_id"] . '-' . $_GET["role_id"];
354  break;
355  case "confirmRemoveFromSuperiors":
356  $this->tabs_gui->activateSubTab("show_staff");
357  $nextcmd = "removeFromSuperiors";
358  $paramname = "obj_id";
359  $param = $_GET["obj_id"];
360  break;
361  case "confirmRemoveFromEmployees":
362  $this->tabs_gui->activateSubTab("show_staff");
363  $nextcmd = "removeFromEmployees";
364  $paramname = "obj_id";
365  $param = $_GET["obj_id"];
366  break;
367  }
368  include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
369  $confirm = new ilConfirmationGUI();
370  $confirm->setFormAction($this->ctrl->getFormAction($this, $nextcmd));
371  $confirm->setHeaderText($this->lng->txt('orgu_staff_deassign'));
372  $confirm->setConfirm($this->lng->txt('confirm'), $nextcmd);
373  $confirm->setCancel($this->lng->txt('cancel'), 'showStaff');
374  $arrUser = ilObjUser::_lookupName($_GET["obj_id"]);
375  $confirm->addItem(
376  $paramname,
377  $param,
378  $arrUser['lastname'] . ', ' . $arrUser['firstname'] . ' [' . $arrUser['login']
379  . ']',
380  ilUtil::getImagePath('icon_usr.svg')
381  );
382  $this->tpl->setContent($confirm->getHTML());
383  }
static _lookupName($a_user_id)
lookup user name
$_GET["client_id"]
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$param
Definition: xapitoken.php:31
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilOrgUnitStaffGUI::executeCommand ( )
Returns
bool
Exceptions
Exception
ilCtrlException
ilException

Definition at line 91 of file class.ilOrgUnitStaffGUI.php.

References confirmRemoveUser(), showOtherRoles(), showStaff(), and showStaffRec().

92  {
93  $next_class = $this->ctrl->getNextClass($this);
94  $cmd = $this->ctrl->getCmd();
95 
96  switch ($next_class) {
97  case 'ilrepositorysearchgui':
98  $repo = new ilRepositorySearchGUI();
99  $this->ctrl->forwardCommand($repo);
100  break;
101  default:
102  switch ($cmd) {
103  case 'showStaff':
104  $this->tabs_gui->activateSubTab("show_staff");
105  $this->showStaff();
106  break;
107  case 'showOtherRoles':
108  $this->tabs_gui->activateSubTab("show_other_roles");
109  $this->showOtherRoles();
110  break;
111  case 'showStaffRec':
112  $this->tabs_gui->activateSubTab("show_staff_rec");
113  $this->showStaffRec();
114  break;
115  case 'confirmRemoveFromRole':
116  case 'confirmRemoveFromEmployees':
117  case 'confirmRemoveFromSuperiors':
118  $this->confirmRemoveUser($cmd);
119  break;
120  case 'addStaff':
121  case 'addOtherRoles':
122  case 'fromSuperiorToEmployee':
123  case 'fromEmployeeToSuperior':
124  case 'removeFromSuperiors':
125  case 'removeFromEmployees':
126  case 'removeFromRole':
127  $this->$cmd();
128  break;
129  default:
130  throw new ilException("Unknown command for command class ilOrgUnitStaffGUI: " . $cmd);
131  break;
132  }
133  break;
134  }
135 
136  return true;
137  }
+ Here is the call graph for this function:

◆ fromEmployeeToSuperior()

ilOrgUnitStaffGUI::fromEmployeeToSuperior ( )

Definition at line 329 of file class.ilOrgUnitStaffGUI.php.

References $_GET, ilAccess\checkAccess(), and ilUtil\sendFailure().

330  {
331  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
332  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
333  $this->ctrl->redirect($this->parent_gui, "");
334  }
335  $this->parent_object->deassignUserFromEmployeeRole($_GET["obj_id"]);
336  $this->parent_object->assignUsersToSuperiorRole(array($_GET["obj_id"]));
337  ilUtil::sendSuccess($this->lng->txt("user_changed_successful"), true);
338  $this->ctrl->redirect($this, "showStaff");
339  }
$_GET["client_id"]
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ fromSuperiorToEmployee()

ilOrgUnitStaffGUI::fromSuperiorToEmployee ( )

Definition at line 316 of file class.ilOrgUnitStaffGUI.php.

References $_GET, ilAccess\checkAccess(), and ilUtil\sendFailure().

317  {
318  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
319  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
320  $this->ctrl->redirect($this->parent_gui, "");
321  }
322  $this->parent_object->deassignUserFromSuperiorRole($_GET["obj_id"]);
323  $this->parent_object->assignUsersToEmployeeRole(array($_GET["obj_id"]));
324  ilUtil::sendSuccess($this->lng->txt("user_changed_successful"), true);
325  $this->ctrl->redirect($this, "showStaff");
326  }
$_GET["client_id"]
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ getOtherRolesTableHTML()

ilOrgUnitStaffGUI::getOtherRolesTableHTML ( )

Definition at line 293 of file class.ilOrgUnitStaffGUI.php.

References $DIC, $lng, and $rbacreview.

Referenced by showOtherRoles().

294  {
295  global $DIC;
296  $lng = $DIC['lng'];
297  $rbacreview = $DIC['rbacreview'];
298  $arrLocalRoles = $rbacreview->getLocalRoles($this->parent_object->getRefId());
299  $html = "";
300  foreach ($arrLocalRoles as $role_id) {
301  $ilObjRole = new ilObjRole($role_id);
302  if (!preg_match("/il_orgu_/", $ilObjRole->getUntranslatedTitle())) {
303  $other_roles_table = new ilOrgUnitOtherRolesTableGUI($this, 'other_role_' . $role_id, $role_id);
304  $other_roles_table->readData();
305  $html .= $other_roles_table->getHTML() . "<br/>";
306  }
307  }
308  if (!$html) {
309  $html = $lng->txt("no_roles");
310  }
311 
312  return $html;
313  }
Class ilObjRole.
Class ilOrgUnitOtherRolesTableGUI.
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ getStaffTableHTML()

ilOrgUnitStaffGUI::getStaffTableHTML (   $recursive = false,
  $table_cmd = "showStaff" 
)
Parameters
bool$recursive
string$table_cmd
Returns
string the tables html.

Definition at line 277 of file class.ilOrgUnitStaffGUI.php.

References $DIC, $lng, and $rbacreview.

Referenced by showStaff(), and showStaffRec().

278  {
279  global $DIC;
280  $lng = $DIC['lng'];
281  $rbacreview = $DIC['rbacreview'];
282  $superior_table = new ilOrgUnitStaffTableGUI($this, $table_cmd, "superior", $recursive);
283  $superior_table->parseData();
284  $superior_table->setTitle($lng->txt("il_orgu_superior"));
285  $employee_table = new ilOrgUnitStaffTableGUI($this, $table_cmd, "employee", $recursive);
286  $employee_table->parseData();
287  $employee_table->setTitle($lng->txt("il_orgu_employee"));
288 
289  return $superior_table->getHTML() . $employee_table->getHTML();
290  }
Class ilOrgUnitStaffTableGUI.
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ removeFromEmployees()

ilOrgUnitStaffGUI::removeFromEmployees ( )

Definition at line 402 of file class.ilOrgUnitStaffGUI.php.

References $_POST, ilAccess\checkAccess(), and ilUtil\sendFailure().

403  {
404  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
405  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
406  $this->ctrl->redirect($this->parent_gui, "");
407  }
408  $this->parent_object->deassignUserFromEmployeeRole($_POST["obj_id"]);
409  //if user is neither employee nor superior, remove orgunit from user->org_units
410  if (!$this->rbacreview->isAssigned($_POST["obj_id"], $this->parent_object->getSuperiorRole())) {
411  ilObjUser::_removeOrgUnit($_POST["obj_id"], $this->parent_object->getRefId());
412  }
413  ilUtil::sendSuccess($this->lng->txt("deassign_user_successful"), true);
414  $this->ctrl->redirect($this, "showStaff");
415  }
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ removeFromRole()

ilOrgUnitStaffGUI::removeFromRole ( )

Definition at line 418 of file class.ilOrgUnitStaffGUI.php.

References $_POST, ilAccess\checkAccess(), and ilUtil\sendFailure().

419  {
420  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
421  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
422  $this->ctrl->redirect($this->parent_gui, "");
423  }
424  $arrObjIdRolId = explode("-", $_POST["obj_id-role_id"]);
425  $this->parent_object->deassignUserFromLocalRole($arrObjIdRolId[1], $arrObjIdRolId[0]);
426  ilUtil::sendSuccess($this->lng->txt("deassign_user_successful"), true);
427  $this->ctrl->redirect($this, "showOtherRoles");
428  }
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ removeFromSuperiors()

ilOrgUnitStaffGUI::removeFromSuperiors ( )

Definition at line 386 of file class.ilOrgUnitStaffGUI.php.

References $_POST, ilAccess\checkAccess(), and ilUtil\sendFailure().

387  {
388  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
389  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
390  $this->ctrl->redirect($this->parent_gui, "");
391  }
392  $this->parent_object->deassignUserFromSuperiorRole($_POST["obj_id"]);
393  //if user is neither employee nor superior, remove orgunit from user->org_units
394  if (!$this->rbacreview->isAssigned($_POST["obj_id"], $this->parent_object->getEmployeeRole())) {
395  ilObjUser::_removeOrgUnit($_POST["obj_id"], $this->parent_object->getRefId());
396  }
397  ilUtil::sendSuccess($this->lng->txt("deassign_user_successful"), true);
398  $this->ctrl->redirect($this, "showStaff");
399  }
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ setTabs()

ilOrgUnitStaffGUI::setTabs ( )

Definition at line 431 of file class.ilOrgUnitStaffGUI.php.

References ilAccess\checkAccess().

Referenced by __construct().

432  {
433  $this->tabs_gui->addSubTab("show_staff", sprintf($this->lng->txt("local_staff"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showStaff"));
434  if ($this->ilAccess->checkAccess("view_learning_progress_rec", "", $this->parent_object->getRefId())) {
435  $this->tabs_gui->addSubTab("show_staff_rec", sprintf($this->lng->txt("rec_staff"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showStaffRec"));
436  }
437  if ($this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
438  $this->tabs_gui->addSubTab("show_other_roles", sprintf($this->lng->txt("local_other_roles"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showOtherRoles"));
439  }
440  }
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showOtherRoles()

ilOrgUnitStaffGUI::showOtherRoles ( )

Definition at line 154 of file class.ilOrgUnitStaffGUI.php.

References addOtherRolesToolbar(), ilAccess\checkAccess(), getOtherRolesTableHTML(), and ilUtil\sendFailure().

Referenced by executeCommand().

155  {
156  if (!$this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
157  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
158  $this->ctrl->redirect($this->parent_gui, "");
159  }
160  if ($this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
161  $this->addOtherRolesToolbar();
162  }
163  $this->tpl->setContent($this->getOtherRolesTableHTML());
164  }
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showStaff()

ilOrgUnitStaffGUI::showStaff ( )

Definition at line 140 of file class.ilOrgUnitStaffGUI.php.

References ilObjOrgUnitAccess\_checkAccessStaff(), addStaffToolbar(), ilAccess\checkAccess(), getStaffTableHTML(), and ilUtil\sendFailure().

Referenced by executeCommand().

141  {
142  if (!ilObjOrgUnitAccess::_checkAccessStaff($this->parent_object->getRefId())) {
143  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
144  $this->ctrl->redirect($this->parent_gui, "");
145  }
146  if ($this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
147  $this->addStaffToolbar();
148  }
149  $this->ctrl->setParameter($this, "recursive", false);
150  $this->tpl->setContent($this->getStaffTableHTML(false, "showStaff"));
151  }
static _checkAccessStaff($ref_id)
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getStaffTableHTML($recursive=false, $table_cmd="showStaff")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showStaffRec()

ilOrgUnitStaffGUI::showStaffRec ( )

Definition at line 167 of file class.ilOrgUnitStaffGUI.php.

References ilObjOrgUnitAccess\_checkAccessStaffRec(), getStaffTableHTML(), and ilUtil\sendFailure().

Referenced by executeCommand().

168  {
169  if (!ilObjOrgUnitAccess::_checkAccessStaffRec($this->parent_object->getRefId())) {
170  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
171  $this->ctrl->redirect($this->parent_gui, "");
172  }
173  $this->ctrl->setParameter($this, "recursive", true);
174  $this->tpl->setContent($this->getStaffTableHTML(true, "showStaffRec"));
175  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getStaffTableHTML($recursive=false, $table_cmd="showStaff")
static _checkAccessStaffRec($ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilOrgUnitStaffGUI::$ctrl
protected

Definition at line 28 of file class.ilOrgUnitStaffGUI.php.

◆ $ilAccess

ilOrgUnitStaffGUI::$ilAccess
protected

Definition at line 48 of file class.ilOrgUnitStaffGUI.php.

Referenced by __construct().

◆ $lng

ilOrgUnitStaffGUI::$lng
protected

◆ $parent_gui

ilOrgUnitStaffGUI::$parent_gui
protected

Definition at line 36 of file class.ilOrgUnitStaffGUI.php.

Referenced by __construct().

◆ $parent_obj

ilOrgUnitStaffGUI::$parent_obj
protected

Definition at line 40 of file class.ilOrgUnitStaffGUI.php.

◆ $rbacreview

ilOrgUnitStaffGUI::$rbacreview
protected

◆ $tabs_gui

ilOrgUnitStaffGUI::$tabs_gui
protected

Definition at line 20 of file class.ilOrgUnitStaffGUI.php.

◆ $toolbar

ilOrgUnitStaffGUI::$toolbar
protected

Definition at line 24 of file class.ilOrgUnitStaffGUI.php.

◆ $tpl

ilOrgUnitStaffGUI::$tpl
protected

Definition at line 32 of file class.ilOrgUnitStaffGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: