diff options
Diffstat (limited to 'testapp/exam/forms.py')
-rw-r--r-- | testapp/exam/forms.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index d0b0b74..9bfedbe 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -13,7 +13,7 @@ from string import letters, punctuation, digits import datetime languages = ( - ("select", "Select"), + ("select", "Select Language"), ("python", "Python"), ("bash", "Bash"), ("C", "C Language"), @@ -23,7 +23,7 @@ languages = ( ) question_types = ( - ("select", "Select"), + ("select", "Select Question Type"), ("mcq", "Multiple Choice"), ("mcc", "Multiple Correct Choices"), ("code", "Code"), @@ -207,3 +207,11 @@ class QuestionForm(forms.Form): new_question.active = active new_question.snippet = snippet new_question.save() + + +class RandomQuestionForm(forms.Form): + question_type = forms.CharField(max_length=8, widget=forms.Select\ + (choices=question_types)) + marks = forms.CharField(max_length=8, widget=forms.Select\ + (choices=(('select', 'Select Marks'),))) + shuffle_questions = forms.BooleanField(required=False) |