From 4acc80ead1ad37a398965d5ed43d5de92c73708d Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Sat, 22 Jan 2005 18:59:10 +0000 Subject: [PATCH] if the current category is deleted then revert back to the default category --- mod/quiz/edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 4a90136e54..19ebc425c7 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -182,7 +182,7 @@ /// 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; } -- 2.39.5