Permalink
Browse files

fix for MDL-8491, comments not saved in backups for essay questions

  • Loading branch information...
moodler
moodler committed Mar 2, 2007
1 parent bd2cf8f commit 3ce0e8274fc03531de6e438677d21f773fc4a938
Showing with 2 additions and 1 deletion.
  1. +1 −0 question/backuplib.php
  2. +1 −1 question/restorelib.php
View
@@ -347,6 +347,7 @@ function backup_question_sessions ($bf,$preferences,$attempt, $level = 6) {
fwrite ($bf,full_tag("NEWEST",$level + 2,false,$newest_state->newest));
fwrite ($bf,full_tag("NEWGRADED",$level + 2,false,$newest_state->newgraded));
fwrite ($bf,full_tag("SUMPENALTY",$level + 2,false,$newest_state->sumpenalty));
+ fwrite ($bf,full_tag("COMMENT",$level + 2,false,$newest_state->comment));
//End newest_state
$status = fwrite ($bf,end_tag("NEWEST_STATE",$level + 1,true));
}
View
@@ -677,7 +677,7 @@ function question_states_restore_mods($attempt_id,$info,$restore) {
$session->newest = backup_todb($res_info['#']['NEWEST']['0']['#']);
$session->newgraded = backup_todb($res_info['#']['NEWGRADED']['0']['#']);
$session->sumpenalty = backup_todb($res_info['#']['SUMPENALTY']['0']['#']);
-
+ $session->comment = 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) {

0 comments on commit 3ce0e82

Please sign in to comment.