ILIAS  release_8 Revision v8.24
ilTrObjectUsersPropsTableGUI Class Reference

Learning progress table: One object, rows: users, columns: properties Example: A course, rows: members, columns: name, status, mark, ... PD, Personal Learning Progress -> UserObjectsProps PD, Learning Progress of Users -> UserAggObjectsProps Crs, Learnign Progress of Participants -> ObjectUsersProps Details -> UserObjectsProps More: PropUsersObjects (Grading Overview in Course) More...

+ Inheritance diagram for ilTrObjectUsersPropsTableGUI:
+ Collaboration diagram for ilTrObjectUsersPropsTableGUI:

Public Member Functions

 __construct (?object $a_parent_obj, string $a_parent_cmd, int $a_obj_id, int $a_ref_id, bool $a_print_view=false)
 Constructor. More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 getItems ()
 Get user items. More...
 
 initFilter ()
 
- Public Member Functions inherited from ilLPTableBaseGUI
 __construct (?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
 
 executeCommand ()
 
 searchFilterListener (int $a_ref_id, array $a_data)
 Listener for SearchResultFilter Checks wheather the object is hidden and mode is not LP_MODE_DEACTIVATED @access public. More...
 
 initBaseFilter (bool $a_split_learning_resources=false, bool $a_include_no_status_filter=true)
 Init filter. More...
 
 getCurrentFilter (bool $as_query=false)
 
 getIconVariant ()
 Gets the variant of LP icons that is shown in the table. More...
 
 setIconVariant (int $variant)
 Sets the variant of LP icons that is shown in the table. More...
 
- 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)
 Set table data. More...
 
 getData ()
 
 dataExists ()
 
 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...
 
 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 ()
 get the name of the parent form More...
 
 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 ()
 
 setShowTemplates (bool $a_value)
 
 getShowTemplates ()
 
 restoreTemplate (string $a_name)
 Restore state from template. More...
 
 saveTemplate (string $a_name)
 Save current state as template. More...
 
 deleteTemplate (string $a_name)
 
 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)
 set max. More...
 
- 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

 fillRow (array $a_set)
 Standard Version of Fill Row. 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...
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 CSV Version of Fill Row. More...
 
- Protected Member Functions inherited from ilLPTableBaseGUI
 initItemIdFromPost ()
 
 initUidFromPost ()
 
 findReferencesForObjId (int $a_obj_id)
 
 sendMail (array $a_user_ids, $a_parent_obj, string $a_parent_cmd)
 
 searchObjects (array $filter, string $permission, ?array $preset_obj_ids=null, bool $a_check_lp_activation=true)
 Search objects that match current filters. More...
 
 isForwardingToFormDispatcher ()
 
 initRepositoryFilter (array $filter)
 
 buildPath (array $ref_ids)
 
 getPossibleTypes (bool $a_split_learning_resources=false, bool $a_include_digilib=false, bool $a_allow_undefined_lp=false)
 
 parseValue (string $id, ?string $value, string $type)
 
 isPercentageAvailable (int $a_obj_id)
 
 parseTitle (int $a_obj_id, string $action, int $a_user_id=0)
 
 getExportMeta ()
 Build export meta data. More...
 
 fillMetaExcel (ilExcel $a_excel, int &$a_row)
 Add meta information to excel export. More...
 
 fillMetaCSV (ilCSVWriter $a_csv)
 Add meta information to csv export. More...
 
 showTimingsWarning (int $a_ref_id, int $a_user_id)
 
 formatSeconds (int $seconds, bool $a_shorten_zero=false)
 
 anonymizeValue ($a_value, bool $a_force_number=false)
 
 buildValueScale (int $a_max_value, bool $a_anonymize=false, bool $a_format_seconds=false)
 
 getMonthsFilter ($a_short=false)
 
 getMonthsYear ($a_year=null, $a_short=false)
 
 getSelectableUserColumns (int $a_in_course=0, int $a_in_group=0)
 
 addToClipboard ()
 Add selected users to clipboard. More...
 
- 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

array $user_fields
 
int $in_course = 0
 
int $in_group = 0
 
int $in_course_ref_id = 0
 
int $in_group_ref_id = 0
 
bool $has_edit = false
 
bool $has_collection = false
 
bool $has_multi = false
 
int $obj_id
 
int $ref_id
 
string $type
 
ilTree $tree
 
ilRbacSystem $rbacsystem
 
ilObjectDataCache $ilObjDataCache
 
ilObjectDefinition $objDefinition
 
- Protected Attributes inherited from ilLPTableBaseGUI
RefineryFactory $refinery
 
HttpService $http
 
array $filter = []
 
bool $anonymized = true
 
int $icon_variant = ilLPStatusIcons::ICON_VARIANT_LONG
 
ilSetting $setting
 
ilObjectDataCache $ilObjDataCache
 
ilObjectDefinition $objDefinition
 
ilTree $tree
 
ilGlobalTemplateInterface $main_tpl
 
- Protected Attributes inherited from ilTable2GUI
string $requested_tmpl_delete
 
string $requested_tmpl_create
 
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_templates = false
 
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 ilLPTableBaseGUI
const HIT_LIMIT = 5000
 
- 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

Learning progress table: One object, rows: users, columns: properties Example: A course, rows: members, columns: name, status, mark, ... PD, Personal Learning Progress -> UserObjectsProps PD, Learning Progress of Users -> UserAggObjectsProps Crs, Learnign Progress of Participants -> ObjectUsersProps Details -> UserObjectsProps More: PropUsersObjects (Grading Overview in Course)

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ @ilCtrl_Calls ilTrObjectUsersPropsTableGUI: ilFormPropertyDispatchGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilTrObjectUsersPropsTableGUI::__construct ( ?object  $a_parent_obj,
string  $a_parent_cmd,
int  $a_obj_id,
int  $a_ref_id,
bool  $a_print_view = false 
)

Constructor.

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

64 {
65 global $DIC;
66
67 $this->tree = $DIC->repositoryTree();
68 $this->rbacsystem = $DIC->rbac()->system();
69 $this->ilObjDataCache = $DIC['ilObjDataCache'];
70 $this->objDefinition = $DIC['objDefinition'];
71
72 $this->setId("troup");
73 $this->obj_id = $a_obj_id;
74 $this->ref_id = $a_ref_id;
75 $this->type = ilObject::_lookupType($a_obj_id);
76
77 $this->in_group_ref_id = $this->tree->checkForParentType($this->ref_id, "grp");
78 if ($this->in_group_ref_id) {
79 $this->in_group = ilObject::_lookupObjId($this->in_group_ref_id);
80 } else {
81 $this->in_course_ref_id = $this->tree->checkForParentType(
82 $this->ref_id,
83 "crs"
84 );
85 if ($this->in_course_ref_id) {
86 $this->in_course = ilObject::_lookupObjId($this->in_course_ref_id);
87 }
88 }
89 parent::__construct($a_parent_obj, $a_parent_cmd);
90 $this->parseTitle($a_obj_id, "trac_participants");
91
92 if ($a_print_view) {
93 $this->setPrintMode(true);
94 }
95
96 if (!$this->getPrintMode()) {
97 // see ilObjCourseGUI::addMailToMemberButton()
98 $mail = new ilMail($DIC->user()->getId());
99 if ($this->rbacsystem->checkAccess(
100 "internal_mail",
101 $mail->getMailObjectReferenceId()
102 )) {
103 $this->addMultiCommand(
104 "mailselectedusers",
105 $this->lng->txt("send_mail")
106 );
107 }
108 $this->lng->loadLanguageModule('user');
109 $this->addMultiCommand(
110 'addToClipboard',
111 $this->lng->txt('clipboard_add_btn')
112 );
113 $this->addColumn("", "", 1);
114 $this->has_multi = true;
115 }
116
117 $labels = $this->getSelectableColumns();
118 $first = false;
119 foreach ($this->getSelectedColumns() as $c) {
120 $first = $c;
121
122 // list cannot be sorted by udf fields (separate query)
123 // because of pagination only core fields can be sorted
124 $sort_id = (substr($c, 0, 4) == "udf_") ? "" : $c;
125
126 $this->addColumn($labels[$c]["txt"], $sort_id);
127 }
128
129 if (!$this->getPrintMode()) {
130 $this->addColumn($this->lng->txt("actions"), "");
131 }
132 $this->setSelectAllCheckbox('uid');
133 $this->setExternalSorting(true);
134 $this->setExternalSegmentation(true);
135 $this->setEnableHeader(true);
136 $this->setFormAction(
137 $this->ctrl->getFormActionByClass(get_class($this))
138 );
139 $this->setRowTemplate(
140 "tpl.object_users_props_row.html",
141 "Services/Tracking"
142 );
143 $this->setEnableTitle(true);
144 $this->setShowTemplates(true);
145 $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
146
147 if ($first) {
148 $this->setDefaultOrderField($first);
149 $this->setDefaultOrderDirection("asc");
150 }
151
152 $this->initFilter();
153
154 $this->getItems();
155
156 // #13807
158 'edit_learning_progress',
159 $this->ref_id
160 );
161 }
parseTitle(int $a_obj_id, string $action, int $a_user_id=0)
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
setExportFormats(array $formats)
Set available export formats.
setExternalSegmentation(bool $a_val)
setEnableTitle(bool $a_enabletitle)
addMultiCommand(string $a_cmd, string $a_text)
setShowTemplates(bool $a_value)
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setEnableHeader(bool $a_enableheader)
setDefaultOrderField(string $a_defaultorderfield)
setPrintMode(bool $a_value=false)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setDefaultOrderDirection(string $a_defaultorderdirection)
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $c, $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilTable2GUI\addColumn(), ilTable2GUI\addMultiCommand(), ilLearningProgressAccess\checkPermission(), ILIAS\Repository\ctrl(), getItems(), ilTable2GUI\getPrintMode(), getSelectableColumns(), ilTable2GUI\getSelectedColumns(), initFilter(), ILIAS\Repository\lng(), ilLPTableBaseGUI\parseTitle(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setEnableTitle(), ilTable2GUI\setExportFormats(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFormAction(), ilTable2GUI\setId(), ilTable2GUI\setPrintMode(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), and ilTable2GUI\setShowTemplates().

+ Here is the call graph for this function:

Member Function Documentation

◆ fillHeaderCSV()

ilTrObjectUsersPropsTableGUI::fillHeaderCSV ( ilCSVWriter  $a_csv)
protected

CSV Version of Fill Header.

Likely to be overwritten by derived class.

Parameters
ilCSVWriter$a_csvcurrent file

Reimplemented from ilTable2GUI.

Definition at line 550 of file class.ilTrObjectUsersPropsTableGUI.php.

550 : void
551 {
552 $labels = $this->getSelectableColumns();
553 foreach ($this->getSelectedColumns() as $c) {
554 $a_csv->addColumn($labels[$c]["txt"]);
555 }
556
557 $a_csv->addRow();
558 }
addColumn(string $a_col)

References $c, ilCSVWriter\addColumn(), and ilCSVWriter\addRow().

+ Here is the call graph for this function:

◆ fillHeaderExcel()

ilTrObjectUsersPropsTableGUI::fillHeaderExcel ( ilExcel  $a_excel,
int &  $a_row 
)
protected

Excel Version of Fill Header.

Likely to be overwritten by derived class.

Parameters
ilExcel$a_excelexcel wrapper
int$a_rowrow counter

Reimplemented from ilTable2GUI.

Definition at line 519 of file class.ilTrObjectUsersPropsTableGUI.php.

519 : void
520 {
521 $labels = $this->getSelectableColumns();
522 $cnt = 0;
523 foreach ($this->getSelectedColumns() as $c) {
524 $a_excel->setCell($a_row, $cnt++, $labels[$c]["txt"]);
525 }
526
527 $a_excel->setBold(
528 "A" . $a_row . ":" . $a_excel->getColumnCoord($cnt - 1) . $a_row
529 );
530 }
setBold(string $a_coords)
Set cell(s) to bold.
getColumnCoord(int $a_col)
Get column "name" from number.
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.

References $c, ilExcel\getColumnCoord(), getSelectableColumns(), ilTable2GUI\getSelectedColumns(), ilExcel\setBold(), and ilExcel\setCell().

+ Here is the call graph for this function:

◆ fillRow()

ilTrObjectUsersPropsTableGUI::fillRow ( array  $a_set)
protected

Standard Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
array$a_setdata array

Reimplemented from ilTable2GUI.

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

408 : void
409 {
410 if ($this->has_multi) {
411 $this->tpl->setVariable("USER_ID", $a_set["usr_id"]);
412 }
413
414 foreach ($this->getSelectedColumns() as $c) {
415 if (!(bool) ($a_set["privacy_conflict"] ?? null)) {
416 if ($c == 'status' && $a_set[$c] != ilLPStatus::LP_STATUS_COMPLETED_NUM) {
417 $timing = $this->showTimingsWarning(
418 $this->ref_id,
419 $a_set["usr_id"]
420 );
421 if ($timing) {
422 if ($timing !== true) {
423 $timing = ": " . ilDatePresentation::formatDate(
424 new ilDate($timing, IL_CAL_UNIX)
425 );
426 } else {
427 $timing = "";
428 }
429 $this->tpl->setCurrentBlock('warning_img');
430 $this->tpl->setVariable(
431 'WARNING_IMG',
433 'time_warn.svg'
434 )
435 );
436 $this->tpl->setVariable(
437 'WARNING_ALT',
438 $this->lng->txt(
439 'trac_time_passed'
440 ) . $timing
441 );
442 $this->tpl->parseCurrentBlock();
443 }
444 }
445
446 // #7694
447 if ($c == 'login' && !$a_set["active"]) {
448 $this->tpl->setCurrentBlock('inactive_bl');
449 $this->tpl->setVariable(
450 'TXT_INACTIVE',
451 $this->lng->txt("inactive")
452 );
453 $this->tpl->parseCurrentBlock();
454 }
455
456 $val = $this->parseValue($c, $a_set[$c] ?? '', $this->type);
457 } else {
458 if ($c == 'login') {
459 $this->tpl->setCurrentBlock('inactive_bl');
460 $this->tpl->setVariable(
461 'TXT_INACTIVE',
462 $this->lng->txt(
463 "status_no_permission"
464 )
465 );
466 $this->tpl->parseCurrentBlock();
467 }
468
469 $val = " ";
470 }
471
472 $this->tpl->setCurrentBlock("user_field");
473 $this->tpl->setVariable("VAL_UF", $val);
474 $this->tpl->parseCurrentBlock();
475 }
476
477 $this->ctrl->setParameterByClass(
478 "illplistofobjectsgui",
479 "user_id",
480 $a_set["usr_id"]
481 );
482
483 if (!$this->getPrintMode() && !(bool) ($a_set["privacy_conflict"] ?? null)) {
484 // details for containers and collections
485 if ($this->has_collection ||
486 $this->objDefinition->isContainer($this->type)) {
487 $this->tpl->setCurrentBlock("item_command");
488 $this->tpl->setVariable(
489 "HREF_COMMAND",
490 $this->ctrl->getLinkTargetByClass(
491 "illplistofobjectsgui",
492 "userdetails"
493 )
494 );
495 $this->tpl->setVariable(
496 "TXT_COMMAND",
497 $this->lng->txt('details')
498 );
499 $this->tpl->parseCurrentBlock();
500 }
501
502 if ($this->has_edit) {
503 $this->tpl->setCurrentBlock("item_command");
504 $this->tpl->setVariable(
505 "HREF_COMMAND",
506 $this->ctrl->getLinkTargetByClass(
507 "illplistofobjectsgui",
508 "edituser"
509 )
510 );
511 $this->tpl->setVariable("TXT_COMMAND", $this->lng->txt('edit'));
512 $this->tpl->parseCurrentBlock();
513 }
514 }
515
516 $this->ctrl->setParameterByClass("illplistofobjectsgui", 'user_id', '');
517 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
Class for single dates.
const LP_STATUS_COMPLETED_NUM
showTimingsWarning(int $a_ref_id, int $a_user_id)
parseValue(string $id, ?string $value, string $type)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References $c, ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), ilUtil\getImagePath(), ilTable2GUI\getPrintMode(), ilTable2GUI\getSelectedColumns(), IL_CAL_UNIX, ILIAS\Repository\lng(), ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPTableBaseGUI\parseValue(), and ilLPTableBaseGUI\showTimingsWarning().

+ Here is the call graph for this function:

◆ fillRowCSV()

ilTrObjectUsersPropsTableGUI::fillRowCSV ( ilCSVWriter  $a_csv,
array  $a_set 
)
protected

CSV Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
ilCSVWriter$a_csvcurrent file
array$a_setdata array

Reimplemented from ilTable2GUI.

Definition at line 560 of file class.ilTrObjectUsersPropsTableGUI.php.

560 : void
561 {
562 foreach ($this->getSelectedColumns() as $c) {
563 if ($c != 'status') {
564 $val = $this->parseValue($c, $a_set[$c], $this->type);
565 } else {
567 (int) $a_set[$c]
568 );
569 }
570 $a_csv->addColumn($val);
571 }
572
573 $a_csv->addRow();
574 }
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.

References $c, ilLearningProgressBaseGUI\_getStatusText(), ilCSVWriter\addColumn(), and ilCSVWriter\addRow().

+ Here is the call graph for this function:

◆ fillRowExcel()

ilTrObjectUsersPropsTableGUI::fillRowExcel ( ilExcel  $a_excel,
int &  $a_row,
array  $a_set 
)
protected

Excel Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
ilExcel$a_excelexcel wrapper
int$a_rowrow counter
array$a_setdata array

Reimplemented from ilTable2GUI.

Definition at line 532 of file class.ilTrObjectUsersPropsTableGUI.php.

536 : void {
537 $cnt = 0;
538 foreach ($this->getSelectedColumns() as $c) {
539 if ($c != 'status') {
540 $val = $this->parseValue($c, $a_set[$c], $this->type);
541 } else {
543 (int) $a_set[$c]
544 );
545 }
546 $a_excel->setCell($a_row, $cnt++, $val);
547 }
548 }

References $c, ilLearningProgressBaseGUI\_getStatusText(), ilLPTableBaseGUI\parseValue(), and ilExcel\setCell().

+ Here is the call graph for this function:

◆ getItems()

ilTrObjectUsersPropsTableGUI::getItems ( )

Get user items.

Definition at line 182 of file class.ilTrObjectUsersPropsTableGUI.php.

182 : void
183 {
185 $additional_fields = $this->getSelectedColumns();
186
187 // only if object is [part of] course/group
188 $check_agreement = null;
189 if ($this->in_course) {
190 // privacy (if course agreement is activated)
192 if ($privacy->courseConfirmationRequired()) {
193 $check_agreement = $this->in_course;
194 }
195 } elseif ($this->in_group) {
196 // privacy (if group agreement is activated)
198 if ($privacy->groupConfirmationRequired()) {
199 $check_agreement = $this->in_group;
200 }
201 }
203 $this->ref_id,
208 $this->getCurrentFilter(),
209 $additional_fields,
210 $check_agreement,
211 $this->user_fields
212 );
213 if (count($tr_data["set"]) == 0 && $this->getOffset() > 0) {
214 $this->resetOffset();
216 $this->ref_id,
221 $this->getCurrentFilter(),
222 $additional_fields,
223 $check_agreement,
224 $this->user_fields
225 );
226 }
227
228 /*
229 * ilTrQuery does not read out any information about org units
230 * (nor should it), so it needs to be added here.
231 */
232 if (in_array('org_units', $additional_fields)) {
233 foreach (($tr_data['set'] ?? []) as $key => $data) {
234 if (!isset($data['usr_id'])) {
235 continue;
236 }
237 $usr_id = (int) $data['usr_id'];
238 $org_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($usr_id);
239 $tr_data["set"][$key]['org_units'] = $org_units;
240 }
241 }
242
243 $this->setMaxCount($tr_data["cnt"]);
244 $this->setData($tr_data["set"]);
245 }
getCurrentFilter(bool $as_query=false)
determineOffsetAndOrder(bool $a_omit_offset=false)
resetOffset(bool $a_in_determination=false)
setData(array $a_data)
Set table data.
setMaxCount(int $a_max_count)
set max.
static getUserDataForObject(int $a_ref_id, string $a_order_field="", string $a_order_dir="", int $a_offset=0, int $a_limit=9999, ?array $a_filters=null, ?array $a_additional_fields=null, ?int $check_agreement=null, ?array $privacy_fields=null)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
string $key
Consumer key/client ID value.
Definition: System.php:193

References ilTableGUI\$data, $in_course, $in_group, ILIAS\LTI\ToolProvider\$key, ilTable2GUI\determineOffsetAndOrder(), ilLPTableBaseGUI\getCurrentFilter(), ilPrivacySettings\getInstance(), ilTable2GUI\getLimit(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilTable2GUI\getSelectedColumns(), ilTrQuery\getUserDataForObject(), ILIAS\Repository\int(), ilTable2GUI\resetOffset(), ilTable2GUI\setData(), ilTableGUI\setMaxCount(), and ilUtil\stripSlashes().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilTrObjectUsersPropsTableGUI::getSelectableColumns ( )

Get selectable columns.

Returns
array key: column id, val: true/false -> default on/off

Reimplemented from ilTable2GUI.

Definition at line 163 of file class.ilTrObjectUsersPropsTableGUI.php.

163 : array
164 {
165 if ($this->selectable_columns) {
167 }
168
170 $this->in_course_ref_id,
171 $this->in_group_ref_id
172 );
173 $this->user_fields = $cols[1];
174 $this->selectable_columns = $cols[0];
175
177 }
getSelectableUserColumns(int $a_in_course=0, int $a_in_group=0)
array $selectable_columns
$cols
Definition: xhr_table.php:11

References $cols, ilTable2GUI\$selectable_columns, and ilLPTableBaseGUI\getSelectableUserColumns().

Referenced by __construct(), fillHeaderExcel(), and initFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFilter()

ilTrObjectUsersPropsTableGUI::initFilter ( )

Reimplemented from ilTable2GUI.

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

247 : void
248 {
249 foreach ($this->getSelectableColumns() as $column => $meta) {
250 // no udf!
251 switch ($column) {
252 case "firstname":
253 case "lastname":
254 case "mark":
255 case "u_comment":
256 case "institution":
257 case "department":
258 case "title":
259 case "street":
260 case "zipcode":
261 case "city":
262 case "country":
263 case "email":
264 case "matriculation":
265 case "login":
266 if ($column != "mark" ||
267 ilObjectLP::supportsMark($this->type)) {
268 $item = $this->addFilterItemByMetaType(
269 $column,
271 true,
272 $meta["txt"]
273 );
274 $this->filter[$column] = $item->getValue();
275 }
276 break;
277
278 case "first_access":
279 case "last_access":
280 case "create_date":
281 case 'status_changed':
282 $item = $this->addFilterItemByMetaType(
283 $column,
285 true,
286 $meta["txt"]
287 );
288 $this->filter[$column] = $item->getDate();
289 break;
290
291 case "birthday":
292 $item = $this->addFilterItemByMetaType(
293 $column,
295 true,
296 $meta["txt"]
297 );
298 $this->filter[$column] = $item->getDate();
299 break;
300
301 case "read_count":
302 case "percentage":
303 $item = $this->addFilterItemByMetaType(
304 $column,
306 true,
307 $meta["txt"]
308 );
309 $this->filter[$column] = $item->getValue();
310 break;
311
312 case "gender":
313 $item = $this->addFilterItemByMetaType(
314 "gender",
316 true,
317 $meta["txt"]
318 );
319 $item->setOptions(
320 array(
321 "" => $this->lng->txt("trac_all"),
322 "n" => $this->lng->txt("gender_n"),
323 "m" => $this->lng->txt("gender_m"),
324 "f" => $this->lng->txt("gender_f"),
325 )
326 );
327 $this->filter["gender"] = $item->getValue();
328 break;
329
330 case "sel_country":
331 $item = $this->addFilterItemByMetaType(
332 "sel_country",
334 true,
335 $meta["txt"]
336 );
337
338 $options = array();
339 foreach (ilCountry::getCountryCodes() as $c) {
340 $options[$c] = $this->lng->txt("meta_c_" . $c);
341 }
342 asort($options);
343 $item->setOptions(
344 array("" => $this->lng->txt("trac_all")) + $options
345 );
346
347 $this->filter["sel_country"] = $item->getValue();
348 break;
349
350 case "status":
351 $item = $this->addFilterItemByMetaType(
352 "status",
354 true,
355 $meta["txt"]
356 );
357 $item->setOptions(
358 array("" => $this->lng->txt("trac_all"),
359 ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM + 1 => $this->lng->txt(
361 ),
362 ilLPStatus::LP_STATUS_IN_PROGRESS_NUM + 1 => $this->lng->txt(
364 ),
365 ilLPStatus::LP_STATUS_COMPLETED_NUM + 1 => $this->lng->txt(
367 ),
368 ilLPStatus::LP_STATUS_FAILED_NUM + 1 => $this->lng->txt(
370 )
371 )
372 );
373 $this->filter["status"] = $item->getValue();
374 if (is_numeric($this->filter["status"])) {
375 $this->filter["status"]--;
376 }
377 break;
378
379 case "language":
380 $item = $this->addFilterItemByMetaType(
381 "language",
383 true
384 );
385 $this->filter["language"] = $item->getValue();
386 break;
387
388 case "spent_seconds":
389 if (ilObjectLP::supportsSpentSeconds($this->type)) {
390 $item = $this->addFilterItemByMetaType(
391 "spent_seconds",
393 true,
394 $meta["txt"]
395 );
396 $this->filter["spent_seconds"]["from"] = $item->getCombinationItem(
397 "from"
398 )->getValueInSeconds();
399 $this->filter["spent_seconds"]["to"] = $item->getCombinationItem(
400 "to"
401 )->getValueInSeconds();
402 }
403 break;
404 }
405 }
406 }
static getCountryCodes()
Get country codes (DIN EN 3166-1)
const LP_STATUS_COMPLETED
const LP_STATUS_FAILED
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_FAILED_NUM
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
static supportsSpentSeconds(string $obj_type)
static supportsMark(string $obj_type)
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
const FILTER_DURATION_RANGE
const FILTER_NUMBER_RANGE
const FILTER_DATETIME_RANGE

References $c, ilTable2GUI\$column, ilTable2GUI\addFilterItemByMetaType(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilTable2GUI\FILTER_DATE_RANGE, ilTable2GUI\FILTER_DATETIME_RANGE, ilTable2GUI\FILTER_DURATION_RANGE, ilTable2GUI\FILTER_LANGUAGE, ilTable2GUI\FILTER_NUMBER_RANGE, ilTable2GUI\FILTER_SELECT, ilTable2GUI\FILTER_TEXT, ilCountry\getCountryCodes(), getSelectableColumns(), ILIAS\Repository\lng(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM, ilObjectLP\supportsMark(), and ilObjectLP\supportsSpentSeconds().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $has_collection

bool ilTrObjectUsersPropsTableGUI::$has_collection = false
protected

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

◆ $has_edit

bool ilTrObjectUsersPropsTableGUI::$has_edit = false
protected

Definition at line 42 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $has_multi

bool ilTrObjectUsersPropsTableGUI::$has_multi = false
protected

Definition at line 44 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $ilObjDataCache

ilObjectDataCache ilTrObjectUsersPropsTableGUI::$ilObjDataCache
protected

Definition at line 52 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $in_course

int ilTrObjectUsersPropsTableGUI::$in_course = 0
protected

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

Referenced by getItems().

◆ $in_course_ref_id

int ilTrObjectUsersPropsTableGUI::$in_course_ref_id = 0
protected

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

◆ $in_group

int ilTrObjectUsersPropsTableGUI::$in_group = 0
protected

Definition at line 39 of file class.ilTrObjectUsersPropsTableGUI.php.

Referenced by getItems().

◆ $in_group_ref_id

int ilTrObjectUsersPropsTableGUI::$in_group_ref_id = 0
protected

Definition at line 41 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $obj_id

int ilTrObjectUsersPropsTableGUI::$obj_id
protected

Definition at line 46 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $objDefinition

ilObjectDefinition ilTrObjectUsersPropsTableGUI::$objDefinition
protected

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

◆ $rbacsystem

ilRbacSystem ilTrObjectUsersPropsTableGUI::$rbacsystem
protected

Definition at line 51 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $ref_id

int ilTrObjectUsersPropsTableGUI::$ref_id
protected

Definition at line 47 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $tree

ilTree ilTrObjectUsersPropsTableGUI::$tree
protected

Definition at line 50 of file class.ilTrObjectUsersPropsTableGUI.php.

◆ $type

string ilTrObjectUsersPropsTableGUI::$type
protected

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

◆ $user_fields

array ilTrObjectUsersPropsTableGUI::$user_fields
protected

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


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