本文整理汇总了PHP中get_docs_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_docs_url函数的具体用法?PHP get_docs_url怎么用?PHP get_docs_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_docs_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: portfolio_picasa_admin_upgrade_notification
function portfolio_picasa_admin_upgrade_notification() {
$admins = get_admins();
if (empty($admins)) {
return;
}
$mainadmin = reset($admins);
$a = new stdClass;
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
foreach ($admins as $admin) {
$message = new stdClass();
$message->component = 'moodle';
$message->name = 'notices';
$message->userfrom = $mainadmin;
$message->userto = $admin;
$message->smallmessage = get_string('oauth2upgrade_message_small', 'portfolio_picasa');
$message->subject = get_string('oauth2upgrade_message_subject', 'portfolio_picasa');
$message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
$message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
}
}
开发者ID:JP-Git,项目名称:moodle,代码行数:25,代码来源:upgrade.php
示例2: report_security_doc_link
function report_security_doc_link($issue, $name)
{
global $CFG;
if (empty($CFG->docroot)) {
return $name;
}
return '<a onclick="this.target=\'docspopup\'" href="' . get_docs_url('report/security/') . $issue . '">' . '<img class="iconhelp" src="' . $CFG->httpswwwroot . '/pix/docs.gif" alt="" />' . $name . '</a>';
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:8,代码来源:lib.php
示例3: secretisstolen
/**
* Display a stolen token message to the site administrator
* @param object $site
* @return string html code
*/
public function secretisstolen($site)
{
global $CFG;
$optionsyes = array();
$optionsyes['url'] = $CFG->wwwroot;
$optionsyes['token'] = $site['token'];
$optionsyes['hubname'] = get_config('local_hub', 'name');
$formcontinue = new single_button(new moodle_url($site['url'] . "/admin/registration/renewregistration.php", $optionsyes), get_string('continue'), 'post');
$docurl = new moodle_url(get_docs_url(get_string('blockedsecretdocurl', 'local_hub')));
$doc = html_writer::tag('a', get_string('moreinfo', 'local_hub'), array('href' => $docurl));
return $this->output->box(get_string('secretisstolen', 'local_hub', $doc)) . $this->output->render($formcontinue);
}
开发者ID:scyrma,项目名称:moodle-local_hub,代码行数:17,代码来源:renderer.php
示例4: upgrade_stale_php_files_page
/**
* Display page explaining proper upgrade process,
* there can not be any PHP file leftovers...
*
* @return string HTML to output.
*/
public function upgrade_stale_php_files_page()
{
$output = '';
$output .= $this->header();
$output .= $this->heading(get_string('upgradestalefiles', 'admin'));
$output .= $this->box_start('generalbox', 'notice');
$output .= format_text(get_string('upgradestalefilesinfo', 'admin', get_docs_url('Upgrading')), FORMAT_MARKDOWN);
$output .= html_writer::empty_tag('br');
$output .= html_writer::tag('div', $this->single_button($this->page->url, get_string('reload'), 'get'), array('class' => 'buttons'));
$output .= $this->box_end();
$output .= $this->footer();
return $output;
}
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:19,代码来源:renderer.php
示例5: atto_computing_params_for_js
/**
* Set params for this plugin.
*
* @param string $elementid
* @param stdClass $options - the options for the editor, including the context.
* @param stdClass $fpoptions - unused.
*/
function atto_computing_params_for_js($elementid, $options, $fpoptions)
{
$texexample = '$$A \\cdot B$$';
// Format a string with the active filter set.
// If it is modified - we assume that some sort of text filter is working in this context.
$result = format_text($texexample, true, $options);
$texfilteractive = $texexample !== $result;
$context = $options['context'];
if (!$context) {
$context = context_system::instance();
}
// Tex example librarys.
$library = array('group1' => array('groupname' => 'librarygroup1', 'grouptitle' => 'librarygroup1_title', 'elements' => get_config('atto_computing', 'librarygroup1')), 'group2' => array('groupname' => 'librarygroup2', 'grouptitle' => 'librarygroup2_title', 'elements' => get_config('atto_computing', 'librarygroup2')), 'group3' => array('groupname' => 'librarygroup3', 'grouptitle' => 'librarygroup3_title', 'elements' => get_config('atto_computing', 'librarygroup3')), 'group4' => array('groupname' => 'librarygroup4', 'grouptitle' => 'librarygroup4_title', 'elements' => get_config('atto_computing', 'librarygroup4')), 'group5' => array('groupname' => 'librarygroup5', 'grouptitle' => 'librarygroup5_title', 'elements' => get_config('atto_computing', 'librarygroup5')), 'group6' => array('groupname' => 'librarygroup6', 'grouptitle' => 'librarygroup6_title', 'elements' => get_config('atto_computing', 'librarygroup6')), 'group7' => array('groupname' => 'librarygroup7', 'grouptitle' => 'librarygroup7_title', 'elements' => get_config('atto_computing', 'librarygroup7')));
return array('texfilteractive' => $texfilteractive, 'contextid' => $context->id, 'library' => $library, 'texdocsurl' => get_docs_url('Using_TeX_Notation'));
}
开发者ID:geoffrowland,项目名称:moodle-editor_atto-computing,代码行数:22,代码来源:lib.php
示例6: configuration_definition
/**
* Add the desired form elements.
*/
protected function configuration_definition()
{
global $CFG;
$form = $this->_form;
$form->addElement('text', 'prefix', get_string('prefix', 'cachestore_apcu'), array('maxlength' => 5, 'size' => 5));
$form->addHelpButton('prefix', 'prefix', 'cachestore_apcu');
$form->setType('prefix', PARAM_TEXT);
// We set to text but we have a rule to limit to alphanumext.
$form->setDefault('prefix', $CFG->prefix);
$form->addRule('prefix', get_string('prefixinvalid', 'cachestore_apcu'), 'regex', '#^[a-zA-Z0-9\\-_]+$#');
$form->addElement('header', 'apc_notice', get_string('notice', 'cachestore_apcu'));
$form->setExpanded('apc_notice');
$link = get_docs_url('Caching#APC');
$form->addElement('html', nl2br(get_string('clusternotice', 'cachestore_apcu', $link)));
}
开发者ID:janeklb,项目名称:moodle,代码行数:18,代码来源:addinstanceform.php
示例7: __construct
public function __construct($context, $id, $roleid)
{
parent::__construct($context, $id);
$this->allrisks = get_all_risks();
$this->risksurl = get_docs_url(s(get_string('risks', 'core_role')));
$this->allpermissions = array(CAP_INHERIT => 'inherit', CAP_ALLOW => 'allow', CAP_PREVENT => 'prevent', CAP_PROHIBIT => 'prohibit');
$this->strperms = array();
foreach ($this->allpermissions as $permname) {
$this->strperms[$permname] = get_string($permname, 'core_role');
}
$this->roleid = $roleid;
$this->load_current_permissions();
// Fill in any blank permissions with an explicit CAP_INHERIT, and init a locked field.
foreach ($this->capabilities as $capid => $cap) {
if (!isset($this->permissions[$cap->name])) {
$this->permissions[$cap->name] = CAP_INHERIT;
}
$this->capabilities[$capid]->locked = false;
}
}
开发者ID:rushi963,项目名称:moodle,代码行数:20,代码来源:capability_table_with_risks.php
示例8: repository_boxnet_admin_upgrade_notification
/**
* Send a message to the admin in regard with the APIv1 migration.
*
* @return void
*/
function repository_boxnet_admin_upgrade_notification()
{
$admins = get_admins();
if (empty($admins)) {
return;
}
$a = new stdClass();
$a->docsurl = get_docs_url('Box.net_APIv1_migration');
foreach ($admins as $admin) {
$message = new stdClass();
$message->component = 'moodle';
$message->name = 'notices';
$message->userfrom = get_admin();
$message->userto = $admin;
$message->smallmessage = get_string('apiv1migration_message_small', 'repository_boxnet');
$message->subject = get_string('apiv1migration_message_subject', 'repository_boxnet');
$message->fullmessage = get_string('apiv1migration_message_content', 'repository_boxnet', $a);
$message->fullmessagehtml = get_string('apiv1migration_message_content', 'repository_boxnet', $a);
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
}
}
开发者ID:alanaipe2015,项目名称:moodle,代码行数:28,代码来源:upgradelib.php
示例9: mod_assignment_pending_upgrades_notification
/**
* Inform admins about assignments that still need upgrading.
*/
function mod_assignment_pending_upgrades_notification($count)
{
$admins = get_admins();
if (empty($admins)) {
return;
}
$a = new stdClass();
$a->count = $count;
$a->docsurl = get_docs_url('Assignment_upgrade_tool');
foreach ($admins as $admin) {
$message = new stdClass();
$message->component = 'moodle';
$message->name = 'notices';
$message->userfrom = \core_user::get_noreply_user();
$message->userto = $admin;
$message->smallmessage = get_string('pendingupgrades_message_small', 'mod_assignment');
$message->subject = get_string('pendingupgrades_message_subject', 'mod_assignment');
$message->fullmessage = get_string('pendingupgrades_message_content', 'mod_assignment', $a);
$message->fullmessagehtml = get_string('pendingupgrades_message_content', 'mod_assignment', $a);
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
}
}
开发者ID:alanaipe2015,项目名称:moodle,代码行数:27,代码来源:upgradelib.php
示例10: admin_config_form
public static function admin_config_form(&$mform)
{
$a = new stdClass();
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
$a->callbackurl = (new moodle_url(self::REDIRECTURL))->out(false);
$mform->addElement('static', null, '', get_string('oauthinfo', 'portfolio_googledocs', $a));
$mform->addElement('text', 'clientid', get_string('clientid', 'portfolio_googledocs'));
$mform->setType('clientid', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'secret', get_string('secret', 'portfolio_googledocs'));
$mform->setType('secret', PARAM_RAW_TRIMMED);
$strrequired = get_string('required');
$mform->addRule('clientid', $strrequired, 'required', null, 'client');
$mform->addRule('secret', $strrequired, 'required', null, 'client');
}
开发者ID:evltuma,项目名称:moodle,代码行数:14,代码来源:lib.php
示例11: doc_link
/**
* Returns a string containing a link to the user documentation.
* Also contains an icon by default. Shown to teachers and admin only.
*
* @param string $path The page link after doc root and language, no leading slash.
* @param string $text The text to be displayed for the link
* @param boolean $forcepopup Whether to force a popup regardless of the value of $CFG->doctonewwindow
* @return string
*/
public function doc_link($path, $text = '', $forcepopup = false) {
global $CFG;
$icon = $this->pix_icon('docs', '', 'moodle', array('class'=>'iconhelp icon-pre', 'role'=>'presentation'));
$url = new moodle_url(get_docs_url($path));
$attributes = array('href'=>$url);
if (!empty($CFG->doctonewwindow) || $forcepopup) {
$attributes['class'] = 'helplinkpopup';
}
return html_writer::tag('a', $icon.$text, $attributes);
}
开发者ID:afgal,项目名称:moodle-1,代码行数:23,代码来源:outputrenderers.php
示例12: get_string_manager
}
}
// switch the string_manager instance to stop using install/lang/
$CFG->early_install_lang = false;
$CFG->langotherroot = $CFG->dataroot . '/lang';
$CFG->langlocalroot = $CFG->dataroot . '/lang';
get_string_manager(true);
// make sure we are installing stable release or require a confirmation
if (isset($maturity)) {
if ($maturity < MATURITY_STABLE and !$options['allow-unstable']) {
$maturitylevel = get_string('maturity' . $maturity, 'admin');
if ($interactive) {
cli_separator();
cli_heading(get_string('notice'));
echo get_string('maturitycorewarning', 'admin', $maturitylevel) . PHP_EOL;
echo get_string('morehelp') . ': ' . get_docs_url('admin/versions') . PHP_EOL;
echo get_string('continue') . PHP_EOL;
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
}
} else {
cli_problem(get_string('maturitycorewarning', 'admin', $maturitylevel));
cli_error(get_string('maturityallowunstable', 'admin'));
}
}
}
// ask for db type - show only drivers available
if ($interactive) {
$options['dbtype'] = strtolower($options['dbtype']);
开发者ID:mongo0se,项目名称:moodle,代码行数:31,代码来源:install.php
示例13: type_config_form
/**
* Edit/Create Admin Settings Moodle form.
*
* @param moodleform $mform Moodle form (passed by reference).
* @param string $classname repository class name.
*/
public static function type_config_form($mform, $classname = 'repository')
{
$callbackurl = new moodle_url(self::CALLBACKURL);
$a = new stdClass();
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
$a->callbackurl = $callbackurl->out(false);
$mform->addElement('static', null, '', get_string('oauthinfo', 'repository_googledocs', $a));
parent::type_config_form($mform);
$mform->addElement('text', 'clientid', get_string('clientid', 'repository_googledocs'));
$mform->setType('clientid', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'secret', get_string('secret', 'repository_googledocs'));
$mform->setType('secret', PARAM_RAW_TRIMMED);
$strrequired = get_string('required');
$mform->addRule('clientid', $strrequired, 'required', null, 'client');
$mform->addRule('secret', $strrequired, 'required', null, 'client');
}
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:22,代码来源:lib.php
示例14: get_capability_docs_link
/**
* Return a link to moodle docs for a given capability name
*
* @param object $capability a capability - a row from the mdl_capabilities table.
* @return string the human-readable capability name as a link to Moodle Docs.
*/
function get_capability_docs_link($capability)
{
$url = get_docs_url('Capabilities/' . $capability->name);
return '<a onclick="this.target=\'docspopup\'" href="' . $url . '">' . get_capability_string($capability->name) . '</a>';
}
开发者ID:rolandovanegas,项目名称:moodle,代码行数:11,代码来源:accesslib.php
示例15: get_risks
protected function get_risks($capability)
{
global $OUTPUT;
$allrisks = get_all_risks();
$risksurl = new moodle_url(get_docs_url(s(get_string('risks', 'core_role'))));
$return = '';
foreach ($allrisks as $type => $risk) {
if ($risk & (int) $capability->riskbitmask) {
if (!isset($this->icons[$type])) {
$pixicon = new pix_icon('/i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
$this->icons[$type] = $OUTPUT->action_icon($risksurl, $pixicon, new popup_action('click', $risksurl));
}
$return .= $this->icons[$type];
}
}
return $return;
}
开发者ID:bobpuffer,项目名称:moodleUCLA-LUTH,代码行数:17,代码来源:permissions_table.php
示例16: defined
* Settings
*
* This file contains settings used by tool_mobile
*
* @package tool_mobile
* @copyright 2016 Juan Leyva
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
if ($hassiteconfig) {
$ADMIN->add('root', new admin_category('mobileapp', new lang_string('mobileapp', 'tool_mobile')), 'development');
$temp = new admin_settingpage('mobilesettings', new lang_string('mobilesettings', 'tool_mobile'), 'moodle/site:config', false);
// We should wait to the installation to finish since we depend on some configuration values that are set once
// the admin user profile is configured.
if (!during_initial_install()) {
$enablemobiledocurl = new moodle_url(get_docs_url('Enable_mobile_web_services'));
$enablemobiledoclink = html_writer::link($enablemobiledocurl, new lang_string('documentation'));
$default = is_https() ? 1 : 0;
$temp->add(new admin_setting_enablemobileservice('enablemobilewebservice', new lang_string('enablemobilewebservice', 'admin'), new lang_string('configenablemobilewebservice', 'admin', $enablemobiledoclink), $default));
}
$ADMIN->add('mobileapp', $temp);
// Show only mobile settings if the mobile service is enabled.
if (!empty($CFG->enablemobilewebservice)) {
// Type of login.
$temp = new admin_settingpage('mobileauthentication', new lang_string('mobileauthentication', 'tool_mobile'));
$options = array(tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'), tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'), tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'));
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin', new lang_string('typeoflogin', 'tool_mobile'), new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme', new lang_string('forcedurlscheme_key', 'tool_mobile'), new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_NOTAGS));
$ADMIN->add('mobileapp', $temp);
// Appearance related settings.
$temp = new admin_settingpage('mobileappearance', new lang_string('mobileappearance', 'tool_mobile'));
开发者ID:Chocolate-lightning,项目名称:moodle,代码行数:31,代码来源:settings.php
示例17: admin_externalpage
$ADMIN->add('webservicesettings', $temp);
$ADMIN->add('webservicesettings', new admin_externalpage('externalservice', get_string('editaservice', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/service.php", 'moodle/site:config', true));
$ADMIN->add('webservicesettings', new admin_externalpage('externalservicefunctions', get_string('externalservicefunctions', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/service_functions.php", 'moodle/site:config', true));
$ADMIN->add('webservicesettings', new admin_externalpage('externalserviceusers', get_string('externalserviceusers', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/service_users.php", 'moodle/site:config', true));
$ADMIN->add('webservicesettings', new admin_externalpage('externalserviceusersettings', get_string('serviceusersettings', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/service_user_settings.php", 'moodle/site:config', true));
/// manage protocol page link
$temp = new admin_settingpage('webserviceprotocols', get_string('manageprotocols', 'webservice'));
$temp->add(new admin_setting_managewebserviceprotocols());
if (empty($CFG->enablewebservices)) {
$temp->add(new admin_setting_heading('webservicesaredisabled', '', get_string('disabledwarning', 'webservice')));
}
// We cannot use $OUTPUT this early, doing so means that we lose the ability
// to set the page layout on all admin pages.
// $wsdoclink = $OUTPUT->doc_link('How_to_get_a_security_key');
$url = new moodle_url(get_docs_url('How_to_get_a_security_key'));
$wsdoclink = html_writer::tag('a', get_string('supplyinfo'),array('href'=>$url));
$temp->add(new admin_setting_configcheckbox('enablewsdocumentation', get_string('enablewsdocumentation',
'admin'), get_string('configenablewsdocumentation', 'admin', $wsdoclink), false));
$ADMIN->add('webservicesettings', $temp);
/// links to protocol pages
$webservices_available = get_plugin_list('webservice');
$active_webservices = empty($CFG->webserviceprotocols) ? array() : explode(',', $CFG->webserviceprotocols);
foreach ($webservices_available as $webservice => $location) {
if (file_exists("$location/settings.php")) {
$name = get_string('pluginname', 'webservice_'.$webservice);
$settings = new admin_settingpage('webservicesetting'.$webservice, $name, 'moodle/site:config', !in_array($webservice, $active_webservices) or empty($CFG->enablewebservices));
include("$location/settings.php");
if ($settings) {
$ADMIN->add('webservicesettings', $settings);
}
开发者ID:nottmoo,项目名称:moodle,代码行数:31,代码来源:plugins.php
示例18: type_config_form
public static function type_config_form($mform, $classname = 'repository')
{
$a = new stdClass();
$a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
$a->callbackurl = google_oauth::callback_url()->out(false);
$mform->addElement('static', null, '', get_string('oauthinfo', 'repository_googledocs', $a));
parent::type_config_form($mform);
$mform->addElement('text', 'clientid', get_string('clientid', 'repository_googledocs'));
$mform->addElement('text', 'secret', get_string('secret', 'repository_googledocs'));
$strrequired = get_string('required');
$mform->addRule('clientid', $strrequired, 'required', null, 'client');
$mform->addRule('secret', $strrequired, 'required', null, 'client');
}
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:13,代码来源:lib.php
示例19: doc_link
public function doc_link($path, $text = '', $forcepopup = false)
{
$attributes['href'] = new moodle_url(get_docs_url($path));
if ($text == '') {
$linktext = bootstrap::icon_help();
} else {
$linktext = bootstrap::icon_help() . ' ' . $text;
}
return html::a($attributes, $linktext);
}
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:10,代码来源:core_renderer.php
示例20: doc_link
/**
* Returns a string containing a link to the user documentation.
* Also contains an icon by default. Shown to teachers and admin only.
*
* @param string $path The page link after doc root and language, no leading slash.
* @param string $text The text to be displayed for the link
* @param string $iconpath The path to the icon to be displayed
*/
function doc_link($path = '', $text = '', $iconpath = '')
{
global $CFG;
if (empty($CFG->docroot)) {
return '';
}
$url = get_docs_url($path);
$target = '';
if (!empty($CFG->doctonewwindow)) {
$target = " onclick=\"window.open('{$url}'); return false;\"";
}
$str = "<a href=\"{$url}\"{$target}>";
if (empty($iconpath)) {
$iconpath = $CFG->httpswwwroot . '/pix/docs.gif';
}
// alt left blank intentionally to prevent repetition in screenreaders
$str .= '<img class="iconhelp" src="' . $iconpath . '" alt="" />' . $text . '</a>';
return $str;
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:27,代码来源:weblib.php
注:本文中的get_docs_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论