Skip to content
Snippets Groups Projects
Commit 0e94f724 authored by Tim Hunt's avatar Tim Hunt
Browse files

Delete associated testcases when the question is deleted.

parent 5087c157
No related branches found
No related tags found
No related merge requests found
......@@ -304,6 +304,9 @@ class qtype_stack extends question_type {
public function delete_question($questionid, $contextid) {
global $DB;
$DB->delete_records('qtype_stack_qtest_expected', array('questionid' => $questionid));
$DB->delete_records('qtype_stack_qtest_inputs', array('questionid' => $questionid));
$DB->delete_records('qtype_stack_qtests', array('questionid' => $questionid));
$DB->delete_records('qtype_stack_prt_nodes', array('questionid' => $questionid));
$DB->delete_records('qtype_stack_prts', array('questionid' => $questionid));
$DB->delete_records('qtype_stack_inputs', array('questionid' => $questionid));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment