58 $this->usr_id =
$DIC->http()->request()->getQueryParams()[
'usr_id'];
62 $this->
setId(
'myst_su');
65 $this->
setRowTemplate(
'tpl.list_user_courses_row.html',
"Services/MyStaff");
100 $arr_usr_id = $this->access->getUsersForUserOperationAndContext(
$DIC->user()
105 'filters' => $this->
filter,
115 $count = $user_courses_fetcher->getData($arr_usr_id, $options);
116 $options[
'limit'] = array(
120 $options[
'count'] =
false;
121 $data = $user_courses_fetcher->getData($arr_usr_id, $options);
137 $item->readFromSession();
138 $this->
filter[
'crs_title'] = $item->getValue();
142 $item->setSelectText(
$DIC->language()->txt(
"mst_select_course"));
143 $item->setHeaderMessage(
$DIC->language()->txt(
"mst_please_select_course"));
146 $item->readFromSession();
148 $this->
filter[
"course"] = $item->getValue();
152 $item->setOptions(array(
153 "" =>
$DIC->language()->txt(
"mst_opt_all"),
159 $item->readFromSession();
160 $this->
filter[
"memb_status"] = $item->getValue();
166 $item->setOptions(array(
167 "" =>
$DIC->language()->txt(
"mst_opt_all"),
174 $item->readFromSession();
175 $this->
filter[
"lp_status"] = $item->getValue();
176 $this->
filter[
"lp_status"] = (int) $this->
filter[
"lp_status"] - 1;
188 if ($this->columnDefinition !==
null) {
194 $cols[
'crs_title'] = array(
195 'txt' =>
$DIC->language()->txt(
'crs_title'),
198 'sort_field' =>
'crs_title',
200 $cols[
'usr_reg_status'] = array(
201 'txt' =>
$DIC->language()->txt(
'member_status'),
204 'sort_field' =>
'reg_status',
207 $cols[
'usr_lp_status'] = array(
208 'txt' =>
$DIC->language()->txt(
'learning_progress'),
211 'sort_field' =>
'lp_status',
215 $this->columnDefinition =
$cols;
230 if (isset($v[
'sort_field'])) {
231 $sort = $v[
'sort_field'];
235 $this->
addColumn($v[
'txt'], $sort, $v[
'width']);
240 $this->
addColumn($DIC->language()->txt(
'actions'));
246 if (isset($this->orgu_names)) {
261 $propGetter = Closure::bind(
function ($prop) {
263 }, $profile, $profile);
267 case 'usr_reg_status':
268 $this->tpl->setCurrentBlock(
'td');
270 $this->tpl->parseCurrentBlock();
272 case 'usr_lp_status':
273 $this->tpl->setCurrentBlock(
'td');
275 $this->tpl->parseCurrentBlock();
278 if ($propGetter($k) !==
null) {
279 $this->tpl->setCurrentBlock(
'td');
280 $this->tpl->setVariable(
'VALUE', (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k)));
281 $this->tpl->parseCurrentBlock();
283 $this->tpl->setCurrentBlock(
'td');
284 $this->tpl->setVariable(
'VALUE',
' ');
285 $this->tpl->parseCurrentBlock();
292 $actions->setListTitle(
$DIC->language()->txt(
"actions"));
293 $actions->setId($profile->getUsrId() .
"-" . $profile->getCrsRefId());
295 $mst_lco_usr_id = $profile->getUsrId();
296 $mst_lco_crs_ref_id = $profile->getCrsRefId();
298 if (
$DIC->access()->checkAccess(
"visible",
"", $mst_lco_crs_ref_id)) {
305 'user_id' => $mst_lco_usr_id,
306 'object_reference.deleted' =>
null
307 ), array(
'user_id' =>
'=',
'object_reference.deleted' =>
'!='))->
get() as $org_unit_assignment
309 if (
$DIC->access()->checkAccess(
"read",
"", $org_unit_assignment->getOrguId())) {
312 $actions->addItem($org_units[$org_unit_assignment->getOrguId()],
'', $link);
316 $DIC->ctrl()->setParameterByClass(ilMStShowUserCoursesGUI::class,
'mst_lco_usr_id', $mst_lco_usr_id);
317 $DIC->ctrl()->setParameterByClass(ilMStShowUserCoursesGUI::class,
'mst_lco_crs_ref_id', $mst_lco_crs_ref_id);
319 $actions = ilMyStaffGUI::extendActionMenuWithUserActions(
322 rawurlencode($this->ctrl->getLinkTargetByClass(
323 "ilMStShowUserCoursesGUI",
328 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
329 $this->tpl->parseCurrentBlock();
342 $a_excel->
setCell($a_row, $col, $v);
355 $a_csv->addColumn($v);
366 $propGetter = Closure::bind(
function ($prop) {
368 }, $my_staff_course, $my_staff_course);
370 $field_values = array();
374 case 'usr_reg_status':
377 case 'usr_lp_status':
381 $field_values[$k] = strip_tags($propGetter($k));
386 return $field_values;
393 if (empty($string)) {
static innerjoin($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
An exception for terminatinating execution or to throw for unit testing.
Class ilMStShowUserCoursesTableGUI.
fillRowExcel(ilExcel $a_excel, &$a_row, $selected_skill)
fillRowCSV($a_csv, $selected_skill)
getTextRepresentationOfOrgUnits()
getFieldValuesForExport(ilMStListCourse $my_staff_course)
getSpaceOrValue(string $string)
__construct(ilMStShowUserCoursesGUI $parent_obj, $parent_cmd=ilMStShowUserCoursesGUI::CMD_INDEX)
Class ilMStShowUserCourses.
const MEMBERSHIP_STATUS_WAITINGLIST
const MEMBERSHIP_STATUS_REQUESTED
const MEMBERSHIP_STATUS_REGISTERED
static getMembershipStatusText($status)
const ACCESS_ENROLMENTS_ORG_UNIT_OPERATION
User interface class for advanced drop-down selection lists.
Helper class to generate CSV files.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_COMPLETED
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_FAILED_NUM
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static getUserLpStatusAsText(ilMStListCourse $my_staff_course)
static getUserLpStatusAsHtml(ilMStListCourse $my_staff_course)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
Class ilOrgUnitOperation.
static getTextRepresentationOfOrgUnits($sort_by_title=true)
Get ref id path array.
getExportMode()
Was export activated?
getSelectedColumns()
Get selected columns.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
setExternalSorting($a_val)
Set external sorting.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setExportFormats(array $formats)
Set available export formats.
getParentObject()
Get parent object.
setPrefix($a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setEnableNumInfo($a_val)
Set enable num info.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setExternalSegmentation($a_val)
Set external segmentation.
setFormName($a_formname="")
Set Form name.
setFilterCols($a_val)
Set filter columns.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
determineLimit()
Determine the limit.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
isColumnSelected($a_col)
Is given column selected?
getOrderDirection()
Get order direction.
setMaxCount($a_max_count)
set max.
This class represents a text property in a property form.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc