ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilMStListCoursesGUI Class Reference

Class ilMStListCoursesGUI. More...

+ Inheritance diagram for ilMStListCoursesGUI:
+ Collaboration diagram for ilMStListCoursesGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 index ()
 
 listUsers ()
 
 applyFilter ()
 
 resetFilter ()
 
 getId ()
 
 cancel ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

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 Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 
 checkForRequiredField ()
 

Protected Attributes

ilTable2GUI $table
 
ilMyStaffAccess $access
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Private Attributes

ilGlobalTemplateInterface $main_tpl
 
ilHelpGUI $help
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListCoursesGUI::__construct ( )

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), and ILIAS\Repository\help().

41  {
42  global $DIC;
44 
45  $this->main_tpl = $DIC->ui()->mainTemplate();
46  $this->access = ilMyStaffAccess::getInstance();
47  $this->help = $DIC->help();
48  $this->help->setScreenIdComponent('msta');
49  }
global $DIC
Definition: shib_login.php:25
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ applyFilter()

ilMStListCoursesGUI::applyFilter ( )
final

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

References index().

108  : void
109  {
110  $this->table = new ilMStListCoursesTableGUI($this, self::CMD_APPLY_FILTER);
111  $this->table->writeFilterToSession();
112  $this->table->resetOffset();
113  $this->index();
114  }
Class ilMStListCoursesTableGUI.
+ Here is the call graph for this function:

◆ cancel()

ilMStListCoursesGUI::cancel ( )
final

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

References $DIC.

131  : void
132  {
133  global $DIC;
134  $DIC->ctrl()->redirect($this);
135  }
global $DIC
Definition: shib_login.php:25

◆ checkAccessOrFail()

ilMStListCoursesGUI::checkAccessOrFail ( )
protected

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand(), and listUsers().

51  : void
52  {
53  if ($this->access->hasCurrentUserAccessToCourseMemberships()) {
54  return;
55  } else {
56  $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
57  $this->ctrl->redirectByClass(ilDashboardGUI::class, "");
58  }
59  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMStListCoursesGUI::executeCommand ( )
final

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

References checkAccessOrFail(), ILIAS\Repository\ctrl(), and index().

61  : void
62  {
63  $cmd = $this->ctrl->getCmd();
64  $next_class = $this->ctrl->getNextClass();
65 
66  switch ($next_class) {
67  case strtolower(\ilMStListCoursesTableGUI::class):
68  $this->checkAccessOrFail();
69 
70  $this->ctrl->setReturn($this, self::CMD_INDEX);
71  $this->table = new \ilMStListCoursesTableGUI($this, self::CMD_INDEX);
72  $this->ctrl->forwardCommand($this->table);
73  break;
74  default:
75  switch ($cmd) {
76  case self::CMD_RESET_FILTER:
77  case self::CMD_APPLY_FILTER:
78  case self::CMD_INDEX:
79  case self::CMD_GET_ACTIONS:
80  $this->$cmd();
81  break;
82  default:
83  $this->index();
84  break;
85  }
86  break;
87  }
88  }
+ Here is the call graph for this function:

◆ getId()

ilMStListCoursesGUI::getId ( )
final

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

124  : string
125  {
126  $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
127 
128  return $this->table->getId();
129  }
Class ilMStListCoursesTableGUI.

◆ index()

ilMStListCoursesGUI::index ( )
final

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

References listUsers().

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

90  : void
91  {
92  $this->listUsers();
93  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsers()

ilMStListCoursesGUI::listUsers ( )
final

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

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

Referenced by index().

95  : void
96  {
97  global $DIC;
98 
99  $this->checkAccessOrFail();
100  $this->help->setScreenId('courses_list');
101 
102  $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
103  $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_list_courses'));
104  $DIC->ui()->mainTemplate()->setTitleIcon(ilUtil::getImagePath('standard/icon_enrl.svg'));
105  $DIC->ui()->mainTemplate()->setContent($this->table->getHTML());
106  }
Class ilMStListCoursesTableGUI.
global $DIC
Definition: shib_login.php:25
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilter()

ilMStListCoursesGUI::resetFilter ( )
final

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

References index().

116  : void
117  {
118  $this->table = new ilMStListCoursesTableGUI($this, self::CMD_RESET_FILTER);
119  $this->table->resetOffset();
120  $this->table->resetFilter();
121  $this->index();
122  }
Class ilMStListCoursesTableGUI.
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMyStaffAccess ilMStListCoursesGUI::$access
protected

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

◆ $help

ilHelpGUI ilMStListCoursesGUI::$help
private

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

◆ $main_tpl

ilGlobalTemplateInterface ilMStListCoursesGUI::$main_tpl
private

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

◆ $table

ilTable2GUI ilMStListCoursesGUI::$table
protected

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

◆ CMD_APPLY_FILTER

const ilMStListCoursesGUI::CMD_APPLY_FILTER = 'applyFilter'

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

◆ CMD_GET_ACTIONS

const ilMStListCoursesGUI::CMD_GET_ACTIONS = "getActions"

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

◆ CMD_INDEX

const ilMStListCoursesGUI::CMD_INDEX = 'index'

◆ CMD_RESET_FILTER

const ilMStListCoursesGUI::CMD_RESET_FILTER = 'resetFilter'

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


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