if the current category is deleted then revert back to the default category

This commit is contained in:
gustav_delius
2005-01-22 18:59:10 +00:00
parent 1082105205
commit 4acc80ead1
+1 -1
View File
@@ -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;
}