public function move_files($questionid, $oldcontextid, $newcontextid) { global $DB; $fs = get_file_storage(); parent::move_files($questionid, $oldcontextid, $newcontextid); $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_ddimageortext', 'bgimage', $questionid); $dragids = $DB->get_records_menu('qtype_ddimageortext_drags', array('questionid' => $questionid), 'id', 'id,1'); foreach ($dragids as $dragid => $notused) { $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_ddimageortext', 'dragimage', $dragid); } $this->move_files_in_combined_feedback($questionid, $oldcontextid, $newcontextid); $this->move_files_in_hints($questionid, $oldcontextid, $newcontextid); }
public function move_files($questionid, $oldcontextid, $newcontextid) { global $DB; $fs = get_file_storage(); parent::move_files($questionid, $oldcontextid, $newcontextid); $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_ddmarker', 'bgimage', $questionid); $this->move_files_in_combined_feedback($questionid, $oldcontextid, $newcontextid); $this->move_files_in_hints($questionid, $oldcontextid, $newcontextid); }