Пример #1
0
 /**
  * Delete all the files belonging to this question.
  * @param int $questionid the question being deleted.
  * @param int $contextid the context the question is in.
  */
 protected function delete_files($questionid, $contextid)
 {
     global $DB;
     $fs = get_file_storage();
     parent::delete_files($questionid, $contextid);
     $dragids = $DB->get_records_menu('qtype_ddimageortext_drags', array('questionid' => $questionid), 'id', 'id,1');
     foreach ($dragids as $dragid => $notused) {
         $fs->delete_area_files($contextid, 'qtype_ddimageortext', 'dragimage', $dragid);
     }
     $this->delete_files_in_combined_feedback($questionid, $contextid);
     $this->delete_files_in_hints($questionid, $contextid);
 }
 /**
  * Delete all the files belonging to this question.
  * @param int $questionid the question being deleted.
  * @param int $contextid the context the question is in.
  */
 protected function delete_files($questionid, $contextid)
 {
     global $DB;
     $fs = get_file_storage();
     parent::delete_files($questionid, $contextid);
     $this->delete_files_in_combined_feedback($questionid, $contextid);
     $this->delete_files_in_hints($questionid, $contextid);
 }