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);
/// 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)