49 $this->
setId(
'myst_lcrt');
53 $this->
setRowTemplate(
'tpl.list_courses_row.html',
"Services/MyStaff");
54 $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
88 'filters' => $this->filter,
98 $data = $certificates_fetcher->getData($options);
99 $options[
'limit'] = array(
112 $item =
new ilTextInputGUI($DIC->language()->txt(
"title"),
"obj_title");
114 $item->readFromSession();
115 $this->filter[
'obj_title'] = $item->getValue();
118 $item =
new ilTextInputGUI($DIC->language()->txt(
"login") .
"/" . $DIC->language()->txt(
"email") .
"/" . $DIC->language()
119 ->txt(
"name"),
"user");
122 $item->readFromSession();
123 $this->filter[
'user'] = $item->getValue();
127 $options[0] = $DIC->language()->txt(
'mst_opt_all');
128 foreach ($paths as $org_ref_id => $path) {
129 $options[$org_ref_id] = $path;
131 $item =
new ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'),
'org_unit');
132 $item->setOptions($options);
134 $item->readFromSession();
135 $this->filter[
'org_unit'] = $item->getValue();
151 $cols[
'objectTitle'] = array(
152 'txt' => $DIC->language()->txt(
'title'),
155 'sort_field' =>
'objectTitle',
157 $cols[
'issuedOnTimestamp'] = array(
158 'txt' => $DIC->language()->txt(
'mst_cert_issued_on'),
161 'sort_field' =>
'issuedOnTimestamp',
163 if ($arr_searchable_user_columns[
'login']) {
164 $cols[
'userLogin'] = array(
165 'txt' => $DIC->language()->txt(
'login'),
168 'sort_field' =>
'userLogin',
171 if ($arr_searchable_user_columns[
'firstname']) {
172 $cols[
'userFirstName'] = array(
173 'txt' => $DIC->language()->txt(
'firstname'),
176 'sort_field' =>
'userFirstName',
179 if ($arr_searchable_user_columns[
'lastname']) {
180 $cols[
'userLastName'] = array(
181 'txt' => $DIC->language()->txt(
'lastname'),
184 'sort_field' =>
'userLastName',
188 if ($arr_searchable_user_columns[
'email']) {
189 $cols[
'usr_email'] = array(
190 'txt' => $DIC->language()->txt(
'email'),
193 'sort_field' =>
'usr_email',
196 if ($arr_searchable_user_columns[
'org_units']) {
197 $cols[
'usr_assinged_orgus'] = array(
198 'txt' => $DIC->language()->txt(
'objs_orgu'),
217 if (isset($v[
'sort_field'])) {
218 $sort = $v[
'sort_field'];
222 $this->
addColumn($v[
'txt'], $sort, $v[
'width']);
228 $this->
addColumn($DIC->language()->txt(
'actions'));
236 public function fillRow($user_certificate_dto)
240 $propGetter = Closure::bind(
function ($prop) {
242 }, $user_certificate_dto, $user_certificate_dto);
247 case 'usr_assinged_orgus':
248 $this->tpl->setCurrentBlock(
'td');
249 $this->tpl->setVariable(
'VALUE', strval(ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_certificate_dto->getUserId())));
250 $this->tpl->parseCurrentBlock();
252 case 'issuedOnTimestamp':
254 $this->tpl->setCurrentBlock(
'td');
255 $this->tpl->setVariable(
'VALUE', $date_time->get(
IL_CAL_DATE));
256 $this->tpl->parseCurrentBlock();
259 if ($propGetter($k) !== null) {
260 $this->tpl->setCurrentBlock(
'td');
261 $this->tpl->setVariable(
'VALUE', (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k)));
262 $this->tpl->parseCurrentBlock();
264 $this->tpl->setCurrentBlock(
'td');
265 $this->tpl->setVariable(
'VALUE',
' ');
266 $this->tpl->parseCurrentBlock();
274 $actions->setListTitle($DIC->language()->txt(
"actions"));
275 $actions->setAsynch(
false);
276 $actions->setId($user_certificate_dto->getCertificateId());
277 $actions->addItem($DIC->language()->txt(
"mst_download_certificate"),
'', $user_certificate_dto->getDownloadLink());
279 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
280 $this->tpl->parseCurrentBlock();
293 $a_excel->
setCell($a_row, $col, $v);
306 $a_csv->addColumn($v);
319 $propGetter = Closure::bind(
function ($prop) {
321 }, $user_certificate_dto, $user_certificate_dto);
323 $field_values = array();
326 case 'usr_assinged_orgus':
327 $field_values[$k] = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_certificate_dto->
getUserId());
329 case 'issuedOnTimestamp':
333 $field_values[$k] = strip_tags($propGetter($k));
338 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.
fillRowCSV($a_csv, $user_certificate_dto)
setEnableNumInfo($a_val)
Set enable num info.
setFilterCols($a_val)
Set filter columns.
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.
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)