/**
  * save properties
  */
 function saveProperties()
 {
     $valid = false;
     $this->initPropertiesForm();
     if ($this->form->checkInput()) {
         $this->object->setTitle($_POST['title']);
         $this->object->setDescription($_POST['description']);
         $this->object->setLayout($_POST["lm_layout"]);
         $this->object->setPageHeader($_POST["lm_pg_header"]);
         $this->object->setTOCMode($_POST["toc_mode"]);
         $this->object->setOnline($_POST["cobj_online"]);
         $this->object->setActiveNumbering($_POST["cobj_act_number"]);
         $this->object->setCleanFrames($_POST["cobj_clean_frames"]);
         if (!$this->ilias->getSetting('disable_comments')) {
             $this->object->setPublicNotes($_POST["cobj_pub_notes"]);
         }
         $this->object->setHistoryUserComments($_POST["cobj_user_comments"]);
         $this->object->setLayoutPerPage($_POST["layout_per_page"]);
         $this->object->setRating($_POST["rating"]);
         $this->object->setDisableDefaultFeedback((int) $_POST["disable_def_feedback"]);
         $this->object->updateProperties();
         $this->object->update();
         if ($this->object->getType() == 'lm') {
             // Update ecs export settings
             include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
             $ecs = new ilECSLearningModuleSettings($this->object);
             if ($ecs->handleSettingsUpdate()) {
                 $valid = true;
             }
         } else {
             $valid = true;
         }
     }
     if ($valid) {
         ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
         $this->ctrl->redirect($this, "properties");
     } else {
         $this->form->setValuesByPost();
         $tpl->setContent($this->form->getHTML());
     }
 }
 /**
  * save properties
  */
 function saveProperties()
 {
     global $lng, $ilUser;
     $valid = false;
     $this->initPropertiesForm();
     if ($this->form->checkInput()) {
         include_once "./Services/Object/classes/class.ilObjectTranslation.php";
         $ot = ilObjectTranslation::getInstance($this->object->getId());
         if ($ot->getContentActivated()) {
             $ot->setDefaultTitle($_POST['title']);
             $ot->setDefaultDescription($_POST['description']);
             $ot->save();
         }
         $this->object->setTitle($_POST['title']);
         $this->object->setDescription($_POST['description']);
         $this->object->setLayout($_POST["lm_layout"]);
         $this->object->setPageHeader($_POST["lm_pg_header"]);
         $this->object->setTOCMode($_POST["toc_mode"]);
         $this->object->setOnline($_POST["cobj_online"]);
         $this->object->setActiveNumbering($_POST["cobj_act_number"]);
         $this->object->setCleanFrames($_POST["cobj_clean_frames"]);
         if (!$this->ilias->getSetting('disable_comments')) {
             $this->object->setPublicNotes($_POST["cobj_pub_notes"]);
         }
         $this->object->setHistoryUserComments($_POST["cobj_user_comments"]);
         $this->object->setLayoutPerPage($_POST["layout_per_page"]);
         $this->object->setRating($_POST["rating"]);
         $this->object->setRatingPages($_POST["rating_pages"]);
         $this->object->setDisableDefaultFeedback((int) $_POST["disable_def_feedback"]);
         $this->object->setProgressIcons((int) $_POST["progr_icons"]);
         $add_info = "";
         if ($_POST["restrict_forw_nav"] && !$_POST["store_tries"]) {
             $_POST["store_tries"] = 1;
             $add_info = "</br>" . $lng->txt("cont_automatically_set_store_tries");
             $add_info = str_replace("\$1", $lng->txt("cont_tries_store"), $add_info);
             $add_info = str_replace("\$2", $lng->txt("cont_restrict_forw_nav"), $add_info);
         }
         $this->object->setStoreTries((int) $_POST["store_tries"]);
         $this->object->setRestrictForwardNavigation((int) $_POST["restrict_forw_nav"]);
         $this->object->updateProperties();
         $this->object->update();
         include_once "./Services/Notification/classes/class.ilNotification.php";
         ilNotification::setNotification(ilNotification::TYPE_LM_BLOCKED_USERS, $ilUser->getId(), $this->object->getId(), (bool) $this->form->getInput("notification_blocked_users"));
         if ($this->object->getType() == 'lm') {
             // Update ecs export settings
             include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
             $ecs = new ilECSLearningModuleSettings($this->object);
             if ($ecs->handleSettingsUpdate()) {
                 $valid = true;
             }
         } else {
             $valid = true;
         }
     }
     if ($valid) {
         ilUtil::sendSuccess($this->lng->txt("msg_obj_modified") . $add_info, true);
         $this->ctrl->redirect($this, "properties");
     } else {
         $lng->loadLanguageModule("style");
         $this->setTabs("settings");
         $this->setSubTabs("cont_general_properties");
         $this->form->setValuesByPost();
         $this->tpl->setContent($this->form->getHTML());
     }
 }