Permalink
Browse files

Now scales are restored in journals too !!

  • Loading branch information...
1 parent c46b0a2 commit 36001aa95b5a53ce8e84eaa56c02b75bbcf1c9d1 stronk7 committed Aug 18, 2003
Showing with 8 additions and 0 deletions.
  1. +8 −0 mod/journal/restorelib.php
View
8 mod/journal/restorelib.php
@@ -46,6 +46,14 @@ function journal_restore_mods($mod,$restore) {
$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);

0 comments on commit 36001aa

Please sign in to comment.