From 8238f44f16c3dcb1cd811636bda67a15e9e88122 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 5 Sep 2008 04:06:17 +0000 Subject: [PATCH] MDL-12336 Inconsistent naming of the Front page area of the question bank, and the front page context more generally. --- lib/accesslib.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) 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; -- 2.39.5