50 $this->
setId(
'myst_lc');
54 $this->
setRowTemplate(
'tpl.list_courses_row.html',
"Services/MyStaff");
55 $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
90 'filters' => $this->filter,
99 $all_users_for_user = $this->access->getUsersForUser($DIC->user()->getId());
102 $count = $list_courses_fetcher->getData($all_users_for_user, $options);
103 $options[
'limit'] = array(
107 $options[
'count'] =
false;
108 $data = $list_courses_fetcher->getData($all_users_for_user, $options);
121 $item =
new ilTextInputGUI($DIC->language()->txt(
"crs_title"),
"crs_title");
123 $item->readFromSession();
124 $this->filter[
'crs_title'] = $item->getValue();
129 $item->setSelectText($DIC->language()->txt(
"mst_select_course"));
130 $item->setHeaderMessage($DIC->language()->txt(
"mst_please_select_course"));
133 $item->readFromSession();
135 $this->filter[
"course"] = $item->getValue();
138 $item =
new ilSelectInputGUI($DIC->language()->txt(
'member_status'),
'memb_status');
139 $item->setOptions(array(
140 "" => $DIC->language()->txt(
"mst_opt_all"),
146 $item->readFromSession();
147 $this->filter[
"memb_status"] = $item->getValue();
151 $item =
new ilSelectInputGUI($DIC->language()->txt(
'learning_progress'),
'lp_status');
153 $item->setOptions(array(
154 "" => $DIC->language()->txt(
"mst_opt_all"),
161 $item->readFromSession();
162 $this->filter[
"lp_status"] = $item->getValue();
163 if ($this->filter[
"lp_status"]) {
164 $this->filter[
"lp_status"] = $this->filter[
"lp_status"] - 1;
169 $item =
new ilTextInputGUI($DIC->language()->txt(
"login") .
"/" . $DIC->language()->txt(
"email") .
"/" . $DIC->language()
170 ->txt(
"name"),
"user");
173 $item->readFromSession();
174 $this->filter[
'user'] = $item->getValue();
178 $options[0] = $DIC->language()->txt(
'mst_opt_all');
179 foreach ($paths as $org_ref_id => $path) {
180 $options[$org_ref_id] = $path;
182 $item =
new ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'),
'org_unit');
183 $item->setOptions($options);
185 $item->readFromSession();
186 $this->filter[
'org_unit'] = $item->getValue();
202 $cols[
'crs_title'] = array(
203 'txt' => $DIC->language()->txt(
'crs_title'),
206 'sort_field' =>
'crs_title',
208 $cols[
'usr_reg_status'] = array(
209 'txt' => $DIC->language()->txt(
'member_status'),
212 'sort_field' =>
'reg_status',
215 $cols[
'usr_lp_status'] = array(
216 'txt' => $DIC->language()->txt(
'learning_progress'),
219 'sort_field' =>
'lp_status',
223 if ($arr_searchable_user_columns[
'login']) {
224 $cols[
'usr_login'] = array(
225 'txt' => $DIC->language()->txt(
'login'),
228 'sort_field' =>
'usr_login',
231 if ($arr_searchable_user_columns[
'firstname']) {
232 $cols[
'usr_firstname'] = array(
233 'txt' => $DIC->language()->txt(
'firstname'),
236 'sort_field' =>
'usr_firstname',
239 if ($arr_searchable_user_columns[
'lastname']) {
240 $cols[
'usr_lastname'] = array(
241 'txt' => $DIC->language()->txt(
'lastname'),
244 'sort_field' =>
'usr_lastname',
248 if ($arr_searchable_user_columns[
'email']) {
249 $cols[
'usr_email'] = array(
250 'txt' => $DIC->language()->txt(
'email'),
253 'sort_field' =>
'usr_email',
257 if ($arr_searchable_user_columns[
'org_units']) {
258 $cols[
'usr_assinged_orgus'] = array(
259 'txt' => $DIC->language()->txt(
'objs_orgu'),
278 if (isset($v[
'sort_field'])) {
279 $sort = $v[
'sort_field'];
283 $this->
addColumn($v[
'txt'], $sort, $v[
'width']);
289 $this->
addColumn($DIC->language()->txt(
'actions'));
301 $propGetter = Closure::bind(
function ($prop) {
303 }, $profile, $profile);
308 case 'usr_assinged_orgus':
309 $this->tpl->setCurrentBlock(
'td');
310 $this->tpl->setVariable(
'VALUE', strval(ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($profile->getUsrId())));
311 $this->tpl->parseCurrentBlock();
313 case 'usr_reg_status':
314 $this->tpl->setCurrentBlock(
'td');
316 $this->tpl->parseCurrentBlock();
318 case 'usr_lp_status':
319 $this->tpl->setCurrentBlock(
'td');
321 $this->tpl->parseCurrentBlock();
324 if ($propGetter($k) !== null) {
325 $this->tpl->setCurrentBlock(
'td');
326 $this->tpl->setVariable(
'VALUE', (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k)));
327 $this->tpl->parseCurrentBlock();
329 $this->tpl->setCurrentBlock(
'td');
330 $this->tpl->setVariable(
'VALUE',
' ');
331 $this->tpl->parseCurrentBlock();
339 $actions->setListTitle($DIC->language()->txt(
"actions"));
340 $actions->setAsynch(
true);
341 $actions->setId($profile->getUsrId() .
"-" . $profile->getCrsRefId());
343 $DIC->ctrl()->setParameterByClass(ilMStListCoursesGUI::class,
'mst_lco_usr_id', $profile->getUsrId());
344 $DIC->ctrl()->setParameterByClass(ilMStListCoursesGUI::class,
'mst_lco_crs_ref_id', $profile->getCrsRefId());
346 $actions->setAsynchUrl(str_replace(
"\\",
"\\\\", $DIC->ctrl()
348 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
349 $this->tpl->parseCurrentBlock();
362 $a_excel->
setCell($a_row, $col, $v);
375 $a_csv->addColumn($v);
388 $propGetter = Closure::bind(
function ($prop) {
390 }, $my_staff_course, $my_staff_course);
392 $field_values = array();
395 case 'usr_assinged_orgus':
396 $field_values[$k] = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($my_staff_course->
getUsrId());
398 case 'usr_reg_status':
401 case 'usr_lp_status':
405 $field_values[$k] = strip_tags($propGetter($k));
410 return $field_values;
const LP_STATUS_COMPLETED_NUM
const MEMBERSHIP_STATUS_REGISTERED
const MEMBERSHIP_STATUS_WAITINGLIST
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
setEnableNumInfo($a_val)
Set enable num info.
const LP_STATUS_NOT_ATTEMPTED
setFilterCols($a_val)
Set filter columns.
static getMembershipStatusText($status)
setExternalSegmentation($a_val)
Set external segmentation.
const LP_STATUS_IN_PROGRESS_NUM
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
determineLimit()
Determine the limit.
getOrderDirection()
Get order direction.
static getUserLpStatusAsHtml(ilMStListCourse $my_staff_course)
getParentObject()
Get parent object.
const LP_STATUS_IN_PROGRESS
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static _enabledLearningProgress()
check wether learing progress is enabled or not
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.
static getUserLpStatusAsText(ilMStListCourse $my_staff_course)
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?
fillRowExcel(ilExcel $a_excel, &$a_row, $selected_skill)
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
const LP_STATUS_NOT_ATTEMPTED_NUM
Class ilMStListCoursesTableGUI.
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.
__construct(ilMStListCoursesGUI $parent_obj, $parent_cmd=ilMStListCoursesGUI::CMD_INDEX)
fillRowCSV($a_csv, $selected_skill)
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setMaxCount($a_max_count)
set max.
getExportMode()
Was export activated?
const MEMBERSHIP_STATUS_REQUESTED
setEnableTitle($a_enabletitle)
Set Enable Title.
const LP_STATUS_COMPLETED
getFieldValuesForExport(ilMStListCourse $my_staff_course)
static _isEnabled($a_key)
const LP_STATUS_FAILED_NUM