62 $this->
setId(
'myst_lc');
66 $this->
setRowTemplate(
'tpl.list_courses_row.html',
"Services/MyStaff");
67 $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
102 'filters' => $this->
filter,
111 $arr_usr_id = $this->access->getUsersForUserOperationAndContext(
112 $DIC->user()->getId(),
118 $count = $list_courses_fetcher->getData($arr_usr_id, $options);
119 $options[
'limit'] = array(
123 $options[
'count'] =
false;
124 $data = $list_courses_fetcher->getData($arr_usr_id, $options);
137 $item =
new ilTextInputGUI($DIC->language()->txt(
"crs_title"),
"crs_title");
139 $item->readFromSession();
140 $this->
filter[
'crs_title'] = $item->getValue();
145 $item->setSelectText($DIC->language()->txt(
"mst_select_course"));
146 $item->setHeaderMessage($DIC->language()->txt(
"mst_please_select_course"));
149 $item->readFromSession();
151 $this->
filter[
"course"] = $item->getValue();
154 $item =
new ilSelectInputGUI($DIC->language()->txt(
'member_status'),
'memb_status');
155 $item->setOptions(array(
156 "" => $DIC->language()->txt(
"mst_opt_all"),
162 $item->readFromSession();
163 $this->
filter[
"memb_status"] = $item->getValue();
167 $item =
new ilSelectInputGUI($DIC->language()->txt(
'learning_progress'),
'lp_status');
169 $item->setOptions(array(
170 "" => $DIC->language()->txt(
"mst_opt_all"),
177 $item->readFromSession();
178 $this->
filter[
"lp_status"] = $item->getValue();
179 $this->
filter[
"lp_status"] = (int) $this->
filter[
"lp_status"] - 1;
183 $item =
new ilTextInputGUI($DIC->language()->txt(
"login") .
"/" . $DIC->language()->txt(
"email") .
"/" . $DIC->language()
184 ->txt(
"name"),
"user");
187 $item->readFromSession();
188 $this->
filter[
'user'] = $item->getValue();
192 $options[0] = $DIC->language()->txt(
'mst_opt_all');
193 foreach ($paths as $org_ref_id => $path) {
194 $options[$org_ref_id] = $path;
196 $item =
new ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'),
'org_unit');
197 $item->setOptions($options);
199 $item->readFromSession();
200 $this->
filter[
'org_unit'] = $item->getValue();
206 if (isset($this->orgu_names)) {
215 if (isset($this->usr_orgu_names[$user_id])) {
216 return $this->usr_orgu_names[$user_id];
219 return $this->usr_orgu_names[$user_id] = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
224 if ($this->selectable_columns_cached) {
239 $cols[
'crs_title'] = array(
240 'txt' => $DIC->language()->txt(
'crs_title'),
243 'sort_field' =>
'crs_title',
245 $cols[
'usr_reg_status'] = array(
246 'txt' => $DIC->language()->txt(
'member_status'),
249 'sort_field' =>
'reg_status',
252 $cols[
'usr_lp_status'] = array(
253 'txt' => $DIC->language()->txt(
'learning_progress'),
256 'sort_field' =>
'lp_status',
260 if ($arr_searchable_user_columns[
'login']) {
261 $cols[
'usr_login'] = array(
262 'txt' => $DIC->language()->txt(
'login'),
265 'sort_field' =>
'usr_login',
268 if ($arr_searchable_user_columns[
'firstname']) {
269 $cols[
'usr_firstname'] = array(
270 'txt' => $DIC->language()->txt(
'firstname'),
273 'sort_field' =>
'usr_firstname',
276 if ($arr_searchable_user_columns[
'lastname']) {
277 $cols[
'usr_lastname'] = array(
278 'txt' => $DIC->language()->txt(
'lastname'),
281 'sort_field' =>
'usr_lastname',
285 if ($arr_searchable_user_columns[
'email']) {
286 $cols[
'usr_email'] = array(
287 'txt' => $DIC->language()->txt(
'email'),
290 'sort_field' =>
'usr_email',
294 if ($arr_searchable_user_columns[
'org_units']) {
295 $cols[
'usr_assinged_orgus'] = array(
296 'txt' => $DIC->language()->txt(
'objs_orgu'),
315 if (isset($v[
'sort_field'])) {
316 $sort = $v[
'sort_field'];
320 $this->
addColumn($v[
'txt'], $sort, $v[
'width']);
326 $this->
addColumn($DIC->language()->txt(
'actions'));
338 $propGetter = Closure::bind(
function ($prop) {
340 }, $profile, $profile);
344 case 'usr_assinged_orgus':
345 $this->tpl->setCurrentBlock(
'td');
347 $this->tpl->parseCurrentBlock();
349 case 'usr_reg_status':
350 $this->tpl->setCurrentBlock(
'td');
352 $this->tpl->parseCurrentBlock();
354 case 'usr_lp_status':
355 $this->tpl->setCurrentBlock(
'td');
357 $this->tpl->parseCurrentBlock();
360 if ($propGetter($k) !== null) {
361 $this->tpl->setCurrentBlock(
'td');
362 $this->tpl->setVariable(
'VALUE', (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k)));
363 $this->tpl->parseCurrentBlock();
365 $this->tpl->setCurrentBlock(
'td');
366 $this->tpl->setVariable(
'VALUE',
' ');
367 $this->tpl->parseCurrentBlock();
374 $actions->setListTitle($DIC->language()->txt(
"actions"));
375 $actions->setId($profile->getUsrId() .
"-" . $profile->getCrsRefId());
377 $mst_lco_usr_id = $profile->getUsrId();
378 $mst_lco_crs_ref_id = $profile->getCrsRefId();
380 if ($DIC->access()->checkAccess(
"visible",
"", $mst_lco_crs_ref_id)) {
386 'user_id' => $mst_lco_usr_id,
387 'object_reference.deleted' => null
388 ), array(
'user_id' =>
'=',
'object_reference.deleted' =>
'!=' ))->
get() as $org_unit_assignment) {
389 if ($DIC->access()->checkAccess(
"read",
"", $org_unit_assignment->getOrguId())) {
392 $actions->addItem($org_units[$org_unit_assignment->getOrguId()],
'', $link);
396 $DIC->ctrl()->setParameterByClass(ilMStListCoursesGUI::class,
'mst_lco_usr_id', $mst_lco_usr_id);
397 $DIC->ctrl()->setParameterByClass(ilMStListCoursesGUI::class,
'mst_lco_crs_ref_id', $mst_lco_crs_ref_id);
399 $actions = ilMyStaffGUI::extendActionMenuWithUserActions(
402 rawurlencode($this->ctrl->getLinkTargetByClass(
403 "ilMStListCoursesGUI",
408 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
409 $this->tpl->parseCurrentBlock();
422 $a_excel->
setCell($a_row, $col, $v);
435 $a_csv->addColumn($v);
448 $propGetter = Closure::bind(
function ($prop) {
450 }, $my_staff_course, $my_staff_course);
452 $field_values = array();
455 case 'usr_assinged_orgus':
458 case 'usr_reg_status':
461 case 'usr_lp_status':
465 $field_values[$k] = strip_tags($propGetter($k));
470 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.
static _lookupTitle($a_id)
getTextRepresentationOfOrgUnits()
getTextRepresentationOfUsersOrgUnits(int $user_id)
static innerjoin($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
setEnableNumInfo($a_val)
Set enable num info.
const LP_STATUS_NOT_ATTEMPTED
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
setFilterCols($a_val)
Set filter columns.
static getMembershipStatusText($status)
setExternalSegmentation($a_val)
Set external segmentation.
const LP_STATUS_IN_PROGRESS_NUM
static _lookupObjectId($a_ref_id)
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.
$selectable_columns_cached
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
const ACCESS_ENROLMENTS_ORG_UNIT_OPERATION
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