]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-8934, assign role context statements incorrect
authortoyomoyo <toyomoyo>
Mon, 19 Mar 2007 04:49:49 +0000 (04:49 +0000)
committertoyomoyo <toyomoyo>
Mon, 19 Mar 2007 04:49:49 +0000 (04:49 +0000)
lib/accesslib.php

index d46d91e8316e4a917a9b66493cd55ab27b70d0b5..021458ca5a34ae6afeaa066fdad77799bbb3a8e9 100755 (executable)
@@ -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;