5include_once 
"Modules/Exercise/classes/class.ilExcCriteria.php";
 
   42        $this->ctrl = 
$DIC->ctrl();
 
   43        $this->toolbar = 
$DIC->toolbar();
 
   44        $this->lng = 
$DIC->language();
 
   45        $this->tpl = 
$DIC[
"tpl"];
 
   46        $this->cat_id = $a_cat_id;
 
   53        $next_class = 
$ilCtrl->getNextClass($this);
 
   56        switch ($next_class) {
 
   75        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this, 
"add"));
 
   77        include_once 
"Services/Form/classes/class.ilSelectInputGUI.php";
 
   80        $ilToolbar->addStickyItem($types);
 
   82        include_once 
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
 
   84        $button->setCaption(
"exc_add_criteria");
 
   85        $button->setCommand(
"add");
 
   86        $ilToolbar->addStickyItem($button);
 
   88        include_once 
"Modules/Exercise/classes/class.ilExcCriteriaTableGUI.php";
 
  102        foreach (array_keys(
$_POST[
"pos"]) as 
$id) {
 
  103            if (array_key_exists(
$id, $all_cat)) {
 
  105                $all_cat[
$id]->setPosition($pos);
 
  106                $all_cat[
$id]->update();
 
  110        ilUtil::sendSuccess(
$lng->txt(
"settings_saved"), 
true);
 
  111        $ilCtrl->redirect($this, 
"view");
 
  123            $ilCtrl->redirect($this, 
"view");
 
  126        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  128        $confirmation_gui->setFormAction(
$ilCtrl->getFormAction($this, 
"delete"));
 
  129        $confirmation_gui->setHeaderText(
$lng->txt(
"exc_criteria_deletion_confirmation"));
 
  130        $confirmation_gui->setCancel(
$lng->txt(
"cancel"), 
"view");
 
  131        $confirmation_gui->setConfirm(
$lng->txt(
"delete"), 
"delete");
 
  134            if (in_array($item->getId(), $ids)) {
 
  135                $confirmation_gui->addItem(
"id[]", $item->getId(), $item->getTitle());
 
  139        $tpl->setContent($confirmation_gui->getHTML());
 
  142    protected function delete()
 
  149            $ilCtrl->redirect($this, 
"view");
 
  153            if (in_array($item->getId(), $ids)) {
 
  158        ilUtil::sendSuccess(
$lng->txt(
"settings_saved"), 
true);
 
  159        $ilCtrl->redirect($this, 
"view");
 
  172        include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  175        $is_edit = (bool) $a_crit_obj->
getId();
 
  177            $form->setFormAction(
$ilCtrl->getFormAction($this, 
"create"));
 
  178            $form->setTitle(
$lng->txt(
"exc_criteria_create_form"));
 
  179            $form->addCommandButton(
"create", 
$lng->txt(
"create"));
 
  181            $form->setFormAction(
$ilCtrl->getFormAction($this, 
"update"));
 
  182            $form->setTitle(
$lng->txt(
"exc_criteria_update_form"));
 
  183            $form->addCommandButton(
"update", 
$lng->txt(
"save"));
 
  186        $form->addCommandButton(
"view", 
$lng->txt(
"cancel"));
 
  193        $title->setRequired(
true);
 
  197        $form->addItem($desc);
 
  212        $new_type = trim($_REQUEST[
"type"]);
 
  214            $ilCtrl->redirect($this, 
"view");
 
  217        $ilCtrl->setParameter($this, 
"type", $new_type);
 
  221            $a_form = $this->
initForm($crit_obj);
 
  224        $tpl->setContent($a_form->getHTML());
 
  241        $is_edit = (bool) $a_crit_obj->
getId();
 
  244        if (
$form->checkInput()) {
 
  258            ilUtil::sendSuccess(
$lng->txt(
"settings_saved"), 
true);
 
  259            $ilCtrl->redirect($this, 
"view");
 
  262        $form->setValuesByPost();
 
  263        $this->{$is_edit ? 
"edit" : 
"add"}(
$form);
 
  270        $new_type = trim($_REQUEST[
"type"]);
 
  272            $ilCtrl->redirect($this, 
"view");
 
  283        $id = (int) $_REQUEST[
"crit_id"];
 
  286            if ($crit_obj->getParent() == $this->cat_id) {
 
  292        $ilCtrl->redirect($this, 
"view");
 
  302            $a_form = $this->
initForm($crit_obj);
 
  306        $tpl->setContent($a_form->getHTML());
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
add(ilPropertyFormGUI $a_form=null)
initForm(ilExcCriteria $a_crit_obj)
edit(ilPropertyFormGUI $a_form=null)
importForm(ilExcCriteria $a_crit_obj)
exportForm(ilExcCriteria $a_crit_obj, ilPropertyFormGUI $a_form)
Class ilExcCriteriaTableGUI.
static getInstancesByParentId($a_parent_id)
initCustomForm(ilPropertyFormGUI $a_form)
static getInstanceById($a_id)
exportCustomForm(ilPropertyFormGUI $a_form)
importCustomForm(ilPropertyFormGUI $a_form)
static getInstanceByType($a_type)
This class represents a non editable value in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id
if(isset($_POST['submit'])) $form