From: toyomoyo Date: Wed, 22 Aug 2007 09:02:32 +0000 (+0000) Subject: do not backup/restore course grade item/category, instead, just fetch it. Pointing... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=58a0097f3926031a07f79243b99a087ed98c0ca8;p=moodle.git do not backup/restore course grade item/category, instead, just fetch it. Pointing all orphan categories and grade items to the course grade item --- diff --git a/backup/backuplib.php b/backup/backuplib.php index 6ddfd209e4..d3534d7e44 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -1374,6 +1374,7 @@ if ($grade_items = get_records_sql("SELECT * FROM {$CFG->prefix}grade_items WHERE courseid = $preferences->backup_course + AND itemtype != 'course' ORDER BY sortorder ASC")) { foreach ($grade_items as $grade_item) { @@ -1426,6 +1427,7 @@ // we do this by getting the lowest depth first $grade_categories = get_records_sql("SELECT * FROM {$CFG->prefix}grade_categories WHERE courseid = $preferences->backup_course + AND depth > 1 ORDER BY depth ASC"); if ($grade_categories) { //Begin grade_categories tag diff --git a/backup/restorelib.php b/backup/restorelib.php index 565bd959c3..a82f89dd25 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -1243,6 +1243,15 @@ if (!defined('RESTORE_SILENTLY')) { echo '