diff --git a/mod/glossary/db/upgrade.php b/mod/glossary/db/upgrade.php index 4abeee0cef6..39b21920a97 100644 --- a/mod/glossary/db/upgrade.php +++ b/mod/glossary/db/upgrade.php @@ -42,12 +42,11 @@ function xmldb_glossary_upgrade($oldversion) { JOIN {glossary} g ON g.id = ge.glossaryid JOIN {modules} m ON m.name = 'glossary' JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = g.id) - WHERE ge.attachment <> '$empty' AND ge.attachment <> '1' - ORDER BY g.course, g.id"; + WHERE ge.attachment <> '$empty' AND ge.attachment <> '1'"; $count = $DB->count_records_sql("SELECT COUNT('x') $sqlfrom"); - if ($rs = $DB->get_recordset_sql("SELECT ge.id, ge.userid, ge.attachment, ge.glossaryid, ge.sourceglossaryid, g.course, cm.id AS cmid $sqlfrom")) { + if ($rs = $DB->get_recordset_sql("SELECT ge.id, ge.userid, ge.attachment, ge.glossaryid, ge.sourceglossaryid, g.course, cm.id AS cmid $sqlfrom ORDER BY g.course, g.id")) { $pbar = new progress_bar('migrateglossaryfiles', 500, true); diff --git a/mod/glossary/version.php b/mod/glossary/version.php index 61f17050716..4fa3d061d65 100644 --- a/mod/glossary/version.php +++ b/mod/glossary/version.php @@ -5,7 +5,7 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2008081700; +$module->version = 2008081900; $module->requires = 2008081600; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs)