5 include_once
"Modules/Exercise/classes/class.ilExcCriteria.php";
20 $this->cat_id = $a_cat_id;
27 $next_class = $ilCtrl->getNextClass($this);
28 $cmd = $ilCtrl->getCmd(
"view");
47 $ilToolbar->setFormAction($ilCtrl->getFormAction($this,
"add"));
49 include_once
"Services/Form/classes/class.ilSelectInputGUI.php";
52 $ilToolbar->addStickyItem($types);
54 include_once
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
56 $button->setCaption(
"exc_add_criteria");
57 $button->setCommand(
"add");
58 $ilToolbar->addStickyItem($button);
60 include_once
"Modules/Exercise/classes/class.ilExcCriteriaTableGUI.php";
62 $tpl->setContent(
$tbl->getHTML());
73 foreach(array_keys(
$_POST[
"pos"]) as $id)
75 if(array_key_exists($id, $all_cat))
78 $all_cat[$id]->setPosition($pos);
79 $all_cat[$id]->update();
84 $ilCtrl->redirect($this,
"view");
95 $ilCtrl->redirect($this,
"view");
98 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
100 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this,
"delete"));
101 $confirmation_gui->setHeaderText($lng->txt(
"exc_criteria_deletion_confirmation"));
102 $confirmation_gui->setCancel($lng->txt(
"cancel"),
"view");
103 $confirmation_gui->setConfirm($lng->txt(
"delete"),
"delete");
107 if(in_array($item->getId(), $ids))
109 $confirmation_gui->addItem(
"id[]", $item->getId(), $item->getTitle());
113 $tpl->setContent($confirmation_gui->getHTML());
116 protected function delete()
123 $ilCtrl->redirect($this,
"view");
128 if(in_array($item->getId(), $ids))
135 $ilCtrl->redirect($this,
"view");
147 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
150 $is_edit = (bool)$a_crit_obj->
getId();
153 $form->setFormAction($ilCtrl->getFormAction($this,
"create"));
154 $form->setTitle($lng->txt(
"exc_criteria_create_form"));
155 $form->addCommandButton(
"create", $lng->txt(
"create"));
159 $form->setFormAction($ilCtrl->getFormAction($this,
"update"));
160 $form->setTitle($lng->txt(
"exc_criteria_update_form"));
161 $form->addCommandButton(
"update", $lng->txt(
"save"));
164 $form->addCommandButton(
"view", $lng->txt(
"cancel"));
168 $form->addItem($type);
171 $title->setRequired(
true);
175 $form->addItem($desc);
178 $form->addItem($req);
189 $new_type = trim($_REQUEST[
"type"]);
192 $ilCtrl->redirect($this,
"view");
195 $ilCtrl->setParameter($this,
"type", $new_type);
200 $a_form = $this->
initForm($crit_obj);
203 $tpl->setContent($a_form->getHTML());
219 $is_edit = (bool)$a_crit_obj->
getId();
221 $form = $this->
initForm($a_crit_obj);
222 if($form->checkInput())
224 $a_crit_obj->
setTitle($form->getInput(
"title"));
241 $ilCtrl->redirect($this,
"view");
244 $form->setValuesByPost();
245 $this->{$is_edit ?
"edit" :
"add"}($form);
252 $new_type = trim($_REQUEST[
"type"]);
255 $ilCtrl->redirect($this,
"view");
266 $id = (int)$_REQUEST[
"crit_id"];
272 $ilCtrl->setParameter($this,
"crit_id", $id);
277 $ilCtrl->redirect($this,
"view");
288 $a_form = $this->
initForm($crit_obj);
292 $tpl->setContent($a_form->getHTML());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getInstanceByType($a_type)
importCustomForm(ilPropertyFormGUI $a_form)
setValue($a_value)
Set Value.
static getInstanceById($a_id)
exportCustomForm(ilPropertyFormGUI $a_form)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
add(ilPropertyFormGUI $a_form=null)
static getInstancesByParentId($a_parent_id)
This class represents a text property in a property form.
edit(ilPropertyFormGUI $a_form=null)
This class represents a non editable value in a property form.
This class represents a text area property in a property form.
exportForm(ilExcCriteria $a_crit_obj, ilPropertyFormGUI $a_form)
initCustomForm(ilPropertyFormGUI $a_form)
initForm(ilExcCriteria $a_crit_obj)
Class ilExcCriteriaTableGUI.
importForm(ilExcCriteria $a_crit_obj)
Confirmation screen class.