Skip to content

Commit

Permalink
Some needed scales recoding previous to ratings... :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Nov 21, 2003
1 parent c1acb61 commit a741f7e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mod/glossary/restorelib.php
Expand Up @@ -68,6 +68,14 @@ function glossary_restore_mods($mod,$restore) {
$glossary->assesstimefinish = backup_todb($info['MOD']['#']['ASSESSTIMEFINISH']['0']['#']);
$glossary->scale = backup_todb($info['MOD']['#']['SCALE']['0']['#']);

//We have to recode the scale field if it's <0 (positive is a grade, not a scale)
if ($glossary->scale < 0) {
$scale = backup_getid($restore->backup_unique_code,"scale",abs($glossary->scale));
if ($scale) {
$glossary->scale = -($scale->new_id);
}
}

//The structure is equal to the db, so insert the glossary
$newid = insert_record ("glossary",$glossary);

Expand Down

0 comments on commit a741f7e

Please sign in to comment.