diff options
author | prathamesh | 2014-07-03 17:31:19 +0530 |
---|---|---|
committer | prathamesh | 2014-07-03 17:31:19 +0530 |
commit | 3918842683580a7265e4420febb13aadf7604e35 (patch) | |
tree | 1cc0452adb3f1a8378aa5a04c22960940a8564dd /testapp/exam/forms.py | |
parent | ba6308eb5dfe391305f5466fba00be46a4755f7e (diff) | |
download | online_test-3918842683580a7265e4420febb13aadf7604e35.tar.gz online_test-3918842683580a7265e4420febb13aadf7604e35.tar.bz2 online_test-3918842683580a7265e4420febb13aadf7604e35.zip |
Interface to create question paper
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) |