50 $this->
setId(
'myst_lc');
54 $this->
setRowTemplate(
'tpl.list_courses_row.html',
"Services/MyStaff");
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);
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();
139 $item->setOptions(array(
140 "" =>
$DIC->language()->txt(
"mst_opt_all"),
146 $item->readFromSession();
147 $this->filter[
"memb_status"] = $item->getValue();
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;
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;
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;
An exception for terminatinating execution or to throw for unit testing.
const MEMBERSHIP_STATUS_WAITINGLIST
const MEMBERSHIP_STATUS_REQUESTED
const MEMBERSHIP_STATUS_REGISTERED
static getMembershipStatusText($status)
Class ilMStListCoursesTableGUI.
fillRowCSV($a_csv, $selected_skill)
__construct(ilMStListCoursesGUI $parent_obj, $parent_cmd=ilMStListCoursesGUI::CMD_INDEX)
getFieldValuesForExport(ilMStListCourse $my_staff_course)
fillRowExcel(ilExcel $a_excel, &$a_row, $selected_skill)
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
Class ilMStListCoursesGUI.
static getUserLpStatusAsText(ilMStListCourse $my_staff_course)
static getUserLpStatusAsHtml(ilMStListCourse $my_staff_course)
static _enabledLearningProgress()
check wether learing progress is enabled or not
Class ilOrgUnitPathStorage.
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.
static _isEnabled($a_key)
static getSelectableColumnInfo($a_admin=false)
Get info of searchable fields for selectable columns in table gui.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc