]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16264 Make mnet courses affect course_list block
authorpeterbulmer <peterbulmer>
Fri, 29 Aug 2008 04:09:27 +0000 (04:09 +0000)
committerpeterbulmer <peterbulmer>
Fri, 29 Aug 2008 04:09:27 +0000 (04:09 +0000)
If a user has mnet courses, these should affect block display in the same way as local courses do.

blocks/course_list/block_course_list.php

index 53f7dcc04a17eb171f2ad865fc8e9c362f37d837..0522d1e15a8b6e3e9f05e0d5daa15810ff127141 100644 (file)
@@ -53,10 +53,10 @@ class block_course_list extends block_list {
                 if (has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) || empty($CFG->block_course_list_hideallcourseslink)) {
                     $this->content->footer = "<a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a> ...";
                 }
-                $this->get_remote_courses();
-                if ($this->content->items) { // make sure we don't return an empty list
-                    return $this->content;
-                }
+            }
+            $this->get_remote_courses();
+            if ($this->content->items) { // make sure we don't return an empty list
+                return $this->content;
             }
         }