]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12463, do not backup mod gradeitems if not selected
authortoyomoyo <toyomoyo>
Tue, 11 Dec 2007 03:16:15 +0000 (03:16 +0000)
committertoyomoyo <toyomoyo>
Tue, 11 Dec 2007 03:16:15 +0000 (03:16 +0000)
backup/backuplib.php

index f703cc328557fcffaf56fa931cbe44e7aeb0d699..c96bec3361f629494f04653d00c0d0d278323b3b 100644 (file)
                 // 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