From: toyomoyo Date: Tue, 11 Dec 2007 03:16:15 +0000 (+0000) Subject: MDL-12463, do not backup mod gradeitems if not selected X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dfbe1fa4739533e9546587952b1285c117a83933;p=moodle.git MDL-12463, do not backup mod gradeitems if not selected --- diff --git a/backup/backuplib.php b/backup/backuplib.php index f703cc3285..c96bec3361 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -1506,6 +1506,11 @@ // do not restore if this grade_item is a mod, and if ($grade_item->itemtype == 'mod') { // this still needs to be included, though grades can be ignored + + //MDL-12463 - exclude grade_items of instances not chosen for backup + if (empty($preferences->mods[$grade_item->itemmodule]->instances[$grade_item->iteminstance]->backup)) { + continue; + } } else if ($grade_item->itemtype == 'category') { // if not all grade items are being backed up // we ignore this type of grade_item and grades associated