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

Class ilObjStudyProgrammeMembersTableGUI. More...

+ Inheritance diagram for ilStudyProgrammeMembersTableGUI:
+ Collaboration diagram for ilStudyProgrammeMembersTableGUI:

Public Member Functions

 __construct (int $prg_obj_id, int $prg_ref_id, ilObjStudyProgrammeMembersGUI $parent_obj, string $parent_cmd='', string $template_context='', ilStudyProgrammeUserProgressDB $sp_user_progress_db, ilStudyProgrammePositionBasedAccess $position_based_access)
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 initFilter ()
 
- Public Member Functions inherited from ilTable2GUI
 __construct ($a_parent_obj, $a_parent_cmd="", $a_template_context="")
 ilTable2GUI constructor. More...
 
 setOpenFormTag ($a_val)
 Set open form tag. More...
 
 getOpenFormTag ()
 Get open form tag. More...
 
 setCloseFormTag ($a_val)
 Set close form tag. More...
 
 getCloseFormTag ()
 Get close form tag. More...
 
 determineLimit ()
 Determine the limit. More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 Determine selected columns. More...
 
 isColumnSelected ($a_col)
 Is given column selected? More...
 
 getSelectedColumns ()
 Get selected columns. More...
 
 executeCommand ()
 Execute command. More...
 
 resetOffset ($a_in_determination=false)
 Reset offset. More...
 
 initFilter ()
 Init filter. More...
 
 getParentObject ()
 Get parent object. More...
 
 getParentCmd ()
 Get parent command. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setNoEntriesText ($a_text)
 Set text for an empty table. More...
 
 getNoEntriesText ()
 Get text for an empty table. More...
 
 setIsDataTable ($a_val)
 Set is data table. More...
 
 getIsDataTable ()
 Get is data table. More...
 
 setEnableTitle ($a_enabletitle)
 Set Enable Title. More...
 
 getEnableTitle ()
 Get Enable Title. More...
 
 setEnableHeader ($a_enableheader)
 Set Enable Header. More...
 
 getEnableHeader ()
 Get Enable Header. More...
 
 setEnableNumInfo ($a_val)
 Set enable num info. More...
 
 getEnableNumInfo ()
 Get enable num info. More...
 
 setTitle ($a_title, $a_icon=0, $a_icon_alt=0)
 Set title and title icon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setOrderField ($a_order_field)
 set order column More...
 
 getOrderField ()
 
 setData ($a_data)
 
 getData ()
 
 dataExists ()
 
 setPrefix ($a_prefix)
 
 getPrefix ()
 
 addFilterItem ($a_input_item, $a_optional=false)
 Add filter item. More...
 
 addFilterItemByMetaType ($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
 Add filter by standard type. More...
 
 getFilterItems ($a_optionals=false)
 Get filter items. More...
 
 getFilterItemByPostVar ($a_post_var)
 
 setFilterCols ($a_val)
 Set filter columns. More...
 
 getFilterCols ()
 Get filter columns. More...
 
 setDisableFilterHiding ($a_val=true)
 Set disable filter hiding. More...
 
 getDisableFilterHiding ()
 Get disable filter hiding. More...
 
 isFilterSelected ($a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 Get selected filters. More...
 
 determineSelectedFilters ()
 Determine selected filters. More...
 
 setCustomPreviousNext ($a_prev_link, $a_next_link)
 Set custom previous/next links. More...
 
 setFormAction ($a_form_action, $a_multipart=false)
 Set Form action parameter. More...
 
 getFormAction ()
 Get Form action parameter. More...
 
 setFormName ($a_formname="")
 Set Form name. More...
 
 getFormName ()
 Get Form name. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get element id. More...
 
 setDisplayAsBlock ($a_val)
 Set display as block. More...
 
 getDisplayAsBlock ()
 Get display as block. More...
 
 getSelectAllCheckbox ()
 Get the name of the checkbox that should be toggled with a select all button. More...
 
 setSelectAllCheckbox ($a_select_all_checkbox, $a_select_all_on_top=false)
 Set the name of the checkbox that should be toggled with a select all button. More...
 
 setExternalSorting ($a_val)
 Set external sorting. More...
 
 getExternalSorting ()
 Get external sorting. More...
 
 setFilterCommand ($a_val, $a_caption=null)
 Set filter command. More...
 
 getFilterCommand ()
 Get filter command. More...
 
 setResetCommand ($a_val, $a_caption=null)
 Set reset filter command. More...
 
 getResetCommand ()
 Get reset filter command. More...
 
 setExternalSegmentation ($a_val)
 Set external segmentation. More...
 
 getExternalSegmentation ()
 Get external segmentation. More...
 
 setRowTemplate ($a_template, $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField ($a_defaultorderfield)
 Set Default order field. More...
 
 getDefaultOrderField ()
 Get Default order field. More...
 
 setDefaultOrderDirection ($a_defaultorderdirection)
 Set Default order direction. More...
 
 getDefaultOrderDirection ()
 Get Default order direction. More...
 
 setDefaultFilterVisiblity ($a_status)
 Set default filter visiblity. More...
 
 getDefaultFilterVisibility ()
 Get default filter visibility. More...
 
 clearCommandButtons ()
 
 addCommandButton ($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
 Add Command button. More...
 
 addCommandButtonInstance (ilButtonBase $a_button)
 Add Command button instance. More...
 
 addSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection='')
 Add Selection List + Command button. More...
 
 addMultiItemSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection='')
 Add Selection List + Command button for selected items. More...
 
 setCloseCommand ($a_link)
 Add command for closing table. More...
 
 addMultiCommand ($a_cmd, $a_text)
 Add Command button. More...
 
 addHiddenInput ($a_name, $a_value)
 Add Hidden Input field. More...
 
 addHeaderCommand ($a_href, $a_text, $a_target="", $a_img="")
 Add Header Command (Link) (Image needed for now) More...
 
 setTopCommands ($a_val)
 Set top commands (display command buttons on top of table, too) More...
 
 getTopCommands ()
 Get top commands (display command buttons on top of table, too) More...
 
 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. More...
 
 getNavParameter ()
 
 setOrderLink ($sort_field, $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder ($a_omit_offset=false)
 Determine offset and order. More...
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering ($a_field)
 Should this field be sorted numeric? More...
 
 render ()
 render table public More...
 
 writeFilterToSession ()
 Write filter values to session. More...
 
 resetFilter ()
 Reset filter. More...
 
 fillFooter ()
 Fill footer row. More...
 
 getLinkbar ($a_num)
 Get previous/next linkbar. More...
 
 fillHiddenRow ()
 
 fillActionRow ()
 Fill Action Row. More...
 
 setHeaderHTML ($html)
 set header html More...
 
 storeProperty ($type, $value)
 Store table property. More...
 
 loadProperty ($type)
 Load table property. More...
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext ($id)
 Set context. More...
 
 getContext ()
 Get context. More...
 
 setShowRowsSelector ($a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 Get rows-per-page selector state. More...
 
 setShowTemplates ($a_value)
 Toggle templates. More...
 
 getShowTemplates ()
 Get template state. More...
 
 restoreTemplate ($a_name)
 Restore state from template. More...
 
 saveTemplate ($a_name)
 Save current state as template. More...
 
 deleteTemplate ($a_name)
 Delete template. More...
 
 getLimit ()
 Get limit. More...
 
 getOffset ()
 Get offset. More...
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode ($a_value=false)
 Toogle print mode. More...
 
 getPrintMode ()
 Get print mode. More...
 
 getExportMode ()
 Was export activated? More...
 
 exportData ($format, $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand ($a_value)
 Enable actions for all entries in current result. More...
 
 setRowSelectorLabel ($row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 setLimit ($a_limit=0, $a_default_limit=0)
 
- Public Member Functions inherited from ilTableGUI
 __construct ($a_data=0, $a_global_tpl=true)
 Constructor. More...
 
 setTemplate ($a_tpl)
 set template public More...
 
getTemplateObject ()
 
 setData ($a_data)
 set table data public More...
 
 getData ()
 
 setTitle ($a_title, $a_icon=0, $a_icon_alt=0)
 set table title public More...
 
 setHelp ($a_help_page, $a_help_icon, $a_help_icon_alt=0)
 set table help page public More...
 
 setHeaderNames ($a_header_names)
 set table header names public More...
 
 getColumnCount ()
 Returns the column count based on the number of the header row columns public. More...
 
 setHeaderVars ($a_header_vars, $a_header_params=0)
 set table header vars public More...
 
 setColumnWidth ($a_column_width)
 set table column widths public More...
 
 setOneColumnWidth ($a_column_width, $a_column_number)
 set one table column width public More...
 
 setMaxCount ($a_max_count)
 set max. More...
 
 setLimit ($a_limit=0, $a_default_limit=0)
 set max. More...
 
 getLimit ()
 Get limit. More...
 
 setPrefix ($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) public More...
 
 setOffset ($a_offset)
 set dataset offset public More...
 
 getOffset ()
 Get offset. More...
 
 setOrderColumn ($a_order_column=0, $a_default_column=0)
 set order column public More...
 
 getOrderColumn ()
 Get order column. More...
 
 setOrderDirection ($a_order_direction)
 set order direction public More...
 
 getOrderDirection ()
 Get order direction. More...
 
 setFooter ($a_style, $a_previous=0, $a_next=0)
 set order direction public More...
 
 enable ($a_module_name)
 enables particular modules of table More...
 
 disable ($a_module_name)
 diesables particular modules of table More...
 
 sortData ()
 
 render ()
 render table public More...
 
 renderHeader ()
 
 setOrderLink ($key, $order_dir)
 
 setStyle ($a_element, $a_style)
 
 getStyle ($a_element)
 
 setBase ($a_base)
 Set Base script name (deprecated, only use this for workarounds). More...
 
 getBase ()
 Get Base script name (deprecated, only use this for workarounds). More...
 
 getFormName ()
 
 setFormName ($a_name="cmd")
 
 getSelectAllCheckbox ()
 
 setSelectAllCheckbox ($a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton ($btn_name, $btn_value)
 

Data Fields

const COLUMNS
 
const OPTION_ALL = -1
 
const VALIDITY_OPTION_VALID = 1
 
const VALIDITY_OPTION_RENEWAL_REQUIRED = 3
 
- 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
 $title
 
 $icon
 
 $icon_alt
 
 $help_page
 
 $help_icon
 
 $help_icon_alt
 
 $header_names
 
 $header_vars
 
 $linkbar_vars
 
 $data
 
 $column_count
 
 $column_width
 
 $max_count
 
 $limit
 
 $max_limit = false
 
 $offset
 
 $order_column
 
 $order_direction
 
 $footer_style
 
 $footer_previous
 
 $footer_next
 
 $lang_support = true
 
 $global_tpl
 
 $form_name
 
 $select_all_checkbox
 
 $action_buttons
 
 $prefix
 
 $base = ""
 
 $enabled
 
 $styles
 

Protected Member Functions

 fillRow ($a_set)
 
 getValueOrEmptyString (string $condition, string $value)
 
 buildActionDropDown (array $actions, int $prgrs_id, int $ass_id, int $usr_id)
 Builds the action menu for each row of the table. More...
 
 getLinkTargetForAction (string $action, int $prgrs_id, int $ass_id)
 Get ilias link for action. More...
 
 fetchData (int $prg_id, int $limit=null, int $offset=null, string $order_column=null, string $order_direction=null, array $filter=[])
 Get data for table. More...
 
 countFetchData (int $prg_id, array $filter=[])
 Get maximum number of rows the table could have. More...
 
 getFrom ()
 
 getWhere (int $prg_id)
 Get the sql part WHERE. More...
 
 addMultiCommands ()
 Add multicommands to table. More...
 
 getMultiCommands ()
 Get possible multicommnds. More...
 
 getValidityOptions ()
 Get options of filter "validity". More...
 
 getStatusOptions ()
 Get options of filter "status". More...
 
 getFilterValues ()
 Get filter-values by field id. More...
 
 getFilterWhere (array $filter)
 Get the additional sql WHERE-part for filters. More...
 
 isPermissionControlledByOrguPosition ()
 
 getOrguValidUsersFilter ()
 
- Protected Member Functions inherited from ilTable2GUI
 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, $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow ($a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilFormPropertyGUI $a_item)
 Get current filter value. More...
 
 SetFilterValue (ilFormPropertyGUI $a_item, $a_value)
 Set current filter value. More...
 
 fillMetaExcel (ilExcel $a_excel, &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, &$a_row, $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV ($a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV ($a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV ($a_csv, $a_set)
 CSV Version of Fill Row. More...
 

Protected Attributes

 $prg_obj_id
 
 $prg_ref_id
 
 $prg_has_lp_children
 
 $db
 
 $ui_factory
 
 $ui_renderer
 
 $sp_user_progress_db
 
 $prg
 
- Protected Attributes inherited from ilTable2GUI
 $ctrl
 
 $tpl
 
 $parent_obj
 
 $parent_cmd
 
 $close_command = ""
 
 $top_anchor = "il_table_top"
 
 $filters = array()
 
 $optional_filters = array()
 
 $filter_cmd = 'applyFilter'
 
 $reset_cmd = 'resetFilter'
 
 $filter_cols = 5
 
 $ext_sort = false
 
 $ext_seg = false
 
 $context = ""
 
 $mi_sel_buttons = []
 
 $disable_filter_hiding = false
 
 $selected_filter = false
 
 $top_commands = true
 
 $selectable_columns = array()
 
 $selected_column = array()
 
 $show_templates = false
 
 $show_rows_selector = true
 
 $rows_selector_off = false
 
 $nav_determined = false
 
 $limit_determined = false
 
 $filters_determined = false
 
 $columns_determined = false
 
 $open_form_tag = true
 
 $close_form_tag = true
 
 $export_formats = []
 
 $export_mode
 
 $print_mode
 
 $enable_command_for_all
 
 $restore_filter
 
 $restore_filter_values
 
 $default_filter_visibility = false
 
 $sortable_fields = array()
 
 $prevent_double_submission = true
 
 $row_selector_label
 
 $select_all_on_top = false
 
 $sel_buttons = []
 
- Protected Attributes inherited from ilTableGUI
 $tpl
 
 $lng
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 Get maximum number of entries to enable actions for all. More...
 

Detailed Description

Class ilObjStudyProgrammeMembersTableGUI.

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

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeMembersTableGUI::__construct ( int  $prg_obj_id,
int  $prg_ref_id,
ilObjStudyProgrammeMembersGUI  $parent_obj,
string  $parent_cmd = '',
string  $template_context = '',
ilStudyProgrammeUserProgressDB  $sp_user_progress_db,
ilStudyProgrammePositionBasedAccess  $position_based_access 
)

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

References $DIC, ilTable2GUI\$parent_cmd, $prg_obj_id, $prg_ref_id, $sp_user_progress_db, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), addMultiCommands(), countFetchData(), ilTable2GUI\determineLimit(), ilTable2GUI\determineOffsetAndOrder(), fetchData(), getFilterValues(), ilObjStudyProgramme\getInstanceByRefId(), ilTable2GUI\getLimit(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilTable2GUI\getSelectedColumns(), ilObjStudyProgrammeMembersGUI\getStudyProgramme(), initFilter(), ilTable2GUI\setData(), ilTable2GUI\setEnableAllCommand(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setEnableTitle(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFormAction(), ilTable2GUI\setId(), ilTableGUI\setMaxCount(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), ilTable2GUI\setShowRowsSelector(), and ilTable2GUI\setTopCommands().

83  {
84  $this->setId("sp_member_list");
85  parent::__construct($parent_obj, $parent_cmd, $template_context);
86 
87  $this->prg_obj_id = $prg_obj_id;
88  $this->prg_ref_id = $prg_ref_id;
89  $this->position_based_access = $position_based_access;
90 
92  $this->prg_has_lp_children = $parent_obj->getStudyProgramme()->hasLPChildren();
93 
94  global $DIC;
95  $this->db = $DIC['ilDB'];
96  $this->ui_factory = $DIC['ui.factory'];
97  $this->ui_renderer = $DIC['ui.renderer'];
98 
99  $this->setEnableTitle(true);
100  $this->setTopCommands(false);
101  $this->setEnableHeader(true);
102  // TODO: switch this to internal sorting/segmentation
103  $this->setExternalSorting(false);
104  $this->setExternalSegmentation(true);
105  $this->setRowTemplate("tpl.members_table_row.html", "Modules/StudyProgramme");
106  $this->setShowRowsSelector(false);
107  $this->setFormAction($this->ctrl->getFormAction($parent_obj, "view"));
108  $this->addColumn("", "", "1", true);
109  $this->setSelectAllCheckbox("prgs_ids[]");
110  $this->setEnableAllCommand(true);
111  $this->addMultiCommands();
112 
113  $selected = $this->getSelectedColumns();
114  foreach (self::COLUMNS as $column) {
115  list($col, $lng_var, $optional, $lp, $no_lp) = $column;
116 
117  $show_by_lp = ($this->prg_has_lp_children && $lp) || (!$this->prg_has_lp_children && $no_lp);
118  $show_optional = !$optional || ($optional && array_key_exists($col, $selected));
119 
120  if ($show_by_lp && $show_optional) {
121  $this->addColumn($this->lng->txt($lng_var), $col);
122  }
123  }
124 
125  $this->sp_user_progress_db = $sp_user_progress_db;
126 
127  $this->initFilter();
128  $filter_values = $this->getFilterValues();
129 
130  $this->determineOffsetAndOrder();
131  $this->determineLimit();
132 
133  $members_list = $this->fetchData(
134  $prg_obj_id,
135  $this->getLimit(),
136  $this->getOffset(),
137  $this->getOrderField(),
138  $this->getOrderDirection(),
139  $filter_values
140  );
141 
142  $this->setMaxCount($this->countFetchData($prg_obj_id, $filter_values));
143  $this->setData($members_list);
144  }
getStudyProgramme(int $ref_id=null)
Get studyprogramm object for ref_id Use this ref_id if argument is null.
setExternalSorting($a_val)
Set external sorting.
setExternalSegmentation($a_val)
Set external segmentation.
determineLimit()
Determine the limit.
getOrderDirection()
Get order direction.
setId($a_val)
Set id.
static getInstanceByRefId($a_ref_id)
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
getOffset()
Get offset.
getSelectedColumns()
Get selected columns.
setEnableAllCommand($a_value)
Enable actions for all entries in current result.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
countFetchData(int $prg_id, array $filter=[])
Get maximum number of rows the table could have.
__construct(Container $dic, ilPlugin $plugin)
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.
$DIC
Definition: xapitoken.php:46
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setEnableHeader($a_enableheader)
Set Enable Header.
getLimit()
Get limit.
setMaxCount($a_max_count)
set max.
setEnableTitle($a_enabletitle)
Set Enable Title.
fetchData(int $prg_id, int $limit=null, int $offset=null, string $order_column=null, string $order_direction=null, array $filter=[])
Get data for table.
+ Here is the call graph for this function:

Member Function Documentation

◆ addMultiCommands()

ilStudyProgrammeMembersTableGUI::addMultiCommands ( )
protected

Add multicommands to table.

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

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

Referenced by __construct().

552  : void
553  {
554  foreach ($this->getMultiCommands() as $cmd => $caption) {
555  $this->addMultiCommand($cmd, $caption);
556  }
557  }
addMultiCommand($a_cmd, $a_text)
Add Command button.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildActionDropDown()

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

Builds the action menu for each row of the table.

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

References ilStudyProgrammeUserProgress\ACTION_MARK_ACCREDITED, ilStudyProgrammeUserProgress\ACTION_REMOVE_USER, ilStudyProgrammeUserProgress\ACTION_SHOW_INDIVIDUAL_PLAN, ilStudyProgrammeUserProgress\ACTION_UNMARK_ACCREDITED, getLinkTargetForAction(), ilTable2GUI\getParentObject(), isPermissionControlledByOrguPosition(), ilOrgUnitOperation\OP_MANAGE_MEMBERS, and ilOrgUnitOperation\OP_VIEW_INDIVIDUAL_PLAN.

Referenced by fillRow().

290  : string {
291  $l = new ilAdvancedSelectionListGUI();
292 
293  $access_by_position = $this->isPermissionControlledByOrguPosition();
294  $parent = $this->getParentObject();
295 
296  $view_individual_plan = $parent->isOperationAllowedForUser(
297  $usr_id,
299  );
300 
301  $edit_individual_plan = $parent->isOperationAllowedForUser(
302  $usr_id,
304  );
305 
306 
307  foreach ($actions as $action) {
308  switch ($action) {
311  if (!$edit_individual_plan) {
312  continue 2;
313  }
314  break;
316  if (!$view_individual_plan) {
317  continue 2;
318  }
319  break;
321  $manage_members =
322  $parent->isOperationAllowedForUser($usr_id, ilOrgUnitOperation::OP_MANAGE_MEMBERS)
323  && in_array($usr_id, $this->getParentObject()->getLocalMembers());
324 
325  if (!$manage_members) {
326  continue 2;
327  }
328  break;
329  }
330  $target = $this->getLinkTargetForAction($action, $prgrs_id, $ass_id);
331  $l->addItem($this->lng->txt("prg_$action"), $action, $target);
332  }
333 
334  return $l->getHTML();
335  }
getParentObject()
Get parent object.
getLinkTargetForAction(string $action, int $prgrs_id, int $ass_id)
Get ilias link for action.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ countFetchData()

ilStudyProgrammeMembersTableGUI::countFetchData ( int  $prg_id,
array  $filter = [] 
)
protected

Get maximum number of rows the table could have.

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

References $query, $res, getFilterWhere(), getFrom(), and getWhere().

Referenced by __construct().

485  : int
486  {
487  // TODO: Reimplement this in terms of ActiveRecord when innerjoin
488  // supports the required rename functionality
489  $query = "SELECT count(prgrs.id) as cnt" . PHP_EOL;
490  $query .= $this->getFrom();
491  $query .= $this->getWhere($prg_id);
492  $query .= $this->getFilterWhere($filter);
493 
494  $res = $this->db->query($query);
495  $rec = $this->db->fetchAssoc($res);
496 
497  return $rec["cnt"];
498  }
getWhere(int $prg_id)
Get the sql part WHERE.
foreach($_POST as $key=> $value) $res
getFilterWhere(array $filter)
Get the additional sql WHERE-part for filters.
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fetchData()

ilStudyProgrammeMembersTableGUI::fetchData ( int  $prg_id,
int  $limit = null,
int  $offset = null,
string  $order_column = null,
string  $order_direction = null,
array  $filter = [] 
)
protected

Get data for table.

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

References ilTableGUI\$limit, ilTableGUI\$offset, $res, ilTableGUI\$title, $url, ilObject\_exists(), ilLink\_getStaticLink(), ilObject\_lookupDeletedDate(), ilContainerReference\_lookupTargetRefId(), ilContainerReference\_lookupTitle(), ilObjectDataDeletionLog\get(), getFilterWhere(), getFrom(), getOrguValidUsersFilter(), ilStudyProgrammeUserProgress\getPossibleActions(), getWhere(), ilObjUser\lookupOrgUnitsRepresentation(), ilStudyProgrammeProgress\STATUS_ACCREDITED, and ilStudyProgrammeProgress\STATUS_COMPLETED.

Referenced by __construct().

355  : array {
356  // TODO: Reimplement this in terms of ActiveRecord when innerjoin
357  // supports the required rename functionality
358 
359  $accredited = $this->db->quote(ilStudyProgrammeProgress::STATUS_ACCREDITED, 'integer');
360 
361  $sql =
362  "SELECT" . PHP_EOL
363  . "prgrs.id AS prgrs_id," . PHP_EOL
364  . "pcp.firstname," . PHP_EOL
365  . "pcp.lastname," . PHP_EOL
366  . "pcp.login," . PHP_EOL
367  . "pcp.usr_id," . PHP_EOL
368  . "prgrs.usr_id," . PHP_EOL
369  . "prgrs.points," . PHP_EOL
370  . "prgrs.points_cur * ABS(prgrs.status - $accredited) /" . PHP_EOL
371  . " (GREATEST(ABS(prgrs.status - $accredited),1))" . PHP_EOL
372  . "+ prgrs.points * (1 - ABS(prgrs.status - $accredited) /" . PHP_EOL
373  . " (GREATEST(ABS(prgrs.status - $accredited),1))) AS points_current," . PHP_EOL
374  . "prgrs.last_change_by," . PHP_EOL
375  . "prgrs.status," . PHP_EOL
376  . "blngs.title AS belongs_to," . PHP_EOL
377  . "cmpl_usr.login AS accredited_by," . PHP_EOL
378  . "cmpl_obj.title AS completion_by," . PHP_EOL
379  . "cmpl_obj.type AS completion_by_type," . PHP_EOL
380  . "prgrs.completion_by AS completion_by_id," . PHP_EOL
381  . "prgrs.assignment_id AS assignment_id," . PHP_EOL
382  . "prgrs.completion_date," . PHP_EOL
383  . "prgrs.vq_date," . PHP_EOL
384  . "prgrs.deadline AS prg_deadline," . PHP_EOL
385  . "ass.root_prg_id AS root_prg_id," . PHP_EOL
386  . "ass.last_change AS prg_assign_date," . PHP_EOL
387  . "ass.last_change_by AS prg_assingment_origin," . PHP_EOL
388  . "ass_usr.login AS prg_assigned_by," . PHP_EOL
389  . "CONCAT(pcp.firstname, pcp.lastname) AS name," . PHP_EOL
390  . "(prgrs.last_change_by IS NOT NULL) AS custom_plan" . PHP_EOL
391  ;
392 
393  $sql .= $this->getFrom();
394  $sql .= $this->getWhere($prg_id);
395  $sql .= $this->getFilterWhere($filter);
396  $sql .= $this->getOrguValidUsersFilter();
397 
398  if ($limit !== null) {
399  $this->db->setLimit($limit, $offset !== null ? $offset : 0);
400  }
401 
402  $res = $this->db->query($sql);
403  $now = (new DateTime())->format('Y-m-d H:i:s');
404  $members_list = array();
405 
406 
407  while ($rec = $this->db->fetchAssoc($res)) {
409  $prg_id,
410  $rec["root_prg_id"],
411  $rec["status"]
412  );
413 
414  $rec['points_current'] = number_format($rec['points_current']);
415  if ($rec["status"] == ilStudyProgrammeProgress::STATUS_COMPLETED) {
416  //If the status completed is set by crs reference
417  //use crs title
418  if ($rec["completion_by_type"] == "crsr") {
419  $completion_id = $rec["completion_by_id"];
420  $title = ilContainerReference::_lookupTitle($completion_id);
421  $ref_id = ilContainerReference::_lookupTargetRefId($completion_id);
422  if (
423  ilObject::_exists($ref_id, true) &&
424  is_null(ilObject::_lookupDeletedDate($ref_id))
425  ) {
426  $url = ilLink::_getStaticLink($ref_id, "crs");
427  $link = $this->ui_factory->link()->standard($title, $url);
428  $rec["completion_by"] = $this->ui_renderer->render($link);
429  } else {
430  $rec["completion_by"] = $title;
431  }
432  }
433 
434  // If the status completed and there is a non-null completion_by field
435  // in the set, this means the completion was achieved by some leaf in
436  // the program tree.
437  if (!$rec["completion_by"]) {
438  $prgrs = $this->sp_user_progress_db->getInstanceForAssignment(
439  $this->prg_obj_id,
440  $rec["assignment_id"]
441  );
442 
443  $rec["completion_by"] = implode(
444  ", ",
445  $prgrs->getNamesOfCompletedOrAccreditedChildren()
446  );
447  }
448  // This case should only occur if the status completed is set
449  // by an already deleted crs.
450  if (!$rec["completion_by"]) {
451  $title = ilObjectDataDeletionLog::get($rec["completion_by_id"]);
452  if (!is_null($title["title"])) {
453  $rec["completion_by"] = $title["title"];
454  }
455  }
456  } elseif ($rec["status"] == ilStudyProgrammeProgress::STATUS_ACCREDITED) {
457  $rec["completion_by"] = $rec["accredited_by"];
458  }
459 
460  if (!$rec['completion_date']) {
461  $rec['completion_date'] = '';
462  }
463 
464  if ($rec['vq_date']) {
465  $rec['prg_validity'] = $this->lng->txt('prg_not_valid');
466  if ($rec["vq_date"] > $now) {
467  $rec['prg_validity'] = $this->lng->txt('prg_still_valid');
468  }
469  } else {
470  $rec['prg_validity'] = '';
471  $rec['vq_date'] = '';
472  }
473 
474  $usr_id = (int) $rec['usr_id'];
475  $rec["orgus"] = ilObjUser::lookupOrgUnitsRepresentation($usr_id);
476  $members_list[] = $rec;
477  }
478 
479  return $members_list;
480  }
static _lookupDeletedDate($a_ref_id)
only called in ilObjectGUI::insertSavedNodes
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
getWhere(int $prg_id)
Get the sql part WHERE.
static lookupOrgUnitsRepresentation($a_usr_id)
lokup org unit representation
foreach($_POST as $key=> $value) $res
static _lookupTitle($a_obj_id)
Overwitten from base class.
getFilterWhere(array $filter)
Get the additional sql WHERE-part for filters.
static getPossibleActions(int $node_id, int $root_prg_id, int $status)
Get a list with possible actions on a progress record.
$url
static _lookupTargetRefId($a_obj_id)
Lookup target ref_id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilStudyProgrammeMembersTableGUI::fillRow (   $a_set)
protected

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

References buildActionDropDown(), ilTable2GUI\getParentObject(), ilTable2GUI\getSelectedColumns(), getValueOrEmptyString(), and ilStudyProgrammeAutoMembershipSource\SOURCE_MAPPING.

147  : void
148  {
149  $usr_id = (int) $a_set['usr_id'];
150 
151  $may_read_learning_progress =
152  !$this->prg->getAccessControlByOrguPositionsGlobal() ||
153  in_array($usr_id, $this->getParentObject()->readLearningProgress())
154  ;
155 
156  $this->tpl->setCurrentBlock("checkb");
157  $this->tpl->setVariable("ID", $a_set["prgrs_id"]);
158  $this->tpl->parseCurrentBlock();
159  $this->tpl->setVariable("FIRSTNAME", $a_set["firstname"]);
160  $this->tpl->setVariable("LASTNAME", $a_set["lastname"]);
161  $this->tpl->setVariable("LOGIN", $a_set["login"]);
162  $this->tpl->setVariable(
163  "STATUS",
164  $this->getValueOrEmptyString(
165  $may_read_learning_progress,
166  $this->sp_user_progress_db->statusToRepr($a_set["status"])
167  )
168  );
169  $this->tpl->setVariable("POINTS_REQUIRED", $a_set["points"]);
170  $this->tpl->setVariable("ASSIGN_DATE", $a_set["prg_assign_date"]);
171 
172  if (!$this->prg_has_lp_children) {
173  $this->tpl->setCurrentBlock("points_current");
174  $this->tpl->setVariable(
175  "POINTS_CURRENT",
176  $this->getValueOrEmptyString($may_read_learning_progress, $a_set['points_current'])
177  );
178  $this->tpl->parseCurrentBlock();
179  }
180 
181  foreach ($this->getSelectedColumns() as $column) {
182  switch ($column) {
183  case "prg_orgus":
184  $this->tpl->setVariable("ORGUS", $a_set["orgus"]);
185  break;
186  case "prg_completion_date":
187  $completion_date = '';
188  if ($may_read_learning_progress) {
189  $completion_date = $a_set["completion_date"];
190  }
191  $this->tpl->setVariable("COMPLETION_DATE", $completion_date);
192  break;
193  case "prg_completion_by":
194  if (is_null($a_set["completion_by"])) {
195  $this->tpl->touchBlock("comp_by");
196  } else {
197  $this->tpl->setVariable(
198  "COMPLETION_BY",
199  $this->getValueOrEmptyString(
200  $may_read_learning_progress,
201  $a_set["completion_by"]
202  )
203  );
204  }
205 
206  break;
207  case "prg_custom_plan":
208  $has_changers = $this->lng->txt("no");
209  if ($a_set["last_change_by"]) {
210  $has_changers = $this->lng->txt("yes");
211  }
212 
213  $this->tpl->setVariable(
214  "CUSTOM_PLAN",
215  $this->getValueOrEmptyString($may_read_learning_progress, $has_changers)
216  );
217  break;
218  case "prg_belongs_to":
219  $this->tpl->setVariable("BELONGS_TO", $a_set["belongs_to"]);
220  break;
221  case "prg_expiry_date":
222  $this->tpl->setVariable(
223  "EXPIRY_DATE",
224  $this->getValueOrEmptyString($may_read_learning_progress, $a_set["vq_date"])
225  );
226  break;
227  case "prg_assigned_by":
228  $assigned_by = $a_set["prg_assigned_by"];
229  if (is_null($assigned_by)) {
231  $assignment_src = (int) $a_set['prg_assignment_origin'];
232  $assigned_by = $this->lng->txt('prg_autoassignment')
233  . ' ' . $this->lng->txt($srcs[$assignment_src]);
234  }
235  $this->tpl->setVariable("ASSIGNED_BY", $assigned_by);
236  break;
237  case "prg_deadline":
238  if (is_null($a_set["prg_deadline"])) {
239  $this->tpl->touchBlock("deadline");
240  } else {
241  $this->tpl->setVariable(
242  "DEADLINE",
243  $this->getValueOrEmptyString(
244  $may_read_learning_progress,
245  $a_set["prg_deadline"]
246  )
247  );
248  }
249  break;
250  case "prg_validity":
251  $this->tpl->setVariable(
252  "VALIDITY",
253  $this->getValueOrEmptyString(
254  $may_read_learning_progress,
255  $a_set['prg_validity']
256  )
257  );
258  break;
259 
260  }
261  }
262  $this->tpl->setVariable(
263  "ACTIONS",
264  $this->buildActionDropDown(
265  $a_set["actions"],
266  $a_set["prgrs_id"],
267  $a_set["assignment_id"],
268  $usr_id
269  )
270  );
271  }
getValueOrEmptyString(string $condition, string $value)
getParentObject()
Get parent object.
getSelectedColumns()
Get selected columns.
buildActionDropDown(array $actions, int $prgrs_id, int $ass_id, int $usr_id)
Builds the action menu for each row of the table.
+ Here is the call graph for this function:

◆ getFilterValues()

ilStudyProgrammeMembersTableGUI::getFilterValues ( )
protected

Get filter-values by field id.

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

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

Referenced by __construct().

645  : array
646  {
647  $f = [];
648  foreach ($this->filters as $item) {
649  $f[$item->getFieldId()] = $this->getFilterValue($item);
650  }
651  return $f;
652  }
getFilterValue(ilFormPropertyGUI $a_item)
Get current filter value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFilterWhere()

ilStudyProgrammeMembersTableGUI::getFilterWhere ( array  $filter)
protected

Get the additional sql WHERE-part for filters.

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

References $name, and IL_CAL_DATE.

Referenced by countFetchData(), and fetchData().

657  : string
658  {
659  $buf = [''];
660 
661  if (strlen($filter['name']) > 0) {
662  $name = substr($this->db->quote($filter['name'], "text"), 1, -1);
663  $name_filter =
664  'AND (' . PHP_EOL
665  . 'pcp.firstname LIKE \'%' . $name . '%\' OR' . PHP_EOL
666  . 'pcp.lastname LIKE \'%' . $name . '%\' OR' . PHP_EOL
667  . 'pcp.login LIKE \'%' . $name . '%\'' . PHP_EOL
668  . ')' . PHP_EOL
669  ;
670 
671  $buf[] = $name_filter;
672  }
673 
674  if ($filter['prg_status'] && (int) $filter['prg_status'] !== self::OPTION_ALL) {
675  $buf[] = 'AND prgrs.status = ' . $this->db->quote($filter['prg_status'], "integer");
676  }
677 
678  if ($filter['prg_validity'] && (int) $filter['prg_validity'] !== self::OPTION_ALL) {
679  $operator = '<='; //self::VALIDITY_OPTION_RENEWAL_REQUIRED
680  if ((int) $filter['prg_validity'] === self::VALIDITY_OPTION_VALID) {
681  $operator = '>';
682  }
683  $buf[] = 'AND prgrs.vq_date ' . $operator . ' NOW()';
684  }
685 
686  $exp_from = $filter['prg_expiry_date']['from'];
687  if (!is_null($exp_from)) {
688  $dat = $exp_from->get(IL_CAL_DATE);
689  $buf[] = 'AND prgrs.vq_date >= \'' . $dat . ' 00:00:00\'';
690  }
691 
692  $exp_to = $filter['prg_expiry_date']['to'];
693  if (!is_null($exp_to)) {
694  $dat = $exp_to->get(IL_CAL_DATE);
695  $buf[] = 'AND prgrs.vq_date <= \'' . $dat . ' 23:59:59\'';
696  }
697 
698  $conditions = implode(PHP_EOL, $buf);
699 
700  return $conditions;
701  }
if($format !==null) $name
Definition: metadata.php:230
const IL_CAL_DATE
+ Here is the caller graph for this function:

◆ getFrom()

ilStudyProgrammeMembersTableGUI::getFrom ( )
protected

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

References ilStudyProgrammeProgressDBRepository\TABLE, and ilStudyProgrammeAssignmentDBRepository\TABLE.

Referenced by countFetchData(), and fetchData().

500  : string
501  {
502  return
503  "FROM " . ilStudyProgrammeProgressDBRepository::TABLE . " prgrs" . PHP_EOL
504  . "JOIN usr_data pcp ON pcp.usr_id = prgrs.usr_id" . PHP_EOL
505  . "JOIN " . ilStudyProgrammeAssignmentDBRepository::TABLE . " ass" . PHP_EOL
506  . " ON ass.id = prgrs.assignment_id" . PHP_EOL
507  . "JOIN object_data blngs ON blngs.obj_id = ass.root_prg_id" . PHP_EOL
508  . "LEFT JOIN usr_data ass_usr ON ass_usr.usr_id = ass.last_change_by" . PHP_EOL
509  . "LEFT JOIN usr_data cmpl_usr ON cmpl_usr.usr_id = prgrs.completion_by" . PHP_EOL
510  . "LEFT JOIN object_data cmpl_obj ON cmpl_obj.obj_id = prgrs.completion_by" . PHP_EOL
511  ;
512  }
+ Here is the caller graph for this function:

◆ getLinkTargetForAction()

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

Get ilias link for action.

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

References ilTable2GUI\getParentObject().

Referenced by buildActionDropDown().

340  : string
341  {
342  return $this->getParentObject()->getLinkTargetForAction($action, $prgrs_id, $ass_id);
343  }
getParentObject()
Get parent object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMultiCommands()

ilStudyProgrammeMembersTableGUI::getMultiCommands ( )
protected

Get possible multicommnds.

Returns
string[]

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

References ilTable2GUI\getParentObject(), and isPermissionControlledByOrguPosition().

Referenced by addMultiCommands().

564  : array
565  {
566  $access_by_position = $this->isPermissionControlledByOrguPosition();
567  if ($access_by_position) {
568  $edit_individual_plan = count($this->getParentObject()->editIndividualPlan()) > 0;
569  $manage_members = count($this->getParentObject()->manageMembers()) > 0;
570  } else {
571  $edit_individual_plan = true;
572  $manage_members = true;
573  }
574 
575  $perms = [];
576  if ($edit_individual_plan) {
577  $perms['markAccreditedMulti'] = $this->lng->txt('prg_multi_mark_accredited');
578  $perms['unmarkAccreditedMulti'] = $this->lng->txt('prg_multi_unmark_accredited');
579  }
580 
581  if ($manage_members) {
582  $perms['removeUserMulti'] = $this->lng->txt('prg_multi_remove_user');
583  }
584  $perms = array_merge(
585  $perms,
586  [
587  'markRelevantMulti' => $this->lng->txt('prg_multi_mark_relevant'),
588  'markNotRelevantMulti' => $this->lng->txt('prg_multi_unmark_relevant'),
589  'updateFromCurrentPlanMulti' => $this->lng->txt('prg_multi_update_from_current_plan'),
590  'changeDeadlineMulti' => $this->lng->txt('prg_multi_change_deadline'),
591  'changeExpireDateMulti' => $this->lng->txt('prg_multi_change_expire_date')
592  ]
593  );
594 
595  return $perms;
596  }
getParentObject()
Get parent object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrguValidUsersFilter()

ilStudyProgrammeMembersTableGUI::getOrguValidUsersFilter ( )
protected

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

References ilTable2GUI\getParentObject(), and ilOrgUnitOperation\OP_MANAGE_MEMBERS.

Referenced by fetchData().

713  : string
714  {
715  if ($this->getParentObject()->mayManageMembers()) {
716  return '';
717  }
718 
719  $valid_user_ids = $this->position_based_access->getUsersInPrgAccessibleForOperation(
720  $this->getParentObject()->object,
722  );
723  if (count($valid_user_ids) < 1) {
724  return ' AND false';
725  }
726  return ' AND pcp.usr_id in ('
727  . implode(',', $valid_user_ids)
728  . ')';
729  }
getParentObject()
Get parent object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilStudyProgrammeMembersTableGUI::getSelectableColumns ( )

Get selectable columns.

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

References $cols.

536  : array
537  {
538  $cols = [];
539  foreach (self::COLUMNS as $column) {
540  list($col, $lng_var, $optional, $lp, $no_lp) = $column;
541  if ($optional) {
542  $cols[$col] = ["txt" => $this->lng->txt($lng_var)];
543  }
544  }
545 
546  return $cols;
547  }
$cols
Definition: xhr_table.php:11

◆ getStatusOptions()

ilStudyProgrammeMembersTableGUI::getStatusOptions ( )
protected

Get options of filter "status".

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

References ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_COMPLETED, ilStudyProgrammeProgress\STATUS_FAILED, ilStudyProgrammeProgress\STATUS_IN_PROGRESS, and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.

Referenced by initFilter().

612  : array
613  {
614  return [
615  ilStudyProgrammeProgress::STATUS_IN_PROGRESS => $this->lng->txt("prg_status_in_progress"),
616  ilStudyProgrammeProgress::STATUS_COMPLETED => $this->lng->txt("prg_status_completed"),
617  ilStudyProgrammeProgress::STATUS_ACCREDITED => $this->lng->txt("prg_status_accredited"),
618  ilStudyProgrammeProgress::STATUS_NOT_RELEVANT => $this->lng->txt("prg_status_not_relevant"),
619  ilStudyProgrammeProgress::STATUS_FAILED => $this->lng->txt("prg_status_failed")
620  ];
621  }
+ Here is the caller graph for this function:

◆ getValidityOptions()

ilStudyProgrammeMembersTableGUI::getValidityOptions ( )
protected

Get options of filter "validity".

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

Referenced by initFilter().

601  : array
602  {
603  return [
604  self::VALIDITY_OPTION_VALID => $this->lng->txt("prg_still_valid"),
605  self::VALIDITY_OPTION_RENEWAL_REQUIRED => $this->lng->txt("prg_not_valid")
606  ];
607  }
+ Here is the caller graph for this function:

◆ getValueOrEmptyString()

ilStudyProgrammeMembersTableGUI::getValueOrEmptyString ( string  $condition,
string  $value 
)
protected

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

Referenced by fillRow().

273  : string
274  {
275  if ($condition) {
276  return $value;
277  }
278 
279  return '';
280  }
+ Here is the caller graph for this function:

◆ getWhere()

ilStudyProgrammeMembersTableGUI::getWhere ( int  $prg_id)
protected

Get the sql part WHERE.

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

References ilTable2GUI\getParentObject().

Referenced by countFetchData(), and fetchData().

517  : string
518  {
519  $q = "WHERE prgrs.prg_id = " . $this->db->quote($prg_id, "integer") . PHP_EOL;
520 
521  if ($this->prg->getAccessControlByOrguPositionsGlobal() && !$this->parent_obj->mayManageMembers()) {
522  $visible = $this->getParentObject()->visibleUsers();
523  if (count($visible) > 0) {
524  $q .= " AND " . $this->db->in("prgrs.usr_id", $visible, false, "integer") . PHP_EOL;
525  } else {
526  $q .= " AND FALSE" . PHP_EOL;
527  }
528  }
529 
530  return $q;
531  }
getParentObject()
Get parent object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFilter()

ilStudyProgrammeMembersTableGUI::initFilter ( )

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

References ilTable2GUI\addFilterItemByMetaType(), getStatusOptions(), and getValidityOptions().

Referenced by __construct().

626  : void
627  {
628  $item = $this->addFilterItemByMetaType('prg_validity', self::FILTER_SELECT);
629  $item->setOptions(
630  [self::OPTION_ALL => $this->lng->txt("all")] + $this->getValidityOptions()
631  );
632 
633  $item = $this->addFilterItemByMetaType('prg_status', self::FILTER_SELECT);
634  $item->setOptions(
635  [self::OPTION_ALL => $this->lng->txt("all")] + $this->getStatusOptions()
636  );
637 
638  $this->addFilterItemByMetaType('name', self::FILTER_TEXT);
639  $this->addFilterItemByMetaType('prg_expiry_date', self::FILTER_DATE_RANGE);
640  }
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
getStatusOptions()
Get options of filter "status".
getValidityOptions()
Get options of filter "validity".
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPermissionControlledByOrguPosition()

ilStudyProgrammeMembersTableGUI::isPermissionControlledByOrguPosition ( )
protected

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

Referenced by buildActionDropDown(), and getMultiCommands().

705  {
706  return (
707  $this->prg->getAccessControlByOrguPositionsGlobal()
708  ||
709  $this->prg->getPositionSettingsIsActiveForPrg()
710  );
711  }
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilStudyProgrammeMembersTableGUI::$db
protected

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

◆ $prg

ilStudyProgrammeMembersTableGUI::$prg
protected

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

◆ $prg_has_lp_children

ilStudyProgrammeMembersTableGUI::$prg_has_lp_children
protected

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

◆ $prg_obj_id

ilStudyProgrammeMembersTableGUI::$prg_obj_id
protected

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

Referenced by __construct().

◆ $prg_ref_id

ilStudyProgrammeMembersTableGUI::$prg_ref_id
protected

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

Referenced by __construct().

◆ $sp_user_progress_db

ilStudyProgrammeMembersTableGUI::$sp_user_progress_db
protected

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

Referenced by __construct().

◆ $ui_factory

ilStudyProgrammeMembersTableGUI::$ui_factory
protected

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

◆ $ui_renderer

ilStudyProgrammeMembersTableGUI::$ui_renderer
protected

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

◆ COLUMNS

const ilStudyProgrammeMembersTableGUI::COLUMNS
Initial value:
= [
['name', 'name', false, true, true],
['login', 'login', false, true, true],
['prg_orgus', 'prg_orgus', true, true, true],
['prg_status', 'prg_status', false, true, true],
['prg_completion_date', 'prg_completion_date', true, true, true],
['prg_completion_by', 'prg_completion_by', true, true, true],
['points', 'prg_points_reachable', false, true, false],
['points', 'prg_points_required', false, false, true],
['points_current', 'prg_points_current', false, false, true],
['prg_custom_plan', 'prg_custom_plan', true, true, true],
['prg_belongs_to', 'prg_belongs_to', true, true, true],
['prg_assign_date', 'prg_assign_date', false, true, true],
['prg_assigned_by', 'prg_assigned_by', true, true, true],
['prg_deadline', 'prg_deadline', true, true, true],
['prg_expiry_date', 'prg_expiry_date', true, true, true],
['prg_validity', 'prg_validity', true, true, true],
[null, 'action', false, true, true]
]

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

◆ OPTION_ALL

const ilStudyProgrammeMembersTableGUI::OPTION_ALL = -1

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

◆ VALIDITY_OPTION_RENEWAL_REQUIRED

const ilStudyProgrammeMembersTableGUI::VALIDITY_OPTION_RENEWAL_REQUIRED = 3

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

◆ VALIDITY_OPTION_VALID

const ilStudyProgrammeMembersTableGUI::VALIDITY_OPTION_VALID = 1

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


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