Skip to content

Commit

Permalink
if the current category is deleted then revert back to the default ca…
Browse files Browse the repository at this point in the history
…tegory
  • Loading branch information
gustav_delius committed Jan 22, 2005
1 parent 1082105 commit 4acc80e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/quiz/edit.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4acc80e

Please sign in to comment.