diff options
author | Prabhu Ramachandran | 2014-07-03 18:06:26 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2014-07-03 18:06:26 +0530 |
commit | befad018f2e59389e92eaa109c6968bea30d06f9 (patch) | |
tree | df02d9de7fdd1596c0be1268bdd9148a2f0f15cb /testapp/exam/forms.py | |
parent | ba6308eb5dfe391305f5466fba00be46a4755f7e (diff) | |
parent | 2d04f8cce5c5cf610b401ed37f796bd2034c07e9 (diff) | |
download | online_test-befad018f2e59389e92eaa109c6968bea30d06f9.tar.gz online_test-befad018f2e59389e92eaa109c6968bea30d06f9.tar.bz2 online_test-befad018f2e59389e92eaa109c6968bea30d06f9.zip |
Merge pull request #32 from prathamesh920/question_paper_creation_interface
Question paper creation interface
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) |