40 ?
object $a_parent_obj,
45 bool $a_print_view =
false
49 $this->
setId(
"truop");
50 $this->user_id = $a_user_id;
51 $this->obj_id = $a_obj_id;
53 $this->ref_id = $a_ref_id;
58 $this->
parseTitle($this->obj_id,
"details", $this->user_id);
81 if ($l ==
"u_comment") {
95 $this->
ctrl->getFormActionByClass(get_class($this))
98 "tpl.user_objects_props_row.html",
99 "components/ILIAS/Tracking"
115 if ($tracking->hasExtendedData(
118 $cols[
"first_access"] = array(
119 "txt" => $this->
lng->txt(
"trac_first_access"),
122 $cols[
"last_access"] = array(
123 "txt" => $this->
lng->txt(
"trac_last_access"),
127 if ($tracking->hasExtendedData(
130 $cols[
"read_count"] = array(
131 "txt" => $this->
lng->txt(
"trac_read_count"),
135 if ($tracking->hasExtendedData(
138 $cols[
"spent_seconds"] = array(
139 "txt" => $this->
lng->txt(
"trac_spent_seconds"),
145 $cols[
"percentage"] = array(
146 "txt" => $this->
lng->txt(
"trac_percentage"),
150 $cols[
"status"] = array(
151 "txt" => $this->
lng->txt(
"trac_status"),
154 $cols[
"mark"] = array(
155 "txt" => $this->
lng->txt(
"trac_mark"),
158 $cols[
"u_comment"] = array(
159 "txt" => $this->
lng->txt(
"trac_comment"),
181 $this->
filter[
"view_mode"] ??
false
184 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0) {
196 $this->
filter[
"view_mode"] ??
false
201 foreach ($tr_data[
"set"] as $idx => $row) {
202 if (($row[
"ref_id"] ?? 0) &&
204 'read_learning_progress',
207 foreach (array_keys($row) as $col_id) {
217 $tr_data[
"set"][$idx][$col_id] =
null;
220 $tr_data[
"set"][$idx][
"privacy_conflict"] =
true;
230 foreach ($tr_data[
"set"] as $idx => $row) {
231 if ($row[
'obj_id'] == $this->obj_id) {
233 } elseif (isset($row[
"sort_title"])) {
234 $set[strtolower($row[
"sort_title"]) .
"__" . $idx] = $row;
236 $set[strtolower($row[
"title"]) .
"__" . $idx] = $row;
239 unset($tr_data[
"set"]);
245 $set = array_values($set);
247 array_unshift($set, $parent);
252 $this->
setData($tr_data[
"set"]);
260 $collection = $olp->getCollectionInstance();
264 $this->
lng->txt(
"trac_view_mode"),
272 $this->
lng->txt(
"trac_view_mode_collection"),
277 $ti->readFromSession();
278 $this->
filter[
"view_mode"] = $ti->getValue();
282 protected function fillRow(array $a_set): void
288 $a_set[
"percentage"] =
null;
292 if (!(
bool) ($a_set[
"privacy_conflict"] ??
null)) {
293 $val = (trim(($a_set[
$c] ??
'')) ==
"")
297 if (($a_set[
$c] ??
'') !=
"" ||
$c ==
"status") {
317 if (($a_set[
"ref_id"] ?? 0) &&
318 $a_set[
"type"] !=
"lobj" &&
319 $a_set[
"type"] !=
"sco" &&
320 $a_set[
"type"] !=
"st" &&
321 $a_set[
"type"] !=
"mob") {
327 if ($timing !==
true) {
337 $this->tpl->setCurrentBlock(
'warning_img');
338 $this->tpl->setVariable(
341 'media/time_warn.svg'
344 $this->tpl->setVariable(
350 $this->tpl->parseCurrentBlock();
355 case "spent_seconds":
363 ($a_set[
$c] < 3600 ?
true :
false)
369 $val = $a_set[
$c] .
"%";
377 if (
$c ==
"spent_seconds" &&
381 if (
$c ==
"percentage" &&
389 $this->tpl->setCurrentBlock(
"user_field");
390 $this->tpl->setVariable(
"VAL_UF", $val);
391 $this->tpl->parseCurrentBlock();
394 if ($a_set[
"privacy_conflict"] ??
null) {
395 $this->tpl->setCurrentBlock(
"permission_bl");
396 $this->tpl->setVariable(
398 $this->
lng->txt(
"status_no_permission")
400 $this->tpl->parseCurrentBlock();
403 if ($a_set[
"title"] ==
"") {
404 $a_set[
"title"] =
"--" . $this->
lng->txt(
"none") .
"--";
407 $this->tpl->setVariable(
411 $this->tpl->setVariable(
"ICON_ALT", $this->
lng->txt($a_set[
"type"]));
416 ) && $a_set[
'obj_id'] != $this->obj_id) {
417 if ($a_set[
'type'] ==
'fold') {
418 $object_gui =
'ilobjfoldergui';
420 $object_gui =
'ilobjgroupgui';
422 $this->tpl->setCurrentBlock(
'title_linked');
425 if ($this->
http->wrapper()->query()->has(
'baseClass')) {
426 $base_class = $this->
http->wrapper()->query()->retrieve(
428 $this->
refinery->kindlyTo()->string()
432 if ($base_class !=
"ilDashboardGUI" && $base_class !=
"ilAdministrationGUI") {
433 $old = $this->
ctrl->getParameterArrayByClass(
434 'illplistofobjectsgui'
436 $this->
ctrl->setParameterByClass(
437 'illplistofobjectsgui',
441 $this->
ctrl->setParameterByClass(
442 'illplistofobjectsgui',
446 $this->
ctrl->setParameterByClass(
447 'illplistofobjectsgui',
451 $url = $this->
ctrl->getLinkTargetByClass(
452 array(
'ilrepositorygui',
454 'illearningprogressgui',
455 'illplistofobjectsgui'
459 $this->
ctrl->setParameterByClass(
460 'illplistofobjectsgui',
462 $old[
"ref_id"] ??
null
464 $this->
ctrl->setParameterByClass(
465 'illplistofobjectsgui',
469 $this->
ctrl->setParameterByClass(
470 'illplistofobjectsgui',
478 $this->tpl->setVariable(
"URL_TITLE",
$url);
479 $this->tpl->setVariable(
"VAL_TITLE", $a_set[
"title"]);
480 $this->tpl->parseCurrentBlock();
482 $this->tpl->setCurrentBlock(
'title_plain');
483 $this->tpl->setVariable(
"VAL_TITLE", $a_set[
"title"]);
484 $this->tpl->parseCurrentBlock();
488 if (($a_set[
'ref_id'] ?? 0)) {
490 $path =
$path->getPath($this->ref_id, $a_set[
'ref_id']);
492 $this->tpl->setVariable(
494 $this->
lng->txt(
'path') .
': ' .
$path
500 if (($a_set[
"ref_id"] ?? 0) &&
502 'edit_learning_progress',
509 $this->tpl->setCurrentBlock(
"item_command");
510 $this->
ctrl->setParameterByClass(
511 "illplistofobjectsgui",
515 $this->tpl->setVariable(
517 $this->
ctrl->getLinkTargetByClass(
518 "illplistofobjectsgui",
522 $this->tpl->setVariable(
"TXT_COMMAND", $this->
lng->txt(
'edit'));
523 $this->
ctrl->setParameterByClass(
524 "illplistofobjectsgui",
528 $this->tpl->parseCurrentBlock();
535 $a_excel->
setCell($a_row, 0, $this->
lng->txt(
"type"));
536 $a_excel->
setCell($a_row, 1, $this->
lng->txt(
"title"));
541 $a_excel->
setCell($a_row, $cnt++, $labels[
$c][
"txt"]);
554 $a_excel->setCell($a_row, 0, $this->
lng->txt($a_set[
"type"]));
555 $a_excel->
setCell($a_row, 1, $a_set[
"title"]);
559 if (
$c !=
'status') {
566 $a_excel->
setCell($a_row, $cnt++, $val);
575 $labels = $this->getSelectableColumns();
576 foreach ($this->getSelectedColumns() as
$c) {
588 foreach ($this->getSelectedColumns() as
$c) {
589 if (
$c !=
'status') {
590 $val = $this->parseValue(
$c, $a_set[
$c], $this->type);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static secondsToString(int $seconds, bool $force_with_seconds=false, ?ilLanguage $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
@classDescription Date and time handling
setBold(string $a_coords)
Set cell(s) to bold.
getColumnCoord(int $a_col)
Get column "name" from number.
setCell(int $a_row, int $col, $value, ?string $datatype=null)
Set cell value.
LP collection of repository objects.
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
TableGUI class for learning progress.
showTimingsWarning(int $a_ref_id, int $a_user_id)
parseValue(string $id, ?string $value, string $type)
isPercentageAvailable(int $a_obj_id)
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 _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
const EXTENDED_DATA_READ_COUNT
const EXTENDED_DATA_SPENT_SECONDS
const EXTENDED_DATA_LAST_ACCESS
static supportsSpentSeconds(string $obj_type)
static supportsMark(string $obj_type)
static getInstance(int $obj_id)
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
This class represents an option in a radio group.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
determineOffsetAndOrder(bool $a_omit_offset=false)
setExportFormats(array $formats)
Set available export formats.
setExternalSegmentation(bool $a_val)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setEnableTitle(bool $a_enabletitle)
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)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
setMaxCount(int $a_max_count)
set max.
static getObjectsDataForUser(int $a_user_id, int $a_parent_obj_id, int $a_parent_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, bool $use_collection=true)
Get all object-based tracking data for user and parent object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillHeaderCSV(ilCSVWriter $a_csv)
CSV Version of Fill Header.
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
CSV Version of Fill Row.
__construct(?object $a_parent_obj, string $a_parent_cmd, int $a_user_id, int $a_obj_id, int $a_ref_id, bool $a_print_view=false)
Constructor.
fillRow(array $a_set)
Standard Version of Fill Row.
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
Excel Version of Fill Row.
fillHeaderExcel(ilExcel $a_excel, int &$a_row)
Excel Version of Fill Header.
getSelectableColumns()
Get selectable columns.
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="")
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
filter(string $filter_id, array $class_path, string $cmd, bool $activated=true, bool $expanded=true)