MDL-29877 Grades - version bump for upgrade step.
authorDamyon Wiese <damyon@moodle.com>
Fri, 12 Apr 2013 03:38:37 +0000 (11:38 +0800)
committerDamyon Wiese <damyon@moodle.com>
Fri, 12 Apr 2013 03:40:00 +0000 (11:40 +0800)
And whitespace...

lib/db/upgrade.php
lib/grade/grade_category.php
version.php

index 5ff29f7..720e17b 100644 (file)
@@ -1142,14 +1142,14 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint(true, 2012062506.02);
     }
 
-    if ($oldversion < 2012062506.04) {
+    if ($oldversion < 2012062506.06) {
         // MDL-29877 Some bad restores created grade items with no category information.
         $sql = "UPDATE mdl_grade_items
                    SET categoryid = courseid
                  WHERE itemtype <> 'course' and itemtype <> 'category'
                        AND categoryid IS NULL";
         $DB->execute($sql);
-        upgrade_main_savepoint(true, 2012062506.04);
+        upgrade_main_savepoint(true, 2012062506.06);
     }
 
     return true;
index 183c564..de50a32 100644 (file)
@@ -1160,7 +1160,7 @@ class grade_category extends grade_object {
             // prevent problems with duplicate sortorders in db
             $sortorder = $item->sortorder;
 
-            while (array_key_exists($categoryid, $cats) 
+            while (array_key_exists($categoryid, $cats)
                 && array_key_exists($sortorder, $cats[$categoryid]->children)) {
 
                 $sortorder++;
index 9f8242f..7a31246 100644 (file)
@@ -30,7 +30,7 @@
 defined('MOODLE_INTERNAL') || die();
 
 
-$version  = 2012062506.05;              // YYYYMMDD      = weekly release date of this DEV branch
+$version  = 2012062506.06;              // YYYYMMDD      = weekly release date of this DEV branch
                                         //         RR    = release increments - 00 in DEV branches
                                         //           .XX = incremental changes