fixed upgrade that never got executed - whatgrade was not filled

This commit is contained in:
Petr Skoda
2010-09-18 13:40:21 +00:00
parent e839dce138
commit 0744fded5d
+3 -5
View File
@@ -40,11 +40,9 @@ function xmldb_scorm_upgrade($oldversion) {
if (empty($whatgradefixed)) {
/// fix bad usage of whatgrade/grading method.
$scorms = $DB->get_records('scorm');
if (!empty($scorm)) {
foreach ($scorms as $scorm) {
$scorm->whatgrade = $scorm->grademethod/10;
$DB->update_record('scorm', $scorm);
}
foreach ($scorms as $scorm) {
$scorm->whatgrade = $scorm->grademethod/10;
$DB->update_record('scorm', $scorm);
}
}
} else {