ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMyStaffGUI Class Reference

Class ilMyStaffGUI. More...

+ Collaboration diagram for ilMyStaffGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 

Static Public Member Functions

static getUserLpStatusAsHtml (ilMStListCourse $my_staff_course)
 
static getUserLpStatusAsText (ilMStListCourse $my_staff_course)
 

Data Fields

const CMD_INDEX = 'index'
 
const TAB_LIST_USERS = 'list_users'
 
const TAB_LIST_COURSES = 'list_courses'
 

Protected Member Functions

 addTabs ($active_tab_id)
 

Detailed Description

Class ilMyStaffGUI.

Author
Martin Studer ms@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 8 of file class.ilMyStaffGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilMyStaffGUI::__construct ( )

Definition at line 18 of file class.ilMyStaffGUI.php.

19 {
20 global $DIC;
21
22 $DIC->language()->loadLanguageModule('mst');
23 $DIC->language()->loadLanguageModule('trac');
24
25 // get the standard template
26 $DIC->ui()->mainTemplate()->getStandardTemplate();
27 $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_my_staff'));
28 }
global $DIC
Definition: saml.php:7

References $DIC.

Member Function Documentation

◆ addTabs()

ilMyStaffGUI::addTabs (   $active_tab_id)
protected
Parameters
string$active_tab_id

Definition at line 65 of file class.ilMyStaffGUI.php.

66 {
67 global $DIC;
68
69 $DIC->tabs()->addTab(self::TAB_LIST_USERS, $DIC->language()->txt('mst_list_users'), $DIC->ctrl()->getLinkTargetByClass(array(
70 self::class,
71 ilMStListUsersGUI::class,
72 ), self::CMD_INDEX));
73 $DIC->tabs()->addTab(self::TAB_LIST_COURSES, $DIC->language()->txt('mst_list_courses'), $DIC->ctrl()->getLinkTargetByClass(array(
74 self::class,
75 ilMStListCoursesGUI::class,
76 ), self::CMD_INDEX));
77
78 if ($active_tab_id) {
79 $DIC->tabs()->activateTab($active_tab_id);
80 }
81 }

References $DIC.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ executeCommand()

ilMyStaffGUI::executeCommand ( )

Definition at line 34 of file class.ilMyStaffGUI.php.

35 {
36 global $DIC;
37
38 // determine next class in the call structure
39 $next_class = $DIC->ctrl()->getNextClass($this);
40
41 switch ($next_class) {
42 case strtolower(ilMStListCoursesGUI::class):
43 $this->addTabs(self::TAB_LIST_COURSES);
44 $list_course_gui = new ilMStListCoursesGUI();
45 $DIC->ctrl()->forwardCommand($list_course_gui);
46 break;
47 case strtolower(ilMStShowUserGUI::class):
48 $list_course_gui = new ilMStShowUserGUI();
49 $DIC->ctrl()->forwardCommand($list_course_gui);
50 break;
51 default:
52 $this->addTabs(self::TAB_LIST_USERS);
53 $list_user_gui = new ilMStListUsersGUI();
54 $DIC->ctrl()->forwardCommand($list_user_gui);
55 break;
56 }
57
58 $DIC->ui()->mainTemplate()->show();
59 }
Class ilMStListCoursesGUI.
Class ilMStListUsersGUI.
Class ilMStShowUserGUI.
addTabs($active_tab_id)

References $DIC, and addTabs().

+ Here is the call graph for this function:

◆ getUserLpStatusAsHtml()

static ilMyStaffGUI::getUserLpStatusAsHtml ( ilMStListCourse  $my_staff_course)
static
Parameters
ilMStListCourse$my_staff_course
Returns
string

Definition at line 130 of file class.ilMyStaffGUI.php.

131 {
132 global $DIC;
133
134 if (ilMyStaffAccess::getInstance()->hasCurrentUserAccessToLearningProgressInObject($my_staff_course->getCrsRefId())) {
135 $lp_icon = $DIC->ui()->factory()->image()
137
138 return $DIC->ui()->renderer()->render($lp_icon) . ' '
139 . ilLearningProgressBaseGUI::_getStatusText(intval($my_staff_course->getUsrLpStatus()));
140 }
141
142 return '&nbsp';
143 }
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
static _getImagePathForStatus($a_status)
Get image path for status.

References $DIC, ilLearningProgressBaseGUI\_getImagePathForStatus(), ilLearningProgressBaseGUI\_getStatusText(), ilMStListCourse\getCrsRefId(), ilMyStaffAccess\getInstance(), and ilMStListCourse\getUsrLpStatus().

Referenced by ilMStListCoursesTableGUI\fillRow(), and ilMStShowUserCoursesTableGUI\fillRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUserLpStatusAsText()

static ilMyStaffGUI::getUserLpStatusAsText ( ilMStListCourse  $my_staff_course)
static
Parameters
ilMStListCourse$my_staff_course
Returns
string

Definition at line 151 of file class.ilMyStaffGUI.php.

152 {
153 if (ilMyStaffAccess::getInstance()->hasCurrentUserAccessToLearningProgressInObject($my_staff_course->getCrsRefId())) {
154 return ilLearningProgressBaseGUI::_getStatusText(intval($my_staff_course->getUsrLpStatus()));
155 }
156
157 return '';
158 }

References ilLearningProgressBaseGUI\_getStatusText(), ilMStListCourse\getCrsRefId(), ilMyStaffAccess\getInstance(), and ilMStListCourse\getUsrLpStatus().

Referenced by ilMStListCoursesTableGUI\getFieldValuesForExport(), and ilMStShowUserCoursesTableGUI\getFieldValuesForExport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ CMD_INDEX

const ilMyStaffGUI::CMD_INDEX = 'index'

Definition at line 10 of file class.ilMyStaffGUI.php.

Referenced by ilMStListUsersTableGUI\getProfileBackUrl().

◆ TAB_LIST_COURSES

const ilMyStaffGUI::TAB_LIST_COURSES = 'list_courses'

Definition at line 12 of file class.ilMyStaffGUI.php.

◆ TAB_LIST_USERS

const ilMyStaffGUI::TAB_LIST_USERS = 'list_users'

Definition at line 11 of file class.ilMyStaffGUI.php.


The documentation for this class was generated from the following file: