Skip to content

Commit

Permalink
Merge branch 'MDL-25837_wip' of git://github.com/skodak/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Jan 17, 2011
2 parents 227d6da + 85b8f8d commit bec662a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/course_overview/block_course_overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function get_content() {
$courses_limit = $courses_limit + 1;
}

$courses = enrol_get_my_courses('id, shortname', 'visible DESC,sortorder ASC', $courses_limit);
$courses = enrol_get_my_courses('id, shortname, modinfo', 'visible DESC,sortorder ASC', $courses_limit);
$site = get_site();
$course = $site; //just in case we need the old global $course hack

Expand Down
4 changes: 4 additions & 0 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3045,6 +3045,10 @@ function &get_fast_modinfo(&$course, $userid=0) {
return $cache[$course->id];
}

if (!property_exists($course, 'modinfo')) {
debugging('Coding problem - missing course modinfo property in get_fast_modinfo() call');
}

if (empty($course->modinfo)) {
// no modinfo yet - load it
rebuild_course_cache($course->id);
Expand Down

0 comments on commit bec662a

Please sign in to comment.