54 $this->
setId(
'myst_lcrt');
58 $this->
setRowTemplate(
'tpl.list_courses_row.html',
"Services/MyStaff");
59 $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
90 'filters' => $this->
filter,
103 $data = $certificates_fetcher->getData($options);
111 $options[
'limit'] = array(
115 $max_data = $certificates_fetcher->getData($options);
123 $item =
new ilTextInputGUI($DIC->language()->txt(
"title"),
"obj_title");
125 $item->readFromSession();
126 $this->
filter[
'obj_title'] = $item->getValue();
130 $DIC->language()->txt(
"login")
131 .
"/" . $DIC->language()->txt(
"email")
132 .
"/" . $DIC->language()->txt(
"name"),
137 $item->readFromSession();
138 $this->
filter[
'user'] = $item->getValue();
142 $options[0] = $DIC->language()->txt(
'mst_opt_all');
143 foreach ($paths as $org_ref_id =>
$path) {
144 $options[$org_ref_id] =
$path;
146 $item =
new ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'),
'org_unit');
147 $item->setOptions($options);
149 $item->readFromSession();
150 $this->
filter[
'org_unit'] = $item->getValue();
156 if ($this->selectable_columns_cached) {
171 $cols[
'objectTitle'] = array(
172 'txt' => $DIC->language()->txt(
'title'),
175 'sort_field' =>
'objectTitle',
177 $cols[
'issuedOnTimestamp'] = array(
178 'txt' => $DIC->language()->txt(
'mst_cert_issued_on'),
181 'sort_field' =>
'issuedOnTimestamp',
183 if ($arr_searchable_user_columns[
'login'] ??
false) {
184 $cols[
'userLogin'] = array(
185 'txt' => $DIC->language()->txt(
'login'),
188 'sort_field' =>
'userLogin',
191 if ($arr_searchable_user_columns[
'firstname'] ??
false) {
192 $cols[
'userFirstName'] = array(
193 'txt' => $DIC->language()->txt(
'firstname'),
196 'sort_field' =>
'userFirstName',
199 if ($arr_searchable_user_columns[
'lastname'] ??
false) {
200 $cols[
'userLastName'] = array(
201 'txt' => $DIC->language()->txt(
'lastname'),
204 'sort_field' =>
'userLastName',
208 if ($arr_searchable_user_columns[
'email'] ??
false) {
209 $cols[
'userEmail'] = array(
210 'txt' => $DIC->language()->txt(
'email'),
213 'sort_field' =>
'userEmail',
216 if ($arr_searchable_user_columns[
'org_units'] ??
false) {
217 $cols[
'usr_assinged_orgus'] = array(
218 'txt' => $DIC->language()->txt(
'objs_orgu'),
233 $sort = $v[
'sort_field'] ??
"";
240 $this->
addColumn($DIC->language()->txt(
'actions'));
246 if (isset($this->usr_orgu_names[$user_id])) {
247 return $this->usr_orgu_names[$user_id];
250 return $this->usr_orgu_names[$user_id] = \ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
260 final protected function fillRow(array $a_set): void
264 $set = array_pop($a_set);
266 $propGetter = Closure::bind(
function ($prop) {
267 return $this->$prop ?? null;
272 case 'usr_assinged_orgus':
273 $this->tpl->setCurrentBlock(
'td');
274 $this->tpl->setVariable(
278 $this->tpl->parseCurrentBlock();
280 case 'issuedOnTimestamp':
282 $this->tpl->setCurrentBlock(
'td');
283 $this->tpl->setVariable(
'VALUE', $date_time->get(
IL_CAL_DATE));
284 $this->tpl->parseCurrentBlock();
287 if ($propGetter($k) !== null) {
288 $this->tpl->setCurrentBlock(
'td');
289 $this->tpl->setVariable(
291 (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k))
293 $this->tpl->parseCurrentBlock();
295 $this->tpl->setCurrentBlock(
'td');
296 $this->tpl->setVariable(
'VALUE',
' ');
297 $this->tpl->parseCurrentBlock();
304 $actions->setListTitle($DIC->language()->txt(
"actions"));
305 $actions->setId($set->getCertificateId());
306 $actions->addItem($DIC->language()->txt(
"mst_download_certificate"),
'', $set->getDownloadLink());
308 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
309 $this->tpl->parseCurrentBlock();
314 $set = array_pop($a_set);
318 $a_excel->
setCell($a_row, $col, $v);
325 $set = array_pop($a_set);
335 $propGetter = Closure::bind(
function ($prop) {
336 return $this->$prop ?? null;
337 }, $user_certificate_dto, $user_certificate_dto);
339 $field_values = array();
342 case 'usr_assinged_orgus':
345 case 'issuedOnTimestamp':
349 $field_values[$k] = strip_tags($propGetter($k) ??
"");
354 return $field_values;
setExportFormats(array $formats)
Set available export formats.
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
Class ilMStListCertificates.
setEnableTitle(bool $a_enabletitle)
getTextRepresentationOfUsersOrgUnits(int $user_id)
setDisableFilterHiding(bool $a_val=true)
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.
__construct(ilMStListCertificatesGUI $parent_obj, $parent_cmd=ilMStListCertificatesGUI::CMD_INDEX)
setFormName(string $a_name="")
getFieldValuesForExport(UserCertificateDto $user_certificate_dto)
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
static getTextRepresentationOfOrgUnits(bool $sort_by_title=true)
Get ref id path array.
Class ilMStListCertificatesTableGUI.
setExternalSorting(bool $a_val)
isColumnSelected(string $col)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setDefaultOrderField(string $a_defaultorderfield)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
array $selectable_columns_cached
setDefaultOrderDirection(string $a_defaultorderdirection)
static getSelectableColumnInfo(bool $a_admin=false)
Get info of searchable fields for selectable columns in table gui.
setEnableNumInfo(bool $a_val)
__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 _isEnabled($a_key)
determineOffsetAndOrder(bool $a_omit_offset=false)
setMaxCount(int $a_max_count)
set max.
setFilterCols(int $a_val)
setExternalSegmentation(bool $a_val)
setPrefix(string $a_prefix)