ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 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 ()
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 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 ()
 

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 = ""
 
php4DOMDocument $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
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
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 = "" 
)

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

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

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  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCMyCoursesGUI::create ( )

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

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

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

◆ edit()

ilPCMyCoursesGUI::edit ( ilPropertyFormGUI  $a_form = null)

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

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ilGlobalTemplateInterface\setContent().

Referenced by update().

69  : void
70  {
71  $tpl = $this->tpl;
72 
73  $this->displayValidationError();
74 
75  if (!$a_form) {
76  $a_form = $this->initForm();
77  }
78  $tpl->setContent($a_form->getHTML());
79  }
initForm($a_insert=false)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ 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.

References ILIAS\Repository\ctrl().

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  }
+ Here is the call graph for this function:

◆ initForm()

ilPCMyCoursesGUI::initForm (   $a_insert = false)
protected

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

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

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

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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
+ 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.

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ilGlobalTemplateInterface\setContent().

Referenced by create().

53  : void
54  {
55  $tpl = $this->tpl;
56 
57  /* #12816 - no form needed yet
58  $this->create();
59  */
60 
61  $this->displayValidationError();
62 
63  if (!$a_form) {
64  $a_form = $this->initForm(true);
65  }
66  $tpl->setContent($a_form->getHTML());
67  }
initForm($a_insert=false)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilPCMyCoursesGUI::update ( )

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

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

135  : void
136  {
137  $form = $this->initForm();
138  if ($form->checkInput()) {
139  $sort = $form->getInput("sort");
140  $this->content_obj->setData($sort);
141  $this->updated = $this->pg_obj->update();
142  if ($this->updated === true) {
143  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
144  }
145  }
146 
147  $this->pg_obj->addHierIDs();
148  $form->setValuesByPost();
149  $this->edit($form);
150  }
initForm($a_insert=false)
edit(ilPropertyFormGUI $a_form=null)
+ Here is the call graph for this function:

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