Moodle Docs link on home page could be a bit confusing

This commit is contained in:
moodler 2006-04-16 16:21:50 +00:00
parent 9bb4d21fa5
commit 9e458bb388

View File

@ -4859,6 +4859,11 @@ function page_doc_link($text='', $iconpath='') {
$path = str_replace($CFG->httpswwwroot.'/','', $CFG->pagepath); // Because the page could be HTTPSPAGEREQUIRED
$path = str_replace('.php', '', $path);
if (empty($path)) { // Not for home page
return '';
}
$lang = str_replace('_utf8', '', current_language());
$str = '<a href="' .$CFG->docroot. '/' .$lang. '/' .$path. '">';