/**
  * Update info (extended meta data) 
  * 
  * @access protected
  */
 protected function updateInfoObject()
 {
     $this->checkPermission("write");
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'crs', $this->object->getId());
     $record_gui->loadFromPost();
     $record_gui->saveValues();
     ilUtil::sendSuccess($this->lng->txt("settings_saved"));
     $this->editInfoObject();
     return true;
 }
 /**
  * update term
  */
 function updateTerm()
 {
     // update term
     $this->term->setTerm(ilUtil::stripSlashes($_POST["term"]));
     $this->term->setLanguage($_POST["term_language"]);
     $this->term->update();
     // update taxonomy assignment
     if ($this->glossary->getTaxonomyId() > 0) {
         include_once "./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php";
         $ta = new ilTaxNodeAssignment("glo", $this->glossary->getId(), "term", $this->glossary->getTaxonomyId());
         $ta->deleteAssignmentsOfItem($this->term->getId());
         if (is_array($_POST["tax_node"])) {
             foreach ($_POST["tax_node"] as $node_id) {
                 $ta->addAssignment($node_id, $this->term->getId());
             }
         }
     }
     // advanced metadata
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'glo', $this->glossary->getId(), 'term', $this->term->getId());
     $record_gui->loadFromPost();
     $record_gui->saveValues();
     ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
     $this->ctrl->redirect($this, "editTerm");
 }
 /**
  * update object
  */
 public function updateObject()
 {
     global $ilErr;
     if (!$this->checkPermissionBool('write')) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
     }
     $form = $this->initEditForm();
     if ($form->checkInput()) {
         $this->object->setLocalInformation($a_form->getInput('local_info'));
         $this->updateCustomValues($form);
         $this->object->update();
         // Save advanced meta data
         include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
         $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, $this->getType(), $this->object->getId());
         $record_gui->loadFromPost();
         $record_gui->saveValues();
         ilUtil::sendSuccess($this->lng->txt("settings_saved"));
         $this->editObject();
     }
     $form->setValuesByPost();
     $this->editObject($form);
 }
 function updateInfoObject()
 {
     global $ilErr, $ilAccess;
     $this->checkPermission('write');
     include_once 'Modules/Course/classes/class.ilCourseFile.php';
     $file_obj = new ilCourseFile();
     $file_obj->setCourseId($this->object->getId());
     $file_obj->setFileName(strlen($_POST['file_name']) ? ilUtil::stripSlashes($_POST['file_name']) : $_FILES['file']['name']);
     $file_obj->setFileSize($_FILES['file']['size']);
     $file_obj->setFileType($_FILES['file']['type']);
     $file_obj->setTemporaryName($_FILES['file']['tmp_name']);
     $file_obj->setErrorCode($_FILES['file']['error']);
     $this->object->setImportantInformation(ilUtil::stripSlashes($_POST['important']));
     $this->object->setSyllabus(ilUtil::stripSlashes($_POST['syllabus']));
     $this->object->setContactName(ilUtil::stripSlashes($_POST['contact_name']));
     $this->object->setContactResponsibility(ilUtil::stripSlashes($_POST['contact_responsibility']));
     $this->object->setContactPhone(ilUtil::stripSlashes($_POST['contact_phone']));
     $this->object->setContactEmail(ilUtil::stripSlashes($_POST['contact_email']));
     $this->object->setContactConsultation(ilUtil::stripSlashes($_POST['contact_consultation']));
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'crs', $this->object->getId());
     $record_gui->loadFromPost();
     // Validate
     $ilErr->setMessage('');
     $file_obj->validate();
     $this->object->validateInfoSettings();
     if (strlen($ilErr->getMessage())) {
         ilUtil::sendFailure($ilErr->getMessage());
         $this->editInfoObject();
         return false;
     }
     $this->object->update();
     $file_obj->create();
     $record_gui->saveValues();
     // Update ecs content
     include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
     $ecs = new ilECSCourseSettings($this->object);
     $ecs->handleContentUpdate();
     ilUtil::sendSuccess($this->lng->txt("crs_settings_saved"));
     $this->editInfoObject();
     return true;
 }