19declare(strict_types=0);
59 ?
object $a_parent_obj,
63 bool $a_print_view =
false
67 $this->tree =
$DIC->repositoryTree();
68 $this->rbacsystem =
$DIC->rbac()->system();
69 $this->ilObjDataCache =
$DIC[
'ilObjDataCache'];
70 $this->objDefinition =
$DIC[
'objDefinition'];
72 $this->
setId(
"troup");
73 $this->obj_id = $a_obj_id;
74 $this->ref_id = $a_ref_id;
77 $this->in_group_ref_id = $this->tree->checkForParentType($this->ref_id,
"grp");
78 if ($this->in_group_ref_id) {
81 $this->in_course_ref_id = $this->tree->checkForParentType(
85 if ($this->in_course_ref_id) {
90 $this->
parseTitle($a_obj_id,
"trac_participants");
99 if ($this->rbacsystem->checkAccess(
101 $mail->getMailObjectReferenceId()
105 $this->
lng->txt(
"send_mail")
108 $this->
lng->loadLanguageModule(
'user');
111 $this->
lng->txt(
'clipboard_add_btn')
114 $this->has_multi =
true;
124 $sort_id = (substr(
$c, 0, 4) ==
"udf_") ?
"" :
$c;
137 $this->
ctrl->getFormActionByClass(get_class($this))
140 "tpl.object_users_props_row.html",
141 "components/ILIAS/Tracking"
157 'edit_learning_progress',
164 if ($this->selectable_columns) {
169 $this->in_course_ref_id,
170 $this->in_group_ref_id
172 $this->user_fields = $cols[1];
173 $this->selectable_columns = $cols[0];
187 $check_agreement =
null;
188 if ($this->in_course) {
191 if ($privacy->courseConfirmationRequired()) {
194 } elseif ($this->in_group) {
197 if ($privacy->groupConfirmationRequired()) {
212 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0) {
231 if (in_array(
'org_units', $additional_fields)) {
232 foreach (($tr_data[
'set'] ?? []) as $key =>
$data) {
233 if (!isset(
$data[
'usr_id'])) {
237 $org_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($usr_id);
238 $tr_data[
"set"][$key][
'org_units'] = $org_units;
243 $this->
setData($tr_data[
"set"]);
263 case "matriculation":
280 case 'status_changed':
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"),
326 $this->
filter[
"gender"] = $item->getValue();
339 $options[
$c] = $this->
lng->txt(
"meta_c_" . $c);
343 array(
"" => $this->
lng->txt(
"trac_all")) + $options
346 $this->
filter[
"sel_country"] = $item->getValue();
357 array(
"" => $this->
lng->txt(
"trac_all"),
372 $this->
filter[
"status"] = $item->getValue();
373 if (is_numeric($this->
filter[
"status"])) {
374 $this->
filter[
"status"]--;
384 $this->
filter[
"language"] = $item->getValue();
387 case "spent_seconds":
395 $this->
filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
397 )->getValueInSeconds();
398 $this->
filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
400 )->getValueInSeconds();
407 protected function fillRow(array $a_set): void
409 if ($this->has_multi) {
410 $this->tpl->setVariable(
"USER_ID", $a_set[
"usr_id"]);
414 if (!(
bool) ($a_set[
"privacy_conflict"] ??
null)) {
421 if ($timing !==
true) {
428 $this->tpl->setCurrentBlock(
'warning_img');
429 $this->tpl->setVariable(
432 'media/time_warn.svg'
435 $this->tpl->setVariable(
441 $this->tpl->parseCurrentBlock();
446 if (
$c ==
'login' && !$a_set[
"active"]) {
447 $this->tpl->setCurrentBlock(
'inactive_bl');
448 $this->tpl->setVariable(
450 $this->
lng->txt(
"inactive")
452 $this->tpl->parseCurrentBlock();
455 $val = $this->
parseValue($c, $a_set[
$c] ??
'', $this->type);
458 $this->tpl->setCurrentBlock(
'inactive_bl');
459 $this->tpl->setVariable(
462 "status_no_permission"
465 $this->tpl->parseCurrentBlock();
471 $this->tpl->setCurrentBlock(
"user_field");
472 $this->tpl->setVariable(
"VAL_UF", $val);
473 $this->tpl->parseCurrentBlock();
476 $this->
ctrl->setParameterByClass(
477 "illplistofobjectsgui",
482 if (!$this->
getPrintMode() && !(
bool) ($a_set[
"privacy_conflict"] ??
null)) {
484 if ($this->has_collection ||
485 $this->objDefinition->isContainer($this->type)) {
486 $this->tpl->setCurrentBlock(
"item_command");
487 $this->tpl->setVariable(
489 $this->
ctrl->getLinkTargetByClass(
490 "illplistofobjectsgui",
494 $this->tpl->setVariable(
496 $this->
lng->txt(
'details')
498 $this->tpl->parseCurrentBlock();
501 if ($this->has_edit) {
502 $this->tpl->setCurrentBlock(
"item_command");
503 $this->tpl->setVariable(
505 $this->
ctrl->getLinkTargetByClass(
506 "illplistofobjectsgui",
510 $this->tpl->setVariable(
"TXT_COMMAND", $this->
lng->txt(
'edit'));
511 $this->tpl->parseCurrentBlock();
515 $this->
ctrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
523 $a_excel->
setCell($a_row, $cnt++, $labels[
$c][
"txt"]);
538 if (
$c !==
'status') {
539 $val = $this->
parseValue($c, $a_set[
$c] ??
null, $this->type);
545 $a_excel->
setCell($a_row, $cnt++, $val);
551 $labels = $this->getSelectableColumns();
552 foreach ($this->getSelectedColumns() as
$c) {
561 foreach ($this->getSelectedColumns() as
$c) {
562 if (
$c !==
'status') {
563 $val = $this->parseValue(
$c, $a_set[
$c] ??
null, $this->type);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getCountryCodes()
Get country codes (DIN EN 3166-1)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
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.
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_COMPLETED
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
TableGUI class for learning progress.
showTimingsWarning(int $a_ref_id, int $a_user_id)
getCurrentFilter(bool $as_query=false)
parseValue(string $id, ?string $value, string $type)
parseTitle(int $a_obj_id, string $action, int $a_user_id=0)
getSelectableUserColumns(int $a_in_course=0, int $a_in_group=0)
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
parses the objects.xml it handles the xml-description of all ilias objects
static supportsSpentSeconds(string $obj_type)
static supportsMark(string $obj_type)
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
determineOffsetAndOrder(bool $a_omit_offset=false)
setExportFormats(array $formats)
Set available export formats.
setExternalSegmentation(bool $a_val)
setEnableTitle(bool $a_enabletitle)
addMultiCommand(string $a_cmd, string $a_text)
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
setFormAction(string $a_form_action, bool $a_multipart=false)
resetOffset(bool $a_in_determination=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)
array $selectable_columns
const FILTER_DURATION_RANGE
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
const FILTER_NUMBER_RANGE
const FILTER_DATETIME_RANGE
setMaxCount(int $a_max_count)
set max.
Learning progress table: One object, rows: users, columns: properties Example: A course,...
ilObjectDataCache $ilObjDataCache
fillRow(array $a_set)
Standard Version of Fill Row.
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
CSV Version of Fill Row.
ilObjectDefinition $objDefinition
fillHeaderExcel(ilExcel $a_excel, int &$a_row)
Excel Version of Fill Header.
__construct(?object $a_parent_obj, string $a_parent_cmd, int $a_obj_id, int $a_ref_id, bool $a_print_view=false)
Constructor.
fillHeaderCSV(ilCSVWriter $a_csv)
CSV Version of Fill Header.
getSelectableColumns()
Get selectable columns.
getItems()
Get user items.
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
Excel Version of Fill Row.
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)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)