From 3ce0e8274fc03531de6e438677d21f773fc4a938 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 2 Mar 2007 04:48:21 +0000 Subject: [PATCH] fix for MDL-8491, comments not saved in backups for essay questions --- question/backuplib.php | 1 + question/restorelib.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/question/backuplib.php b/question/backuplib.php index 3b84e1a98d9..75a9ccf13e2 100644 --- a/question/backuplib.php +++ b/question/backuplib.php @@ -347,6 +347,7 @@ 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)); } diff --git a/question/restorelib.php b/question/restorelib.php index e0f8d65912d..0cb0b022743 100644 --- a/question/restorelib.php +++ b/question/restorelib.php @@ -677,7 +677,7 @@ $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) { -- 2.11.4.GIT