MDL-15904 fixed pg problem

This commit is contained in:
skodak
2008-08-18 22:26:38 +00:00
parent b8dddc9e37
commit f7f71f83ba
2 changed files with 3 additions and 4 deletions
+2 -3
View 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);
+1 -1
View 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;