adding backward compatitiblity for question restores

This commit is contained in:
toyomoyo 2007-03-02 08:04:05 +00:00
parent 345ea0f7d4
commit a917db623e

View File

@ -699,7 +699,13 @@
$session->newest = backup_todb($res_info['#']['NEWEST']['0']['#']);
$session->newgraded = backup_todb($res_info['#']['NEWGRADED']['0']['#']);
$session->sumpenalty = backup_todb($res_info['#']['SUMPENALTY']['0']['#']);
if ($res_info['#']['MANUALCOMMENT']['0']['#']) {
$session->manualcomment = backup_todb($res_info['#']['MANUALCOMMENT']['0']['#']);
} else { // pre 1.7 backups
$session->manualcomment = backup_todb($res_info['#']['COMMENT']['0']['#']);
}
//We have to recode the question field
$question = backup_getid($restore->backup_unique_code,"question",$session->questionid);
if ($question) {