Followup to MDL-8994 - validate the category id we got from the form. Merged from MOODLE_18_STABLE.

This commit is contained in:
tjhunt
2007-03-22 22:02:14 +00:00
parent bc67d9b3bd
commit 88495aa8d2
+3
View File
@@ -150,6 +150,9 @@ class default_questiontype {
// question types.
// First, save the basic question itself
if (!record_exists('question_categories', 'id', $form->category)) {
print_error('categorydoesnotexist', 'question');
}
$question->category = $form->category;
$question->name = trim($form->name);
$question->questiontext = trim($form->questiontext);