예제 #1
0
 /**
  * save properties
  */
 function saveProperties()
 {
     global $tpl;
     $this->initSettingsForm();
     if ($this->form->checkInput()) {
         $this->object->setTitle($_POST['title']);
         $this->object->setDescription($_POST['description']);
         $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
         $this->object->setVirtualMode($_POST["glo_mode"]);
         //			$this->object->setActiveGlossaryMenu(ilUtil::yn2tf($_POST["glo_act_menu"]));
         $this->object->setActiveDownloads(ilUtil::yn2tf($_POST["glo_act_downloads"]));
         $this->object->setPresentationMode($_POST["pres_mode"]);
         $this->object->setSnippetLength($_POST["snippet_length"]);
         $this->object->setShowTaxonomy($_POST["show_tax"]);
         $this->object->update();
         // field order of advanced metadata
         include_once "./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php";
         $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getId());
         $cols = $adv_ap->getColumnOrder();
         if (count($cols) > 1) {
             $adv_ap->saveColumnOrder($_POST["field_order"]);
         }
         // set definition short texts dirty
         include_once "./Modules/Glossary/classes/class.ilGlossaryDefinition.php";
         ilGlossaryDefinition::setShortTextsDirty($this->object->getId());
         // update metadata record selection
         include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
         $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_REC_SELECTION, 'glo', $this->object->getId(), "term");
         $record_gui->saveSelection();
         // Update ecs export settings
         include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
         $ecs = new ilECSGlossarySettings($this->object);
         if ($ecs->handleSettingsUpdate()) {
             ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
             $this->ctrl->redirect($this, "properties");
         }
     }
     $this->form->setValuesByPost();
     $tpl->setContent($this->form->getHTML());
 }
예제 #2
0
 /**
  * Save Settings
  */
 function saveSettingsObject()
 {
     global $ilCtrl, $lng, $ilUser, $ilSetting;
     $this->checkPermission("write");
     $this->initSettingsForm();
     if ($this->form_gui->checkInput()) {
         if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")) && $this->form_gui->getInput("shorttitle") != $this->object->getShortTitle()) {
             $short_item = $this->form_gui->getItemByPostVar("shorttitle");
             $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
         } else {
             $this->object->setTitle($this->form_gui->getInput("title"));
             $this->object->setDescription($this->form_gui->getInput("description"));
             $this->object->setOnline($this->form_gui->getInput("online"));
             $this->object->setStartPage(ilWikiPage::lookupTitle($this->form_gui->getInput("startpage_id")));
             $this->object->setShortTitle($this->form_gui->getInput("shorttitle"));
             $this->object->setRatingOverall($this->form_gui->getInput("rating_overall"));
             $this->object->setRating($this->form_gui->getInput("rating"));
             // $this->object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
             $this->object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
             $this->object->setRatingCategories($this->form_gui->getInput("rating_ext"));
             if (!$ilSetting->get("disable_comments")) {
                 $this->object->setPublicNotes($this->form_gui->getInput("public_notes"));
             }
             $this->object->setIntroduction($this->form_gui->getInput("intro"));
             //				$this->object->setImportantPages($this->form_gui->getInput("imp_pages"));
             $this->object->setPageToc($this->form_gui->getInput("page_toc"));
             $this->object->update();
             // update metadata record selection
             include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
             $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_REC_SELECTION, 'wiki', $this->object->getId(), "wpg");
             $record_gui->saveSelection();
             // Update ecs export settings
             include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
             $ecs = new ilECSWikiSettings($this->object);
             if ($ecs->handleSettingsUpdate()) {
                 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
                 $ilCtrl->redirect($this, "editSettings");
             }
         }
     }
     $this->form_gui->setValuesByPost();
     $this->tpl->setContent($this->form_gui->getHTML());
 }