mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-28512 qtype essay: clean up properly when a question is deleted.
This commit is contained in:
parent
a5ec499521
commit
19835d4aff
1 changed files with 7 additions and 0 deletions
|
@ -80,6 +80,13 @@ class qtype_essay extends question_type {
|
||||||
$question->graderinfoformat = $questiondata->options->graderinfoformat;
|
$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.
|
* @return array the different response formats that the question type supports.
|
||||||
* internal name => human-readable name.
|
* internal name => human-readable name.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue