19 declare(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");
98 $mail =
new ilMail($DIC->user()->getId());
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;
126 $this->
addColumn($labels[$c][
"txt"], $sort_id);
137 $this->
ctrl->getFormActionByClass(get_class($this))
140 "tpl.object_users_props_row.html",
158 'edit_learning_progress',
165 if ($this->selectable_columns) {
170 $this->in_course_ref_id,
171 $this->in_group_ref_id
173 $this->user_fields =
$cols[1];
174 $this->selectable_columns =
$cols[0];
188 $check_agreement = null;
189 if ($this->in_course) {
192 if ($privacy->courseConfirmationRequired()) {
195 } elseif ($this->in_group) {
198 if ($privacy->groupConfirmationRequired()) {
213 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0) {
232 if (in_array(
'org_units', $additional_fields)) {
233 foreach (($tr_data[
'set'] ?? []) as
$key =>
$data) {
234 if (!isset(
$data[
'usr_id'])) {
238 $org_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($usr_id);
239 $tr_data[
"set"][
$key][
'org_units'] = $org_units;
244 $this->
setData($tr_data[
"set"]);
264 case "matriculation":
281 case 'status_changed':
321 "" => $this->
lng->txt(
"trac_all"),
322 "n" => $this->
lng->txt(
"gender_n"),
323 "m" => $this->
lng->txt(
"gender_m"),
324 "f" => $this->
lng->txt(
"gender_f"),
327 $this->
filter[
"gender"] = $item->getValue();
340 $options[
$c] = $this->
lng->txt(
"meta_c_" . $c);
344 array(
"" => $this->
lng->txt(
"trac_all")) + $options
347 $this->
filter[
"sel_country"] = $item->getValue();
358 array(
"" => $this->
lng->txt(
"trac_all"),
373 $this->
filter[
"status"] = $item->getValue();
374 if (is_numeric($this->
filter[
"status"])) {
375 $this->
filter[
"status"]--;
385 $this->
filter[
"language"] = $item->getValue();
388 case "spent_seconds":
396 $this->
filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
398 )->getValueInSeconds();
399 $this->
filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
401 )->getValueInSeconds();
408 protected function fillRow(array $a_set): void
410 if ($this->has_multi) {
411 $this->tpl->setVariable(
"USER_ID", $a_set[
"usr_id"]);
415 if (!(
bool) ($a_set[
"privacy_conflict"] ?? null)) {
422 if ($timing !==
true) {
429 $this->tpl->setCurrentBlock(
'warning_img');
430 $this->tpl->setVariable(
436 $this->tpl->setVariable(
442 $this->tpl->parseCurrentBlock();
447 if ($c ==
'login' && !$a_set[
"active"]) {
448 $this->tpl->setCurrentBlock(
'inactive_bl');
449 $this->tpl->setVariable(
451 $this->
lng->txt(
"inactive")
453 $this->tpl->parseCurrentBlock();
456 $val = $this->
parseValue($c, $a_set[$c] ??
'', $this->type);
459 $this->tpl->setCurrentBlock(
'inactive_bl');
460 $this->tpl->setVariable(
463 "status_no_permission" 466 $this->tpl->parseCurrentBlock();
472 $this->tpl->setCurrentBlock(
"user_field");
473 $this->tpl->setVariable(
"VAL_UF", $val);
474 $this->tpl->parseCurrentBlock();
477 $this->
ctrl->setParameterByClass(
478 "illplistofobjectsgui",
483 if (!$this->
getPrintMode() && !(
bool) ($a_set[
"privacy_conflict"] ?? null)) {
485 if ($this->has_collection ||
486 $this->objDefinition->isContainer($this->type)) {
487 $this->tpl->setCurrentBlock(
"item_command");
488 $this->tpl->setVariable(
490 $this->
ctrl->getLinkTargetByClass(
491 "illplistofobjectsgui",
495 $this->tpl->setVariable(
497 $this->
lng->txt(
'details')
499 $this->tpl->parseCurrentBlock();
502 if ($this->has_edit) {
503 $this->tpl->setCurrentBlock(
"item_command");
504 $this->tpl->setVariable(
506 $this->
ctrl->getLinkTargetByClass(
507 "illplistofobjectsgui",
511 $this->tpl->setVariable(
"TXT_COMMAND", $this->
lng->txt(
'edit'));
512 $this->tpl->parseCurrentBlock();
516 $this->
ctrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
524 $a_excel->
setCell($a_row, $cnt++, $labels[$c][
"txt"]);
539 if ($c !=
'status') {
540 $val = $this->
parseValue($c, $a_set[$c], $this->type);
546 $a_excel->
setCell($a_row, $cnt++, $val);
563 if ($c !=
'status') {
564 $val = $this->
parseValue($c, $a_set[$c], $this->type);
const LP_STATUS_COMPLETED_NUM
getCurrentFilter(bool $as_query=false)
setExportFormats(array $formats)
Set available export formats.
setFormAction(string $a_form_action, bool $a_multipart=false)
ilObjectDataCache $ilObjDataCache
setEnableTitle(bool $a_enabletitle)
getSelectableUserColumns(int $a_in_course=0, int $a_in_group=0)
const LP_STATUS_NOT_ATTEMPTED
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getColumnCoord(int $a_col)
Get column "name" from number.
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)
setShowTemplates(bool $a_value)
const LP_STATUS_IN_PROGRESS_NUM
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
__construct(?object $a_parent_obj, string $a_parent_cmd, int $a_obj_id, int $a_ref_id, bool $a_print_view=false)
Constructor.
setPrintMode(bool $a_value=false)
getItems()
Get user items.
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.
const FILTER_NUMBER_RANGE
array $selectable_columns
const LP_STATUS_IN_PROGRESS
ilObjectDefinition $objDefinition
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parses the objects.xml it handles the xml-description of all ilias objects
resetOffset(bool $a_in_determination=false)
setExternalSorting(bool $a_val)
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
setBold(string $a_coords)
Set cell(s) to bold.
fillHeaderExcel(ilExcel $a_excel, int &$a_row)
const FILTER_DATETIME_RANGE
TableGUI class for learning progress.
setDefaultOrderField(string $a_defaultorderfield)
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
Learning progress table: One object, rows: users, columns: properties Example: A course, rows: members, columns: name, status, mark, ...
const FILTER_DURATION_RANGE
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
parseValue(string $id, ?string $value, string $type)
setDefaultOrderDirection(string $a_defaultorderdirection)
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
const LP_STATUS_NOT_ATTEMPTED_NUM
static supportsSpentSeconds(string $obj_type)
__construct(Container $dic, ilPlugin $plugin)
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
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 getCountryCodes()
Get country codes (DIN EN 3166-1)
static supportsMark(string $obj_type)
fillHeaderCSV(ilCSVWriter $a_csv)
static _lookupType(int $id, bool $reference=false)
parseTitle(int $a_obj_id, string $action, int $a_user_id=0)
showTimingsWarning(int $a_ref_id, int $a_user_id)
const LP_STATUS_COMPLETED
addMultiCommand(string $a_cmd, string $a_text)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
const LP_STATUS_FAILED_NUM
setExternalSegmentation(bool $a_val)