]> git.mjollnir.org Git - moodle.git/commitdiff
if the current category is deleted then revert back to the default category
authorgustav_delius <gustav_delius>
Sat, 22 Jan 2005 18:59:10 +0000 (18:59 +0000)
committergustav_delius <gustav_delius>
Sat, 22 Jan 2005 18:59:10 +0000 (18:59 +0000)
mod/quiz/edit.php

index 4a90136e54526e89b292f64a436d0c734b0444a5..19ebc425c7e70e32640f4086a4c7b4853fc823b6 100644 (file)
     
 /// all commands have been dealt with, now print the page
 
-    if (empty($modform->category)) {
+    if (empty($modform->category) or !record_exists('quiz_categories', 'id', $modform->category)) { 
         $category = quiz_get_default_category($course->id);
         $modform->category = $category->id;
     }