|
|
|
[
Permlink
| « Hide
]
Robert Puffer - 01/Jul/08 12:04 AM
I believe this is actually fixed in the latest 1.91+ but isn't fixed in the importing feature -- A MAJOR DISABILITY!!
Robert,
We're using build Moodle 1.9.1+ (Build 20080521) so unless it was released after this then I don't think so. I've been watching the release notes and didn't see a fix in the notes but I could have missed it. When I was using that build it wasn't fixed either. We're now on 20080618 and the backup and restore is fixed but the import is not.
Robert,
Thanks. Let's hope that they elevate this problem to a priority so that gets fixed sooner than later. Did you file a separate bug in terms of the import content function or were you hoping that they'd read this one and act on it? Not sure why grade_categories aren't backed up when user_data is not selected. But here are the two locations in backup/backuplib.php where it needs to be fixed.
First in function backup_gradebook_info it sets $backupall to false, as shown: // if no user data selected, we do not backup categories if (!backup_userdata_selected($preferences,$grade_item->itemmodule,$grade_item->iteminstance)) { $backupall = false; Meaning, when we get here (shortly below the above code) // Now backup grade_item (inside grade_category) if ($backupall) { $status = backup_gradebook_category_info($bf,$preferences); } Gradebook categories aren't backed up. And also in the function backup_gradebook_item_info, if the grade_item is of type category it isn't backed-up if $backupall is false: } 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 if (!$backupall) { continue; } } I'm not sure why it's programmed this way, but removing the $backupall conditional statements in backuplib.php will fix the issue of missing categories. But, manual grade_items which have a calculation are not restored correctly. The new grade_item ID's aren't populated in the calculation when restored and instead the calculation string from the backup file is plugged straight into the database. The id's in the calculation string need to be adjusted to reflect the newly created ID's for the restored grade_items. thanks Tom for the info, I have files a new bug for this backup issue . it should be fixed now; categories are not included if some mods are not selected instead of when user data not selected
the gradebook categories are not restored intentionally, the problem is that you do not always want the gradebook categories when importing
solution could be to add some new switch that would force gradebook category import as a workaround please use full backup/restore for now |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||