]> git.mjollnir.org Git - moodle.git/commitdiff
course/lib: print_my_moodle() - ask get_my_courses() for the summary
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:51:50 +0000 (07:51 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:51:50 +0000 (07:51 +0000)
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.

course/lib.php

index 163d35eac168a2a3dc13081e3566631072fae84f..7597df2fe5ba47f4929d3cdb41ec602a9bf666a9 100644 (file)
@@ -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') {