From ca811cb0ccb85a5aec56d79d4ba88dd847024c3b Mon Sep 17 00:00:00 2001
From: Penny Leach <penny@mjollnir.org>
Date: Tue, 18 Aug 2009 16:03:11 +0200
Subject: [PATCH] [UPSTREAM] assignment/uploadpdf backup/restore - fixed a bug

stopped all comments from being backed up, rather than specific ones
---
 mod/assignment/type/uploadpdf/assignment.class.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mod/assignment/type/uploadpdf/assignment.class.php b/mod/assignment/type/uploadpdf/assignment.class.php
index ecde842..ba0100d 100644
--- a/mod/assignment/type/uploadpdf/assignment.class.php
+++ b/mod/assignment/type/uploadpdf/assignment.class.php
@@ -1686,7 +1686,7 @@ class assignment_uploadpdf extends assignment_base {
      *Backup extra data about the assignment submission. This is just comments at the moment.
      */
     function backup_one_submission($bf, $preferences, $assignment, $submission) {
-        if (!$comments = get_records('assignment_uploadpdf_comment')) {
+        if (!$comments = get_records('assignment_uploadpdf_comment', 'assignment_submission', $submission->id)) {
             return true;
         }
         fwrite ($bf,start_tag("COMMENTS",4,true));
-- 
1.6.3.3

