当前位置: 首页>>代码示例>>PHP>>正文


PHP ilObject::update方法代码示例

本文整理汇总了PHP中ilObject::update方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObject::update方法的具体用法?PHP ilObject::update怎么用?PHP ilObject::update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilObject的用法示例。


在下文中一共展示了ilObject::update方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 /**
  * update object data
  *
  * @access	public
  * @return	boolean
  */
 function update()
 {
     global $ilDB;
     $this->updateMetaData();
     parent::update();
     $ilDB->manipulate("UPDATE file_based_lm SET " . " is_online = " . $ilDB->quote(ilUtil::tf2yn($this->getOnline()), "text") . ", startfile = " . $ilDB->quote($this->getStartFile(), "text") . " " . ", show_lic = " . $ilDB->quote($this->getShowLicense(), "integer") . " " . ", show_bib = " . $ilDB->quote($this->getShowBibliographicalData(), "integer") . " " . " WHERE id = " . $ilDB->quote($this->getId(), "integer"));
     return true;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:14,代码来源:class.ilObjFileBasedLM.php

示例2: update

 /**
  * update object data
  *
  * @access	public
  * @return	boolean
  */
 function update()
 {
     global $ilDB;
     if (!parent::update()) {
         return false;
     }
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:14,代码来源:class.ilObjAccessibilitySettings.php

示例3: update

 /**
  * update object data
  *
  * @access	public
  * @return	boolean
  */
 function update()
 {
     if (!parent::update()) {
         return false;
     }
     // put here object specific stuff
     return true;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:14,代码来源:class.ilObjAdvancedEditing.php

示例4: update

 /**
  * update object data
  *
  * @access	public
  * @return	boolean
  */
 function update()
 {
     $this->updateMetaData();
     if (!parent::update()) {
         return false;
     }
     // put here object specific stuff
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilObjSurveyQuestionPool.php

示例5: update

 /**
  * update object data
  * @return	boolean
  */
 function update()
 {
     global $ilDB;
     if (!parent::update()) {
         return false;
     }
     // put here object specific stuff
     if ($this->getId()) {
         $ilDB->update("booking_settings", $this->getDBFields(), array("booking_pool_id" => array("integer", $this->getId())));
     }
     return true;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:16,代码来源:class.ilObjBookingPool.php

示例6: update

 /**
  * update object data
  *
  * @access	public
  * @return	boolean
  */
 function update()
 {
     global $ilDB;
     if (!parent::update()) {
         return false;
     }
     // save styles of style folder
     $q = "DELETE FROM style_folder_styles WHERE folder_id = " . $ilDB->quote($this->getId(), "integer");
     $ilDB->manipulate($q);
     foreach ($this->styles as $style) {
         $q = "INSERT INTO style_folder_styles (folder_id, style_id) VALUES" . "(" . $ilDB->quote((int) $this->getId(), "integer") . ", " . $ilDB->quote((int) $style["id"], "integer") . ")";
         $ilDB->manipulate($q);
     }
     return true;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:21,代码来源:class.ilObjStyleSettings.php

示例7: update

    /**
     * update object data
     *
     * @access	public
     * @return	boolean
     */
    function update()
    {
        global $ilDB;
        $this->updateMetaData();
        parent::update();
        $statement = $ilDB->manipulateF('
			UPDATE sahs_lm  
			SET c_online = %s, 
				api_adapter = %s, 
				api_func_prefix = %s,
				auto_review = %s,
				default_lesson_mode = %s,
				c_type = %s,
				stylesheet = %s, 
				editable = %s, 
				max_attempt = %s, 
				module_version = %s, 
				credit = %s, 
				glossary = %s, 
				question_tries = %s,
				unlimited_session = %s,
				no_menu = %s,
				hide_navig = %s,
				sequencing = %s,
				interactions = %s,
				objectives = %s,
				comments = %s,
				time_from_lms = %s,
				debug = %s,
				localization = %s,
				seq_exp_mode = %s,
				debugpw = %s,
				open_mode = %s,
				width = %s,
				height = %s,
				auto_continue = %s,
				auto_last_visited = %s,
				check_values = %s,
				offline_mode = %s,
				auto_suspend = %s
			WHERE id = %s', array('text', 'text', 'text', 'text', 'text', 'text', 'integer', 'integer', 'integer', 'integer', 'text', 'integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'text', 'integer', 'integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer'), array(ilUtil::tf2yn($this->getOnline()), $this->getAPIAdapterName(), $this->getAPIFunctionsPrefix(), $this->getAutoReviewChar(), $this->getDefaultLessonMode(), $this->getSubType(), $this->getStyleSheetId(), $this->getEditable(), $this->getMaxAttempt(), $this->getModuleVersion(), $this->getCreditMode(), $this->getAssignedGlossary(), $this->getTries(), ilUtil::tf2yn($this->getSession()), ilUtil::tf2yn($this->getNoMenu()), ilUtil::tf2yn($this->getHideNavig()), ilUtil::tf2yn($this->getSequencing()), ilUtil::tf2yn($this->getInteractions()), ilUtil::tf2yn($this->getObjectives()), ilUtil::tf2yn($this->getComments()), ilUtil::tf2yn($this->getTime_from_lms()), ilUtil::tf2yn($this->getDebug()), $this->getLocalization(), $this->getSequencingExpertMode(), $this->getDebugPw(), $this->getOpenMode(), $this->getWidth(), $this->getHeight(), ilUtil::tf2yn($this->getAutoContinue()), ilUtil::tf2yn($this->getAuto_last_visited()), ilUtil::tf2yn($this->getCheck_values()), ilUtil::tf2yn($this->getOfflineMode()), ilUtil::tf2yn($this->getAutoSuspend()), $this->getId()));
        return true;
    }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:49,代码来源:class.ilObjSAHSLearningModule.php

示例8: update

 /**
  * update media object in db
  */
 function update($a_upload = false)
 {
     parent::update();
     if (!$a_upload) {
         $this->updateMetaData();
     }
     ilMediaItem::deleteAllItemsOfMob($this->getId());
     // iterate all items
     $media_items =& $this->getMediaItems();
     $j = 1;
     foreach ($media_items as $key => $val) {
         $item =& $media_items[$key];
         if (is_object($item)) {
             $item->setMobId($this->getId());
             $item->setNr($j);
             if ($item->getLocationType() == "Reference") {
                 $item->extractUrlParameters();
             }
             $item->create();
             $j++;
         }
     }
     self::handleQuotaUpdate($this);
     global $ilAppEventHandler;
     $ilAppEventHandler->raise('Services/MediaObjects', 'update', array('object' => $this, 'obj_type' => 'mob', 'obj_id' => $this->getId()));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilObjMediaObject.php

示例9: update

 /**
  * update complete object (meta data and properties)
  */
 function update()
 {
     $this->updateMetaData();
     parent::update();
     $this->updateProperties();
     $this->updateAutoGlossaries();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:10,代码来源:class.ilObjContentObject.php

示例10: afterSave

 protected function afterSave(ilObject $a_new_object)
 {
     $a_new_object->setOffline(true);
     $a_new_object->setNumberOfSlots(4);
     $a_new_object->update();
     // always send a message
     ilUtil::sendSuccess($this->lng->txt("book_pool_added"), true);
     $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
     $this->ctrl->redirect($this, "edit");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:10,代码来源:class.ilObjBookingPoolGUI.php

示例11: update

 /**
  * Update
  */
 function update()
 {
     $ret = parent::update();
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
     return $ret;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:10,代码来源:class.ilContainer.php

示例12: update

 /**
  * updates a record "user" and write it into database
  * @access	public
  */
 function update()
 {
     global $ilErr, $ilDB, $ilAppEventHandler;
     $this->syncActive();
     if (!$this->active) {
         $this->setInactivationDate(ilUtil::now());
     }
     $update_array = array("gender" => array("text", $this->gender), "title" => array("text", $this->utitle), "firstname" => array("text", $this->firstname), "lastname" => array("text", $this->lastname), "email" => array("text", trim($this->email)), "birthday" => array('date', $this->getBirthday()), "hobby" => array("text", $this->hobby), "institution" => array("text", $this->institution), "department" => array("text", $this->department), "street" => array("text", $this->street), "city" => array("text", $this->city), "zipcode" => array("text", $this->zipcode), "country" => array("text", $this->country), "sel_country" => array("text", $this->sel_country), "phone_office" => array("text", $this->phone_office), "phone_home" => array("text", $this->phone_home), "phone_mobile" => array("text", $this->phone_mobile), "fax" => array("text", $this->fax), "referral_comment" => array("text", $this->referral_comment), "matriculation" => array("text", $this->matriculation), "client_ip" => array("text", $this->client_ip), "approve_date" => array("timestamp", $this->approve_date), "active" => array("integer", $this->active), "time_limit_unlimited" => array("integer", $this->getTimeLimitUnlimited()), "time_limit_until" => array("integer", $this->getTimeLimitUntil()), "time_limit_from" => array("integer", $this->getTimeLimitFrom()), "time_limit_owner" => array("integer", $this->getTimeLimitOwner()), "time_limit_message" => array("integer", $this->getTimeLimitMessage()), "profile_incomplete" => array("integer", $this->getProfileIncomplete()), "auth_mode" => array("text", $this->getAuthMode()), "ext_account" => array("text", $this->getExternalAccount()), "im_icq" => array("text", $this->im_icq), "im_yahoo" => array("text", $this->im_yahoo), "im_msn" => array("text", $this->im_msn), "im_aim" => array("text", $this->im_aim), "im_skype" => array("text", $this->im_skype), "delicious" => array("text", $this->delicious), "latitude" => array("text", $this->latitude), "longitude" => array("text", $this->longitude), "loc_zoom" => array("integer", (int) $this->loc_zoom), "last_password_change" => array("integer", $this->last_password_change_ts), "im_jabber" => array("text", $this->im_jabber), "im_voip" => array("text", $this->im_voip), "last_update" => array("timestamp", ilUtil::now()), 'inactivation_date' => array('timestamp', $this->inactivation_date));
     if (isset($this->agree_date) && (strtotime($this->agree_date) !== false || $this->agree_date == null)) {
         $update_array["agree_date"] = array("timestamp", $this->agree_date);
     }
     switch ($this->passwd_type) {
         case IL_PASSWD_PLAIN:
             if (strlen($this->passwd)) {
                 $update_array["i2passwd"] = array("text", (string) "");
                 $update_array["passwd"] = array("text", (string) md5($this->passwd));
             } else {
                 $update_array["i2passwd"] = array("text", (string) "");
                 $update_array["passwd"] = array("text", (string) $this->passwd);
             }
             break;
         case IL_PASSWD_MD5:
             $update_array["i2passwd"] = array("text", (string) "");
             $update_array["passwd"] = array("text", (string) $this->passwd);
             break;
         case IL_PASSWD_CRYPT:
             $update_array["i2passwd"] = array("text", (string) $this->passwd);
             $update_array["passwd"] = array("text", (string) "");
             break;
         default:
             $ilErr->raiseError("<b>Error: passwd_type missing in function update()" . $this->id . "!</b><br />class: " . get_class($this) . "<br />Script: " . __FILE__ . "<br />Line: " . __LINE__, $ilErr->FATAL);
     }
     $ilDB->update("usr_data", $update_array, array("usr_id" => array("integer", $this->id)));
     $this->writePrefs();
     // update user defined fields
     $this->updateUserDefinedFields();
     parent::update();
     parent::updateOwner();
     $this->read();
     $ilAppEventHandler->raise("Services/User", "afterUpdate", array("user_obj" => $this));
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:46,代码来源:class.ilObjUser.php

示例13: update

 /**
  * update object in db
  *
  * @return	boolean	true on success
  */
 public function update()
 {
     parent::update();
     $this->write();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilObjFileAccessSettings.php

示例14: update

 /**
  * updates a record "role" and write it into database
  * @access	public
  */
 function update()
 {
     global $ilDB;
     $query = "UPDATE role_data SET " . "allow_register= " . $ilDB->quote($this->allow_register, 'integer') . ", " . "assign_users = " . $ilDB->quote($this->getAssignUsersStatus(), 'integer') . ", " . "disk_quota = " . $ilDB->quote($this->getDiskQuota(), 'integer') . ", " . "wsp_disk_quota = " . $ilDB->quote($this->getPersonalWorkspaceDiskQuota(), 'integer') . " " . "WHERE role_id= " . $ilDB->quote($this->id, 'integer') . " ";
     $res = $ilDB->manipulate($query);
     parent::update();
     $this->read();
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:class.ilObjRole.php

示例15: update

 /**
  * update object
  *
  * @access public
  * @param
  * @return bool success
  */
 public function update()
 {
     global $ilDB;
     global $ilAppEventHandler;
     if (!parent::update()) {
         return false;
     }
     $query = "UPDATE event SET " . "location = " . $this->db->quote($this->getLocation(), 'text') . "," . "tutor_name = " . $this->db->quote($this->getName(), 'text') . ", " . "tutor_phone = " . $this->db->quote($this->getPhone(), 'text') . ", " . "tutor_email = " . $this->db->quote($this->getEmail(), 'text') . ", " . "details = " . $this->db->quote($this->getDetails(), 'text') . ", " . "registration = " . $this->db->quote($this->enabledRegistration(), 'integer') . " " . "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " ";
     $res = $ilDB->manipulate($query);
     $ilAppEventHandler->raise('Modules/Session', 'update', array('object' => $this, 'obj_id' => $this->getId(), 'appointments' => $this->prepareCalendarAppointments('update')));
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:19,代码来源:class.ilObjSession.php


注:本文中的ilObject::update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。