From fbc88f388657bd091e30d1f176c2efe720415d67 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 26 Sep 2006 19:18:21 +0000 Subject: [PATCH] fixed legacy comment upgrade code in assignment and journal --- mod/assignment/restorelib.php | 2 +- mod/journal/restorelib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/assignment/restorelib.php b/mod/assignment/restorelib.php index 9ecd055d2a..4cc0412cf7 100644 --- a/mod/assignment/restorelib.php +++ b/mod/assignment/restorelib.php @@ -149,7 +149,7 @@ $submission->data1 = backup_todb($sub_info['#']['DATA1']['0']['#']); $submission->data2 = backup_todb($sub_info['#']['DATA2']['0']['#']); $submission->grade = backup_todb($sub_info['#']['GRADE']['0']['#']); - if (isset(backup_todb($sub_info['#']['COMMENT']['0']['#']))) { + if (isset($sub_info['#']['COMMENT']['0']['#'])) { $submission->submissioncomment = backup_todb($sub_info['#']['COMMENT']['0']['#']); } else { $submission->submissioncomment = backup_todb($sub_info['#']['SUBMISSIONCOMMENT']['0']['#']); diff --git a/mod/journal/restorelib.php b/mod/journal/restorelib.php index a3e082f2d1..0849e0190b 100644 --- a/mod/journal/restorelib.php +++ b/mod/journal/restorelib.php @@ -132,7 +132,7 @@ $entry->text = backup_todb($entry_info['#']['TEXT']['0']['#']); $entry->format = backup_todb($entry_info['#']['FORMAT']['0']['#']); $entry->rating = backup_todb($entry_info['#']['RATING']['0']['#']); - if (isset(backup_todb($entry_info['#']['COMMENT']['0']['#']))) { + if (isset($entry_info['#']['COMMENT']['0']['#'])) { $entry->entrycomment = backup_todb($entry_info['#']['COMMENT']['0']['#']); } else { $entry->entrycomment = backup_todb($entry_info['#']['ENTRYCOMMENT']['0']['#']); -- 2.39.5