summaryrefslogtreecommitdiff
path: root/testapp/exam/forms.py
diff options
context:
space:
mode:
authorprathamesh2014-07-03 17:31:19 +0530
committerprathamesh2014-07-03 17:31:19 +0530
commit3918842683580a7265e4420febb13aadf7604e35 (patch)
tree1cc0452adb3f1a8378aa5a04c22960940a8564dd /testapp/exam/forms.py
parentba6308eb5dfe391305f5466fba00be46a4755f7e (diff)
downloadonline_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.py12
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)