33 $this->
setId(
'myst_lc');
37 $this->
setRowTemplate(
'tpl.list_courses_row.html',
"Services/MyStaff");
38 $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
73 'filters' => $this->filter,
82 $all_users_for_user = $this->access->getUsersForUser($DIC->user()->getId());
103 $item =
new ilTextInputGUI($DIC->language()->txt(
"crs_title"),
"crs_title");
105 $item->readFromSession();
106 $this->filter[
'crs_title'] = $item->getValue();
111 $item->setSelectText($DIC->language()->txt(
"mst_select_course"));
112 $item->setHeaderMessage($DIC->language()->txt(
"mst_please_select_course"));
115 $item->readFromSession();
117 $this->filter[
"course"] = $item->getValue();
120 $item =
new ilSelectInputGUI($DIC->language()->txt(
'member_status'),
'memb_status');
122 "" => $DIC->language()->txt(
"mst_opt_all"),
128 $item->readFromSession();
129 $this->filter[
"memb_status"] = $item->getValue();
133 $item =
new ilSelectInputGUI($DIC->language()->txt(
'learning_progress'),
'lp_status');
136 "" => $DIC->language()->txt(
"mst_opt_all"),
143 $item->readFromSession();
144 $this->filter[
"lp_status"] = $item->getValue();
145 if ($this->filter[
"lp_status"]) {
146 $this->filter[
"lp_status"] = $this->filter[
"lp_status"] - 1;
151 $item =
new ilTextInputGUI($DIC->language()->txt(
"login") .
"/" . $DIC->language()->txt(
"email") .
"/" . $DIC->language()
152 ->txt(
"name"),
"user");
155 $item->readFromSession();
156 $this->filter[
'user'] = $item->getValue();
160 $options[0] = $DIC->language()->txt(
'mst_opt_all');
164 $item =
new ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'),
'org_unit');
167 $item->readFromSession();
168 $this->filter[
'org_unit'] = $item->getValue();
184 $cols[
'crs_title'] = array(
185 'txt' => $DIC->language()->txt(
'crs_title'),
188 'sort_field' =>
'crs_title',
190 $cols[
'usr_reg_status'] = array(
191 'txt' => $DIC->language()->txt(
'member_status'),
194 'sort_field' =>
'reg_status',
197 $cols[
'usr_lp_status'] = array(
198 'txt' => $DIC->language()->txt(
'learning_progress'),
201 'sort_field' =>
'lp_status',
205 if ($arr_searchable_user_columns[
'login']) {
206 $cols[
'usr_login'] = array(
207 'txt' => $DIC->language()->txt(
'login'),
210 'sort_field' =>
'usr_login',
213 if ($arr_searchable_user_columns[
'firstname']) {
214 $cols[
'usr_firstname'] = array(
215 'txt' => $DIC->language()->txt(
'firstname'),
218 'sort_field' =>
'usr_firstname',
221 if ($arr_searchable_user_columns[
'lastname']) {
222 $cols[
'usr_lastname'] = array(
223 'txt' => $DIC->language()->txt(
'lastname'),
226 'sort_field' =>
'usr_lastname',
230 if ($arr_searchable_user_columns[
'email']) {
231 $cols[
'usr_email'] = array(
232 'txt' => $DIC->language()->txt(
'email'),
235 'sort_field' =>
'usr_email',
239 if ($arr_searchable_user_columns[
'org_units']) {
240 $cols[
'usr_assinged_orgus'] = array(
241 'txt' => $DIC->language()->txt(
'objs_orgu'),
260 if (isset($v[
'sort_field'])) {
261 $sort = $v[
'sort_field'];
265 $this->
addColumn($v[
'txt'], $sort, $v[
'width']);
271 $this->
addColumn($DIC->language()->txt(
'actions'));
283 $propGetter = Closure::bind(
function ($prop) {
285 }, $my_staff_course, $my_staff_course);
290 case 'usr_assinged_orgus':
291 $this->tpl->setCurrentBlock(
'td');
292 $this->tpl->setVariable(
'VALUE', strval(ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($my_staff_course->getUsrId())));
293 $this->tpl->parseCurrentBlock();
295 case 'usr_reg_status':
296 $this->tpl->setCurrentBlock(
'td');
298 $this->tpl->parseCurrentBlock();
300 case 'usr_lp_status':
301 $this->tpl->setCurrentBlock(
'td');
303 $this->tpl->parseCurrentBlock();
306 if ($propGetter($k) !== null) {
307 $this->tpl->setCurrentBlock(
'td');
308 $this->tpl->setVariable(
'VALUE', (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k)));
309 $this->tpl->parseCurrentBlock();
311 $this->tpl->setCurrentBlock(
'td');
312 $this->tpl->setVariable(
'VALUE',
' ');
313 $this->tpl->parseCurrentBlock();
321 $actions->setListTitle($DIC->language()->txt(
"actions"));
322 $actions->setAsynch(
true);
323 $actions->setId($my_staff_course->getUsrId() .
"-" . $my_staff_course->getCrsRefId());
325 $DIC->ctrl()->setParameterByClass(ilMStListCoursesGUI::class,
'mst_lco_usr_id', $my_staff_course->getUsrId());
326 $DIC->ctrl()->setParameterByClass(ilMStListCoursesGUI::class,
'mst_lco_crs_ref_id', $my_staff_course->getCrsRefId());
328 $actions->setAsynchUrl(str_replace(
"\\",
"\\\\", $DIC->ctrl()
330 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
331 $this->tpl->parseCurrentBlock();
344 $a_excel->
setCell($a_row, $col, $v);
357 $a_csv->addColumn($v);
370 $propGetter = Closure::bind(
function ($prop) {
372 }, $my_staff_course, $my_staff_course);
374 $field_values = array();
377 case 'usr_assinged_orgus':
378 $field_values[$k] = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($my_staff_course->
getUsrId());
380 case 'usr_reg_status':
383 case 'usr_lp_status':
387 $field_values[$k] = strip_tags($propGetter($k));
392 return $field_values;
const LP_STATUS_COMPLETED_NUM
getFieldValuesForExport(ilMStListCourse $my_staff_course)
fillRowCSV($a_csv, $my_staff_course)
const MEMBERSHIP_STATUS_REGISTERED
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
fillRowExcel(ilExcel $a_excel, &$a_row, $my_staff_course)
setEnableNumInfo($a_val)
Set enable num info.
const LP_STATUS_NOT_ATTEMPTED
setFilterCols($a_val)
Set filter columns.
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.
Class ilMStListCoursesTableGUI.
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.
fillRow($my_staff_course)
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
__construct(ilMStListCoursesGUI $parent_obj, $parent_cmd=ilMStListCoursesGUI::CMD_INDEX)
This class represents a text property in a property form.
static getUserLpStatusAsText(ilMStListCourse $my_staff_course)
getSelectedColumns()
Get selected columns.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
Class ilMStListCoursesGUI.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static getData(array $arr_usr_ids=array(), array $options=array())
isColumnSelected($a_col)
Is given column selected?
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
User interface class for advanced drop-down selection lists.
const LP_STATUS_NOT_ATTEMPTED_NUM
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
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.
static getMembershipStatusText($status)
const MEMBERSHIP_STATUS_WAITINGLIST
setMaxCount($a_max_count)
set max.
getExportMode()
Was export activated?
setEnableTitle($a_enabletitle)
Set Enable Title.
const LP_STATUS_COMPLETED
static _isEnabled($a_key)
const LP_STATUS_FAILED_NUM
const MEMBERSHIP_STATUS_REQUESTED