]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10899 - followup - need to move random questions too.
authortjhunt <tjhunt>
Mon, 12 May 2008 15:59:05 +0000 (15:59 +0000)
committertjhunt <tjhunt>
Mon, 12 May 2008 15:59:05 +0000 (15:59 +0000)
question/category_class.php

index 80c5fe16fd16603283357ba96d180b7d2d705074..0469f2e5b27a27b840817c1dddc785d9d1214e99 100644 (file)
@@ -352,7 +352,7 @@ class question_category_object {
     }
 
     function move_questions($oldcat, $newcat){
-        $questionids = get_records_select_menu('question', "category = $oldcat AND parent = 0", '', 'id,1');
+        $questionids = get_records_select_menu('question', "category = $oldcat AND (parent = 0 OR parent = id)", '', 'id,1');
         if (!question_move_questions_to_category(implode(',', array_keys($questionids)), $newcat)) {
             print_error('errormovingquestions', 'question', $returnurl, $ids);
         }