MDL-46576 core_grades: Fix upgrade to natural weight.

When upgrading from 'Sum of grades' to natural aggregation the
weights were no automatically assigned and the grade totals were
wrong. This has now been rectified.
This commit is contained in:
Adrian Greeve 2014-10-10 15:30:12 +08:00
parent aec2a725a8
commit 7970c21751
2 changed files with 4 additions and 1 deletions

View File

@ -3918,6 +3918,9 @@ function xmldb_main_upgrade($oldversion) {
foreach ($courses as $course) {
set_config('show_sumofgrades_upgrade_' . $course->courseid, 1);
// Set each of the grade items to needing an update so that when the user visits the grade reports the
// figures will be updated.
$DB->set_field('grade_items', 'needsupdate', 1, array('courseid' => $course->courseid));
}
set_config('grades_sumofgrades_upgrade_flagged', 1);

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2014100800.02; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2014100800.07; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.