MDL-55956 mod_assign: Do not use API constant in upgrade
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 10 Mar 2017 05:27:49 +0000 (13:27 +0800)
committerDan Poltawski <dan@moodle.com>
Fri, 10 Mar 2017 18:04:50 +0000 (18:04 +0000)
mod/assign/db/upgrade.php

index ee4c961..c070dc8 100644 (file)
@@ -261,7 +261,8 @@ function xmldb_assign_upgrade($oldversion) {
             'groupid' => 0,
             'repeatid' => 0
         ];
-        $DB->set_field('event', 'priority', CALENDAR_EVENT_USER_OVERRIDE_PRIORITY, $params);
+        // CALENDAR_EVENT_USER_OVERRIDE_PRIORITY has a value of 9999999.
+        $DB->set_field('event', 'priority', 9999999, $params);
 
         // Set priority for group overrides for existing assign events.
         $where = 'groupid IS NOT NULL';