ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 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
 
Profile $profile
 
- 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 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 "components/ILIAS/Tracking"
142 );
143 $this->setEnableTitle(true);
144 $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
145
146 if ($first) {
147 $this->setDefaultOrderField($first);
148 $this->setDefaultOrderDirection("asc");
149 }
150
151 $this->initFilter();
152
153 $this->getItems();
154
155 // #13807
157 'edit_learning_progress',
158 $this->ref_id
159 );
160 }
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)
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: deliver.php:25
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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(), and ilTable2GUI\setSelectAllCheckbox().

+ 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 549 of file class.ilTrObjectUsersPropsTableGUI.php.

549 : void
550 {
551 $labels = $this->getSelectableColumns();
552 foreach ($this->getSelectedColumns() as $c) {
553 $a_csv->addColumn($labels[$c]["txt"]);
554 }
555
556 $a_csv->addRow();
557 }
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 518 of file class.ilTrObjectUsersPropsTableGUI.php.

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

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<string,mixed>$a_set data array

Reimplemented from ilTable2GUI.

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

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

559 : void
560 {
561 foreach ($this->getSelectedColumns() as $c) {
562 if ($c !== 'status') {
563 $val = $this->parseValue($c, $a_set[$c] ?? null, $this->type);
564 } else {
566 (int) $a_set[$c]
567 );
568 }
569 $a_csv->addColumn($val);
570 }
571
572 $a_csv->addRow();
573 }
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 531 of file class.ilTrObjectUsersPropsTableGUI.php.

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

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 181 of file class.ilTrObjectUsersPropsTableGUI.php.

181 : void
182 {
184 $additional_fields = $this->getSelectedColumns();
185
186 // only if object is [part of] course/group
187 $check_agreement = null;
188 if ($this->in_course) {
189 // privacy (if course agreement is activated)
191 if ($privacy->courseConfirmationRequired()) {
192 $check_agreement = $this->in_course;
193 }
194 } elseif ($this->in_group) {
195 // privacy (if group agreement is activated)
197 if ($privacy->groupConfirmationRequired()) {
198 $check_agreement = $this->in_group;
199 }
200 }
202 $this->ref_id,
207 $this->getCurrentFilter(),
208 $additional_fields,
209 $check_agreement,
210 $this->user_fields
211 );
212 if (count($tr_data["set"]) == 0 && $this->getOffset() > 0) {
213 $this->resetOffset();
215 $this->ref_id,
220 $this->getCurrentFilter(),
221 $additional_fields,
222 $check_agreement,
223 $this->user_fields
224 );
225 }
226
227 /*
228 * ilTrQuery does not read out any information about org units
229 * (nor should it), so it needs to be added here.
230 */
231 if (in_array('org_units', $additional_fields)) {
232 foreach (($tr_data['set'] ?? []) as $key => $data) {
233 if (!isset($data['usr_id'])) {
234 continue;
235 }
236 $usr_id = (int) $data['usr_id'];
237 $org_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($usr_id);
238 $tr_data["set"][$key]['org_units'] = $org_units;
239 }
240 }
241
242 $this->setMaxCount($tr_data["cnt"]);
243 $this->setData($tr_data["set"]);
244 }
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="")

References ilTableGUI\$data, $in_course, $in_group, 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 162 of file class.ilTrObjectUsersPropsTableGUI.php.

162 : array
163 {
164 if ($this->selectable_columns) {
166 }
167
168 $cols = $this->getSelectableUserColumns(
169 $this->in_course_ref_id,
170 $this->in_group_ref_id
171 );
172 $this->user_fields = $cols[1];
173 $this->selectable_columns = $cols[0];
174
176 }
getSelectableUserColumns(int $a_in_course=0, int $a_in_group=0)
array $selectable_columns

References 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 246 of file class.ilTrObjectUsersPropsTableGUI.php.

246 : void
247 {
248 foreach ($this->getSelectableColumns() as $column => $meta) {
249 // no udf!
250 switch ($column) {
251 case "firstname":
252 case "lastname":
253 case "mark":
254 case "u_comment":
255 case "institution":
256 case "department":
257 case "title":
258 case "street":
259 case "zipcode":
260 case "city":
261 case "country":
262 case "email":
263 case "matriculation":
264 case "login":
265 if ($column != "mark" ||
266 ilObjectLP::supportsMark($this->type)) {
267 $item = $this->addFilterItemByMetaType(
268 $column,
270 true,
271 $meta["txt"]
272 );
273 $this->filter[$column] = $item->getValue();
274 }
275 break;
276
277 case "first_access":
278 case "last_access":
279 case "create_date":
280 case 'status_changed':
281 $item = $this->addFilterItemByMetaType(
282 $column,
284 true,
285 $meta["txt"]
286 );
287 $this->filter[$column] = $item->getDate();
288 break;
289
290 case "birthday":
291 $item = $this->addFilterItemByMetaType(
292 $column,
294 true,
295 $meta["txt"]
296 );
297 $this->filter[$column] = $item->getDate();
298 break;
299
300 case "read_count":
301 case "percentage":
302 $item = $this->addFilterItemByMetaType(
303 $column,
305 true,
306 $meta["txt"]
307 );
308 $this->filter[$column] = $item->getValue();
309 break;
310
311 case "gender":
312 $item = $this->addFilterItemByMetaType(
313 "gender",
315 true,
316 $meta["txt"]
317 );
318 $item->setOptions(
319 array(
320 "" => $this->lng->txt("trac_all"),
321 "n" => $this->lng->txt("gender_n"),
322 "m" => $this->lng->txt("gender_m"),
323 "f" => $this->lng->txt("gender_f"),
324 )
325 );
326 $this->filter["gender"] = $item->getValue();
327 break;
328
329 case "sel_country":
330 $item = $this->addFilterItemByMetaType(
331 "sel_country",
333 true,
334 $meta["txt"]
335 );
336
337 $options = array();
338 foreach (ilCountry::getCountryCodes() as $c) {
339 $options[$c] = $this->lng->txt("meta_c_" . $c);
340 }
341 asort($options);
342 $item->setOptions(
343 array("" => $this->lng->txt("trac_all")) + $options
344 );
345
346 $this->filter["sel_country"] = $item->getValue();
347 break;
348
349 case "status":
350 $item = $this->addFilterItemByMetaType(
351 "status",
353 true,
354 $meta["txt"]
355 );
356 $item->setOptions(
357 array("" => $this->lng->txt("trac_all"),
358 ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM + 1 => $this->lng->txt(
360 ),
361 ilLPStatus::LP_STATUS_IN_PROGRESS_NUM + 1 => $this->lng->txt(
363 ),
364 ilLPStatus::LP_STATUS_COMPLETED_NUM + 1 => $this->lng->txt(
366 ),
367 ilLPStatus::LP_STATUS_FAILED_NUM + 1 => $this->lng->txt(
369 )
370 )
371 );
372 $this->filter["status"] = $item->getValue();
373 if (is_numeric($this->filter["status"])) {
374 $this->filter["status"]--;
375 }
376 break;
377
378 case "language":
379 $item = $this->addFilterItemByMetaType(
380 "language",
382 true
383 );
384 $this->filter["language"] = $item->getValue();
385 break;
386
387 case "spent_seconds":
388 if (ilObjectLP::supportsSpentSeconds($this->type)) {
389 $item = $this->addFilterItemByMetaType(
390 "spent_seconds",
392 true,
393 $meta["txt"]
394 );
395 $this->filter["spent_seconds"]["from"] = $item->getCombinationItem(
396 "from"
397 )->getValueInSeconds();
398 $this->filter["spent_seconds"]["to"] = $item->getCombinationItem(
399 "to"
400 )->getValueInSeconds();
401 }
402 break;
403 }
404 }
405 }
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
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)

References $c, ilTable2GUI\$column, ilTable2GUI\addFilterItemByMetaType(), ILIAS\Repository\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: