]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-10564, wrong userid used in get_my_courses() for blogs
authortoyomoyo <toyomoyo>
Thu, 26 Jul 2007 02:47:44 +0000 (02:47 +0000)
committertoyomoyo <toyomoyo>
Thu, 26 Jul 2007 02:47:44 +0000 (02:47 +0000)
blog/lib.php

index b5a3d8162f720e3049cb54488c5cb3b3bab22c50..1bfc95f65d8a81f34f4ba072fc4beb071dfccdc6 100755 (executable)
             break;
 
             case BLOG_COURSE_LEVEL:
-                $mycourses = array_keys(get_my_courses($targetuserid));
+                $mycourses = array_keys(get_my_courses($USER->id));
                 $usercourses = array_keys(get_my_courses($targetuserid));
                 $shared = array_intersect($mycourses, $usercourses);
                 if (!empty($shared)) {
             break;
 
             case BLOG_GROUP_LEVEL:
-                $mycourses = array_keys(get_my_courses($targetuserid));
+                $mycourses = array_keys(get_my_courses($USER->id));
                 $usercourses = array_keys(get_my_courses($targetuserid));
                 $shared = array_intersect($mycourses, $usercourses);
                 foreach ($shared as $courseid) {