ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 string CMD_INDEX = 'index'
 
const string TAB_LIST_USERS = 'list_users'
 
const string TAB_LIST_COURSES = 'list_courses'
 
const string TAB_LIST_CERTIFICATES = 'list_certificates'
 
const string TAB_LIST_COMPETENCES = 'list_competences'
 
const string TAB_LIST_STUDY_PROGRAMME = 'list_study_programme'
 

Static Protected Member Functions

static addLinkWithActionData (ilUserAction $action)
 

Detailed Description

Class ilMyStaffGUI.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilMyStaffGUI::__construct ( )

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

36 {
37 global $DIC;
38
39 $DIC->language()->loadLanguageModule('mst');
40 $DIC->language()->loadLanguageModule('trac');
41
42 // get the standard template
43 $DIC->ui()->mainTemplate()->loadStandardTemplate();
44 }
global $DIC
Definition: shib_login.php:26

References $DIC.

Member Function Documentation

◆ addLinkWithActionData()

static ilMyStaffGUI::addLinkWithActionData ( ilUserAction  $action)
staticprotected

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

135 {
136 global $DIC;
137
138 $ui_fac = $DIC->ui()->factory();
139
140 $action_data = $action->getData();
141 $link = $ui_fac->link()->standard(
142 $action->getText(),
143 $action->getHref()
144 )->withAdditionalOnLoadCode(function ($id) use ($action_data) {
145 $r = "var button = document.getElementById('$id');";
146 foreach ($action_data as $k => $v) {
147 $r .= "button.setAttribute('data-" . $k . "', '" . $v . "');";
148 }
149 return $r;
150 });
151
152 return $link;
153 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $DIC, $id, ilUserAction\getData(), ilUserAction\getHref(), and ilUserAction\getText().

+ Here is the call graph for this function:

◆ executeCommand()

ilMyStaffGUI::executeCommand ( )
final

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

46 : void
47 {
48 global $DIC;
49
50 // determine next class in the call structure
51 $next_class = $DIC->ctrl()->getNextClass($this);
52 switch ($next_class) {
53 case "ilmstlistcoursesgui":
54 $list_gui = new \ilMStListCoursesGUI();
55 $DIC->ctrl()->forwardCommand($list_gui);
56 break;
57 case strtolower(ilMStListCertificatesGUI::class):
58 $list_gui = new ilMStListCertificatesGUI();
59 $DIC->ctrl()->forwardCommand($list_gui);
60 break;
61 case strtolower(ilMStListCompetencesGUI::class):
62 $list_gui = new ilMStListCompetencesGUI($DIC);
63 $DIC->ctrl()->forwardCommand($list_gui);
64 break;
65 // case strtolower(ilMStListStudyProgrammesGUI::class):
66 // $list_gui = new ilMStListStudyProgrammesGUI();
67 // $DIC->ctrl()->forwardCommand($list_gui);
68 // break;
69 case strtolower(ilMStShowUserGUI::class):
70 $user_gui = new ilMStShowUserGUI();
71 $DIC->ctrl()->forwardCommand($user_gui);
72 break;
73 case strtolower(ilEmployeeTalkMyStaffListGUI::class):
74 $user_gui = new ilEmployeeTalkMyStaffListGUI();
75 $DIC->ctrl()->forwardCommand($user_gui);
76 break;
77 default:
78 $list_gui = new ilMStListUsersGUI();
79 $DIC->ctrl()->forwardCommand($list_gui);
80 break;
81 }
82
83 $DIC->ui()->mainTemplate()->printToStdout();
84 }
@ilCtrl_IsCalledBy ilEmployeeTalkMyStaffListGUI: ilMyStaffGUI @ilCtrl_IsCalledBy ilEmployeeTalkMyStaf...
Class ilMStListCertificatesGUI.
Class ilMStListCompetencesGUI.
Class ilMStListUsersGUI.
Class ilMStShowUserGUI.

References $DIC.

◆ getUserLpStatusAsHtml()

static ilMyStaffGUI::getUserLpStatusAsHtml ( ilMStListCourse  $my_staff_course)
staticfinal

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

155 : string
156 {
157 global $DIC;
158
159 if (ilMyStaffAccess::getInstance()->hasCurrentUserAccessToLearningProgressInObject($my_staff_course->getCrsRefId())) {
161 $lp_icon = $DIC->ui()->factory()->symbol()->icon()
162 ->custom(
163 $lp_icons->getImagePathForStatus($my_staff_course->getUsrLpStatus()),
165 );
166
167 return $DIC->ui()->renderer()->render($lp_icon) . ' '
168 . ilLearningProgressBaseGUI::_getStatusText(intval($my_staff_course->getUsrLpStatus()));
169 }
170
171 return '&nbsp';
172 }
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.

References $DIC, ilLearningProgressBaseGUI\_getStatusText(), ILIAS\MyStaff\ListCourses\ilMStListCourse\getCrsRefId(), ilLPStatusIcons\getInstance(), ILIAS\MyStaff\ListCourses\ilMStListCourse\getUsrLpStatus(), and ilLPStatusIcons\ICON_VARIANT_LONG.

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)
staticfinal

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

174 : string
175 {
176 if (ilMyStaffAccess::getInstance()->hasCurrentUserAccessToLearningProgressInObject($my_staff_course->getCrsRefId())) {
177 return ilLearningProgressBaseGUI::_getStatusText(intval($my_staff_course->getUsrLpStatus()));
178 }
179
180 return '';
181 }

References ilLearningProgressBaseGUI\_getStatusText(), ILIAS\MyStaff\ListCourses\ilMStListCourse\getCrsRefId(), and ILIAS\MyStaff\ListCourses\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 string ilMyStaffGUI::CMD_INDEX = 'index'

◆ TAB_LIST_CERTIFICATES

const string ilMyStaffGUI::TAB_LIST_CERTIFICATES = 'list_certificates'

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

◆ TAB_LIST_COMPETENCES

const string ilMyStaffGUI::TAB_LIST_COMPETENCES = 'list_competences'

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

◆ TAB_LIST_COURSES

const string ilMyStaffGUI::TAB_LIST_COURSES = 'list_courses'

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

◆ TAB_LIST_STUDY_PROGRAMME

const string ilMyStaffGUI::TAB_LIST_STUDY_PROGRAMME = 'list_study_programme'

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

◆ TAB_LIST_USERS

const string ilMyStaffGUI::TAB_LIST_USERS = 'list_users'

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


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