Skip to content

Commit

Permalink
backup/restore of grade histories should be off by default
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Nov 7, 2007
1 parent 23adb9c commit b25d908
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backup/backup_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
$backup_user_files = optional_param('backup_user_files',1);
$backup_course_files = optional_param('backup_course_files',1);
$backup_site_files = optional_param('backup_site_files',1);
$backup_gradebook_history = optional_param('backup_gradebook_history', 1, PARAM_INT);
$backup_gradebook_history = optional_param('backup_gradebook_history', 0, PARAM_INT);
$backup_messages = optional_param('backup_messages',1);

if ($count == 0) {
Expand Down
2 changes: 1 addition & 1 deletion backup/restore_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
error( 'course_header object missing from session' );
}

$restore_gradebook_history = optional_param('restore_gradebook_history', 1, PARAM_INT);
$restore_gradebook_history = optional_param('restore_gradebook_history', 0, PARAM_INT);

//Check that we have all we need
//backup_unique_code
Expand Down
2 changes: 1 addition & 1 deletion backup/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ function restore_create_gradebook($restore,$xml_file) {
$dbrec->categoryid = $coursecat->id;
} else if (!empty($info['GRADE_ITEM']['#']['CATEGORYID']['0']['#']) && $info['GRADE_ITEM']['#']['CATEGORYID']['0']['#']!='$@NULL@$') {
$category = backup_getid($restore->backup_unique_code,'grade_categories',backup_todb($info['GRADE_ITEM']['#']['CATEGORYID']['0']['#']));
if ($category->new_id) {
if (!empty($category->new_id)) {
$dbrec->categoryid = $category->new_id;
} else {
// this could be restoring into existing course, and grade item points to the old course grade item (category)
Expand Down

0 comments on commit b25d908

Please sign in to comment.