diff --git a/question/type/gapselect/backup/moodle2/backup_qtype_gapselect_plugin.class.php b/question/type/gapselect/backup/moodle2/backup_qtype_gapselect_plugin.class.php index 8af1eec312a..76a0615546a 100755 --- a/question/type/gapselect/backup/moodle2/backup_qtype_gapselect_plugin.class.php +++ b/question/type/gapselect/backup/moodle2/backup_qtype_gapselect_plugin.class.php @@ -68,17 +68,4 @@ class backup_qtype_gapselect_plugin extends backup_qtype_plugin { return $plugin; } - - /** - * Returns one array with filearea => mappingname elements for the qtype - * - * Used by {@link get_components_and_fileareas} to know about all the qtype - * files to be processed both in backup and restore. - */ - public static function get_qtype_fileareas() { - return array( - 'correctfeedback' => 'question_created', - 'partiallycorrectfeedback' => 'question_created', - 'incorrectfeedback' => 'question_created'); - } } diff --git a/question/type/gapselect/questiontypebase.php b/question/type/gapselect/questiontypebase.php index 26c736127ac..63e19fc05ba 100644 --- a/question/type/gapselect/questiontypebase.php +++ b/question/type/gapselect/questiontypebase.php @@ -312,22 +312,11 @@ abstract class qtype_gapselect_base extends question_type { public function move_files($questionid, $oldcontextid, $newcontextid) { parent::move_files($questionid, $oldcontextid, $newcontextid); - - $fs = get_file_storage(); - $fs->move_area_files_to_new_context($oldcontextid, - $newcontextid, 'question', 'correctfeedback', $questionid); - $fs->move_area_files_to_new_context($oldcontextid, - $newcontextid, 'question', 'partiallycorrectfeedback', $questionid); - $fs->move_area_files_to_new_context($oldcontextid, - $newcontextid, 'question', 'incorrectfeedback', $questionid); + $this->move_files_in_combined_feedback($questionid, $oldcontextid, $newcontextid); } protected function delete_files($questionid, $contextid) { parent::delete_files($questionid, $contextid); - - $fs = get_file_storage(); - $fs->delete_area_files($contextid, 'question', 'correctfeedback', $questionid); - $fs->delete_area_files($contextid, 'question', 'partiallycorrectfeedback', $questionid); - $fs->delete_area_files($contextid, 'question', 'incorrectfeedback', $questionid); + $this->delete_files_in_combined_feedback($questionid, $contextid); } }