24 $ilTabs = $DIC[
'ilTabs'];
30 $this->tabs = $ilTabs;
50 $this->
setTitle($this->lng->txt(
"Staff"));
57 $this->
addColumn($this->lng->txt(
"firstname"),
"first_name");
58 $this->
addColumn($this->lng->txt(
"lastname"),
"last_name");
59 if ($this->recursive) {
60 $this->
addColumn($this->lng->txt(
'obj_orgu'),
'org_units');
62 $this->
addColumn($this->lng->txt(
"action"));
67 if ($this->staff ==
"employee") {
69 } elseif ($this->staff ==
"superior") {
72 throw new Exception(
"The ilOrgUnitStaffTableGUI's staff variable has to be either 'employee' or 'superior'");
81 foreach ($user_ids as $user_id) {
108 $set[
"first_name"] =
$user->getFirstname();
109 $set[
"last_name"] =
$user->getLastname();
110 $set[
"user_object"] =
$user;
111 $set[
"user_id"] = $user_id;
112 if ($this->recursive) {
121 $ilAccess = $DIC[
'ilAccess'];
123 $ilAccess = $DIC[
'ilAccess'];
124 $this->tpl->setVariable(
"FIRST_NAME", $set[
"first_name"]);
125 $this->tpl->setVariable(
"LAST_NAME", $set[
"last_name"]);
126 if ($this->recursive) {
128 $this->tpl->setVariable(
"ORG_UNITS", implode(
', ', $orgUnitsTitles));
130 $this->ctrl->setParameterByClass(
"illearningprogressgui",
"obj_id", $set[
"user_id"]);
131 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"obj_id", $set[
"user_id"]);
133 $selection->setListTitle(
$lng->txt(
"Actions"));
134 $selection->setId(
"selection_list_user_lp_" . $set[
"user_id"]);
138 $selection->addItem(
$lng->txt(
"show_learning_progress"),
"show_learning_progress", $this->ctrl->getLinkTargetByClass(array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI",
"ilLearningProgressGUI"),
""));
141 if ($this->staff ==
"employee") {
144 if ($this->staff ==
"superior") {
148 $this->tpl->setVariable(
"ACTIONS", $selection->getHTML());
156 $selection->addItem($this->lng->txt(
"remove"),
"delete_from_employees", $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"confirmRemoveFromEmployees"));
157 $selection->addItem($this->lng->txt(
"change_to_superior"),
"change_to_superior", $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"fromEmployeeToSuperior"));
165 $selection->addItem($this->lng->txt(
"remove"),
"delete_from_superiors", $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"confirmRemoveFromSuperiors"));
166 $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="")
ilTable2GUI 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.
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.
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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
addSuperiorActions(&$selection)
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.