ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 27 of file class.ilMyStaffGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilMyStaffGUI::__construct ( )

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

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

References $DIC.

Member Function Documentation

◆ addLinkWithActionData()

static ilMyStaffGUI::addLinkWithActionData ( ilUserAction  $action)
staticprotected

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

131 {
132 global $DIC;
133
134 $ui_fac = $DIC->ui()->factory();
135
136 $action_data = $action->getData();
137 $link = $ui_fac->link()->standard(
138 $action->getText(),
139 $action->getHref()
140 )->withAdditionalOnLoadCode(function ($id) use ($action_data) {
141 $r = "var button = document.getElementById('$id');";
142 foreach ($action_data as $k => $v) {
143 $r .= "button.setAttribute('data-" . $k . "', '" . $v . "');";
144 }
145 return $r;
146 });
147
148 return $link;
149 }
$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 47 of file class.ilMyStaffGUI.php.

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

151 : string
152 {
153 global $DIC;
154
155 if (ilMyStaffAccess::getInstance()->hasCurrentUserAccessToLearningProgressInObject($my_staff_course->getCrsRefId())) {
157 $lp_icon = $DIC->ui()->factory()->symbol()->icon()
158 ->custom(
159 $lp_icons->getImagePathForStatus($my_staff_course->getUsrLpStatus()),
161 );
162
163 return $DIC->ui()->renderer()->render($lp_icon) . ' '
164 . ilLearningProgressBaseGUI::_getStatusText(intval($my_staff_course->getUsrLpStatus()));
165 }
166
167 return '&nbsp';
168 }
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 170 of file class.ilMyStaffGUI.php.

170 : string
171 {
172 if (ilMyStaffAccess::getInstance()->hasCurrentUserAccessToLearningProgressInObject($my_staff_course->getCrsRefId())) {
173 return ilLearningProgressBaseGUI::_getStatusText(intval($my_staff_course->getUsrLpStatus()));
174 }
175
176 return '';
177 }

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 32 of file class.ilMyStaffGUI.php.

◆ TAB_LIST_COMPETENCES

const string ilMyStaffGUI::TAB_LIST_COMPETENCES = 'list_competences'

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

◆ TAB_LIST_COURSES

const string ilMyStaffGUI::TAB_LIST_COURSES = 'list_courses'

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

◆ TAB_LIST_STUDY_PROGRAMME

const string ilMyStaffGUI::TAB_LIST_STUDY_PROGRAMME = 'list_study_programme'

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

◆ TAB_LIST_USERS

const string ilMyStaffGUI::TAB_LIST_USERS = 'list_users'

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


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