From: mjollnir_ Date: Mon, 22 Nov 2004 05:41:14 +0000 (+0000) Subject: Merged from MOODLE_14_STABLE: Changes to calls to get_courses to not get all fields X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e6d1d120b1437a2cb2edcb48dcf17d04dbac99e7;p=moodle.git Merged from MOODLE_14_STABLE: Changes to calls to get_courses to not get all fields --- diff --git a/admin/uploaduser.php b/admin/uploaduser.php index aebe3efa40..53f20a089d 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -174,7 +174,7 @@ $addgroup[2] = $user->group3; $addgroup[3] = $user->group4; $addgroup[4] = $user->group5; - $courses = get_courses("all"); + $courses = get_courses("all",'c.sortorder','c.id,c.shortname,c.fullname,c.sortorder'); for ($i=0; $i<5; $i++) { $courseid[$i]=0; } diff --git a/backup/backup.php b/backup/backup.php index 8ccdf1adbe..fb3efb9118 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -49,7 +49,7 @@ print_header("$site->shortname: $strcoursebackup", $site->fullname, "wwwroot/$CFG->admin/index.php\">$stradministration -> $strcoursebackup"); - if ($courses = get_courses()) { + if ($courses = get_courses('all','c.shortname','c.id,c.shortname,c.fullname')) { print_heading(get_string("choosecourse")); print_simple_box_start("center"); foreach ($courses as $course) { diff --git a/backup/restore_check.html b/backup/restore_check.html index 05f04b4324..879a8d57ca 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -148,7 +148,7 @@ //Now, select the course if needed if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and (iscreator())) { - if ($courses = get_courses("all","c.fullname")) { + if ($courses = get_courses("all","c.fullname","c.id,c.fullname,c.shortname")) { print_heading(get_string("choosecourse")); print_simple_box_start("center"); foreach ($courses as $course) { diff --git a/calendar/view.php b/calendar/view.php index 1fb3d57f81..97c77a09ef 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -606,7 +606,7 @@ function calendar_course_filter_selector($getvars = '') { } if (isadmin()) { - $courses = get_courses('all', 'c.shortname'); + $courses = get_courses('all', 'c.shortname','c.id,c.shortname'); } else { $courses = get_my_courses($USER->id, 'shortname'); }