Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 3ce0e8274fc03531de6e438677d21f773fc4a938 1 parent bd2cf8f
moodler authored
Showing with 2 additions and 1 deletion.
  1. +1 −0  question/backuplib.php
  2. +1 −1  question/restorelib.php
View
1  question/backuplib.php
@@ -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
2  question/restorelib.php
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.