ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTrMatrixTableGUI Class Reference

name table More...

+ Inheritance diagram for ilTrMatrixTableGUI:
+ Collaboration diagram for ilTrMatrixTableGUI:

Public Member Functions

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

Protected Member Functions

 fillRow (array $a_set)
 
 fillHeaderExcel (ilExcel $a_excel, int &$a_row)
 
 fillRowExcel (ilExcel $a_excel, int &$a_row, array $a_set)
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 
- 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)
 
 fillMetaCSV (ilCSVWriter $a_csv)
 
 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

int $ref_id
 
array $ref_ids = []
 
string $type
 
int $obj_id
 
array $obj_ids = null
 
array $objective_ids = []
 
array $sco_ids = []
 
array $subitem_ids = []
 
int $in_course = 0
 
int $in_group = 0
 
int $in_course_ref_id = 0
 
int $in_group_ref_id = 0
 
array $privacy_fields = []
 
array $privacy_cols = []
 
array $perc_map = []
 
bool $has_multi
 
ilTree $tree
 
ilRbacSystem $rbacsystem
 
ilObjectDataCache $ilObjDataCache
 
- 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_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

name table

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$ /

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

Constructor & Destructor Documentation

◆ __construct()

ilTrMatrixTableGUI::__construct ( ?object  $a_parent_obj,
string  $a_parent_cmd,
int  $ref_id 
)

Constructor.

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

References $c, $DIC, ilTableGUI\$icon, $ref_id, ilTableGUI\$title, ILIAS\GlobalScreen\Provider\__construct(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilTable2GUI\addColumn(), ilTable2GUI\addMultiCommand(), ILIAS\Repository\ctrl(), getSelectableColumns(), ilTable2GUI\getSelectedColumns(), ILIAS\FileDelivery\http(), initFilter(), ILIAS\Repository\lng(), ilLPTableBaseGUI\parseTitle(), ILIAS\Repository\refinery(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setExportFormats(), ilTable2GUI\setFormAction(), ilTable2GUI\setId(), ilTable2GUI\setRowTemplate(), and ilTable2GUI\setSelectAllCheckbox().

57  {
58  global $DIC;
59 
60  $this->tree = $DIC->repositoryTree();
61  $this->rbacsystem = $DIC->rbac()->system();
62  $this->ilObjDataCache = $DIC['ilObjDataCache'];
63 
64  $this->setId("trsmtx_" . $ref_id);
65  $this->ref_id = $ref_id;
66  $this->obj_id = ilObject::_lookupObjId($ref_id);
67  $this->type = ilObject::_lookupType($this->obj_id); // #17188
68 
69  $this->in_group_ref_id = $this->tree->checkForParentType($this->ref_id, "grp");
70  if ($this->in_group_ref_id) {
71  $this->in_group = ilObject::_lookupObjId($this->in_group_ref_id);
72  } else {
73  $this->in_course_ref_id = $this->tree->checkForParentType(
74  $this->ref_id,
75  "crs"
76  );
77  if ($this->in_course_ref_id) {
78  $this->in_course = ilObject::_lookupObjId($this->in_course_ref_id);
79  }
80  }
81 
82  $this->lng = $DIC->language();
83  $this->http = $DIC->http();
84  $this->refinery = $DIC->refinery();
85  $this->initFilter();
86  parent::__construct($a_parent_obj, $a_parent_cmd);
87 
88  $this->parseTitle($this->obj_id, "trac_matrix");
89  $this->setEnableHeader(true);
90  $this->setFormAction(
91  $this->ctrl->getFormActionByClass(get_class($this))
92  );
93  $this->setRowTemplate(
94  "tpl.user_object_matrix_row.html",
95  "components/ILIAS/Tracking"
96  );
97  $this->setDefaultOrderField("login");
98  $this->setDefaultOrderDirection("asc");
99 
100  // see ilObjCourseGUI::addMailToMemberButton()
101  $mail = new ilMail($DIC->user()->getId());
102  if ($this->rbacsystem->checkAccess(
103  "internal_mail",
104  $mail->getMailObjectReferenceId()
105  )) {
106  $this->addMultiCommand(
107  "mailselectedusers",
108  $this->lng->txt("send_mail")
109  );
110  }
111 
112  $this->lng->loadLanguageModule('user');
113  $this->addMultiCommand(
114  'addToClipboard',
115  $this->lng->txt('clipboard_add_btn')
116  );
117  $this->addColumn("", "", '1');
118  $this->has_multi = true;
119 
120  $this->addColumn($this->lng->txt("login"), "login");
121 
122  $labels = $this->getSelectableColumns();
123  $selected = $this->getSelectedColumns();
124  foreach ($selected as $c) {
125  $title = $labels[$c]["txt"];
126 
127  if (isset($labels[$c]["no_permission"]) && $labels[$c]["no_permission"]) {
128  $title .= " (" . $this->lng->txt("status_no_permission") . ")";
129  }
130 
131  $tooltip = array();
132  if (isset($labels[$c]["icon"])) {
133  $alt = $this->lng->txt($labels[$c]["type"] ?? "");
134  $icon = '<img class="ilListItemIcon" src="' . $labels[$c]["icon"] . '" alt="' . $alt . '" />';
135  if (sizeof($selected) > 5) {
136  $tooltip[] = $title;
137  $title = $icon;
138  } else {
139  $title = $icon . ' ' . $title;
140  }
141  if ($labels[$c]["path"] ?? false) {
142  $tooltip[] = $labels[$c]["path"];
143  }
144  }
145 
146  if (isset($labels[$c]["id"])) {
147  $sort_id = $labels[$c]["id"];
148  } else {
149  // list cannot be sorted by udf fields (separate query)
150  $sort_id = (substr($c, 0, 4) == "udf_") ? "" : $c;
151  }
152 
153  $this->addColumn(
154  $title,
155  $sort_id,
156  "",
157  false,
158  "",
159  implode(" - ", $tooltip)
160  );
161  }
162  $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
163  $this->setSelectAllCheckbox('uid');
164  }
setExportFormats(array $formats)
Set available export formats.
setFormAction(string $a_form_action, bool $a_multipart=false)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
$c
Definition: deliver.php:25
setId(string $a_val)
static _lookupObjId(int $ref_id)
static http()
Fetches the global http state from ILIAS.
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
global $DIC
Definition: shib_login.php:22
setDefaultOrderDirection(string $a_defaultorderdirection)
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
static _lookupType(int $id, bool $reference=false)
parseTitle(int $a_obj_id, string $action, int $a_user_id=0)
addMultiCommand(string $a_cmd, string $a_text)
setEnableHeader(bool $a_enableheader)
+ Here is the call graph for this function:

Member Function Documentation

◆ fillHeaderCSV()

ilTrMatrixTableGUI::fillHeaderCSV ( ilCSVWriter  $a_csv)
protected

Definition at line 745 of file class.ilTrMatrixTableGUI.php.

References $c, $DIC, ilCSVWriter\addColumn(), ilCSVWriter\addRow(), getSelectableColumns(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\lng(), and ilObjectPlugin\lookupTxtById().

745  : void
746  {
747  global $DIC;
748 
749  $ilObjDataCache = $DIC['ilObjDataCache'];
750 
751  $a_csv->addColumn($this->lng->txt("login"));
752 
753  $labels = $this->getSelectableColumns();
754  foreach ($this->getSelectedColumns() as $c) {
755  if (substr($c, 0, 4) == "obj_") {
756  $obj_id = substr($c, 4);
757 
758  $type = $this->ilObjDataCache->lookupType((int) $obj_id);
759  if ($DIC['objDefinition']->isPlugin($type)) {
760  $type_text = ilObjectPlugin::lookupTxtById(
761  $type,
762  'obj_' . $type
763  );
764  } else {
765  $type_text = $this->lng->txt($type);
766  }
767 
768  $a_csv->addColumn("(" . $type_text . ") " . $labels[$c]["txt"]);
769 
770  if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
771  $a_csv->addColumn(
772  $this->lng->txt("trac_percentage") . " (%)"
773  );
774  }
775  } else {
776  $a_csv->addColumn($labels[$c]["txt"]);
777  }
778  }
779 
780  $a_csv->addRow();
781  }
addColumn(string $a_col)
ilObjectDataCache $ilObjDataCache
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:22
static lookupTxtById(string $plugin_id, string $lang_var)
+ Here is the call graph for this function:

◆ fillHeaderExcel()

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

Definition at line 644 of file class.ilTrMatrixTableGUI.php.

References $c, $DIC, ilExcel\getColumnCoord(), getSelectableColumns(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\lng(), ilObjectPlugin\lookupTxtById(), ilExcel\setBold(), and ilExcel\setCell().

644  : void
645  {
646  global $DIC;
647 
648  $ilObjDataCache = $DIC['ilObjDataCache'];
649 
650  $a_excel->setCell($a_row, 0, $this->lng->txt("login"));
651 
652  $labels = $this->getSelectableColumns();
653  $cnt = 1;
654  foreach ($this->getSelectedColumns() as $c) {
655  if (substr($c, 0, 4) == "obj_") {
656  $obj_id = substr($c, 4);
657 
658  $type = $this->ilObjDataCache->lookupType((int) $obj_id);
659  if ($DIC['objDefinition']->isPlugin($type)) {
660  $type_text = ilObjectPlugin::lookupTxtById(
661  $type,
662  'obj_' . $type
663  );
664  } else {
665  $type_text = $this->lng->txt($type);
666  }
667 
668  $a_excel->setCell(
669  $a_row,
670  $cnt,
671  "(" . $type_text . ") " . $labels[$c]["txt"]
672  );
673 
674  if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
675  $cnt++;
676  $a_excel->setCell(
677  $a_row,
678  $cnt,
679  $this->lng->txt(
680  "trac_percentage"
681  ) . " (%)"
682  );
683  }
684  } else {
685  $a_excel->setCell($a_row, $cnt, $labels[$c]["txt"]);
686  }
687  $cnt++;
688  }
689 
690  $a_excel->setBold(
691  "A" . $a_row . ":" . $a_excel->getColumnCoord($cnt) . $a_row
692  );
693  }
getColumnCoord(int $a_col)
Get column "name" from number.
ilObjectDataCache $ilObjDataCache
$c
Definition: deliver.php:25
setCell(int $a_row, int $col, $value, ?string $datatype=null, bool $disable_strip_tags_for_strings=false)
Set cell value.
setBold(string $a_coords)
Set cell(s) to bold.
global $DIC
Definition: shib_login.php:22
static lookupTxtById(string $plugin_id, string $lang_var)
+ Here is the call graph for this function:

◆ fillRow()

ilTrMatrixTableGUI::fillRow ( array  $a_set)
protected

Definition at line 506 of file class.ilTrMatrixTableGUI.php.

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

506  : void
507  {
508  if ($this->has_multi) {
509  $this->tpl->setVariable("USER_ID", $a_set["usr_id"]);
510  }
511 
512  foreach ($this->getSelectedColumns() as $c) {
513  switch ($c) {
514  case (substr($c, 0, 4) == "obj_"):
515  $obj_id = substr($c, 4);
516 
517  // object without read-lp-permission
518  if (in_array($obj_id, $this->privacy_cols) ||
519  ($a_set["privacy_conflict"] ?? false)) {
520  $this->tpl->setCurrentBlock("objects");
521  $this->tpl->setVariable("VAL_STATUS", "&nbsp;");
522  $this->tpl->parseCurrentBlock();
523  continue 2;
524  }
525 
526  $status = isset($a_set[$c])
527  ? (int) $a_set[$c]
529  $percentage = isset($a_set[$c . "_perc"])
530  ? (int) $a_set[$c . "_perc"]
531  : null;
532 
533  if ($status != ilLPStatus::LP_STATUS_COMPLETED_NUM) {
534  $timing = $this->showTimingsWarning(
535  $this->ref_ids[$obj_id],
536  $a_set["usr_id"]
537  );
538  if ($timing) {
539  if ($timing !== true) {
540  $timing = ": " . ilDatePresentation::formatDate(
541  new ilDate($timing, IL_CAL_UNIX)
542  );
543  } else {
544  $timing = "";
545  }
546  $this->tpl->setCurrentBlock('warning_img');
547  $this->tpl->setVariable(
548  'WARNING_IMG',
550  'media/time_warn.svg'
551  )
552  );
553  $this->tpl->setVariable(
554  'WARNING_ALT',
555  $this->lng->txt(
556  'trac_time_passed'
557  ) . $timing
558  );
559  $this->tpl->parseCurrentBlock();
560  }
561  }
562 
563  $this->tpl->setCurrentBlock("objects");
564  $this->tpl->setVariable(
565  "VAL_STATUS",
566  $this->parseValue(
567  "status",
568  (string) $status,
569  ""
570  )
571  );
572  $this->tpl->setVariable(
573  "VAL_PERCENTAGE",
574  $this->parseValue(
575  "percentage",
576  (string) $percentage,
577  ""
578  )
579  );
580  $this->tpl->parseCurrentBlock();
581  break;
582 
583  case (substr($c, 0, 6) == "objtv_"):
584  case (substr($c, 0, 7) == "objsco_"):
585  case (substr($c, 0, 7) == "objsub_"):
586  $status = isset($a_set[$c])
587  ? (int) $a_set[$c]
589 
590  $this->tpl->setCurrentBlock("objects");
591  if (!($a_set["privacy_conflict"] ?? false)) {
592  $this->tpl->setVariable(
593  "VAL_STATUS",
594  $this->parseValue(
595  "status",
596  (string) $status,
597  ""
598  )
599  );
600  } else {
601  $this->tpl->setVariable("VAL_STATUS", "&nbsp;");
602  }
603  $this->tpl->parseCurrentBlock();
604  break;
605 
606  default:
607  $this->tpl->setCurrentBlock("user_field");
608  if (!($a_set["privacy_conflict"] ?? false)) {
609  $this->tpl->setVariable(
610  "VAL_UF",
611  $this->parseValue(
612  $c,
613  $a_set[$c] ?? "",
614  ""
615  )
616  );
617  } else {
618  $this->tpl->setVariable("VAL_UF", "&nbsp;");
619  }
620  $this->tpl->parseCurrentBlock();
621  break;
622  }
623  }
624 
625  // #7694
626  if (!$a_set["active"] || ($a_set["privacy_conflict"] ?? false)) {
627  $mess = array();
628  if ($a_set["privacy_conflict"] ?? false) {
629  $mess[] = $this->lng->txt("status_no_permission");
630  } elseif (!$a_set["active"]) {
631  $mess[] = $this->lng->txt("inactive");
632  }
633  $this->tpl->setCurrentBlock('inactive_bl');
634  $this->tpl->setVariable('TXT_INACTIVE', implode(", ", $mess));
635  $this->tpl->parseCurrentBlock();
636  }
637 
638  $login = !($a_set["privacy_conflict"] ?? false)
639  ? $a_set["login"]
640  : "&nbsp;";
641  $this->tpl->setVariable("VAL_LOGIN", $login);
642  }
const LP_STATUS_COMPLETED_NUM
const IL_CAL_UNIX
$c
Definition: deliver.php:25
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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)
const LP_STATUS_NOT_ATTEMPTED_NUM
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
showTimingsWarning(int $a_ref_id, int $a_user_id)
+ Here is the call graph for this function:

◆ fillRowCSV()

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

Definition at line 783 of file class.ilTrMatrixTableGUI.php.

References $c, ilLearningProgressBaseGUI\_getStatusText(), ilCSVWriter\addColumn(), ilCSVWriter\addRow(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\int(), null, and ilLPTableBaseGUI\parseValue().

783  : void
784  {
785  $a_csv->addColumn($a_set["login"]);
786 
787  foreach ($this->getSelectedColumns() as $c) {
788  switch ($c) {
789  case (substr($c, 0, 4) == "obj_"):
790  $obj_id = substr($c, 4);
792  (int) $a_set[$c]
793  );
794  $a_csv->addColumn($val);
795 
796  if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
797  $perc = (int) $a_set[$c . "_perc"];
798  if (!$perc) {
799  $perc = null;
800  }
801  $a_csv->addColumn((string) $perc);
802  }
803  break;
804 
805  case (substr($c, 0, 6) == "objtv_"):
806  case (substr($c, 0, 7) == "objsco_"):
807  case (substr($c, 0, 7) == "objsub_"):
809  (int) $a_set[$c]
810  );
811  $a_csv->addColumn($val);
812  break;
813 
814  /* #14142
815  case "last_access":
816  case "spent_seconds":
817  case "status_changed":
818  */
819  default:
820  $val = $this->parseValue($c, $a_set[$c] ?? '', "user");
821  $a_csv->addColumn($val);
822  break;
823  }
824  }
825 
826  $a_csv->addRow();
827  }
addColumn(string $a_col)
$c
Definition: deliver.php:25
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
parseValue(string $id, ?string $value, string $type)
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
+ Here is the call graph for this function:

◆ fillRowExcel()

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

Definition at line 695 of file class.ilTrMatrixTableGUI.php.

References $c, ilLearningProgressBaseGUI\_getStatusText(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\int(), null, ilLPTableBaseGUI\parseValue(), and ilExcel\setCell().

699  : void {
700  $a_excel->setCell($a_row, 0, $a_set["login"]);
701 
702  $cnt = 1;
703  foreach ($this->getSelectedColumns() as $c) {
704  switch ($c) {
705  case (substr($c, 0, 4) == "obj_"):
706  $obj_id = substr($c, 4);
708  (int) $a_set[$c]
709  );
710  $a_excel->setCell($a_row, $cnt, $val);
711 
712  if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
713  $cnt++;
714  $perc = (int) ($a_set[$c . "_perc"] ?? 0);
715  $perc = !$perc
716  ? null
717  : $perc . "%";
718  $a_excel->setCell($a_row, $cnt, $perc);
719  }
720  break;
721 
722  case (substr($c, 0, 6) == "objtv_"):
723  case (substr($c, 0, 7) == "objsco_"):
724  case (substr($c, 0, 7) == "objsub_"):
726  (int) $a_set[$c]
727  );
728  $a_excel->setCell($a_row, $cnt, $val);
729  break;
730 
731  /* #14142
732  case "last_access":
733  case "spent_seconds":
734  case "status_changed":
735  */
736  default:
737  $val = $this->parseValue($c, $a_set[$c] ?? '', "user");
738  $a_excel->setCell($a_row, $cnt, $val);
739  break;
740  }
741  $cnt++;
742  }
743  }
$c
Definition: deliver.php:25
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setCell(int $a_row, int $col, $value, ?string $datatype=null, bool $disable_strip_tags_for_strings=false)
Set cell value.
parseValue(string $id, ?string $value, string $type)
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
+ Here is the call graph for this function:

◆ getItems()

ilTrMatrixTableGUI::getItems ( array  $a_user_fields,
?array  $a_privary_fields = null 
)

Definition at line 327 of file class.ilTrMatrixTableGUI.php.

References ilTable2GUI\$column, ilTableGUI\$data, $in_course, $in_group, $obj_id, $objectives, $user_id, ILIAS\Repository\filter(), ilPrivacySettings\getInstance(), ilTrQuery\getObjectIds(), ilTrQuery\getUserObjectiveMatrix(), ilTrQuery\getUserObjectMatrix(), ILIAS\Repository\int(), ilLPTableBaseGUI\isPercentageAvailable(), ilCourseObjective\lookupObjectiveTitle(), ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM, ilTable2GUI\setData(), ilTable2GUI\setFilterValue(), and ilTableGUI\setMaxCount().

Referenced by getSelectableColumns().

330  : array {
331 
332  // #17081
333  if ($this->restore_filter) {
334  $name = $this->restore_filter_values["name"];
335  $this->setFilterValue($this->filters[0], $name);
336  $this->filter["name"] = $name;
337  }
338 
339  $collection = ilTrQuery::getObjectIds(
340  $this->obj_id,
341  $this->ref_id,
342  true
343  );
344  if ($collection["object_ids"]) {
345  // we need these for the timing warnings
346  $this->ref_ids = $collection["ref_ids"];
347 
348  // only if object is [part of] course/group
349  $check_agreement = false;
350  if ($this->in_course) {
351  // privacy (if course agreement is activated)
352  $privacy = ilPrivacySettings::getInstance();
353  if ($privacy->courseConfirmationRequired()) {
354  $check_agreement = $this->in_course;
355  }
356  } elseif ($this->in_group) {
357  // privacy (if group agreement is activated)
358  $privacy = ilPrivacySettings::getInstance();
359  if ($privacy->groupConfirmationRequired()) {
360  $check_agreement = $this->in_group;
361  }
362  }
364  $this->ref_id,
365  $collection["object_ids"],
366  $this->filter["name"] ?? '',
367  $a_user_fields,
368  $a_privary_fields,
369  $check_agreement
370  );
371  if ($collection["objectives_parent_id"] && $data["users"]) {
372  // sub-items: learning objectives
374  $collection["objectives_parent_id"],
375  $data["users"]
376  );
377 
378  $this->objective_ids = array();
379 
380  foreach ($objectives as $user_id => $inner_objectives) {
381  if (isset($data["set"][$user_id])) {
382  foreach ($inner_objectives as $objective_id => $status) {
383  $obj_id = "objtv_" . $objective_id;
384  $data["set"][$user_id][$obj_id] = $status;
385 
386  if (!in_array($obj_id, $this->objective_ids)) {
387  $this->objective_ids[$objective_id] = ilCourseObjective::lookupObjectiveTitle(
388  $objective_id
389  );
390  }
391  }
392  }
393  }
394  }
395 
396  // sub-items: SCOs
397  if ($collection["scorm"] && $data["set"]) {
398  $this->sco_ids = array();
399  foreach (array_keys($data["set"]) as $user_id) {
400  foreach ($collection["scorm"]["scos"] as $sco) {
401  if (!in_array($sco, $this->sco_ids)) {
402  $this->sco_ids[$sco] = $collection["scorm"]["scos_title"][$sco];
403  }
404 
405  // alex, 5 Nov 2011: we got users being in failed and in
406  // completed status, I changed the setting in: first check failed
407  // then check completed since failed should superseed completed
408  // (before completed has been checked before failed)
410  if (in_array(
411  $user_id,
412  $collection["scorm"]["failed"][$sco]
413  )) {
415  } elseif (in_array(
416  $user_id,
417  $collection["scorm"]["completed"][$sco]
418  )) {
420  } elseif (in_array(
421  $user_id,
422  $collection["scorm"]["in_progress"][$sco]
423  )) {
425  }
426 
427  $obj_id = "objsco_" . $sco;
428  $data["set"][$user_id][$obj_id] = $status;
429  }
430  }
431  }
432 
433  // sub-items: generic, e.g. lm chapter
434  if ($collection["subitems"] && $data["set"]) {
435  foreach (array_keys($data["set"]) as $user_id) {
436  foreach ($collection["subitems"]["items"] as $item_id) {
437  $this->subitem_ids[$item_id] = $collection["subitems"]["item_titles"][$item_id];
438 
440  if (isset(
441  $collection["subitems"]["completed"]
442  ) && in_array(
443  $user_id,
444  $collection["subitems"]["completed"][$item_id]
445  )) {
447  } elseif (isset(
448  $collection["subitems"]["in_progress"]
449  ) &&
450  in_array(
451  $user_id,
452  $collection["subitems"]["in_progress"][$item_id]
453  )) {
455  }
456 
457  $obj_id = "objsub_" . $item_id;
458  $data["set"][$user_id][$obj_id] = $status;
459  }
460  }
461  }
462 
463  // percentage export
464  if ($data["set"]) {
465  $this->perc_map = array();
466  foreach ($data["set"] as $row_idx => $row) {
467  foreach ($row as $column => $value) {
468  if (substr($column, -5) == "_perc") {
469  $obj_id = explode("_", $column);
470  $obj_id = (int) $obj_id[1];
471 
472  // #18673
473  if (!$this->isPercentageAvailable($obj_id) ||
474  !(int) $value) {
475  unset($data["set"][$row_idx][$column]);
476  } else {
477  $this->perc_map[$obj_id] = true;
478  }
479  }
480  }
481  }
482  }
483 
484  /*
485  * ilTrQuery does not read out any information about org units
486  * (nor should it), so it needs to be added here.
487  */
488  if (in_array('org_units', $a_user_fields)) {
489  foreach (($data['set'] ?? []) as $key => $usr_data) {
490  if (!isset($usr_data['usr_id'])) {
491  continue;
492  }
493  $usr_id = (int) $usr_data['usr_id'];
494  $org_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($usr_id);
495  $data["set"][$key]['org_units'] = $org_units;
496  }
497  }
498 
499  $this->setMaxCount($data["cnt"] ?? 0);
500  $this->setData($data["set"] ?? []);
501  return $collection["object_ids"] ?? [];
502  }
503  return [];
504  }
const LP_STATUS_COMPLETED_NUM
setData(array $a_data)
static getUserObjectMatrix(int $a_parent_ref_id, array $a_obj_ids, ?string $a_user_filter=null, ?array $a_additional_fields=null, ?array $a_privacy_fields=null, ?int $a_check_agreement=null)
Get status matrix for users on objects.
static getUserObjectiveMatrix(int $a_parent_obj_id, array $a_users)
const LP_STATUS_IN_PROGRESS_NUM
static getObjectIds(int $a_parent_obj_id, int $a_parent_ref_id, bool $use_collection=true, bool $a_refresh_status=true, ?array $a_user_ids=null)
Get (sub)objects for given object, also handles learning objectives (course only) ...
$objectives
isPercentageAvailable(int $a_obj_id)
static lookupObjectiveTitle(int $a_objective_id, bool $a_add_description=false)
setFilterValue(ilTableFilterItem $a_item, $a_value)
const LP_STATUS_NOT_ATTEMPTED_NUM
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
setMaxCount(int $a_max_count)
set max.
const LP_STATUS_FAILED_NUM
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilTrMatrixTableGUI::getSelectableColumns ( )

Definition at line 191 of file class.ilTrMatrixTableGUI.php.

References ilTableGUI\$icon, ilTable2GUI\$id, $obj_id, $path, ilTableGUI\$title, ilObject\_getIcon(), ilContainerReference\_lookupTargetTitle(), ilLearningProgressAccess\checkPermission(), getItems(), ilLPTableBaseGUI\getSelectableUserColumns(), ilTrQuery\getSubItemType(), ILIAS\Repository\lng(), and null.

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

191  : array
192  {
193  $user_cols = $this->getSelectableUserColumns(
194  $this->in_course_ref_id,
195  $this->in_group_ref_id
196  );
197  $columns = [];
198  if ($this->obj_ids === null) {
199  // we cannot use the selected columns because they are not ready yet
200  // so we use all available columns, should be ok anyways
201  $this->obj_ids = $this->getItems(
202  array_keys($user_cols[0]),
203  $user_cols[1]
204  );
205  }
206  $parent = [];
207  if (isset($this->obj_ids)) {
208  $tmp_cols = array();
209  foreach ($this->obj_ids as $obj_id) {
210  if ($obj_id == $this->obj_id) {
211  $parent = array("txt" => $this->lng->txt("status"),
212  "default" => true
213  );
214  } else {
215  $no_perm = false;
216 
217  $ref_id = $this->ref_ids[$obj_id];
218  if ($ref_id &&
220  'read_learning_progress',
221  $ref_id
222  )) {
223  $no_perm = true;
224  $this->privacy_cols[] = $obj_id;
225  }
226 
227  $title = $this->ilObjDataCache->lookupTitle((int) $obj_id);
228  $type = $this->ilObjDataCache->lookupType((int) $obj_id);
229  $icon = ilObject::_getIcon((int) $obj_id, "tiny", $type);
230  if ($type == "sess") {
231  $sess = new ilObjSession($obj_id, false);
232  $title = $sess->getPresentationTitle();
233  }
234 
235  // BT 35475: set titles of referenced objects correctly
236  if (
237  $title == '' &&
238  ($type == 'catr' || $type == 'crsr' || $type == 'grpr')
239  ) {
241  }
242 
243  // #16453
244  $relpath = null;
245  $path = new ilPathGUI();
246  $path = $path->getPath($this->ref_id, $ref_id);
247  if ($path) {
248  $relpath = $this->lng->txt('path') . ': ' . $path;
249  }
250 
251  $tmp_cols[strtolower($title) . "#~#obj_" . $obj_id] = array(
252  "txt" => $title,
253  "icon" => $icon,
254  "type" => $type,
255  "default" => true,
256  "no_permission" => $no_perm,
257  "path" => $relpath
258  );
259  }
260  }
261  if (sizeof($this->objective_ids)) {
262  foreach ($this->objective_ids as $obj_id => $title) {
263  $tmp_cols[strtolower(
264  $title
265  ) . "#~#objtv_" . $obj_id] = array("txt" => $title,
266  "default" => true
267  );
268  }
269  }
270  if (sizeof($this->sco_ids)) {
271  foreach ($this->sco_ids as $obj_id => $title) {
272  $icon = ilObject::_getIcon($obj_id, "tiny", "sco");
273  $tmp_cols[strtolower(
274  $title
275  ) . "#~#objsco_" . $obj_id] = array("txt" => $title,
276  "icon" => $icon,
277  "default" => true
278  );
279  }
280  }
281  if (sizeof($this->subitem_ids)) {
282  foreach ($this->subitem_ids as $obj_id => $title) {
284  $obj_id,
285  "tiny",
287  $this->obj_id
288  )
289  );
290  $tmp_cols[strtolower(
291  $title
292  ) . "#~#objsub_" . $obj_id] = array("txt" => $title,
293  "icon" => $icon,
294  "default" => true
295  );
296  }
297  }
298 
299  // alex, 5 Nov 2011: Do not sort SCORM items or "chapters"
300  if (!sizeof($this->sco_ids) && !sizeof($this->subitem_ids)) {
301  ksort($tmp_cols);
302  }
303  foreach ($tmp_cols as $id => $def) {
304  $id = explode('#~#', $id);
305  $columns[$id[1]] = $def;
306  }
307  unset($tmp_cols);
308 
309  if ($parent) {
310  $columns["obj_" . $this->obj_id] = $parent;
311  }
312  }
313 
314  unset($user_cols[0]["status"]);
315  unset($user_cols[0]["login"]);
316  foreach ($user_cols[0] as $col_id => $col_def) {
317  if (!isset($columns[$col_id])) {
318  // these are all additional fields, no default
319  $col_def["default"] = false;
320  $columns[$col_id] = $col_def;
321  }
322  }
323 
324  return $columns;
325  }
static _lookupTargetTitle(int $a_obj_id)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
getSelectableUserColumns(int $a_in_course=0, int $a_in_group=0)
static getSubItemType(int $a_parent_obj_id)
Get sub-item object type for parent.
$path
Definition: ltiservices.php:29
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getItems(array $a_user_fields, ?array $a_privary_fields=null)
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFilter()

ilTrMatrixTableGUI::initFilter ( )

Definition at line 166 of file class.ilTrMatrixTableGUI.php.

References ilTable2GUI\addFilterItemByMetaType(), ILIAS\Repository\filter(), ilTable2GUI\FILTER_TEXT, ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), null, and ilTable2GUI\setFilterValue().

Referenced by __construct().

166  : void
167  {
168  $item = $this->addFilterItemByMetaType(
169  "name",
171  false,
172  $this->lng->txt('login')
173  );
174  $this->filter["name"] = $item->getValue();
175 
176  // #14949 - is called before constructor, so we have to do it ourselves
177  if ($this->http->wrapper()->query()->has($this->prefix . '_tpl')) {
178  $this->filter["name"] = null;
179  $this->setFilterValue($item, '');
180  }
181  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
static http()
Fetches the global http state from ILIAS.
setFilterValue(ilTableFilterItem $a_item, $a_value)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ numericOrdering()

ilTrMatrixTableGUI::numericOrdering (   $a_field)

Definition at line 183 of file class.ilTrMatrixTableGUI.php.

183  : bool
184  {
185  if ($a_field === 'read_count' || $a_field === 'spent_seconds') {
186  return true;
187  }
188  return false;
189  }

Field Documentation

◆ $has_multi

bool ilTrMatrixTableGUI::$has_multi
protected

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

◆ $ilObjDataCache

ilObjectDataCache ilTrMatrixTableGUI::$ilObjDataCache
protected

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

◆ $in_course

int ilTrMatrixTableGUI::$in_course = 0
protected

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

Referenced by getItems().

◆ $in_course_ref_id

int ilTrMatrixTableGUI::$in_course_ref_id = 0
protected

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

◆ $in_group

int ilTrMatrixTableGUI::$in_group = 0
protected

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

Referenced by getItems().

◆ $in_group_ref_id

int ilTrMatrixTableGUI::$in_group_ref_id = 0
protected

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

◆ $obj_id

int ilTrMatrixTableGUI::$obj_id
protected

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

Referenced by getItems(), and getSelectableColumns().

◆ $obj_ids

array ilTrMatrixTableGUI::$obj_ids = null
protected

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

◆ $objective_ids

array ilTrMatrixTableGUI::$objective_ids = []
protected

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

◆ $perc_map

array ilTrMatrixTableGUI::$perc_map = []
protected

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

◆ $privacy_cols

array ilTrMatrixTableGUI::$privacy_cols = []
protected

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

◆ $privacy_fields

array ilTrMatrixTableGUI::$privacy_fields = []
protected

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

◆ $rbacsystem

ilRbacSystem ilTrMatrixTableGUI::$rbacsystem
protected

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

◆ $ref_id

int ilTrMatrixTableGUI::$ref_id
protected

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

Referenced by __construct().

◆ $ref_ids

array ilTrMatrixTableGUI::$ref_ids = []
protected

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

◆ $sco_ids

array ilTrMatrixTableGUI::$sco_ids = []
protected

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

◆ $subitem_ids

array ilTrMatrixTableGUI::$subitem_ids = []
protected

Definition at line 36 of file class.ilTrMatrixTableGUI.php.

◆ $tree

ilTree ilTrMatrixTableGUI::$tree
protected

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

◆ $type

string ilTrMatrixTableGUI::$type
protected

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


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