From: martinlanghoff Date: Wed, 19 Sep 2007 07:51:50 +0000 (+0000) Subject: course/lib: print_my_moodle() - ask get_my_courses() for the summary X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5b9e50caf022ee91a1c2fd657ea344d471040843;p=moodle.git course/lib: print_my_moodle() - ask get_my_courses() for the summary get_my_courses() now defaults to a much leaner dataset, but accepts an array of "additional" fields we want. So ask nicely for the summary, so that we can print_course() later with it. --- diff --git a/course/lib.php b/course/lib.php index 163d35eac1..7597df2fe5 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1883,7 +1883,7 @@ function print_my_moodle() { error("It shouldn't be possible to see My Moodle without being logged in."); } - $courses = get_my_courses($USER->id); + $courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', array('summary')); $rhosts = array(); $rcourses = array(); if (!empty($CFG->mnet_dispatcher_mode) && $CFG->mnet_dispatcher_mode==='strict') {