57 $this->
setId(
'myst_lcrt');
61 $this->
setRowTemplate(
'tpl.list_courses_row.html',
"Services/MyStaff");
62 $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
97 'filters' => $this->
filter,
110 $data = $certificates_fetcher->getData($options);
114 $options[
'limit'] = array(
118 $max_data = $certificates_fetcher->getData($options);
127 $item =
new ilTextInputGUI($DIC->language()->txt(
"title"),
"obj_title");
129 $item->readFromSession();
130 $this->
filter[
'obj_title'] = $item->getValue();
134 $DIC->language()->txt(
"login")
135 .
"/" . $DIC->language()->txt(
"email")
136 .
"/" . $DIC->language()->txt(
"name"),
141 $item->readFromSession();
142 $this->
filter[
'user'] = $item->getValue();
146 $options[0] = $DIC->language()->txt(
'mst_opt_all');
147 foreach ($paths as $org_ref_id => $path) {
148 $options[$org_ref_id] = $path;
150 $item =
new ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'),
'org_unit');
151 $item->setOptions($options);
153 $item->readFromSession();
154 $this->
filter[
'org_unit'] = $item->getValue();
160 if ($this->selectable_columns_cached) {
175 $cols[
'objectTitle'] = array(
176 'txt' => $DIC->language()->txt(
'title'),
179 'sort_field' =>
'objectTitle',
181 $cols[
'issuedOnTimestamp'] = array(
182 'txt' => $DIC->language()->txt(
'mst_cert_issued_on'),
185 'sort_field' =>
'issuedOnTimestamp',
187 if ($arr_searchable_user_columns[
'login']) {
188 $cols[
'userLogin'] = array(
189 'txt' => $DIC->language()->txt(
'login'),
192 'sort_field' =>
'userLogin',
195 if ($arr_searchable_user_columns[
'firstname']) {
196 $cols[
'userFirstName'] = array(
197 'txt' => $DIC->language()->txt(
'firstname'),
200 'sort_field' =>
'userFirstName',
203 if ($arr_searchable_user_columns[
'lastname']) {
204 $cols[
'userLastName'] = array(
205 'txt' => $DIC->language()->txt(
'lastname'),
208 'sort_field' =>
'userLastName',
212 if ($arr_searchable_user_columns[
'email']) {
213 $cols[
'userEmail'] = array(
214 'txt' => $DIC->language()->txt(
'email'),
217 'sort_field' =>
'userEmail',
220 if ($arr_searchable_user_columns[
'org_units']) {
221 $cols[
'usr_assinged_orgus'] = array(
222 'txt' => $DIC->language()->txt(
'objs_orgu'),
241 if (isset($v[
'sort_field'])) {
242 $sort = $v[
'sort_field'];
246 $this->
addColumn($v[
'txt'], $sort, $v[
'width']);
252 $this->
addColumn($DIC->language()->txt(
'actions'));
258 if (isset($this->usr_orgu_names[$user_id])) {
259 return $this->usr_orgu_names[$user_id];
262 return $this->usr_orgu_names[$user_id] = \ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
268 public function fillRow($user_certificate_dto)
272 $propGetter = Closure::bind(
function ($prop) {
274 }, $user_certificate_dto, $user_certificate_dto);
278 case 'usr_assinged_orgus':
279 $this->tpl->setCurrentBlock(
'td');
281 $this->tpl->parseCurrentBlock();
283 case 'issuedOnTimestamp':
285 $this->tpl->setCurrentBlock(
'td');
286 $this->tpl->setVariable(
'VALUE', $date_time->get(
IL_CAL_DATE));
287 $this->tpl->parseCurrentBlock();
290 if ($propGetter($k) !== null) {
291 $this->tpl->setCurrentBlock(
'td');
292 $this->tpl->setVariable(
'VALUE', (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($user_certificate_dto->getCertificateId());
306 $actions->addItem($DIC->language()->txt(
"mst_download_certificate"),
'', $user_certificate_dto->getDownloadLink());
308 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
309 $this->tpl->parseCurrentBlock();
322 $a_excel->
setCell($a_row, $col, $v);
335 $a_csv->addColumn($v);
348 $propGetter = Closure::bind(
function ($prop) {
350 }, $user_certificate_dto, $user_certificate_dto);
352 $field_values = array();
355 case 'usr_assinged_orgus':
358 case 'issuedOnTimestamp':
362 $field_values[$k] = strip_tags($propGetter($k));
367 return $field_values;
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
Class ilMStListCertificates.
getTextRepresentationOfUsersOrgUnits(int $user_id)
fillRowCSV($a_csv, $user_certificate_dto)
setEnableNumInfo($a_val)
Set enable num info.
setFilterCols($a_val)
Set filter columns.
setExternalSegmentation($a_val)
Set external segmentation.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
fillRowExcel(ilExcel $a_excel, &$a_row, $user_certificate_dto)
determineLimit()
Determine the limit.
__construct(ilMStListCertificatesGUI $parent_obj, $parent_cmd=ilMStListCertificatesGUI::CMD_INDEX)
getOrderDirection()
Get order direction.
getFieldValuesForExport(UserCertificateDto $user_certificate_dto)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
$selectable_columns_cached
Class ilMStListCertificatesTableGUI.
fillRow($user_certificate_dto)
static getTextRepresentationOfOrgUnits($sort_by_title=true)
Get ref id path array.
static getSelectableColumnInfo($a_admin=false)
Get info of searchable fields for selectable columns in table gui.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
getSelectedColumns()
Get selected columns.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
isColumnSelected($a_col)
Is given column selected?
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
__construct(Container $dic, ilPlugin $plugin)
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setMaxCount($a_max_count)
set max.
getExportMode()
Was export activated?
setEnableTitle($a_enabletitle)
Set Enable Title.
static _isEnabled($a_key)