5 include_once
"Modules/Exercise/classes/class.ilExcCriteriaCatalogue.php";
20 $this->exc_obj = $a_exc_obj;
27 $next_class = $ilCtrl->getNextClass($this);
28 $cmd = $ilCtrl->getCmd(
"view");
32 case "ilexccriteriagui":
33 $ilTabs->clearTargets();
34 $ilTabs->setBackTarget($lng->txt(
"back"), $ilCtrl->getLinkTarget($this,
""));
35 $ilCtrl->saveParameter($this,
"cat_id");
36 include_once
"Modules/Exercise/classes/class.ilExcCriteriaGUI.php";
38 $ilCtrl->forwardCommand($crit_gui);
56 $ilToolbar->addButton($lng->txt(
"exc_add_criteria_catalogue"),
57 $ilCtrl->getLinkTarget($this,
"add"));
59 include_once
"Modules/Exercise/classes/class.ilExcCriteriaCatalogueTableGUI.php";
61 $tpl->setContent(
$tbl->getHTML());
72 foreach(array_keys(
$_POST[
"pos"]) as $id)
74 if(array_key_exists($id, $all_cat))
77 $all_cat[$id]->setPosition($pos);
78 $all_cat[$id]->update();
83 $ilCtrl->redirect($this,
"view");
94 $ilCtrl->redirect($this,
"view");
97 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
99 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this,
"delete"));
100 $confirmation_gui->setHeaderText($lng->txt(
"exc_criteria_catalogue_deletion_confirmation"));
101 $confirmation_gui->setCancel($lng->txt(
"cancel"),
"view");
102 $confirmation_gui->setConfirm($lng->txt(
"delete"),
"delete");
106 if(in_array($item->getId(), $ids))
108 $confirmation_gui->addItem(
"id[]", $item->getId(), $item->getTitle());
112 $tpl->setContent($confirmation_gui->getHTML());
115 protected function delete()
122 $ilCtrl->redirect($this,
"view");
127 if(in_array($item->getId(), $ids))
134 $ilCtrl->redirect($this,
"view");
146 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
149 $is_edit = ($a_cat_obj !== null);
152 $form->setFormAction($ilCtrl->getFormAction($this,
"create"));
153 $form->setTitle($lng->txt(
"exc_criteria_catalogue_create_form"));
154 $form->addCommandButton(
"create", $lng->txt(
"create"));
158 $form->setFormAction($ilCtrl->getFormAction($this,
"update"));
159 $form->setTitle($lng->txt(
"exc_criteria_catalogue_update_form"));
160 $form->addCommandButton(
"update", $lng->txt(
"save"));
163 $form->addCommandButton(
"view", $lng->txt(
"cancel"));
166 $title->setRequired(
true);
181 $tpl->setContent($a_form->getHTML());
193 $is_edit = ($a_cat_obj !== null);
195 $form = $this->
initForm($a_cat_obj);
196 if($form->checkInput())
201 $a_cat_obj->setParent($this->exc_obj->getId());
204 $a_cat_obj->setTitle($form->getInput(
"title"));
212 $a_cat_obj->update();
216 $ilCtrl->redirect($this,
"view");
219 $form->setValuesByPost();
220 $this->{$is_edit ?
"edit" :
"add"}($form);
232 $id = (int)$_REQUEST[
"cat_id"];
236 if($cat_obj->getParent() == $this->exc_obj->getId())
238 $ilCtrl->setParameter($this,
"cat_id", $id);
243 $ilCtrl->redirect($this,
"view");
254 $a_form = $this->
initForm($cat_obj);
258 $tpl->setContent($a_form->getHTML());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilExcCriteriaCatalogue.
Class ilExcCriteriaCatalogueGUI.
initForm(ilExcCriteriaCatalogue $a_cat_obj=null)
__construct(ilObjExercise $a_exc_obj)
add(ilPropertyFormGUI $a_form=null)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
exportForm(ilExcCriteriaCatalogue $a_cat_obj, ilPropertyFormGUI $a_form)
Class ilExcCriteriaCatalogueTableGUI.
This class represents a text property in a property form.
edit(ilPropertyFormGUI $a_form=null)
static getInstancesByParentId($a_parent_id)
importForm(ilExcCriteriaCatalogue $a_cat_obj=null)
Confirmation screen class.