]> git.mjollnir.org Git - moodle.git/commitdiff
Small bugfix to allow question categories to be changed
authormoodler <moodler>
Mon, 7 Jul 2003 15:08:03 +0000 (15:08 +0000)
committermoodler <moodler>
Mon, 7 Jul 2003 15:08:03 +0000 (15:08 +0000)
mod/quiz/question.php

index 2c3b63d015b945a3570604a286a2e2245c9a01fc..88e94837b4753fa6b2d3ce47ad3360530a0f11a5 100644 (file)
@@ -14,7 +14,9 @@
         if (! $question = get_record("quiz_questions", "id", $id)) {
             error("This question doesn't exist");
         }
-
+        if (!empty($category)) {
+            $question->category = $category;
+        }
         if (! $category = get_record("quiz_categories", "id", $question->category)) {
             error("This question doesn't belong to a valid category!");
         }