Permalink
Browse files

MDL-40003 mod_assign: Fixed submission comments not being restored

  • Loading branch information...
sam-moodle authored and FMCorz committed Jun 3, 2013
1 parent 3e6e38b commit 2470b6ea896c42de8400e998b01509ab8cbd23af
Showing with 18 additions and 0 deletions.
  1. +18 −0 mod/assign/backup/moodle2/restore_assign_activity_task.class.php
@@ -120,4 +120,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 2470b6e

Please sign in to comment.