5 require_once(
"./Modules/Portfolio/classes/class.ilPCMyCourses.php");
6 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
24 function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
26 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
35 $next_class = $this->ctrl->getNextClass($this);
38 $cmd = $this->ctrl->getCmd();
69 $tpl->setContent($a_form->getHTML());
87 $tpl->setContent($a_form->getHTML());
100 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
102 $form->setFormAction($ilCtrl->getFormAction($this));
105 $form->setTitle($this->lng->txt(
"cont_insert_my_courses"));
109 $form->setTitle($this->lng->txt(
"cont_update_my_courses"));
113 $sort->
setInfo($this->lng->txt(
"cont_mycourses_sortorder_info"));
114 $sort->setRequired(
true);
115 $form->addItem($sort);
117 $sort->addOption(
new ilRadioOption($this->lng->txt(
"cont_mycourses_sortorder_alphabetical"),
"alpha"));
118 $sort->addOption(
new ilRadioOption($this->lng->txt(
"cont_mycourses_sortorder_location"),
"loc"));
122 $sort->setValue(
"alpha");
124 $form->addCommandButton(
"create_my_courses", $this->lng->txt(
"save"));
125 $form->addCommandButton(
"cancelCreate", $this->lng->txt(
"cancel"));
129 $sort->setValue($this->content_obj->getSorting());
131 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
132 $form->addCommandButton(
"cancelUpdate", $this->lng->txt(
"cancel"));
144 if($form->checkInput())
146 $sort = $form->getInput(
"sort");
149 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
150 $this->content_obj->setData($sort);
151 $this->updated = $this->pg_obj->update();
152 if ($this->updated ===
true)
154 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
158 $form->setValuesByPost();
159 return $this->
insert($form);
168 if($form->checkInput())
170 $sort = $form->getInput(
"sort");
172 $this->content_obj->setData($sort);
173 $this->updated = $this->pg_obj->update();
174 if ($this->updated ===
true)
176 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
180 $this->pg_obj->addHierIDs();
181 $form->setValuesByPost();
182 return $this->
edit($form);
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, ...)
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.