From dfbe1fa4739533e9546587952b1285c117a83933 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Tue, 11 Dec 2007 03:16:15 +0000 Subject: [PATCH] MDL-12463, do not backup mod gradeitems if not selected --- backup/backuplib.php | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5