ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilStudyProgrammeMembersTableGUI Class Reference
+ Inheritance diagram for ilStudyProgrammeMembersTableGUI:
+ Collaboration diagram for ilStudyProgrammeMembersTableGUI:

Public Member Functions

 __construct (int $prg_obj_id, int $prg_ref_id, ilObjStudyProgrammeMembersGUI $parent_obj, ilPRGPermissionsHelper $permissions, Data\Factory $data_factory, ILIAS\UI\Factory $ui_factory, ILIAS\UI\Renderer $ui_renderer, ilStudyProgrammeUserTable $prg_user_table, ilPRGAssignmentFilter $custom_filter, ilObjUser $user, string $parent_cmd='', string $template_context='')
 
 getSelectableColumns ()
 
 initFilter ()
 
- Public Member Functions inherited from ilTable2GUI
 __construct (?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 determineLimit ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 
 isColumnSelected (string $col)
 
 getSelectedColumns ()
 
 resetOffset (bool $a_in_determination=false)
 
 initFilter ()
 
 getParentObject ()
 
 getParentCmd ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setNoEntriesText (string $a_text)
 
 getNoEntriesText ()
 
 setIsDataTable (bool $a_val)
 
 getIsDataTable ()
 
 setEnableTitle (bool $a_enabletitle)
 
 getEnableTitle ()
 
 setEnableHeader (bool $a_enableheader)
 
 getEnableHeader ()
 
 setEnableNumInfo (bool $a_val)
 
 getEnableNumInfo ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setOrderField (string $a_order_field)
 
 getOrderField ()
 
 setData (array $a_data)
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $a_prefix)
 
 getPrefix ()
 
 addFilterItem (ilTableFilterItem $a_input_item, bool $a_optional=false)
 
 addFilterItemByMetaType (string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
 Add filter by standard type. More...
 
 getFilterItems (bool $a_optionals=false)
 
 getFilterItemByPostVar (string $a_post_var)
 
 setFilterCols (int $a_val)
 
 getFilterCols ()
 
 setDisableFilterHiding (bool $a_val=true)
 
 getDisableFilterHiding ()
 
 isFilterSelected (string $a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 
 determineSelectedFilters ()
 
 setCustomPreviousNext (string $a_prev_link, string $a_next_link)
 
 setFormAction (string $a_form_action, bool $a_multipart=false)
 
 getFormAction ()
 
 setFormName (string $a_name="")
 
 getFormName ()
 
 setId (string $a_val)
 
 getId ()
 
 setDisplayAsBlock (bool $a_val)
 
 getDisplayAsBlock ()
 
 setSelectAllCheckbox (string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
 setExternalSorting (bool $a_val)
 
 getExternalSorting ()
 
 setFilterCommand (string $a_val, string $a_caption="")
 
 getFilterCommand ()
 
 setResetCommand (string $a_val, string $a_caption="")
 
 getResetCommand ()
 
 setExternalSegmentation (bool $a_val)
 
 getExternalSegmentation ()
 
 setRowTemplate (string $a_template, string $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 getDefaultOrderField ()
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 getDefaultOrderDirection ()
 
 setDefaultFilterVisiblity (bool $a_status)
 
 getDefaultFilterVisibility ()
 
 clearCommandButtons ()
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 addCommandButtonInstance (ilButtonBase $a_button)
 
 addMultiItemSelectionButton (string $a_sel_var, array $a_options, string $a_cmd, string $a_text, string $a_default_selection='')
 
 setCloseCommand (string $a_link)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addHiddenInput (string $a_name, string $a_value)
 
 addHeaderCommand (string $a_href, string $a_text, string $a_target="", string $a_img="")
 
 setTopCommands (bool $a_val)
 
 getTopCommands ()
 
 addColumn (string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
 getNavParameter ()
 
 setOrderLink (string $key, string $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder (bool $a_omit_offset=false)
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 render ()
 
 writeFilterToSession ()
 
 resetFilter ()
 
 fillFooter ()
 
 getLinkbar (string $a_num)
 
 fillHiddenRow ()
 
 fillActionRow ()
 
 setHeaderHTML (string $html)
 
 storeProperty (string $type, string $value)
 
 loadProperty (string $type)
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext (string $id)
 
 getContext ()
 
 setShowRowsSelector (bool $a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 
 getLimit ()
 
 getOffset ()
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode (bool $a_value=false)
 
 getPrintMode ()
 
 getExportMode ()
 
 exportData (int $format, bool $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand (bool $a_value)
 
 setRowSelectorLabel (string $row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 
- Public Member Functions inherited from ilTableGUI
 __construct (array $a_data=[], bool $a_global_tpl=true)
 
 setTemplate (ilTemplate $a_tpl)
 
 getTemplateObject ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setHelp (string $a_help_page, string $a_help_icon, string $a_help_icon_alt="")
 
 setHeaderNames (array $a_header_names)
 
 getColumnCount ()
 
 setHeaderVars (array $a_header_vars, array $a_header_params=[])
 
 setColumnWidth (array $a_column_width)
 set table column widths More...
 
 setOneColumnWidth (string $a_column_width, int $a_column_number)
 
 setMaxCount (int $a_max_count)
 set max. More...
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
 getLimit ()
 
 setPrefix (string $a_prefix)
 set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) More...
 
 setOffset (int $a_offset)
 set dataset offset More...
 
 getOffset ()
 
 setOrderColumn (string $a_order_column="", string $a_default_column="")
 
 getOrderColumn ()
 
 setOrderDirection (string $a_order_direction)
 
 getOrderDirection ()
 
 setFooter (string $a_style, string $a_previous="", string $a_next="")
 
 enable (string $a_module_name)
 
 disable (string $a_module_name)
 
 sortData ()
 
 render ()
 
 renderHeader ()
 
 setOrderLink (string $key, string $order_dir)
 
 setStyle (string $a_element, string $a_style)
 
 getStyle (string $a_element)
 
 setBase (string $a_base)
 
 getBase ()
 
 getFormName ()
 get the name of the parent form More...
 
 setFormName (string $a_name="cmd")
 
 getSelectAllCheckbox ()
 get the name of the checkbox that should be toggled with a select all button More...
 
 setSelectAllCheckbox (string $a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton (string $btn_name, string $btn_value)
 

Protected Member Functions

 getOrdering ()
 
 fillRow ($row)
 
 buildActionDropDown (array $actions, string $prgrs_id, int $ass_id)
 
 getLinkTargetForAction (string $action, string $prgrs_id, int $ass_id)
 
 addMultiCommands ()
 
 getMultiCommands ()
 Get possible multicommands. More...
 
 getFilterValues ()
 Get filter-values by field id. More...
 
 getPossibleActions (bool $is_root, int $status, int $node_lifecyle_status)
 Get a list with possible actions on a progress record. More...
 
 getValidUserIds ()
 
 getCompletionLink (int $target_obj_id, string $title)
 
- Protected Member Functions inherited from ilTable2GUI
 getRequestedValues ()
 
 prepareOutput ()
 Anything that must be done before HTML is generated. More...
 
 isFilterVisible ()
 Check if filter is visible: manually shown (session, db) or default value set. More...
 
 isAdvMDFilter (ilAdvancedMDRecordGUI $a_gui, ilTableFilterItem $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilTableFilterItem $a_item)
 Get current filter value. More...
 
 setFilterValue (ilTableFilterItem $a_item, $a_value)
 
 fillMetaExcel (ilExcel $a_excel, int &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, int &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, int &$a_row, array $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV (ilCSVWriter $a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 CSV Version of Fill Row. More...
 

Protected Attributes

Data Factory $data_factory
 
int $prg_obj_id
 
bool $prg_has_lp_children
 
ilObjStudyProgramme $prg
 
ilPRGPermissionsHelper $permissions
 
bool $may_edit_anything
 
ilStudyProgrammeUserTable $prg_user_table
 
ilObjUser $user
 
ilPRGAssignmentFilter $custom_filter
 
ILIAS UI Factory $ui_factory
 
ILIAS UI Renderer $ui_renderer
 
- Protected Attributes inherited from ilTable2GUI
string $requested_nav_par2 = ""
 
string $requested_nav_par = ""
 
string $requested_nav_par1 = ""
 
ILIAS Table TableGUIRequest $table_request = null
 
array $selected_columns = []
 
ilCtrl $ctrl
 
object $parent_obj = null
 
string $parent_cmd = ""
 
string $close_command = ""
 
string $top_anchor = "il_table_top"
 
array $filters = array()
 
array $optional_filters = array()
 
string $filter_cmd = 'applyFilter'
 
string $reset_cmd = 'resetFilter'
 
int $filter_cols = 5
 
bool $ext_sort = false
 
bool $ext_seg = false
 
string $context = ""
 
array $mi_sel_buttons = []
 
bool $disable_filter_hiding = false
 
bool $top_commands = true
 
array $selectable_columns = array()
 
array $selected_column = array()
 
bool $show_rows_selector = true
 
bool $rows_selector_off = false
 
bool $nav_determined = false
 
bool $limit_determined = false
 
bool $filters_determined = false
 
bool $columns_determined = false
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
array $export_formats = []
 
int $export_mode = 0
 
bool $print_mode = false
 
bool $enable_command_for_all = false
 
bool $restore_filter = false
 
array $restore_filter_values = []
 
bool $default_filter_visibility = false
 
array $sortable_fields = array()
 
bool $prevent_double_submission = true
 
string $row_selector_label = ""
 
bool $select_all_on_top = false
 
array $sel_buttons = []
 
string $nav_value = ''
 
string $noentriestext = ''
 
string $css_row = ''
 
bool $display_as_block = false
 
string $description = ''
 
string $id = ""
 
bool $custom_prev_next = false
 
string $reset_cmd_txt = ""
 
string $defaultorderfield = ""
 
string $defaultorderdirection = ""
 
array $column = []
 
bool $datatable = false
 
bool $num_info = false
 
bool $form_multipart = false
 
array $row_data = []
 
string $order_field = ""
 
array $selected_filter = []
 
string $form_action = ""
 
string $formname = ""
 
string $sort_order = ""
 
array $buttons = []
 
array $multi = []
 
array $hidden_inputs = []
 
array $header_commands = []
 
string $row_template = ""
 
string $row_template_dir = ""
 
string $filter_cmd_txt = ""
 
string $custom_prev = ""
 
string $custom_next = ""
 
array $raw_post_data = null
 
ilGlobalTemplateInterface $main_tpl
 
- Protected Attributes inherited from ilTableGUI
string $sort_order
 
string $link_params
 
array $header_params
 
 $tpl
 
ilLanguage $lng
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 
- Static Public Member Functions inherited from ilTableGUI
static linkbar (string $AScript, int $AHits, int $ALimit, int $AOffset, array $AParams=array(), array $ALayout=array(), string $prefix='')
 
- Data Fields inherited from ilTable2GUI
const FILTER_TEXT = 1
 
const FILTER_SELECT = 2
 
const FILTER_DATE = 3
 
const FILTER_LANGUAGE = 4
 
const FILTER_NUMBER_RANGE = 5
 
const FILTER_DATE_RANGE = 6
 
const FILTER_DURATION_RANGE = 7
 
const FILTER_DATETIME_RANGE = 8
 
const FILTER_CHECKBOX = 9
 
const EXPORT_EXCEL = 1
 
const EXPORT_CSV = 2
 
const ACTION_ALL_LIMIT = 1000
 
- Data Fields inherited from ilTableGUI
string $title = ""
 
string $icon = ""
 
string $icon_alt = ""
 
string $help_page = ""
 
string $help_icon = ""
 
string $help_icon_alt = ""
 
array $header_names = []
 
array $header_vars = []
 
array $linkbar_vars = []
 
array $data = []
 
int $column_count = 0
 
array $column_width = []
 
int $max_count = 0
 
int $limit = 0
 
bool $max_limit = false
 
int $offset = 0
 
string $order_column = ""
 
string $order_direction = ""
 
string $footer_style = ""
 
string $footer_previous = ""
 
string $footer_next = ""
 
bool $lang_support = true
 
bool $global_tpl = false
 
string $form_name = ""
 
string $select_all_checkbox = ""
 
array $action_buttons = []
 
string $prefix = ""
 
string $base = ""
 
array $enabled
 
array $styles
 

Detailed Description

Definition at line 23 of file class.ilStudyProgrammeMembersTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeMembersTableGUI::__construct ( int  $prg_obj_id,
int  $prg_ref_id,
ilObjStudyProgrammeMembersGUI  $parent_obj,
ilPRGPermissionsHelper  $permissions,
Data\Factory  $data_factory,
ILIAS\UI\Factory  $ui_factory,
ILIAS\UI\Renderer  $ui_renderer,
ilStudyProgrammeUserTable  $prg_user_table,
ilPRGAssignmentFilter  $custom_filter,
ilObjUser  $user,
string  $parent_cmd = '',
string  $template_context = '' 
)

Definition at line 37 of file class.ilStudyProgrammeMembersTableGUI.php.

References ilTable2GUI\$column, $custom_filter, $data_factory, ilTable2GUI\$parent_cmd, $permissions, $prg_obj_id, $prg_user_table, $ui_factory, $ui_renderer, $user, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), ilTable2GUI\addHiddenInput(), addMultiCommands(), ILIAS\Repository\ctrl(), ilTable2GUI\determineLimit(), ilTable2GUI\determineOffsetAndOrder(), getFilterValues(), ilObjStudyProgramme\getInstanceByRefId(), ilTable2GUI\getLimit(), ilTable2GUI\getOffset(), getOrdering(), ilTable2GUI\getSelectedColumns(), ilObjStudyProgrammeMembersGUI\getStudyProgramme(), getValidUserIds(), initFilter(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilPRGPermissionsHelper\mayAnyOf(), null, ilOrgUnitOperation\OP_EDIT_INDIVIDUAL_PLAN, ilOrgUnitOperation\OP_MANAGE_MEMBERS, ilTable2GUI\setData(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setEnableAllCommand(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setEnableTitle(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFormAction(), ilTable2GUI\setId(), ilTableGUI\setMaxCount(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), ilTable2GUI\setShowRowsSelector(), ilTable2GUI\setTopCommands(), and ILIAS\Repository\user().

50  {
51  $this->setId("sp_member_list_" . $prg_obj_id);
52  $this->prg_obj_id = $prg_obj_id;
53  $this->prg_user_table = $prg_user_table;
54  $this->custom_filter = $custom_filter;
55  parent::__construct($parent_obj, $parent_cmd, $template_context);
56 
57  $this->data_factory = $data_factory;
58  $this->ui_factory = $ui_factory;
59  $this->ui_renderer = $ui_renderer;
60  $this->permissions = $permissions;
61  $this->may_edit_anything = $this->permissions->mayAnyOf([ilOrgUnitOperation::OP_EDIT_INDIVIDUAL_PLAN, ilOrgUnitOperation::OP_MANAGE_MEMBERS]);
62  $this->user = $user;
63 
64  $this->prg = ilObjStudyProgramme::getInstanceByRefId($prg_ref_id);
65  $this->prg_has_lp_children = $parent_obj->getStudyProgramme()->hasLPChildren();
66 
67  $this->setEnableTitle(true);
68  $this->setTopCommands(false);
69  $this->setEnableHeader(true);
70  $this->setExternalSorting(true);
71  $this->setExternalSegmentation(true);
72  $this->setRowTemplate("tpl.members_table_row.html", "components/ILIAS/StudyProgramme");
73  $this->setShowRowsSelector(true);
74  $this->setFormAction($this->ctrl->getFormAction($parent_obj, "view"));
75  $this->addColumn("", "", "1", true);
76  $this->setEnableAllCommand(true);
77  $this->addMultiCommands();
78  $this->setDefaultOrderField('prgrs_id');
79  $this->setDefaultOrderDirection('ASC');
80 
81  if ($this->may_edit_anything) {
82  $this->setSelectAllCheckbox($parent_obj::F_SELECTED_PROGRESS_IDS . '[]');
83  }
84 
85  $selected = $this->getSelectedColumns();
86  foreach ($this->prg_user_table->getColumns($prg_obj_id) as $column) {
87  [$col, $lng_var, $optional, $lp, $no_lp] = $column;
88 
89  $show_by_lp = ($this->prg_has_lp_children && $lp) || (!$this->prg_has_lp_children && $no_lp);
90  $show_optional = !$optional || ($optional && array_key_exists($col, $selected));
91 
92  if ($show_by_lp && $show_optional) {
93  $this->addColumn($lng_var, $col);
94  }
95  }
96 
97  $this->addColumn($this->lng->txt('action'), '');
98 
99  $this->initFilter();
100  $this->determineOffsetAndOrder();
101  $this->determineLimit();
102 
103  $valid_user_ids = $this->getValidUserIds();
104  $filter_values = $this->getFilterValues();
105 
106  $order = $this->getOrdering();
107 
108  $members_list = $this->prg_user_table->fetchData(
109  $prg_obj_id,
110  $valid_user_ids,
111  $order,
112  $this->custom_filter->withValues($filter_values),
113  $this->getLimit() ? (int) $this->getLimit() : null,
114  $this->getOffset()
115  );
116 
117  $count = $this->prg_user_table->countFetchData(
118  $prg_obj_id,
119  $valid_user_ids,
120  $this->custom_filter->withValues($filter_values)
121  );
122  $this->setMaxCount($count);
123 
124 
125  $progress_ids = array_map(
126  function ($row) {
127  return (string) $row->getId();
128  },
129  $members_list
130  );
131  $this->addHiddenInput(
132  $parent_obj::F_ALL_PROGRESS_IDS,
133  implode(',', $progress_ids)
134  );
135 
136  $this->setData($members_list);
137  }
setData(array $a_data)
setTopCommands(bool $a_val)
setFormAction(string $a_form_action, bool $a_multipart=false)
setEnableTitle(bool $a_enabletitle)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setId(string $a_val)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setExternalSorting(bool $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
addHiddenInput(string $a_name, string $a_value)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setEnableAllCommand(bool $a_value)
getStudyProgramme(?int $ref_id=null)
Get studyprogramm object for ref_id Use this ref_id if argument is null.
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
setExternalSegmentation(bool $a_val)
+ Here is the call graph for this function:

Member Function Documentation

◆ addMultiCommands()

ilStudyProgrammeMembersTableGUI::addMultiCommands ( )
protected

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

References ilTable2GUI\addMultiCommand(), and getMultiCommands().

Referenced by __construct().

329  : void
330  {
331  foreach ($this->getMultiCommands() as $cmd => $caption) {
332  $this->addMultiCommand($cmd, $caption);
333  }
334  }
addMultiCommand(string $a_cmd, string $a_text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildActionDropDown()

ilStudyProgrammeMembersTableGUI::buildActionDropDown ( array  $actions,
string  $prgrs_id,
int  $ass_id 
)
protected

Definition at line 264 of file class.ilStudyProgrammeMembersTableGUI.php.

References ilObjStudyProgrammeMembersGUI\ACTION_ACKNOWLEDGE_COURSES, ilObjStudyProgrammeMembersGUI\ACTION_CHANGE_DEADLINE, ilObjStudyProgrammeMembersGUI\ACTION_CHANGE_EXPIRE_DATE, ilObjStudyProgrammeMembersGUI\ACTION_MARK_ACCREDITED, ilObjStudyProgrammeMembersGUI\ACTION_MARK_RELEVANT, ilObjStudyProgrammeMembersGUI\ACTION_REMOVE_USER, ilObjStudyProgrammeMembersGUI\ACTION_SHOW_INDIVIDUAL_PLAN, ilObjStudyProgrammeMembersGUI\ACTION_UNMARK_ACCREDITED, ilObjStudyProgrammeMembersGUI\ACTION_UNMARK_RELEVANT, ilObjStudyProgrammeMembersGUI\ACTION_UPDATE_FROM_CURRENT_PLAN, getLinkTargetForAction(), ILIAS\Repository\lng(), ilOrgUnitOperation\OP_EDIT_INDIVIDUAL_PLAN, ilOrgUnitOperation\OP_MANAGE_MEMBERS, and ilOrgUnitOperation\OP_VIEW_INDIVIDUAL_PLAN.

Referenced by fillRow().

268  : string {
269  $l = [];
270 
271  $view_individual_plan = $this->permissions->may(ilOrgUnitOperation::OP_VIEW_INDIVIDUAL_PLAN);
272  $edit_individual_plan = $this->permissions->may(ilOrgUnitOperation::OP_EDIT_INDIVIDUAL_PLAN);
273  $addremove_users = $this->permissions->may(ilOrgUnitOperation::OP_MANAGE_MEMBERS);
274 
275  foreach ($actions as $action) {
276  switch ($action) {
285  if (!$edit_individual_plan) {
286  continue 2;
287  }
288  break;
290  if (!$view_individual_plan) {
291  continue 2;
292  }
293  break;
294 
296  if (!$addremove_users) {
297  continue 2;
298  }
299  break;
300  }
301 
302  $target = $this->getLinkTargetForAction($action, $prgrs_id, $ass_id);
303  $l[] = $this->ui_factory->button()->shy($this->lng->txt("prg_$action"), $target);
304  }
305  return $this->ui_renderer->render(
306  $this->ui_factory->dropdown()->standard($l)
307  );
308  }
getLinkTargetForAction(string $action, string $prgrs_id, int $ass_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilStudyProgrammeMembersTableGUI::fillRow (   $row)
protected

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

References ilTable2GUI\$column, $out, ilObject\_lookupType(), buildActionDropDown(), getCompletionLink(), getPossibleActions(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\lng(), and ilStudyProgrammeUserTable\lookupTitle().

154  : void
155  {
156  if (!$row instanceof ilStudyProgrammeUserTableRow) {
157  throw new \Exception("use ilStudyProgrammeUserTableRow for data output", 1);
158  }
159 
160  if ($this->may_edit_anything) {
161  $this->tpl->setCurrentBlock("checkb");
162  $this->tpl->setVariable("ID", (string) $row->getId());
163  $this->tpl->parseCurrentBlock();
164  }
165 
166  if (!$row->isUserActiveRaw()) {
167  $this->tpl->setCurrentBlock('access_warning');
168  $this->tpl->setVariable('PARENT_ACCESS', $this->lng->txt('usr_account_inactive'));
169  $this->tpl->parseCurrentBlock();
170  }
171 
172  $this->tpl->setVariable("FIRSTNAME", $row->getFirstname());
173  $this->tpl->setVariable("LASTNAME", $row->getLastname());
174  $this->tpl->setVariable("LOGIN", $row->getLogin());
175  $this->tpl->setVariable("STATUS", $row->getStatus());
176  $this->tpl->setVariable("ASSIGN_DATE", $row->getAssignmentDate());
177  $this->tpl->setVariable("POINTS_REQUIRED", $row->getPointsRequired());
178 
179  if (!$this->prg_has_lp_children) {
180  $this->tpl->setCurrentBlock("points_current");
181  $this->tpl->setVariable("POINTS_CURRENT", $row->getPointsCurrent());
182  $this->tpl->parseCurrentBlock();
183  }
184 
185  foreach ($this->getSelectedColumns() as $column) {
186  switch ($column) {
187  case "prg_orgus":
188  $this->tpl->setVariable("ORGUS", $row->getOrgUs());
189  break;
190  case "prg_completion_date":
191  $this->tpl->setVariable("COMPLETION_DATE", $row->getCompletionDate());
192  break;
193  case "prg_completion_by":
194  $completion_by = $row->getCompletionBy();
195  if ($completion_by_obj_ids = $row->getCompletionByObjIds()) {
196  $out = [];
197  foreach ($completion_by_obj_ids as $completion_by_obj_id) {
198  $type = ilObject::_lookupType($completion_by_obj_id);
199  if ($type === 'crs') {
200  $out[] = $this->getCompletionLink($completion_by_obj_id, $completion_by);
201  } else {
202  $target_obj_id = $completion_by_obj_id;
203  $out[] = $this->getCompletionLink(
204  $target_obj_id,
205  ilStudyProgrammeUserTable::lookupTitle($completion_by_obj_id)
206  );
207  }
208  }
209  $completion_by = implode(', ', $out);
210  }
211  $this->tpl->setVariable("COMPLETION_BY", $completion_by);
212  break;
213  case "prg_custom_plan":
214  $this->tpl->setVariable("CUSTOM_PLAN", $row->getCustomPlan());
215  break;
216  case "prg_belongs_to":
217  $this->tpl->setVariable("BELONGS_TO", $row->getBelongsTo());
218  break;
219  case "prg_expiry_date":
220  $this->tpl->setVariable("EXPIRY_DATE", $row->getExpiryDate());
221  break;
222  case "prg_assigned_by":
223  $this->tpl->setVariable("ASSIGNED_BY", $row->getAssignmentBy());
224  break;
225  case "prg_deadline":
226  $this->tpl->setVariable("DEADLINE", $row->getDeadline());
227  break;
228  case "prg_validity":
229  $this->tpl->setVariable("VALIDITY", $row->getValidity());
230  break;
231  case 'org_units':
232  $this->tpl->setCurrentBlock('udf');
233  $this->tpl->setVariable("UDF", $row->getOrgUs());
234  $this->tpl->parseCurrentBlock();
235  break;
236  case 'gender':
237  $this->tpl->setCurrentBlock('udf');
238  $this->tpl->setVariable("UDF", $row->getGender());
239  $this->tpl->parseCurrentBlock();
240  break;
241  default:
242  $value = $row->getUserInformation()->getUserData($column) ?? '';
243  $this->tpl->setCurrentBlock('udf');
244  $this->tpl->setVariable("UDF", $value);
245  $this->tpl->parseCurrentBlock();
246  }
247  }
248  $actions = $this->getPossibleActions(
249  $row->isRootProgress(),
250  $row->getStatusRaw(),
251  $row->getNodeLifecycleStatus()
252  );
253 
254  $this->tpl->setVariable(
255  "ACTIONS",
256  $this->buildActionDropDown(
257  $actions,
258  (string) $row->getId(),
259  $row->getAssignmentId()
260  )
261  );
262  }
ilStudyProgrammeUserTable provides a flattened list of progresses at a programme-node.
getPossibleActions(bool $is_root, int $status, int $node_lifecyle_status)
Get a list with possible actions on a progress record.
buildActionDropDown(array $actions, string $prgrs_id, int $ass_id)
$out
Definition: buildRTE.php:24
getCompletionLink(int $target_obj_id, string $title)
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ getCompletionLink()

ilStudyProgrammeMembersTableGUI::getCompletionLink ( int  $target_obj_id,
string  $title 
)
protected

Definition at line 465 of file class.ilStudyProgrammeMembersTableGUI.php.

References $ref_id, ilTableGUI\$title, $url, ilObject\_getAllReferences(), ilLink\_getStaticLink(), and ilObject\_isInTrash().

Referenced by fillRow().

465  : string
466  {
467  $link = $title;
468  $ref_ids = ilObject::_getAllReferences($target_obj_id);
469  foreach ($ref_ids as $ref_id) {
470  if (!ilObject::_isInTrash($ref_id)) {
471  $url = ilLink::_getStaticLink($ref_id, "crs");
472  $link = $this->ui_renderer->render($this->ui_factory->link()->standard($title, $url));
473  }
474  }
475  return $link;
476  }
static _getAllReferences(int $id)
get all reference ids for object ID
$url
Definition: shib_logout.php:66
$ref_id
Definition: ltiauth.php:65
static _isInTrash(int $ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFilterValues()

ilStudyProgrammeMembersTableGUI::getFilterValues ( )
protected

Get filter-values by field id.

Definition at line 393 of file class.ilStudyProgrammeMembersTableGUI.php.

References Vendor\Package\$f, ilTable2GUI\getCurrentState(), and ilTable2GUI\getFilterValue().

Referenced by __construct().

393  : array
394  {
395  $this->getCurrentState();
396  $f = [];
397  foreach ($this->filters as $item) {
398  $f[$item->getFieldId()] = $this->getFilterValue($item);
399  }
400  return $f;
401  }
getFilterValue(ilTableFilterItem $a_item)
Get current filter value.
getCurrentState()
get current settings for order, limit, columns and filter
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLinkTargetForAction()

ilStudyProgrammeMembersTableGUI::getLinkTargetForAction ( string  $action,
string  $prgrs_id,
int  $ass_id 
)
protected

Definition at line 311 of file class.ilStudyProgrammeMembersTableGUI.php.

References ilTable2GUI\getParentObject().

Referenced by buildActionDropDown().

311  : string
312  {
313  return $this->getParentObject()->getLinkTargetForAction($action, $prgrs_id, $ass_id);
314  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMultiCommands()

ilStudyProgrammeMembersTableGUI::getMultiCommands ( )
protected

Get possible multicommands.

Returns
string[]

Definition at line 341 of file class.ilStudyProgrammeMembersTableGUI.php.

References ILIAS\Repository\lng(), ilOrgUnitOperation\OP_EDIT_INDIVIDUAL_PLAN, and ilOrgUnitOperation\OP_MANAGE_MEMBERS.

Referenced by addMultiCommands().

341  : array
342  {
343  $permissions_for_edit_individual_plan = [
344  'updateFromCurrentPlanMulti' => $this->lng->txt('prg_multi_update_from_current_plan'),
345  'acknowledgeCoursesMulti' => $this->lng->txt('prg_acknowledge_completed_courses'),
346  'markRelevantMulti' => $this->lng->txt('prg_multi_mark_relevant'),
347  'markNotRelevantMulti' => $this->lng->txt('prg_multi_unmark_relevant'),
348  'changeDeadlineMulti' => $this->lng->txt('prg_multi_change_deadline'),
349  'changeExpireDateMulti' => $this->lng->txt('prg_multi_change_expire_date'),
350  'markAccreditedMulti' => $this->lng->txt('prg_multi_mark_accredited'),
351  'unmarkAccreditedMulti' => $this->lng->txt('prg_multi_unmark_accredited'),
352  ];
353  if ($this->prg->isCertificateActive()) {
354  $permissions_for_edit_individual_plan['updateCertificateMulti'] = $this->lng->txt('prg_multi_update_certificate');
355  $permissions_for_edit_individual_plan['removeCertificateMulti'] = $this->lng->txt('prg_multi_remove_certificate');
356  }
357 
358  $permissions_for_manage = [
359  'removeUserMulti' => $this->lng->txt('prg_multi_remove_user'),
360  'mailUserMulti' => $this->lng->txt('prg_multi_mail_user')
361  ];
362 
363  $perms = [];
364 
365  if ($this->permissions->may(ilOrgUnitOperation::OP_EDIT_INDIVIDUAL_PLAN)) {
366  $perms = array_merge($perms, $permissions_for_edit_individual_plan);
367  }
368 
369  if ($this->permissions->may(ilOrgUnitOperation::OP_MANAGE_MEMBERS)) {
370  $perms = array_merge($perms, $permissions_for_manage);
371  }
372 
373  return $perms;
374  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrdering()

ilStudyProgrammeMembersTableGUI::getOrdering ( )
protected

Definition at line 139 of file class.ilStudyProgrammeMembersTableGUI.php.

References ilTable2GUI\getDefaultOrderDirection(), ilTable2GUI\getDefaultOrderField(), ilTableGUI\getOrderDirection(), and ilTable2GUI\getOrderField().

Referenced by __construct().

139  : Data\Order
140  {
141  $field = $this->getOrderField();
142  if (!$field) {
143  $field = $this->getDefaultOrderField();
144  }
145  $direction = $this->getOrderDirection();
146  if (!$direction) {
147  $direction = $this->getDefaultOrderDirection();
148  }
149 
150  return $this->data_factory->order($field, strtoupper($direction));
151  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPossibleActions()

ilStudyProgrammeMembersTableGUI::getPossibleActions ( bool  $is_root,
int  $status,
int  $node_lifecyle_status 
)
protected

Get a list with possible actions on a progress record.

Returns
string[]

Definition at line 408 of file class.ilStudyProgrammeMembersTableGUI.php.

References ilObjStudyProgrammeMembersGUI\ACTION_ACKNOWLEDGE_COURSES, ilObjStudyProgrammeMembersGUI\ACTION_CHANGE_DEADLINE, ilObjStudyProgrammeMembersGUI\ACTION_CHANGE_EXPIRE_DATE, ilObjStudyProgrammeMembersGUI\ACTION_MARK_ACCREDITED, ilObjStudyProgrammeMembersGUI\ACTION_MARK_RELEVANT, ilObjStudyProgrammeMembersGUI\ACTION_REMOVE_CERTIFICATE, ilObjStudyProgrammeMembersGUI\ACTION_REMOVE_USER, ilObjStudyProgrammeMembersGUI\ACTION_SHOW_INDIVIDUAL_PLAN, ilObjStudyProgrammeMembersGUI\ACTION_UNMARK_ACCREDITED, ilObjStudyProgrammeMembersGUI\ACTION_UNMARK_RELEVANT, ilObjStudyProgrammeMembersGUI\ACTION_UPDATE_CERTIFICATE, ilObjStudyProgrammeMembersGUI\ACTION_UPDATE_FROM_CURRENT_PLAN, ilPRGProgress\STATUS_ACCREDITED, ilStudyProgrammeAssessmentSettings\STATUS_ACTIVE, ilPRGProgress\STATUS_COMPLETED, ilPRGProgress\STATUS_IN_PROGRESS, and ilPRGProgress\STATUS_NOT_RELEVANT.

Referenced by fillRow().

412  : array {
413  $actions = [];
414 
415  if ($is_root) {
422  }
423 
424  if ($status == ilPRGProgress::STATUS_ACCREDITED) {
426  }
427  if ($status == ilPRGProgress::STATUS_IN_PROGRESS) {
429  }
430 
431  if (! $is_root &&
432  ($status == ilPRGProgress::STATUS_IN_PROGRESS ||
434  ) {
436  }
438  && $node_lifecyle_status == ilStudyProgrammeAssessmentSettings::STATUS_ACTIVE
439  ) {
441  }
442  if ($status == ilPRGProgress::STATUS_COMPLETED ||
444  && $this->prg->isCertificateActive()
445  ) {
448  }
449 
450 
451  return $actions;
452  }
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilStudyProgrammeMembersTableGUI::getSelectableColumns ( )

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

References ilTable2GUI\$column.

316  : array
317  {
318  $cols = [];
319  foreach ($this->prg_user_table->getColumns($this->prg_obj_id) as $column) {
320  [$col, $lng_var, $optional, $lp, $no_lp] = $column;
321  if ($optional) {
322  $cols[$col] = ["txt" => $lng_var];
323  }
324  }
325 
326  return $cols;
327  }

◆ getValidUserIds()

ilStudyProgrammeMembersTableGUI::getValidUserIds ( )
protected

Definition at line 454 of file class.ilStudyProgrammeMembersTableGUI.php.

References null, ilOrgUnitOperation\OP_VIEW_MEMBERS, and ILIAS\Repository\user().

Referenced by __construct().

454  : ?array
455  {
456  if ($this->permissions->may($this->permissions::ROLEPERM_MANAGE_MEMBERS)) {
457  return null;
458  }
459 
460  $valid_user_ids = $this->permissions->getUserIdsSusceptibleTo(ilOrgUnitOperation::OP_VIEW_MEMBERS);
461  array_unshift($valid_user_ids, $this->user->getId());
462  return $valid_user_ids;
463  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFilter()

ilStudyProgrammeMembersTableGUI::initFilter ( )

Definition at line 379 of file class.ilStudyProgrammeMembersTableGUI.php.

References ilTable2GUI\$id, and ilTable2GUI\addFilterItemByMetaType().

Referenced by __construct().

379  : void
380  {
381  foreach ($this->custom_filter->getItemConfig() as $conf) {
382  [$id, $type, $options, $caption] = $conf;
383  $item = $this->addFilterItemByMetaType($id, $type, false, $caption);
384  if ($options) {
385  $item->setOptions($options);
386  }
387  }
388  }
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $custom_filter

ilPRGAssignmentFilter ilStudyProgrammeMembersTableGUI::$custom_filter
protected

Definition at line 33 of file class.ilStudyProgrammeMembersTableGUI.php.

Referenced by __construct().

◆ $data_factory

Data Factory ilStudyProgrammeMembersTableGUI::$data_factory
protected

Definition at line 25 of file class.ilStudyProgrammeMembersTableGUI.php.

Referenced by __construct().

◆ $may_edit_anything

bool ilStudyProgrammeMembersTableGUI::$may_edit_anything
protected

Definition at line 30 of file class.ilStudyProgrammeMembersTableGUI.php.

◆ $permissions

ilPRGPermissionsHelper ilStudyProgrammeMembersTableGUI::$permissions
protected

Definition at line 29 of file class.ilStudyProgrammeMembersTableGUI.php.

Referenced by __construct().

◆ $prg

ilObjStudyProgramme ilStudyProgrammeMembersTableGUI::$prg
protected

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

◆ $prg_has_lp_children

bool ilStudyProgrammeMembersTableGUI::$prg_has_lp_children
protected

Definition at line 27 of file class.ilStudyProgrammeMembersTableGUI.php.

◆ $prg_obj_id

int ilStudyProgrammeMembersTableGUI::$prg_obj_id
protected

Definition at line 26 of file class.ilStudyProgrammeMembersTableGUI.php.

Referenced by __construct().

◆ $prg_user_table

ilStudyProgrammeUserTable ilStudyProgrammeMembersTableGUI::$prg_user_table
protected

Definition at line 31 of file class.ilStudyProgrammeMembersTableGUI.php.

Referenced by __construct().

◆ $ui_factory

ILIAS UI Factory ilStudyProgrammeMembersTableGUI::$ui_factory
protected

Definition at line 34 of file class.ilStudyProgrammeMembersTableGUI.php.

Referenced by __construct().

◆ $ui_renderer

ILIAS UI Renderer ilStudyProgrammeMembersTableGUI::$ui_renderer
protected

Definition at line 35 of file class.ilStudyProgrammeMembersTableGUI.php.

Referenced by __construct().

◆ $user

ilObjUser ilStudyProgrammeMembersTableGUI::$user
protected

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

Referenced by __construct().


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