ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMStListCoursesGUI Class Reference

Class ilMStListCoursesGUI. More...

+ Collaboration diagram for ilMStListCoursesGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 index ()
 
 listUsers ()
 
 applyFilter ()
 
 resetFilter ()
 
 getId ()
 
 cancel ()
 

Data Fields

const CMD_APPLY_FILTER = 'applyFilter'
 
const CMD_INDEX = 'index'
 
const CMD_GET_ACTIONS = "getActions"
 
const CMD_RESET_FILTER = 'resetFilter'
 

Protected Member Functions

 checkAccessOrFail ()
 

Protected Attributes

 $table
 
 $access
 
 $help
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListCoursesGUI::__construct ( )

Definition at line 37 of file class.ilMStListCoursesGUI.php.

38 {
39 global $DIC;
40 $this->access = ilMyStaffAccess::getInstance();
41 $this->help = $DIC->help();
42 $this->help->setScreenIdComponent('msta');
43 }
global $DIC
Definition: goto.php:24
help()
Definition: help.php:2

References $DIC, and help().

+ Here is the call graph for this function:

Member Function Documentation

◆ applyFilter()

ilMStListCoursesGUI::applyFilter ( )

Definition at line 127 of file class.ilMStListCoursesGUI.php.

128 {
129 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_APPLY_FILTER);
130 $this->table->writeFilterToSession();
131 $this->table->resetOffset();
132 $this->index();
133 }

References index().

+ Here is the call graph for this function:

◆ cancel()

ilMStListCoursesGUI::cancel ( )

Definition at line 162 of file class.ilMStListCoursesGUI.php.

163 {
164 global $DIC;
165
166 $DIC->ctrl()->redirect($this);
167 }

References $DIC.

◆ checkAccessOrFail()

ilMStListCoursesGUI::checkAccessOrFail ( )
protected

Definition at line 49 of file class.ilMStListCoursesGUI.php.

50 {
51 global $DIC;
52
53 if ($this->access->hasCurrentUserAccessToCourseMemberships()) {
54 return;
55 } else {
56 ilUtil::sendFailure($DIC->language()->txt("permission_denied"), true);
57 $DIC->ctrl()->redirectByClass(ilDashboardGUI::class, "");
58 }
59 }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $DIC, and ilUtil\sendFailure().

Referenced by executeCommand(), and listUsers().

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

◆ executeCommand()

ilMStListCoursesGUI::executeCommand ( )

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

66 {
67 global $DIC;
68
69 $cmd = $DIC->ctrl()->getCmd();
70 $next_class = $DIC->ctrl()->getNextClass();
71
72 switch ($next_class) {
73 case strtolower(ilFormPropertyDispatchGUI::class):
74 $this->checkAccessOrFail();
75
76 $DIC->ctrl()->setReturn($this, self::CMD_INDEX);
77 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
78 $this->table->executeCommand();
79 break;
80 default:
81 switch ($cmd) {
82
85 case self::CMD_INDEX:
87 $this->$cmd();
88 break;
89 default:
90 $this->index();
91 break;
92 }
93 break;
94 }
95 }

References $DIC, checkAccessOrFail(), CMD_APPLY_FILTER, CMD_GET_ACTIONS, CMD_INDEX, CMD_RESET_FILTER, and index().

+ Here is the call graph for this function:

◆ getId()

ilMStListCoursesGUI::getId ( )
Returns
string

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

152 {
153 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
154
155 return $this->table->getId();
156 }

◆ index()

ilMStListCoursesGUI::index ( )

Definition at line 101 of file class.ilMStListCoursesGUI.php.

102 {
103 $this->listUsers();
104 }

References listUsers().

Referenced by applyFilter(), executeCommand(), and resetFilter().

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

◆ listUsers()

ilMStListCoursesGUI::listUsers ( )

Definition at line 110 of file class.ilMStListCoursesGUI.php.

111 {
112 global $DIC;
113
114 $this->checkAccessOrFail();
115 $this->help->setScreenId('courses_list');
116
117 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
118 $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_list_courses'));
119 $DIC->ui()->mainTemplate()->setTitleIcon(ilUtil::getImagePath('icon_enrl.svg'));
120 $DIC->ui()->mainTemplate()->setContent($this->table->getHTML());
121 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $DIC, checkAccessOrFail(), ilUtil\getImagePath(), and help().

Referenced by index().

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

◆ resetFilter()

ilMStListCoursesGUI::resetFilter ( )

Definition at line 139 of file class.ilMStListCoursesGUI.php.

140 {
141 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_RESET_FILTER);
142 $this->table->resetOffset();
143 $this->table->resetFilter();
144 $this->index();
145 }

References index().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMStListCoursesGUI::$access
protected

Definition at line 27 of file class.ilMStListCoursesGUI.php.

◆ $help

ilMStListCoursesGUI::$help
protected

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

◆ $table

ilMStListCoursesGUI::$table
protected

Definition at line 23 of file class.ilMStListCoursesGUI.php.

◆ CMD_APPLY_FILTER

const ilMStListCoursesGUI::CMD_APPLY_FILTER = 'applyFilter'

Definition at line 16 of file class.ilMStListCoursesGUI.php.

Referenced by executeCommand().

◆ CMD_GET_ACTIONS

const ilMStListCoursesGUI::CMD_GET_ACTIONS = "getActions"

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

Referenced by executeCommand().

◆ CMD_INDEX

◆ CMD_RESET_FILTER

const ilMStListCoursesGUI::CMD_RESET_FILTER = 'resetFilter'

Definition at line 19 of file class.ilMStListCoursesGUI.php.

Referenced by executeCommand().


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