Permalink
Browse files

MDL-40003 mod_assign: Fixed submission comments not being restored

  • Loading branch information...
1 parent 98f4a31 commit 780a21f62a5f6b324922fdb5473b7e1278ba81ce @sam-moodle sam-moodle committed with FMCorz Jun 3, 2013
Showing with 18 additions and 0 deletions.
  1. +18 −0 mod/assign/backup/moodle2/restore_assign_activity_task.class.php
@@ -117,4 +117,22 @@ static public function define_restore_log_rules_for_course() {
return $rules;
}
+ /**
+ * Given a comment area, return the itemname that contains the itemid mappings.
+ *
+ * @param string $commentarea
+ * @return string
+ */
+ public function get_comment_mapping_itemname($commentarea) {
+ switch ($commentarea) {
+ case 'submission_comments':
+ $itemname = 'submission';
+ break;
+ default:
+ $itemname = parent::get_comment_mapping_itemname($commentarea);
+ break;
+ }
+
+ return $itemname;
+ }
}

0 comments on commit 780a21f

Please sign in to comment.