36 $this->tpl = $DIC[
"tpl"];
37 $this->
ctrl = $DIC->ctrl();
38 $this->
user = $DIC->user();
39 $this->
lng = $DIC->language();
46 $next_class = $this->
ctrl->getNextClass($this);
49 $cmd = $this->
ctrl->getCmd();
51 switch ($next_class) {
99 $form->setFormAction($ilCtrl->getFormAction($this));
101 $form->setTitle($this->
lng->txt(
"cont_insert_consultation_hours"));
103 $form->setTitle($this->
lng->txt(
"cont_update_consultation_hours"));
108 $form->addItem($mode);
110 $opt_auto =
new ilRadioOption($this->
lng->txt(
"cont_cach_mode_automatic"),
"auto");
111 $opt_auto->
setInfo($this->
lng->txt(
"cont_cach_mode_automatic_info"));
112 $mode->addOption($opt_auto);
115 $mode->setValue(
'auto');
142 $mode->setValue(
"auto");
144 $form->addCommandButton(
"create_consultation_hours", $this->
lng->txt(
"select"));
145 $form->addCommandButton(
"cancelCreate", $this->
lng->txt(
"cancel"));
160 $form->addCommandButton(
"update", $this->
lng->txt(
"select"));
161 $form->addCommandButton(
"cancelUpdate", $this->
lng->txt(
"cancel"));
175 if ($form->checkInput()) {
177 $mode = $form->getInput(
"mode");
178 if ($mode ==
"manual") {
179 $grp_ids = $form->getInput(
"grp");
183 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
184 $this->content_obj->setData($mode, (array) $grp_ids);
185 $this->updated = $this->pg_obj->update();
186 if ($this->updated ===
true) {
187 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
191 $form->setValuesByPost();
198 if ($form->checkInput()) {
200 $mode = $form->getInput(
"mode");
201 if ($mode ==
"manual") {
202 $grp_ids = $form->getInput(
"grp");
205 $this->content_obj->setData($mode, $grp_ids);
206 $this->updated = $this->pg_obj->update();
207 if ($this->updated ===
true) {
208 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
212 $this->pg_obj->addHierIDs();
213 $form->setValuesByPost();
This class represents an option in a radio group.
edit(?ilPropertyFormGUI $a_form=null)
Edit consultation hours form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
Content object of ilPageObject (see ILIAS DTD).
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
create_consultation_hours()
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initForm(bool $a_insert=false)
Init consultation hours form.
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
__construct(Container $dic, ilPlugin $plugin)
insert(?ilPropertyFormGUI $a_form=null)
Insert consultation hours form.