42         $this->
ctrl = $DIC->ctrl();
    43         $this->
tabs = $DIC->tabs();
    44         $this->
lng = $DIC->language();
    45         $this->
toolbar = $DIC->toolbar();
    46         $this->tpl = $DIC->ui()->mainTemplate();
    47         $this->exc_obj = $a_exc_obj;
    49         $this->request = $DIC->exercise()->internal()->gui()->request();
    61         $next_class = $ilCtrl->getNextClass($this);
    62         $cmd = $ilCtrl->getCmd(
"view");
    64         switch ($next_class) {
    65             case "ilexccriteriagui":
    66                 $ilTabs->clearTargets();
    67                 $ilTabs->setBackTarget($lng->
txt(
"back"), $ilCtrl->getLinkTarget($this, 
""));
    68                 $ilCtrl->saveParameter($this, 
"cat_id");
    70                 $ilCtrl->forwardCommand($crit_gui);
    84     protected function view(): void
    91         $ilToolbar->addButton(
    92             $lng->
txt(
"exc_add_criteria_catalogue"),
    93             $ilCtrl->getLinkTarget($this, 
"add")
   108         $req_positions = $this->request->getPositions();
   109         asort($req_positions);
   110         foreach (array_keys($req_positions) as 
$id) {
   111             if (array_key_exists($id, $all_cat)) {
   113                 $all_cat[
$id]->setPosition($pos);
   114                 $all_cat[
$id]->update();
   118         $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"settings_saved"), 
true);
   119         $ilCtrl->redirect($this, 
"view");
   128         $ids = $this->request->getCatalogueIds();
   129         if (count($ids) == 0) {
   131             $ilCtrl->redirect($this, 
"view");
   135         $confirmation_gui->setFormAction($ilCtrl->getFormAction($this, 
"delete"));
   136         $confirmation_gui->setHeaderText($lng->
txt(
"exc_criteria_catalogue_deletion_confirmation"));
   137         $confirmation_gui->setCancel($lng->
txt(
"cancel"), 
"view");
   138         $confirmation_gui->setConfirm($lng->
txt(
"delete"), 
"delete");
   141             if (in_array($item->getId(), $ids)) {
   142                 $confirmation_gui->addItem(
"id[]", $item->getId(), $item->getTitle());
   146         $tpl->
setContent($confirmation_gui->getHTML());
   149     protected function delete(): 
void   154         $ids = $this->request->getCatalogueIds();
   155         if (count($ids) == 0) {
   156             $ilCtrl->redirect($this, 
"view");
   160             if (in_array($item->getId(), $ids)) {
   165         $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"settings_saved"), 
true);
   166         $ilCtrl->redirect($this, 
"view");
   182         $is_edit = ($a_cat_obj !== null);
   184             $form->setFormAction($ilCtrl->getFormAction($this, 
"create"));
   185             $form->setTitle($lng->
txt(
"exc_criteria_catalogue_create_form"));
   186             $form->addCommandButton(
"create", $lng->
txt(
"create"));
   188             $form->setFormAction($ilCtrl->getFormAction($this, 
"update"));
   189             $form->setTitle($lng->
txt(
"exc_criteria_catalogue_update_form"));
   190             $form->addCommandButton(
"update", $lng->
txt(
"save"));
   193         $form->addCommandButton(
"view", $lng->
txt(
"cancel"));
   196         $title->setRequired(
true);
   197         $form->addItem($title);
   226         $is_edit = ($a_cat_obj !== null);
   228         $form = $this->
initForm($a_cat_obj);
   229         if ($form->checkInput()) {
   232                 $a_cat_obj->setParent($this->exc_obj->getId());
   235             $a_cat_obj->setTitle($form->getInput(
"title"));
   240                 $a_cat_obj->update();
   243             $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"settings_saved"), 
true);
   244             $ilCtrl->redirect($this, 
"view");
   247         $form->setValuesByPost();
   248         $this->{$is_edit ? 
"edit" : 
"add"}($form);
   260         $id = $this->request->getCatalogueId();
   263             if ($cat_obj->getParent() == $this->exc_obj->getId()) {
   264                 $ilCtrl->setParameter($this, 
"cat_id", 
$id);
   269         $ilCtrl->redirect($this, 
"view");
   281             $a_form = $this->
initForm($cat_obj);
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class ilExcCriteriaCatalogueGUI. 
 
initForm(ilExcCriteriaCatalogue $a_cat_obj=null)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user. 
 
static getInstancesByParentId(int $a_parent_id)
 
add(ilPropertyFormGUI $a_form=null)
 
ilGlobalTemplateInterface $tpl
 
setContent(string $a_html)
Sets content for standard template. 
 
exportForm(ilExcCriteriaCatalogue $a_cat_obj, ilPropertyFormGUI $a_form)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
edit(ilPropertyFormGUI $a_form=null)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
importForm(ilExcCriteriaCatalogue $a_cat_obj=null)
 
Exercise gui request wrapper.