From fdbadd57ebb0597cd89aab26bee820294d341a29 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Mon, 22 Nov 2004 05:40:45 +0000 Subject: [PATCH] Changes to calls to get_courses to not get all fields --- admin/uploaduser.php | 2 +- backup/backup.php | 4 ++-- backup/restore_check.html | 2 +- calendar/view.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/uploaduser.php b/admin/uploaduser.php index d14bc15a3d1..c9f892cd98b 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -170,7 +170,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 db93cd1425a..c9e0ea593fb 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -49,11 +49,11 @@ 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) { - echo "id\">$course->fullname ($course->shortname)
"; + echo "id\">$course->fullname ($course->shortname)
"; } print_simple_box_end(); } else { diff --git a/backup/restore_check.html b/backup/restore_check.html index 9673c6c20f4..300c7528ac7 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 5de0908192f..c90b4d0f6a6 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'); }