35 $ilCtrl = $DIC[
'ilCtrl'];
37 $this->ref_id = $a_ref_id;
38 $this->
setId(
"admusrlp");
44 $this->
addColumn($this->
lng->txt(
"firstname"),
"firstname");
45 $this->
addColumn($this->
lng->txt(
"lastname"),
"lastname");
46 $this->
addColumn($this->
lng->txt(
"online_time"),
"online_time");
47 $this->
addColumn($this->
lng->txt(
"last_login"),
"last_login");
51 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
53 $this->
setRowTemplate(
"tpl.user_list_lp_row.html",
"Services/User");
85 if (count($usr_data[
"set"]) == 0 && $this->
getOffset() > 0) {
100 array(
"online_time"),
107 $this->
setData($usr_data[
"set"]);
117 protected function fillRow(array $a_set): void
121 $ilCtrl = $DIC[
'ilCtrl'];
123 if ($this->lp_active) {
124 $ilCtrl->setParameterByClass(
"illearningprogressgui",
"ref_id", $this->ref_id);
125 $ilCtrl->setParameterByClass(
"illearningprogressgui",
"obj_id", $a_set[
"usr_id"]);
126 $link = $ilCtrl->getLinkTargetByClass(array(
"ilobjusergui",
'illearningprogressgui'),
"");
128 $this->tpl->setCurrentBlock(
"login_link");
129 $this->tpl->setVariable(
"HREF_LOGIN", $link);
130 $this->tpl->setVariable(
"VAL_LOGIN", $a_set[
"login"]);
132 $this->tpl->setCurrentBlock(
"login_plain");
133 $this->tpl->setVariable(
"VAL_LOGIN_PLAIN", $a_set[
"login"]);
135 $this->tpl->parseCurrentBlock();
137 $this->tpl->setVariable(
"VAL_FIRSTNAME", $a_set[
"firstname"]);
138 $this->tpl->setVariable(
"VAL_LASTNAME", $a_set[
"lastname"]);
139 $this->tpl->setVariable(
141 self::secondsToShortString($a_set[
"online_time"])
143 $this->tpl->setVariable(
151 $a_excel->
setCell($a_row, 0, $a_set[
"login"]);
152 $a_excel->
setCell($a_row, 1, $a_set[
"firstname"]);
153 $a_excel->
setCell($a_row, 2, $a_set[
"lastname"]);
157 self::secondsToShortString($a_set[
"online_time"])
168 $seconds = $seconds ?: 0;
169 $days = floor($seconds / 86400);
170 $rest = $seconds % 86400;
172 $hours = floor(
$rest / 3600);
175 $minutes = floor(
$rest / 60);
178 return sprintf(
"%02d:%02d:%02d:%02d", $days, $hours, $minutes,
$rest);
setExportFormats(array $formats)
Set available export formats.
setFormAction(string $a_form_action, bool $a_multipart=false)
static secondsToShortString(int $seconds)
converts seconds to string: Long: 7 days 4 hour(s) ...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.
__construct(object $a_parent_obj, string $a_parent_cmd, int $a_ref_id)
resetOffset(bool $a_in_determination=false)
setExternalSorting(bool $a_val)
static _enabledLearningProgress()
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
__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 getUserListData(string $a_order_field, string $a_order_dir, int $a_offset, int $a_limit, string $a_string_filter="", string $a_activation_filter="", ?ilDateTime $a_last_login_filter=null, bool $a_limited_access_filter=false, bool $a_no_courses_filter=false, int $a_course_group_filter=0, int $a_role_filter=0, array $a_user_folder_filter=null, array $a_additional_fields=null, array $a_user_filter=null, string $a_first_letter="", string $a_authentication_filter="")
Get data for user administration list.
determineOffsetAndOrder(bool $a_omit_offset=false)
setMaxCount(int $a_max_count)
set max.
setExternalSegmentation(bool $a_val)