From 8cf990bcfefc6726cb43394604c52f6d4c9fb455 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Mon, 19 Mar 2007 04:49:49 +0000 Subject: [PATCH] merged fix for MDL-8934, assign role context statements incorrect --- lib/accesslib.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index d46d91e831..021458ca5a 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -2612,7 +2612,7 @@ function print_context_name($context) { switch ($context->contextlevel) { case CONTEXT_SYSTEM: // by now it's a definite an inherit - $name = get_string('site'); + $name = get_string('coresystem'); break; case CONTEXT_PERSONAL: @@ -2633,7 +2633,12 @@ function print_context_name($context) { case CONTEXT_COURSE: // 1 to 1 to course cat if ($course = get_record('course', 'id', $context->instanceid)) { - $name = get_string('course').': '. format_string($course->fullname); + + if ($context->instanceid == SITEID) { + $name = get_string('site').': '. format_string($course->fullname); + } else { + $name = get_string('course').': '. format_string($course->fullname); + } } break; -- 2.39.5