Changed CONTEXT_SITE to CONTEXT_SYSTEM MDL-6506
authormoodler <moodler>
Tue, 26 Sep 2006 03:57:05 +0000 (03:57 +0000)
committermoodler <moodler>
Tue, 26 Sep 2006 03:57:05 +0000 (03:57 +0000)
course/search.php
userpix/index.php
userpix/upgrade.php

index 84fd010..4e478de 100644 (file)
@@ -43,7 +43,7 @@
 
 /// Editing functions
 
-    if (has_capablity('moodle/course:visibility', get_context_instance(CONTEXT_SITE, SITEID))) {
+    if (has_capablity('moodle/course:visibility', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
 
     /// Hide or show a course
 
index 3340d97..9e4e5e3 100644 (file)
@@ -11,7 +11,7 @@
     require_login();
 
 /// Remove the following three lines if you want everyone to access it
-    require_capability('moodle/site:config', get_context_instance(CONTEXT_SITE, SITEID));
+    require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
 
     if (!$users = get_records("user", "picture", "1", "lastaccess DESC", "id,firstname,lastname")) {
         error("no users!");
index da197e5..8c0ae93 100644 (file)
@@ -7,7 +7,7 @@
 
     require_login();
 
-    require_capability('moodle/site:config', get_context_instance(CONTEXT_SITE, SITEID));
+    require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
     
     if (!$users = get_records("user", "picture", "1", "lastaccess DESC", "id,firstname,lastname")) {
         error("no users!");