• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilSetting类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess;
     $news_set = new ilSetting("news");
     $enable_internal_rss = $news_set->get("enable_rss_for_internal");
     // user
     if ($a_set["user_id"] > 0) {
         $this->tpl->setCurrentBlock("user_info");
         $user_obj = new ilObjUser($a_set["user_id"]);
         $this->tpl->setVariable("VAL_AUTHOR", $user_obj->getLogin());
         $this->tpl->setVariable("TXT_AUTHOR", $lng->txt("author"));
         $this->tpl->parseCurrentBlock();
     }
     // access
     if ($enable_internal_rss) {
         $this->tpl->setCurrentBlock("access");
         $this->tpl->setVariable("TXT_ACCESS", $lng->txt("news_news_item_visibility"));
         if ($a_set["visibility"] == NEWS_PUBLIC || $a_set["priority"] == 0 && ilBlockSetting::_lookup("news", "public_notifications", 0, $a_set["context_obj_id"])) {
             $this->tpl->setVariable("VAL_ACCESS", $lng->txt("news_visibility_public"));
         } else {
             $this->tpl->setVariable("VAL_ACCESS", $lng->txt("news_visibility_users"));
         }
         $this->tpl->parseCurrentBlock();
     }
     // last update
     if ($a_set["creation_date"] != $a_set["update_date"]) {
         $this->tpl->setCurrentBlock("ni_update");
         $this->tpl->setVariable("TXT_LAST_UPDATE", $lng->txt("last_update"));
         $this->tpl->setVariable("VAL_LAST_UPDATE", ilDatePresentation::formatDate(new ilDateTime($a_set["update_date"], IL_CAL_DATETIME)));
         $this->tpl->parseCurrentBlock();
     }
     // creation date
     $this->tpl->setVariable("VAL_CREATION_DATE", ilDatePresentation::formatDate(new ilDateTime($a_set["creation_date"], IL_CAL_DATETIME)));
     $this->tpl->setVariable("TXT_CREATED", $lng->txt("created"));
     // title
     $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
     // content
     if ($a_set["content"] != "") {
         $this->tpl->setCurrentBlock("content");
         $this->tpl->setVariable("VAL_CONTENT", ilUtil::shortenText($a_set["content"], 80, true, true), true);
         $this->tpl->parseCurrentBlock();
     }
     $perm_ref_id = $this->perm_ref_id > 0 ? $this->perm_ref_id : $a_set["ref_id"];
     if ($ilAccess->checkAccess("write", "", $perm_ref_id)) {
         $this->tpl->setCurrentBlock("edit");
         $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
         $ilCtrl->setParameterByClass("ilnewsitemgui", "news_item_id", $a_set["id"]);
         $this->tpl->setVariable("CMD_EDIT", $ilCtrl->getLinkTargetByClass("ilnewsitemgui", "editNewsItem"));
         $this->tpl->parseCurrentBlock();
     }
     // context
     $this->tpl->setVariable("CONTEXT", $lng->txt("obj_" . $a_set["context_obj_type"]) . ":<br />" . ilObject::_lookupTitle($a_set["context_obj_id"]));
     $this->tpl->setVariable("VAL_ID", $a_set["id"]);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:58,代码来源:class.ilNewsForContextTableGUI.php


示例17: getAdminTabsForCommand

 /**
  * Builds $config and $commandparts arrays to assign them as parameters
  * when calling $this->buildTabs and $this->activateTab.
  * @param string     $command
  */
 public function getAdminTabsForCommand($command)
 {
     /**
      * @var $ilTabs ilTabsGUI
      * @var $ilCtrl ilCtrl
      * @var $ilDB   ilDB
      */
     global $ilTabs, $ilCtrl, $ilDB;
     $command = $this->convertLowerCamelCaseToUnderscoreCaseConversion($command);
     $stopCommands = array('create');
     if (in_array($command, $stopCommands)) {
         return;
     }
     $settings = new ilSetting('chatroom');
     $public_room_ref = $settings->get('public_room_ref');
     $query = 'SELECT ref_id FROM object_reference INNER JOIN object_data ON object_data.obj_id = object_reference.obj_id WHERE type = ' . $ilDB->quote('chta', 'text');
     $rset = $ilDB->query($query);
     $data = $ilDB->fetchAssoc($rset);
     $admin_ref = $data['ref_id'];
     $ilCtrl->setParameterByClass('ilObjChatroomAdminGUI', 'ref_id', $admin_ref);
     $config = array('view' => array('lng' => 'settings', 'link' => $ilCtrl->getLinkTargetByClass('ilObjChatroomAdminGUI', 'view-clientsettings'), 'permission' => 'read', 'subtabs' => array('clientsettings' => array('lng' => 'client_settings', 'link' => $ilCtrl->getLinkTargetByClass('ilObjChatroomAdminGUI', 'view-clientsettings'), 'permission' => 'read'), 'serversettings' => array('lng' => 'server_settings', 'link' => $ilCtrl->getLinkTargetByClass('ilObjChatroomAdminGUI', 'view-serversettings'), 'permission' => 'read'))), 'smiley' => array('lng' => 'smiley', 'link' => $ilCtrl->getLinkTargetByClass('ilObjChatroomAdminGUI', 'smiley'), 'permission' => 'read'));
     $ilCtrl->setParameterByClass('ilObjChatroomGUI', 'ref_id', $public_room_ref);
     $config['settings'] = array('lng' => 'public_chat_settings', 'link' => $ilCtrl->getLinkTargetByClass('ilObjChatroomGUI', 'settings-general'), 'permission' => 'write', 'subtabs' => array('settings' => array('lng' => 'settings', 'link' => $ilCtrl->getLinkTarget($this->gui, 'settings-general'), 'permission' => 'write'), 'ban' => array('lng' => 'bans', 'link' => $ilCtrl->getLinkTargetByClass('ilObjChatroomGUI', 'ban-show'), 'permission' => 'moderate')));
     $ilCtrl->setParameterByClass('ilPermissionGUI', 'ref_id', $public_room_ref);
     $config['perm'] = array('lng' => 'public_chat_permissions', 'link' => $ilCtrl->getLinkTargetByClass('ilPermissionGUI', 'perm'), 'permission' => 'write');
     $ilCtrl->clearParametersByClass('ilPermissionGUI');
     $ilCtrl->setParameterByClass('ilPermissionGUI', 'ref_id', $admin_ref);
     $config['perm_settings'] = array('lng' => 'perm_settings', 'link' => $ilCtrl->getLinkTargetByClass('ilpermissiongui', 'perm'), 'permission' => 'write');
     $ilCtrl->clearParametersByClass('ilPermissionGUI');
     $commandParts = explode('_', $command, 2);
     if ($command == 'ban_show') {
         $commandParts[0] = 'settings';
         $commandParts[1] = 'ban';
     } else {
         if ($command == 'settings_general') {
             $commandParts[0] = 'settings';
             $commandParts[1] = 'settings';
         } else {
             if ($ilCtrl->getCmdClass() == 'ilpermissiongui' && $_REQUEST['ref_id'] == $public_room_ref) {
                 $commandParts[0] = 'perm';
                 $ilCtrl->setParameterByClass('ilPermissionGUI', 'ref_id', $public_room_ref);
             } else {
                 if ($ilCtrl->getCmdClass() == 'ilpermissiongui' && $_REQUEST['ref_id'] == $admin_ref) {
                     $commandParts[0] = 'perm_settings';
                     $ilCtrl->setParameterByClass('ilPermissionGUI', 'ref_id', $admin_ref);
                 }
             }
         }
     }
     $this->buildTabs($ilTabs, $config, $commandParts);
     $this->activateTab($commandParts, $config);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:57,代码来源:class.ilChatroomTabFactory.php


示例18: _getUploadDirectory

 /**
  * Get the directory with uploaded files
  *
  * The directory is configured as cont_upload_dir in the settings table.
  * The directory must exist and have read permissions.
  * Currently the user must have admin permissions in ILIAS.
  * Later there may be different directories for different users/roles.
  *
  * @return   string      full path of upload directory on the server or empty
  * @access   static
  */
 static function _getUploadDirectory()
 {
     global $rbacsystem;
     if (!$rbacsystem->checkAccess('write', SYSTEM_FOLDER_ID)) {
         return '';
     }
     $lm_set = new ilSetting("lm");
     $upload_dir = $lm_set->get("cont_upload_dir");
     if (is_dir($upload_dir) and is_readable($upload_dir)) {
         return $upload_dir;
     } else {
         return '';
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilUploadFiles.php


示例19: _isEnabled

 /**
  * Check, if licencing is enabled
  * This check is called from the ilAccessHandler class.
  *
  * @return   boolean     licensing enabled (true/false)
  */
 static function _isEnabled()
 {
     static $enabled;
     if (isset($enabled)) {
         return $enabled;
     }
     $lic_set = new ilSetting("license");
     if ($lic_set->get("license_counter")) {
         $enabled = true;
         return true;
     } else {
         $enabled = false;
         return false;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilLicenseAccess.php


示例20: __construct

 /**
  *
  * Constructor
  * 
  * @access	public
  *
  */
 public function __construct()
 {
     $dqs = new ilSetting('disk_quota');
     $rcpt = $dqs->get('summary_rcpt');
     $rcpt = explode(',', $rcpt);
     $loginnames = array();
     foreach ($rcpt as $loginname) {
         $loginname = trim($loginname);
         if (ilObjUser::_lookupId($loginname)) {
             $loginnames[] = $loginname;
         }
     }
     $this->setRecipients($loginnames);
     parent::__construct();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilDiskQuotaSummaryNotification.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilTable2GUI类代码示例发布时间:2022-05-23
下一篇:
PHP ilSession类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap