]> git.mjollnir.org Git - moodle.git/commitdiff
fixed wrong capability name and function name typo
authorskodak <skodak>
Mon, 9 Oct 2006 10:07:15 +0000 (10:07 +0000)
committerskodak <skodak>
Mon, 9 Oct 2006 10:07:15 +0000 (10:07 +0000)
course/import/activities/mod.php
lib/accesslib.php

index 5b13cf41b2ce979ce371c6bee2c1dfb396472e2d..3230200722aa356421c83ae5f5f5197941a2577e 100644 (file)
@@ -18,7 +18,7 @@
  
     $tcourseids = '';
  
-    if ($teachers = get_user_capability_course('moodle/course:edit')) {
+    if ($teachers = get_user_capability_course('moodle/course:update')) {
         foreach ($teachers as $teacher) {
             if ($teacher->id != $course->id && $teacher->id != SITEID){
                 $tcourseids .= $teacher->id.',';
index 6c66f96ad12d75806b4d0234a123a1406ffe206e..1a5f8f56eed29b26727c9d14857165eeaa7825a2 100755 (executable)
@@ -2867,7 +2867,7 @@ function get_user_capability_course($capability, $userid='') {
     $courses = get_records_select('course', '', '', 'id, id');
 
     foreach ($courses as $course) {
-        if (has_capability($capability, get_context_capability(CONTEXT_COURSE, $course->id))) {
+        if (has_capability($capability, get_context_instance(CONTEXT_COURSE, $course->id))) {
             $usercourses[] = $course;
         }
     }