function move_files($questionid, $oldcontextid, $newcontextid) { parent::move_files($questionid, $oldcontextid, $newcontextid); $this->move_files_in_answers($questionid, $oldcontextid, $newcontextid); }
function move_files($questionid, $oldcontextid, $newcontextid) { $fs = get_file_storage(); parent::move_files($questionid, $oldcontextid, $newcontextid); $this->move_files_in_answers($questionid, $oldcontextid, $newcontextid); $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_calculated', 'instruction', $questionid); }
function move_files($questionid, $oldcontextid, $newcontextid) { global $DB; $fs = get_file_storage(); parent::move_files($questionid, $oldcontextid, $newcontextid); $subquestionids = $DB->get_records_menu('question_match_sub', array('question' => $questionid), 'id', 'id,1'); foreach ($subquestionids as $subquestionid => $notused) { $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_match', 'subquestion', $subquestionid); } }
function move_files($questionid, $oldcontextid, $newcontextid) { $fs = get_file_storage(); parent::move_files($questionid, $oldcontextid, $newcontextid); $this->move_files_in_answers($questionid, $oldcontextid, $newcontextid, true); $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_multichoice', 'correctfeedback', $questionid); $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_multichoice', 'partiallycorrectfeedback', $questionid); $fs->move_area_files_to_new_context($oldcontextid, $newcontextid, 'qtype_multichoice', 'incorrectfeedback', $questionid); }