Browse files

MDL-20636 lib/Questionlib fixed calls to question_delete_question() #381

  • Loading branch information...
1 parent 058f658 commit 7ee214ff893e3473347913c4b976f01ade435b1c Colin Chambers committed with timhunt Apr 8, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/questionlib.php
View
8 lib/questionlib.php
@@ -389,7 +389,7 @@ function question_delete_question($questionid) {
if ($children = $DB->get_records('question', array('parent' => $questionid), '', 'id,qtype')) {
foreach ($children as $child) {
if ($child->id != $questionid) {
- delete_question($child->id);
+ question_delete_question($child->id);
}
}
}
@@ -428,7 +428,7 @@ function question_delete_course($course, $feedback=true) {
//deleting questions
if ($questions = $DB->get_records('question', array('category' => $category->id), '', 'id,qtype')) {
foreach ($questions as $question) {
- delete_question($question->id);
+ question_delete_question($question->id);
}
$DB->delete_records("question", array("category"=>$category->id));
}
@@ -477,7 +477,7 @@ function question_delete_course_category($category, $newcategory, $feedback=true
// Try to delete each question.
foreach ($questions as $question) {
- delete_question($question->id);
+ question_delete_question($question->id);
}
// Check to see if there were any questions that were kept because they are
@@ -586,7 +586,7 @@ function question_delete_activity($cm, $feedback=true) {
//deleting questions
if ($questions = $DB->get_records('question', array('category' => $category->id), '', 'id,qtype')) {
foreach ($questions as $question) {
- delete_question($question->id);
+ question_delete_question($question->id);
}
$DB->delete_records("question", array("category"=>$category->id));
}

0 comments on commit 7ee214f

Please sign in to comment.