ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilPCMyCoursesGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPCMyCoursesGUI:
+ Collaboration diagram for ilPCMyCoursesGUI:

Public Member Functions

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
 
 executeCommand ()
 
 insert (?ilPropertyFormGUI $a_form=null)
 
 edit (?ilPropertyFormGUI $a_form=null)
 
 create_my_courses ()
 
 create ()
 
 update ()
 
- Public Member Functions inherited from ilPageContentGUI
 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id="", string $a_pc_id="0")
 
 setContentObject (ilPageContent $a_val)
 
 getContentObject ()
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 getStyle ()
 
 getCharacteristicsOfCurrentStyle (array $a_type)
 Get characteristics of current style and call setCharacteristics, if style is given. More...
 
 setCharacteristics (array $a_chars)
 
 getCharacteristics ()
 
 getHierId ()
 
 setHierId (string $a_hier_id)
 set hierarchical id in dom object More...
 
 delete ()
 
 displayValidationError ()
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions (string $a_type="")
 Get table templates. More...
 

Protected Member Functions

 initForm ($a_insert=false)
 
- Protected Member Functions inherited from ilPageContentGUI
 redirectToParent (string $hier_id="")
 
 getParentReturn (string $hier_id="")
 
 updateAndReturn ()
 
 setCurrentTextLang (string $lang_key)
 
 getCurrentTextLang ()
 
 setEditorToolContext ()
 
 initEditor ()
 
 getEditorScriptTag (string $form_pc_id="", string $form_cname="")
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 
- Data Fields inherited from ilPageContentGUI
ilPageContent $content_obj
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilPageObject $pg_obj
 
string $hier_id = ""
 
DOMDocument $dom
 
 $updated
 
string $target_script = ""
 
string $return_location = ""
 
ilPageConfig $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static string $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Protected Attributes inherited from ilPageContentGUI
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS COPage InternalGUIService $gui
 
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
LOMServices $lom_services
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
Style Content CharacteristicManager $char_manager
 
- Static Protected Attributes inherited from ilPageContentGUI
static array $common_bb_buttons
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Handles user commands on my courses data

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

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

Constructor & Destructor Documentation

◆ __construct()

ilPCMyCoursesGUI::__construct ( ilPageObject  $a_pg_obj,
?ilPageContent  $a_content_obj,
string  $a_hier_id,
string  $a_pc_id = "" 
)

Reimplemented from ilPageContentGUI.

Definition at line 25 of file class.ilPCMyCoursesGUI.php.

30 {
31 global $DIC;
32
33 $this->tpl = $DIC["tpl"];
34 $this->ctrl = $DIC->ctrl();
35 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
36 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCMyCoursesGUI::create ( )

Definition at line 121 of file class.ilPCMyCoursesGUI.php.

121 : void
122 {
123 $form = $this->initForm(true);
124 if ($form->checkInput()) {
125 $sort = $form->getInput("sort");
126
127 $this->content_obj = new ilPCMyCourses($this->getPage());
128 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
129 $this->content_obj->setData($sort);
130 $this->updated = $this->pg_obj->update();
131 if ($this->updated === true) {
132 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
133 }
134 }
135
136 $form->setValuesByPost();
137 $this->insert($form);
138 }
initForm($a_insert=false)
insert(?ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl(), ilPageContentGUI\getPage(), initForm(), and insert().

Referenced by create_my_courses().

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

◆ create_my_courses()

ilPCMyCoursesGUI::create_my_courses ( )

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

116 : void
117 {
118 $this->create();
119 }

References create().

+ Here is the call graph for this function:

◆ edit()

ilPCMyCoursesGUI::edit ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 69 of file class.ilPCMyCoursesGUI.php.

69 : void
70 {
72
74
75 if (!$a_form) {
76 $a_form = $this->initForm();
77 }
78 $tpl->setContent($a_form->getHTML());
79 }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ILIAS\UICore\GlobalTemplate\setContent().

Referenced by update().

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

◆ executeCommand()

ilPCMyCoursesGUI::executeCommand ( )

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

38 : void
39 {
40 // get next class that processes or forwards current command
41 $next_class = $this->ctrl->getNextClass($this);
42
43 // get current command
44 $cmd = $this->ctrl->getCmd();
45
46 switch ($next_class) {
47 default:
48 $this->$cmd();
49 break;
50 }
51 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initForm()

ilPCMyCoursesGUI::initForm (   $a_insert = false)
protected

Definition at line 81 of file class.ilPCMyCoursesGUI.php.

82 {
83 $ilCtrl = $this->ctrl;
84
85 $form = new ilPropertyFormGUI();
86 $form->setFormAction($ilCtrl->getFormAction($this));
87 if ($a_insert) {
88 $form->setTitle($this->lng->txt("cont_insert_my_courses"));
89 } else {
90 $form->setTitle($this->lng->txt("cont_update_my_courses"));
91 }
92
93 $sort = new ilRadioGroupInputGUI($this->lng->txt("cont_mycourses_sortorder"), "sort");
94 $sort->setInfo($this->lng->txt("cont_mycourses_sortorder_info")); //#15511
95 $sort->setRequired(true);
96 $form->addItem($sort);
97
98 $sort->addOption(new ilRadioOption($this->lng->txt("cont_mycourses_sortorder_alphabetical"), "alpha"));
99 $sort->addOption(new ilRadioOption($this->lng->txt("cont_mycourses_sortorder_location"), "loc"));
100
101 if ($a_insert) {
102 $sort->setValue("alpha");
103
104 $form->addCommandButton("create_my_courses", $this->lng->txt("save"));
105 $form->addCommandButton("cancelCreate", $this->lng->txt("cancel"));
106 } else {
107 $sort->setValue($this->content_obj->getSorting());
108
109 $form->addCommandButton("update", $this->lng->txt("save"));
110 $form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
111 }
112
113 return $form;
114 }
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.

References ilPageContentGUI\$ctrl, and ILIAS\Repository\lng().

Referenced by create(), edit(), insert(), and update().

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

◆ insert()

ilPCMyCoursesGUI::insert ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 53 of file class.ilPCMyCoursesGUI.php.

53 : void
54 {
56
57 /* #12816 - no form needed yet
58 $this->create();
59 */
60
62
63 if (!$a_form) {
64 $a_form = $this->initForm(true);
65 }
66 $tpl->setContent($a_form->getHTML());
67 }

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ILIAS\UICore\GlobalTemplate\setContent().

Referenced by create().

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

◆ update()

ilPCMyCoursesGUI::update ( )

Definition at line 140 of file class.ilPCMyCoursesGUI.php.

140 : void
141 {
142 $form = $this->initForm();
143 if ($form->checkInput()) {
144 $sort = $form->getInput("sort");
145 $this->content_obj->setData($sort);
146 $this->updated = $this->pg_obj->update();
147 if ($this->updated === true) {
148 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
149 }
150 }
151
152 $this->pg_obj->addHierIDs();
153 $form->setValuesByPost();
154 $this->edit($form);
155 }
edit(?ilPropertyFormGUI $a_form=null)

References ILIAS\Repository\ctrl(), edit(), and initForm().

+ Here is the call graph for this function:

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