]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15904 fixed pg problem
authorskodak <skodak>
Mon, 18 Aug 2008 22:26:38 +0000 (22:26 +0000)
committerskodak <skodak>
Mon, 18 Aug 2008 22:26:38 +0000 (22:26 +0000)
mod/assignment/db/upgrade.php
mod/assignment/version.php

index cce1973c0f697ff3d7980dfc46a60110b5d65172..dc796ddaccb1ec0834f94f985b0bba5e2710adb1 100644 (file)
@@ -46,12 +46,11 @@ function xmldb_assignment_upgrade($oldversion) {
         $sqlfrom = "FROM {assignment_submissions} s
                     JOIN {assignment} a ON a.id = s.assignment
                     JOIN {modules} m ON m.name = 'assignment'
-                    JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = a.id)
-                ORDER BY a.course, s.assignment";
+                    JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = a.id)";
 
         $count = $DB->count_records_sql("SELECT COUNT('x') $sqlfrom");
 
-        if ($rs = $DB->get_recordset_sql("SELECT s.id, s.userid, s.teacher, s.assignment, a.course, cm.id AS cmid $sqlfrom")) {
+        if ($rs = $DB->get_recordset_sql("SELECT s.id, s.userid, s.teacher, s.assignment, a.course, cm.id AS cmid $sqlfrom ORDER BY a.course, s.assignment")) {
 
             $pbar = new progress_bar('migrateassignmentfiles', 500, true);
 
index 3c5ff3c707db4c75dedd207efd3003fb15bd40f0..258e0a7dc4e0c55ca532a212014c08835b43be42 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2008081100;
+$module->version  = 2008081900;
 $module->requires = 2008080701;  // Requires this Moodle version
 $module->cron     = 60;