mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Now scales are restored in journals too !!
This commit is contained in:
parent
c46b0a23db
commit
36001aa95b
@ -46,6 +46,14 @@
|
||||
$journal->assessed = backup_todb($info['MOD']['#']['ASSESSED']['0']['#']);
|
||||
$journal->timemodified = backup_todb($info['MOD']['#']['TIMEMODIFIED']['0']['#']);
|
||||
|
||||
//We have to recode the assessed field if it is <0 (scale)
|
||||
if ($journal->assessed < 0) {
|
||||
$scale = backup_getid($restore->backup_unique_code,"scale",abs($journal->assessed));
|
||||
if ($scale) {
|
||||
$journal->assessed = -($scale->new_id);
|
||||
}
|
||||
}
|
||||
|
||||
//The structure is equal to the db, so insert the journal
|
||||
$newid = insert_record ("journal",$journal);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user