Permalink
Browse files

Merge branch 'MDL-61573-master' of https://github.com/Kathrin84/moodle

  • Loading branch information...
dmonllao committed Sep 24, 2018
2 parents 6ef7752 + df8eec5 commit bac17316149b0051dd42724f06c428d1f0849495
Showing with 15 additions and 5 deletions.
  1. +3 −3 admin/settings/appearance.php
  2. +1 −1 lang/en/admin.php
  3. +11 −1 user/lib.php
@@ -32,9 +32,9 @@
'customusermenuitems',
new lang_string('customusermenuitems', 'admin'),
new lang_string('configcustomusermenuitems', 'admin'),
'grades,grades|/grade/report/mygrades.php|grades
messages,message|/message/index.php|message
preferences,moodle|/user/preferences.php|preferences',
'grades,grades|/grade/report/mygrades.php|t/grades
messages,message|/message/index.php|t/message
preferences,moodle|/user/preferences.php|t/preferences',
PARAM_RAW,
'50',
'10'
@@ -192,7 +192,7 @@
-Moodle development|https://moodle.org/development
Moodle.com|http://moodle.com/
</pre>';
$string['configcustomusermenuitems'] = 'You can configure the contents of the user menu (with the exception of the log out link, which is automatically added). Each line is separated by pipe characters and consists of 1) a string in "langstringname, componentname" form or as plain text, 2) a URL, and 3) an icon either as a pix icon (in the folder pix/t, or prefix the icon name with ../ if icon is in another pix folder) or as a URL. Dividers can be used by adding a line of one or more # characters where desired.';
$string['configcustomusermenuitems'] = 'You can configure the contents of the user menu (with the exception of the log out link, which is automatically added). Each line is separated by pipe characters and consists of 1) a string in "langstringname, componentname" form or as plain text, 2) a URL, and 3) an icon either as a pix icon (in the folder pix with the structure [subfoldername]/[iconname], e.g. i/publish) or as a URL. Dividers can be used by adding a line of one or more # characters where desired.';
$string['configdbsessions'] = 'If enabled, this setting will use the database to store information about current sessions. Note that changing this setting now will log out all current users (including you). If you are using MySQL please make sure that \'max_allowed_packet\' in my.cnf (or my.ini) is at least 4M. Other session drivers can be configured directly in config.php, see config-dist.php for more information. This option disappears if you specify session driver in config.php file.';
$string['configdebug'] = 'If you turn this on, then PHP\'s error_reporting will be increased so that more warnings are printed. This is only useful for developers.';
$string['configdebugdisplay'] = 'Set to on, the error reporting will go to the HTML page. This is practical, but breaks XHTML, JS, cookies and HTTP headers in general. Set to off, it will send the output to your server logs, allowing better debugging. The PHP setting error_log controls which log this goes to.';
@@ -753,7 +753,17 @@ function user_convert_text_to_menu_items($text, $page) {
$child->pix = $pixpath;
} else {
// Check for the specified image existing.
$pixpath = "t/" . $bits[2];
if (strpos($bits[2], '../') === 0) {
// The string starts with '../'.
// Strip off the first three characters - this should be the pix path.
$pixpath = substr($bits[2], 3);
} else if (strpos($bits[2], '/') === false) {
// There is no / in the path. Prefix it with 't/', which is the default path.
$pixpath = "t/{$bits[2]}";
} else {
// There is a '/' in the path - this is either a URL, or a standard pix path with no changes required.
$pixpath = $bits[2];
}
if ($page->theme->resolve_image_location($pixpath, 'moodle', true)) {
// Use the image.
$child->pix = $pixpath;

0 comments on commit bac1731

Please sign in to comment.