mirror of
https://github.com/moodle/moodle.git
synced 2025-01-20 23:18:43 +01:00
discussion->usermodified is in backup & restore now.
This commit is contained in:
parent
41fd7fe497
commit
e222ce0944
@ -132,6 +132,7 @@
|
||||
fwrite ($bf,full_tag("GROUPID",6,false,$for_dis->groupid));
|
||||
fwrite ($bf,full_tag("ASSESSED",6,false,$for_dis->assessed));
|
||||
fwrite ($bf,full_tag("TIMEMODIFIED",6,false,$for_dis->timemodified));
|
||||
fwrite ($bf,full_tag("USERMODIFIED",6,false,$for_dis->usermodified));
|
||||
//Now print posts to xml
|
||||
$status = backup_forum_posts($bf,$preferences,$for_dis->id);
|
||||
//End discussion
|
||||
|
@ -203,6 +203,7 @@
|
||||
$discussion->groupid = backup_todb($dis_info['#']['GROUPID']['0']['#']);
|
||||
$discussion->assessed = backup_todb($dis_info['#']['ASSESSED']['0']['#']);
|
||||
$discussion->timemodified = backup_todb($dis_info['#']['TIMEMODIFIED']['0']['#']);
|
||||
$discussion->usermodified = backup_todb($dis_info['#']['USERMODIFIED']['0']['#']);
|
||||
|
||||
//We have to recode the userid field
|
||||
$user = backup_getid($restore->backup_unique_code,"user",$discussion->userid);
|
||||
@ -216,6 +217,12 @@
|
||||
$discussion->groupid = $group->new_id;
|
||||
}
|
||||
|
||||
//We have to recode the usermodified field
|
||||
$user = backup_getid($restore->backup_unique_code,"user",$discussion->usermodified);
|
||||
if ($user) {
|
||||
$discussion->usermodified = $user->new_id;
|
||||
}
|
||||
|
||||
//The structure is equal to the db, so insert the forum_discussions
|
||||
$newid = insert_record ("forum_discussions",$discussion);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user