From: tjhunt Date: Fri, 5 Sep 2008 04:06:17 +0000 (+0000) Subject: MDL-12336 Inconsistent naming of the Front page area of the question bank, and the... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8238f44f16c3dcb1cd811636bda67a15e9e88122;p=moodle.git MDL-12336 Inconsistent naming of the Front page area of the question bank, and the front page context more generally. --- diff --git a/lib/accesslib.php b/lib/accesslib.php index 34771f5d3f..6c7ca44fb3 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -3278,20 +3278,19 @@ function print_context_name($context, $withprefix = true, $short = false) { break; case CONTEXT_COURSE: // 1 to 1 to course cat - if ($course = $DB->get_record('course', array('id'=>$context->instanceid))) { - if ($withprefix){ - if ($context->instanceid == SITEID) { - $name = get_string('site').': '; - } else { + if ($context->instanceid == SITEID) { + $name = get_string('frontpage', 'admin'); + } else { + if ($course = $DB->get_record('course', array('id'=>$context->instanceid))) { + if ($withprefix){ $name = get_string('course').': '; } + if (!$short){ + $name .= format_string($course->shortname); + } else { + $name .= format_string($course->fullname); + } } - if ($short){ - $name .=format_string($course->shortname); - } else { - $name .=format_string($course->fullname); - } - } break;