3 require_once(
"./Services/Table/classes/class.ilTable2GUI.php");
4 require_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
5 require_once(
"./Services/Tracking/classes/class.ilObjUserTracking.php");
27 $ilTabs = $DIC[
'ilTabs'];
33 $this->tabs = $ilTabs;
40 parent::__construct($parent_obj, $parent_cmd, $template_context);
42 $this->
setFormAction($this->ctrl->getFormAction($parent_obj));
53 $this->
setTitle($this->lng->txt(
"Staff"));
59 $this->
addColumn($this->lng->txt(
"firstname"),
"first_name");
60 $this->
addColumn($this->lng->txt(
"lastname"),
"last_name");
61 if ($this->recursive) {
62 $this->
addColumn($this->lng->txt(
'obj_orgu'),
'org_units');
64 $this->
addColumn($this->lng->txt(
"action"));
68 if($this->staff ==
"employee")
70 elseif($this->staff ==
"superior")
73 throw new Exception(
"The ilOrgUnitStaffTableGUI's staff variable has to be either 'employee' or 'superior'");
80 foreach($user_ids as $user_id){
106 $set[
"first_name"] = $user->getFirstname();
107 $set[
"last_name"] = $user->getLastname();
108 $set[
"user_object"] = $user;
109 $set[
"user_id"] = $user_id;
116 $ilAccess = $DIC[
'ilAccess'];
118 $ilAccess = $DIC[
'ilAccess'];
119 $this->tpl->setVariable(
"FIRST_NAME", $set[
"first_name"]);
120 $this->tpl->setVariable(
"LAST_NAME", $set[
"last_name"]);
121 if ($this->recursive) {
123 $this->tpl->setVariable(
"ORG_UNITS", implode(
', ', $orgUnitsTitles));
125 $this->ctrl->setParameterByClass(
"illearningprogressgui",
"obj_id", $set[
"user_id"]);
126 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"obj_id", $set[
"user_id"]);
128 $selection->setListTitle(
$lng->txt(
"Actions"));
129 $selection->setId(
"selection_list_user_lp_".$set[
"user_id"]);
133 $selection->addItem(
$lng->txt(
"show_learning_progress"),
"show_learning_progress", $this->ctrl->getLinkTargetByClass(
array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI",
"ilLearningProgressGUI"),
""));
136 if($this->staff ==
"employee")
138 if($this->staff ==
"superior")
141 $this->tpl->setVariable(
"ACTIONS", $selection->getHTML());
149 $selection->addItem($this->lng->txt(
"remove"),
"delete_from_employees", $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"confirmRemoveFromEmployees"));
150 $selection->addItem($this->lng->txt(
"change_to_superior"),
"change_to_superior", $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"fromEmployeeToSuperior"));
157 $selection->addItem($this->lng->txt(
"remove"),
"delete_from_superiors", $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"confirmRemoveFromSuperiors"));
158 $selection->addItem($this->lng->txt(
"change_to_employee"),
"change_to_employee", $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"fromSuperiorToEmployee"));
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
Constructor.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
addEmployeeActions(&$selection)
setShowTemplates($a_value)
Toggle templates.
setRowForUser(&$set, $user_id)
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static _enabledLearningProgress()
check wether learing progress is enabled or not
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
Class ilOrgUnitStaffTableGUI.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
addSuperiorActions(&$selection)
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
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.