Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-28512 qtype essay: clean up properly when a question is deleted.

  • Loading branch information...
commit 2b18a45e61b9bd36dc70ae567ccc8ae778cd9b47 1 parent 7def533
@timhunt timhunt authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 question/type/essay/questiontype.php
View
7 question/type/essay/questiontype.php
@@ -80,6 +80,13 @@ protected function initialise_question_instance(question_definition $question, $
$question->graderinfoformat = $questiondata->options->graderinfoformat;
}
+ public function delete_question($questionid, $contextid) {
+ global $DB;
+
+ $DB->delete_records('qtype_essay_options', array('questionid' => $questionid));
+ parent::delete_question($questionid, $contextid);
+ }
+
/**
* @return array the different response formats that the question type supports.
* internal name => human-readable name.
Please sign in to comment.
Something went wrong with that request. Please try again.