mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-23514-master' of https://github.com/danielneis/moodle
Conflicts: lang/en/admin.php
This commit is contained in:
commit
8053854592
@ -191,6 +191,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
|
||||
// "documentation" settingpage
|
||||
$temp = new admin_settingpage('documentation', new lang_string('moodledocs'));
|
||||
$temp->add(new admin_setting_configtext('docroot', new lang_string('docroot', 'admin'), new lang_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
|
||||
$ltemp = array('' => get_string('forceno'));
|
||||
$ltemp += get_string_manager()->get_list_of_translations(true);
|
||||
$temp->add(new admin_setting_configselect('doclang', get_string('doclang', 'admin'), get_string('configdoclang', 'admin'), '', $ltemp));
|
||||
$temp->add(new admin_setting_configcheckbox('doctonewwindow', new lang_string('doctonewwindow', 'admin'), new lang_string('configdoctonewwindow', 'admin'), 0));
|
||||
$ADMIN->add('appearance', $temp);
|
||||
|
||||
|
@ -192,6 +192,7 @@ $string['configenabledevicedetection'] = 'Enables detection of mobiles, smartpho
|
||||
$string['configdisableuserimages'] = 'Disable the ability for users to change user profile images.';
|
||||
$string['configdisplayloginfailures'] = 'This will display information to selected users about previous failed logins.';
|
||||
$string['configdndallowtextandlinks'] = 'Enable or disable the dragging and dropping of text and links onto a course page, alongside the dragging and dropping of files. Note that the dragging of text into Firefox or between different browsers is unreliable and may result in no data being uploaded, or corrupted text being uploaded.';
|
||||
$string['configdoclang'] = 'This language will be used in links for the documentation pages.';
|
||||
$string['configdocroot'] = 'Defines the path to the Moodle Docs for providing context-specific documentation via \'Moodle Docs for this page\' links in the footer of each page. If the field is left blank, links will not be displayed.';
|
||||
$string['configdoctonewwindow'] = 'If you enable this, then links to Moodle Docs will be shown in a new window.';
|
||||
$string['configeditordictionary'] = 'This value will be used if aspell doesn\'t have dictionary for users own language.';
|
||||
@ -429,6 +430,7 @@ $string['disableuserimages'] = 'Disable user profile images';
|
||||
$string['displayerrorswarning'] = 'Enabling the PHP setting <em>display_errors</em> is not recommended on production sites because some error messages may reveal sensitive information about your server.';
|
||||
$string['displayloginfailures'] = 'Display login failures to';
|
||||
$string['dndallowtextandlinks'] = 'Drag and drop upload of text/links';
|
||||
$string['doclang'] = 'Language for docs';
|
||||
$string['docroot'] = 'Moodle Docs document root';
|
||||
$string['doctonewwindow'] = 'Open in new window';
|
||||
$string['download'] = 'Download';
|
||||
|
@ -629,10 +629,16 @@ function get_docs_url($path = null) {
|
||||
// that will ensure people end up at the latest version of the docs.
|
||||
$branch = '.';
|
||||
}
|
||||
if (!empty($CFG->docroot)) {
|
||||
return $CFG->docroot . '/' . $branch . '/' . current_language() . '/' . $path;
|
||||
if (empty($CFG->doclang)) {
|
||||
$lang = current_language();
|
||||
} else {
|
||||
return 'http://docs.moodle.org/'. $branch . '/' . current_language() . '/' . $path;
|
||||
$lang = $CFG->doclang;
|
||||
}
|
||||
$end = '/' . $branch . '/' . $lang . '/' . $path;
|
||||
if (empty($CFG->docroot)) {
|
||||
return 'http://docs.moodle.org'. $end;
|
||||
} else {
|
||||
return $CFG->docroot . $end ;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user