mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 08:09:47 +02:00
backup/restore Support for 4 new fields in data module
This commit is contained in:
parent
7db989230f
commit
b6aeb9ba31
2 changed files with 8 additions and 0 deletions
|
@ -98,6 +98,10 @@ function data_backup_one_mod($bf,$preferences,$data) {
|
|||
fwrite ($bf,full_tag("APPROVAL",4,false,$data->approval));
|
||||
fwrite ($bf,full_tag("SCALE",4,false,$data->scale));
|
||||
fwrite ($bf,full_tag("ASSESSED",4,false,$data->assessed));
|
||||
fwrite ($bf,full_tag("DEFAULTSORT",4,false,$data->defaultsort));
|
||||
fwrite ($bf,full_tag("DEFAULTSORTDIR",4,false,$data->defaultsortdir));
|
||||
fwrite ($bf,full_tag("EDITANY",4,false,$data->editany));
|
||||
fwrite ($bf,full_tag("NOTIFICATION",4,false,$data->notification));
|
||||
|
||||
// if we've selected to backup users info, then call any other functions we need
|
||||
// including backing up individual files
|
||||
|
|
|
@ -92,6 +92,10 @@ function data_restore_mods($mod,$restore) {
|
|||
if (isset($info['MOD']['#']['ASSESSPUBLIC']['0']['#'])) {
|
||||
$database->assesspublic = backup_todb($info['MOD']['#']['ASSESSPUBLIC']['0']['#']);
|
||||
}
|
||||
$database->defaultsort = backup_todb($info['MOD']['#']['DEFAULTSORT']['0']['#']);
|
||||
$database->defaultsortdir = backup_todb($info['MOD']['#']['DEFAULTSORTDIR']['0']['#']);
|
||||
$database->editany = backup_todb($info['MOD']['#']['EDITANY']['0']['#']);
|
||||
$database->notification = backup_todb($info['MOD']['#']['NOTIFICATION']['0']['#']);
|
||||
|
||||
$newid = insert_record ('data', $database);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue