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


PHP ilSetting类代码示例

本文整理汇总了PHP中ilSetting的典型用法代码示例。如果您正苦于以下问题:PHP ilSetting类的具体用法?PHP ilSetting怎么用?PHP ilSetting使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: __construct

 /**
  * Constructor
  *
  * @param int $a_node
  * @param object $a_access_handler
  * @param int $a_id
  * @param int $a_old_nr
  * @param bool $a_enable_notes
  * @param bool $a_may_contribute
  * @return ilBlogPostingGUI
  */
 function __construct($a_node_id, $a_access_handler = null, $a_id = 0, $a_old_nr = 0, $a_enable_public_notes = true, $a_may_contribute = true)
 {
     global $tpl, $lng;
     $lng->loadLanguageModule("blog");
     $this->node_id = $a_node_id;
     $this->access_handler = $a_access_handler;
     $this->enable_public_notes = (bool) $a_enable_public_notes;
     parent::__construct("blp", $a_id, $a_old_nr);
     // #11151
     $this->may_contribute = (bool) $a_may_contribute;
     $this->setEnableEditing($a_may_contribute);
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
     // #11190
     $blga_set = new ilSetting("blga");
     $this->setPreventHTMLUnmasking((bool) $blga_set->get("mask", false));
     $this->setEnabledMaps(true);
     $this->setEnabledInternalLinks(false);
     $this->setEnabledWikiLinks(false);
     $this->setEnabledPCTabs(true);
     $this->setEnabledActivation(true);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:39,代码来源:class.ilBlogPostingGUI.php

示例2: exportActiveIDs

 protected function exportActiveIDs()
 {
     global $ilDB, $ilSetting;
     include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
     $assessmentSetting = new ilSetting("assessment");
     $user_criteria = $assessmentSetting->get("user_criteria");
     if (strlen($user_criteria) == 0) {
         $user_criteria = 'usr_id';
     }
     if ($this->anonymized) {
         $result = $ilDB->queryF("SELECT * FROM tst_active WHERE test_fi = %s", array('integer'), array($this->test_id));
     } else {
         $result = $ilDB->queryF("SELECT tst_active.*, usr_data." . $user_criteria . " FROM tst_active, usr_data WHERE tst_active.test_fi = %s AND tst_active.user_fi = usr_data.usr_id", array('integer'), array($this->test_id));
     }
     $this->xmlStartTag("tst_active", NULL);
     while ($row = $ilDB->fetchAssoc($result)) {
         $attrs = array('active_id' => $row['active_id'], 'user_fi' => $row['user_fi'], 'anonymous_id' => $row['anonymous_id'], 'test_fi' => $row['test_fi'], 'lastindex' => $row['lastindex'], 'tries' => $row['tries'], 'submitted' => $row['submitted'], 'submittimestamp' => $row['submittimestamp'], 'tstamp' => $row['tstamp']);
         $attrs['fullname'] = ilObjTestAccess::_getParticipantData($row['active_id']);
         if (!$this->anonymized) {
             $attrs['user_criteria'] = $user_criteria;
             $attrs[$user_criteria] = $row[$user_criteria];
         }
         array_push($this->active_ids, $row['active_id']);
         $this->xmlElement("row", $attrs);
     }
     $this->xmlEndTag("tst_active");
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:27,代码来源:class.ilTestResultsToXML.php

示例3: init

 /**
  * Init
  */
 function init()
 {
     global $ilSetting, $rbacsystem;
     $prfa_set = new ilSetting("prfa");
     $this->setPreventHTMLUnmasking(!(bool) $prfa_set->get("mask", false));
     $this->setEnableInternalLinks(false);
     $this->setEnablePCType("Profile", true);
     if (!$ilSetting->get('disable_wsp_certificates')) {
         $this->setEnablePCType("Verification", true);
     }
     $skmg_set = new ilSetting("skmg");
     if ($skmg_set->get("enable_skmg")) {
         $this->setEnablePCType("Skills", true);
     }
     include_once './Services/Calendar/classes/class.ilCalendarUserSettings.php';
     $settings = ilCalendarSettings::_getInstance();
     if ($settings->isEnabled() && $rbacsystem->checkAccess('add_consultation_hours', $settings->getCalendarSettingsId()) && $settings->areConsultationHoursEnabled()) {
         $this->setEnablePCType("ConsultationHours", true);
     }
     $prfa_set = new ilSetting("prfa");
     if ($prfa_set->get("mycrs", true)) {
         $this->setEnablePCType("MyCourses", true);
     }
     // patch optes begin (no trunk)
     $mset = new ilSetting("mobs");
     if ($mset->get("mep_activate_pages")) {
         $this->setEnablePCType("ContentInclude", true);
     }
     // patch optes end (no trunk)
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:33,代码来源:class.ilPortfolioPageConfig.php

示例4: getNodeIcon

 /**
  * Get node icon
  *
  * @param array $a_node node array
  * @return string icon path
  */
 function getNodeIcon($a_node)
 {
     if ($a_node["child"] == $this->getNodeId($this->getRootNode())) {
         $icon = ilUtil::getImagePath("icon_lm.svg");
     } else {
         $a_name = "icon_" . $a_node["type"] . ".svg";
         if ($a_node["type"] == "pg") {
             include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
             $lm_set = new ilSetting("lm");
             $active = ilLMPage::_lookupActive($a_node["child"], $this->lm->getType(), $lm_set->get("time_scheduled_page_activation"));
             // is page scheduled?
             $img_sc = $lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_node["child"], $this->lm->getType()) ? "_sc" : "";
             $a_name = "icon_pg" . $img_sc . ".svg";
             if (!$active) {
                 $a_name = "icon_pg_d" . $img_sc . ".svg";
             } else {
                 include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
                 $contains_dis = ilLMPage::_lookupContainsDeactivatedElements($a_node["child"], $this->lm->getType());
                 if ($contains_dis) {
                     $a_name = "icon_pg_del" . $img_sc . ".svg";
                 }
             }
         }
         $icon = ilUtil::getImagePath($a_name);
     }
     return $icon;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilPublicSectionExplorerGUI.php

示例5: __construct

 /**
  * Constructor
  */
 function __construct($a_portfolio_id, $a_id = 0, $a_old_nr = 0, $a_enable_comments = true)
 {
     global $tpl, $ilSetting;
     $this->portfolio_id = (int) $a_portfolio_id;
     $this->enable_comments = (bool) $a_enable_comments;
     parent::__construct("prtf", $a_id, $a_old_nr);
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
     // #11190
     $prfa_set = new ilSetting("prfa");
     $this->setPreventHTMLUnmasking((bool) $prfa_set->get("mask", false));
     // $this->setEnabledMaps(true);
     $this->setEnabledInternalLinks(false);
     $this->setEnabledPCTabs(true);
     $this->setEnabledProfile(true);
     if (!$ilSetting->get('disable_wsp_certificates')) {
         $this->setEnabledVerification(true);
     }
     /* embedding blog postings currently disabled 
     		if(!$ilSetting->get('disable_wsp_blogs'))
     		{
     			$this->setEnabledBlog(true);
     		}		
     		*/
     $skmg_set = new ilSetting("skmg");
     if ($skmg_set->get("enable_skmg")) {
         $this->setEnabledSkills(true);
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilPortfolioPageGUI.php

示例6: __construct

 /**
  * Private constructor
  */
 private function __construct()
 {
     $this->settings = new ilSetting("fileupload");
     $this->dndUploadEnabled = $this->settings->get("dnd_upload_enabled", true) == true;
     $this->repositoryDndUploadEnabled = $this->settings->get("repository_dnd_upload_enabled", true) == true;
     $this->concurrentUploads = $this->settings->get("concurrent_upload_count", self::CONCURRENT_UPLOADS_DEFAULT);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilFileUploadSettings.php

示例7: general

 /**
  * Prepares and displays settings form.
  * @param ilPropertyFormGUI $settingsForm
  */
 public function general(ilPropertyFormGUI $settingsForm = null)
 {
     /**
      * @var $lng    ilLanguage
      * @var $tpl    ilTemplate
      * @var $ilCtrl ilCtrl
      */
     global $lng, $tpl, $ilCtrl;
     if (!ilChatroom::checkUserPermissions(array('read', 'write'), $this->gui->ref_id)) {
         $ilCtrl->setParameterByClass('ilrepositorygui', 'ref_id', ROOT_FOLDER_ID);
         $ilCtrl->redirectByClass('ilrepositorygui', '');
     }
     $chatSettings = new ilSetting('chatroom');
     if (!$chatSettings->get('chat_enabled')) {
         ilUtil::sendInfo($lng->txt('server_disabled'), true);
     }
     $this->gui->switchToVisibleMode();
     $formFactory = new ilChatroomFormFactory();
     if (!$settingsForm) {
         $settingsForm = $formFactory->getSettingsForm();
     }
     $room = ilChatRoom::byObjectId($this->gui->object->getId());
     $settings = array('title' => $this->gui->object->getTitle(), 'desc' => $this->gui->object->getDescription());
     if ($room) {
         ilChatroomFormFactory::applyValues($settingsForm, array_merge($settings, $room->getSettings()));
     } else {
         ilChatroomFormFactory::applyValues($settingsForm, $settings);
     }
     $settingsForm->setTitle($lng->txt('settings_title'));
     $settingsForm->addCommandButton('settings-saveGeneral', $lng->txt('save'));
     $settingsForm->setFormAction($ilCtrl->getFormAction($this->gui, 'settings-saveGeneral'));
     $tpl->setVariable('ADM_CONTENT', $settingsForm->getHtml());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilChatroomSettingsTask.php

示例8: getHTML

 /**
  * @return string
  */
 public function getHTML()
 {
     global $tpl, $ilTabs, $ilCtrl, $lng;
     $form = new ilPropertyFormGUI();
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, 'showContent'));
     $form->setTitle($lng->txt('detail_view'));
     // add link button if a link is defined in the settings
     $set = new ilSetting("bibl");
     $link = $set->get(strtolower($this->bibl_obj->getFiletype()));
     if (!empty($link)) {
         $form->addCommandButton('autoLink', 'Link');
     }
     $attributes = $this->entry->getAttributes();
     //translate array key in order to sort by those keys
     foreach ($attributes as $key => $attribute) {
         //Check if there is a specific language entry
         if ($lng->exists($key)) {
             $strDescTranslated = $lng->txt($key);
         } else {
             $arrKey = explode("_", $key);
             $is_standard_field = false;
             switch ($arrKey[0]) {
                 case 'bib':
                     $is_standard_field = ilBibTex::isStandardField($arrKey[2]);
                     break;
                 case 'ris':
                     $is_standard_field = ilRis::isStandardField($arrKey[2]);
                     break;
             }
             //				var_dump($is_standard_field); // FSX
             if ($is_standard_field) {
                 $strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
             } else {
                 $strDescTranslated = $arrKey[2];
             }
         }
         unset($attributes[$key]);
         $attributes[$strDescTranslated] = $attribute;
     }
     // sort attributes alphabetically by their array-key
     ksort($attributes, SORT_STRING);
     // render attributes to html
     foreach ($attributes as $key => $attribute) {
         $ci = new ilCustomInputGUI($key);
         $ci->setHtml($attribute);
         $form->addItem($ci);
     }
     // generate/render links to libraries
     $settings = ilBibliographicSetting::getAll();
     foreach ($settings as $set) {
         $ci = new ilCustomInputGUI($set->getName());
         $ci->setHtml($set->getButton($this->bibl_obj, $this->entry));
         $form->addItem($ci);
     }
     $tpl->setPermanentLink("bibl", $this->bibl_obj->getRefId(), "_" . $_GET[ilObjBibliographicGUI::P_ENTRY_ID]);
     // set content and title
     return $form->getHTML();
     //Permanent Link
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:63,代码来源:class.ilBibliographicDetailsGUI.php

示例9: getImage

 /**
  * get image path (may be overwritten by derived classes)
  */
 function getImage($a_name, $a_type = "", $a_id = "")
 {
     // overwrite chapter icons with lp info?
     if (!$this->offlineMode() && $a_type == "st") {
         $icon = $this->checkLPIcon($a_id);
         if ($icon) {
             return $icon;
         }
     }
     include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
     if ($a_type == "pg") {
         include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
         $lm_set = new ilSetting("lm");
         $active = ilLMPage::_lookupActive($a_id, $this->lm_obj->getType(), $lm_set->get("time_scheduled_page_activation"));
         // is page scheduled?
         $img_sc = $lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_id, $this->lm_obj->getType()) ? "_sc" : "";
         $a_name = "icon_pg" . $img_sc . "_s.png";
         if (!$active) {
             $a_name = "icon_pg_d" . $img_sc . "_s.png";
         } else {
             $contains_dis = ilLMPage::_lookupContainsDeactivatedElements($a_id, $this->lm_obj->getType());
             if ($contains_dis) {
                 $a_name = "icon_pg_del" . $img_sc . "_s.png";
             }
         }
     }
     return ilUtil::getImagePath($a_name, false, "output", $this->offlineMode());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:31,代码来源:class.ilLMTOCExplorer.php

示例10: _isSummaryMailActive

 /**
  * Static getter. Returns true, if disk quota summary mails are active.
  *
  * Summary mails are active if the variable "summary_mail_enabled"
  * is set in ilSetting('disk_quota')
  *
  * @return	boolean	value
  */
 public static function _isSummaryMailActive()
 {
     if (self::$isSummaryMailActive == null) {
         $settings = new ilSetting('disk_quota');
         self::$isSummaryMailActive = self::_isActive() && (int) $settings->get('summary_mail_enabled') == 1;
     }
     return self::$isSummaryMailActive;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:16,代码来源:class.ilDiskQuotaActivationChecker.php

示例11: ilObjMediaCast

 /**
  * Constructor
  * @access	public
  * @param	integer	reference_id or object_id
  * @param	boolean	treat the id as reference_id (true) or object_id (false)
  */
 function ilObjMediaCast($a_id = 0, $a_call_by_reference = true)
 {
     $this->type = "mcst";
     $this->ilObject($a_id, $a_call_by_reference);
     $mcst_set = new ilSetting("mcst");
     $this->setDefaultAccess($mcst_set->get("defaultaccess") == "users" ? 0 : 1);
     $this->setOrder(self::ORDER_CREATION_DATE_DESC);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:14,代码来源:class.ilObjMediaCast.php

示例12: run

 public function run()
 {
     global $lng, $ilDB;
     $status = ilCronJobResult::STATUS_NO_ACTION;
     $status_details = null;
     $setting = new ilSetting("cron");
     $last_run = $setting->get(get_class($this));
     // #10284 - we already did send today, do nothing
     if ($last_run == date("Y-m-d")) {
         // #14005
         $status_details = "Did already run today.";
     } else {
         // gather objects and participants with notification setting
         $objects = array();
         $set = $ilDB->query("SELECT usr_id,keyword FROM usr_pref" . " WHERE " . $ilDB->like("keyword", "text", "grpcrs_ntf_%") . " AND value = " . $ilDB->quote("1", "text"));
         while ($row = $ilDB->fetchAssoc($set)) {
             $ref_id = substr($row["keyword"], 11);
             $type = ilObject::_lookupType($ref_id, true);
             if ($type) {
                 $objects[$type][$ref_id][] = $row["usr_id"];
             }
         }
         $counter = 0;
         if (sizeof($objects)) {
             $old_lng = $lng;
             include_once "Services/News/classes/class.ilNewsItem.php";
             foreach ($objects as $type => $ref_ids) {
                 // type is not needed for now
                 foreach ($ref_ids as $ref_id => $user_ids) {
                     // gather news per object
                     $news_item = new ilNewsItem();
                     if ($news_item->checkNewsExistsForGroupCourse($ref_id)) {
                         foreach ($user_ids as $user_id) {
                             // gather news for user
                             $user_news = $news_item->getNewsForRefId($ref_id, false, false, 1, false, false, false, false, $user_id);
                             if ($user_news) {
                                 $this->sendMail($user_id, $ref_id, $user_news);
                                 $counter++;
                             }
                         }
                     }
                 }
             }
             $lng = $old_lng;
         }
         // save last run
         $setting->set(get_class($this), date("Y-m-d"));
         if ($counter) {
             $status = ilCronJobResult::STATUS_OK;
         }
     }
     $result = new ilCronJobResult();
     $result->setStatus($status);
     if ($status_details) {
         $result->setMessage($status_details);
     }
     return $result;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:58,代码来源:class.ilMembershipCronNotifications.php

示例13: init

 /**
  * Init
  */
 function init()
 {
     $this->setEnablePCType("Map", true);
     $this->setEnableInternalLinks(false);
     $this->setPreventHTMLUnmasking(false);
     $this->setEnableActivation(true);
     $blga_set = new ilSetting("blga");
     $this->setPreventHTMLUnmasking((bool) $blga_set->get("mask", false));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:12,代码来源:class.ilBlogPostingConfig.php

示例14: getHTML

 /**
  * @return string
  */
 public function getHTML()
 {
     ilYuiUtil::initJson();
     $chatSetting = new ilSetting('chatroom');
     if ($this->getCurrentDetailLevel() == 0 || !$chatSetting->get('chat_enabled', 0) || !(bool) @ilChatroomServerConnector::checkServerConnection()) {
         return '';
     } else {
         return parent::getHTML();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilChatroomBlockGUI.php

示例15: __construct

 /**
  * Constructor
  *
  * @param
  * @return
  */
 function __construct()
 {
     global $ilSetting;
     $news_set = new ilSetting("news");
     $news_set->get("acc_cache_mins");
     parent::__construct("ServicesNews", "News", true);
     $this->setExpiresAfter($news_set->get("acc_cache_mins") * 60);
     if ((int) $news_set->get("acc_cache_mins") == 0) {
         self::$disabled = true;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:17,代码来源:class.ilNewsCache.php


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