projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc67d9b
)
Followup to MDL-8994 - validate the category id we got from the form. Merged from...
author
tjhunt
<tjhunt>
Thu, 22 Mar 2007 22:02:14 +0000
(22:02 +0000)
committer
tjhunt
<tjhunt>
Thu, 22 Mar 2007 22:02:14 +0000
(22:02 +0000)
question/type/questiontype.php
patch
|
blob
|
history
diff --git
a/question/type/questiontype.php
b/question/type/questiontype.php
index fa481e93a1462a1d11e4076e888196cd3b56084c..dfa507e5b4fdeaac92fab2ee87cc4613d4d8c7c5 100644
(file)
--- a/
question/type/questiontype.php
+++ b/
question/type/questiontype.php
@@
-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);