public function updateObject() { global $ilAccess; if (!$ilAccess->checkAccess('write', '', (int) $_GET['ref_id'])) { $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->MESSAGE); } $this->initSettingsForm('edit'); if ($this->form_gui->checkInput()) { $_POST['Fobject']['title'] = $this->form_gui->getInput('title'); $_POST['Fobject']['desc'] = $this->form_gui->getInput('desc'); $_POST['Fobject']['activated'] = $this->form_gui->getInput('activated'); $_POST['Fobject']['akclassvalue1'] = $this->form_gui->getInput('akclassvalue1'); $_POST['Fobject']['akclassvalue2'] = $this->form_gui->getInput('akclassvalue2'); $this->object->setTitle(ilUtil::prepareDBString($_POST['Fobject']['title'])); $this->object->setDescription(ilUtil::prepareDBString($_POST['Fobject']['desc'])); $this->object->activated = ilUtil::tf2yn($_POST['Fobject']['activated']); // update akclassvalues only if iLinc is active if ($this->ilias->getSetting('ilinc_akclassvalues_active')) { if ($this->object->getAKClassValue1() != $_POST['Fobject']['akclassvalue1']) { $this->object->setAKClassValue1(ilUtil::prepareDBString($_POST['Fobject']['akclassvalue1'])); } if ($this->object->getAKClassValue2() != $_POST['Fobject']['akclassvalue2']) { $this->object->setAKClassValue2(ilUtil::prepareDBString($_POST['Fobject']['akclassvalue2'])); } } // save changes to ilinc server and ilias database $success = $this->object->update(); if ($success == false) { $this->ilErr->raiseError($this->object->getErrorMsg(), $this->ilErr->MESSAGE); } // update all akclassvalues of classes if akclassvalues has changed if (array_key_exists('akclassvalue1', $_POST['Fobject']) or array_key_exists('akclassvalue2', $_POST['Fobject'])) { if (!$this->object->updateClassrooms()) { ilUtil::sendInfo($this->lng->txt($this->object->getErrorMsg())); $this->form_gui->setValuesByPost(); return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml()); } } ilUtil::sendInfo($this->lng->txt('msg_obj_modified')); $this->form_gui->setValuesByPost(); return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml()); } else { $this->form_gui->setValuesByPost(); return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml()); } }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'size' => ilUtil::prepareDBString($this->getSize()), 'installation_remarks' => ilUtil::prepareDBString($this->getInstallationRemarks()), 'installation_remarks_language' => ilUtil::prepareDBString($this->getInstallationRemarksLanguageCode()), 'other_platform_requirements' => ilUtil::prepareDBString($this->getOtherPlatformRequirements()), 'other_platform_requirements_language' => ilUtil::prepareDBString($this->getOtherPlatformRequirementsLanguageCode()), 'duration' => ilUtil::prepareDBString($this->getDuration())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'format' => ilUtil::prepareDBString($this->getFormat())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'interactivity_type' => ilUtil::prepareDBString($this->getInteractivityType()), 'learning_resource_type' => ilUtil::prepareDBString($this->getLearningResourceType()), 'interactivity_level' => ilUtil::prepareDBString($this->getInteractivityLevel()), 'semantic_density' => ilUtil::prepareDBString($this->getSemanticDensity()), 'intended_end_user_role' => ilUtil::prepareDBString($this->getIntendedEndUserRole()), 'context' => ilUtil::prepareDBString($this->getContext()), 'difficulty' => ilUtil::prepareDBString($this->getDifficulty()), 'typical_learning_time' => ilUtil::prepareDBString($this->getTypicalLearningTime())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'typical_age_range' => ilUtil::prepareDBString($this->getTypicalAgeRange()), 'typical_age_range_language' => ilUtil::prepareDBString($this->getTypicalAgeRangeLanguageCode())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'costs' => ilUtil::prepareDBString($this->getCosts()), 'copyright_and_other_restrictions' => ilUtil::prepareDBString($this->getCopyrightAndOtherRestrictions()), 'description' => ilUtil::prepareDBString($this->getDescription()), 'description_language' => ilUtil::prepareDBString($this->getDescriptionLanguageCode())); }
/** * update object in db * * Note: This is mostly the same as method update in class.ilObject.php. * In addition to updating descriptional properties, we also update the * "type" property. This is needed, because a Null Resource can be converted * into another resource type using a PUT or a MKCOL request by a WebDAV client. * * @access public * @return boolean true on success */ function update() { parent::update(); $q = "UPDATE object_data" . " SET" . " type = '" . ilUtil::prepareDBString($this->getType()) . "'" . " WHERE obj_id = '" . $this->getId() . "'"; $this->ilias->db->query($q); return true; }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'role' => ilUtil::prepareDBString($this->getRole()), 'date' => ilUtil::prepareDBString($this->getDate())); }
function __parseQuotation() { if (!strlen($this->getQueryString())) { $this->quoted_words[] = ''; return false; } $query_str = $this->getQueryString(); while (preg_match("/\".*?\"/", $query_str, $matches)) { $query_str = str_replace($matches[0], '', $query_str); $this->quoted_words[] = ilUtil::prepareDBString($matches[0]); } // Parse the rest $words = explode(' ', trim($query_str)); foreach ($words as $word) { if (!strlen(trim($word))) { continue; } $this->quoted_words[] = ilUtil::prepareDBString($word); } if (!$this->getAllowedWildcards()) { // #14768 foreach ($this->quoted_words as $idx => $word) { if (!stristr($word, '\\')) { $word = str_replace('%', '\\%', $word); $word = str_replace('_', '\\_', $word); } $this->quoted_words[$idx] = $word; } } }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'keyword' => ilUtil::prepareDBString($this->getKeyword()), 'keyword_language' => ilUtil::prepareDBString($this->getKeywordLanguageCode())); }
function __parseQuotation() { if (!strlen($this->getQueryString())) { $this->quoted_words[] = ''; return false; } $query_str = $this->getQueryString(); while (preg_match("/\".*?\"/", $query_str, $matches)) { $query_str = str_replace($matches[0], '', $query_str); $this->quoted_words[] = ilUtil::prepareDBString($matches[0]); } // Parse the rest $words = explode(' ', trim($query_str)); foreach ($words as $word) { if (!strlen(trim($word))) { continue; } $this->quoted_words[] = ilUtil::prepareDBString($word); } }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'operating_system_name' => ilUtil::prepareDBString($this->getOperatingSystemName()), 'operating_system_minimum_version' => ilUtil::prepareDBString($this->getOperatingSystemMinimumVersion()), 'operating_system_maximum_version' => ilUtil::prepareDBString($this->getOperatingSystemMaximumVersion()), 'browser_name' => ilUtil::prepareDBString($this->getBrowserName()), 'browser_minimum_version' => ilUtil::prepareDBString($this->getBrowserMinimumVersion()), 'browser_maximum_version' => ilUtil::prepareDBString($this->getBrowserMaximumVersion()), 'or_composite_id' => $this->getOrCompositeId()); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'lifecycle_status' => ilUtil::prepareDBString($this->getStatus()), 'meta_version' => ilUtil::prepareDBString($this->getVersion()), 'version_language' => ilUtil::prepareDBString($this->getVersionLanguageCode())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'meta_data_scheme' => ilUtil::prepareDBString($this->getMetaDataScheme()), 'language' => ilUtil::prepareDBString($this->getLanguageCode())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'catalog' => ilUtil::prepareDBString($this->getCatalog()), 'entry' => ilUtil::prepareDBString($this->getEntry())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'location' => ilUtil::prepareDBString($this->getLocation()), 'location_type' => ilUtil::prepareDBString($this->getLocationType())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'entity' => ilUtil::prepareDBString($this->getEntity()), 'date' => ilUtil::prepareDBString($this->getDate()), 'description' => ilUtil::prepareDBString($this->getDescription()), 'description_language' => ilUtil::prepareDBString($this->getDescriptionLanguageCode())); }
function __getFields() { return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'general_structure' => ilUtil::prepareDBString($this->getStructure()), 'title' => ilUtil::prepareDBString($this->getTitle()), 'title_language' => ilUtil::prepareDBString($this->getTitleLanguageCode()), 'coverage' => ilUtil::prepareDBString($this->getCoverage()), 'coverage_language' => ilUtil::prepareDBString($this->getCoverageLanguageCode())); }