5 require_once(
"./Modules/Portfolio/classes/class.ilPCMyCourses.php");
6 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
24 public function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
28 $this->tpl = $DIC[
"tpl"];
29 $this->ctrl = $DIC->ctrl();
30 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
39 $next_class = $this->ctrl->getNextClass($this);
42 $cmd = $this->ctrl->getCmd();
44 switch ($next_class) {
71 $tpl->setContent($a_form->getHTML());
88 $tpl->setContent($a_form->getHTML());
101 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
105 $form->setTitle($this->lng->txt(
"cont_insert_my_courses"));
107 $form->setTitle($this->lng->txt(
"cont_update_my_courses"));
111 $sort->
setInfo($this->lng->txt(
"cont_mycourses_sortorder_info"));
112 $sort->setRequired(
true);
113 $form->addItem($sort);
115 $sort->addOption(
new ilRadioOption($this->lng->txt(
"cont_mycourses_sortorder_alphabetical"),
"alpha"));
116 $sort->addOption(
new ilRadioOption($this->lng->txt(
"cont_mycourses_sortorder_location"),
"loc"));
119 $sort->setValue(
"alpha");
121 $form->addCommandButton(
"create_my_courses", $this->lng->txt(
"save"));
122 $form->addCommandButton(
"cancelCreate", $this->lng->txt(
"cancel"));
124 $sort->setValue($this->content_obj->getSorting());
126 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
127 $form->addCommandButton(
"cancelUpdate", $this->lng->txt(
"cancel"));
139 if (
$form->checkInput()) {
140 $sort =
$form->getInput(
"sort");
143 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
144 $this->content_obj->setData($sort);
145 $this->updated = $this->pg_obj->update();
146 if ($this->updated ===
true) {
147 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
151 $form->setValuesByPost();
161 if (
$form->checkInput()) {
162 $sort =
$form->getInput(
"sort");
164 $this->content_obj->setData($sort);
165 $this->updated = $this->pg_obj->update();
166 if ($this->updated ===
true) {
167 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
171 $this->pg_obj->addHierIDs();
172 $form->setValuesByPost();
This class represents an option in a radio group.
create()
Create new courses.
initForm($a_insert=false)
Init courses form.
executeCommand()
execute command
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
if(isset($_POST['submit'])) $form
displayValidationError()
display validation errors
edit(ilPropertyFormGUI $a_form=null)
Edit courses form.
__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
Constructor public.
insert(ilPropertyFormGUI $a_form=null)
Insert courses form.