summaryrefslogtreecommitdiff
path: root/testapp/exam/forms.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2015-05-27 10:58:44 +0530
committerPrabhu Ramachandran2015-05-27 10:58:44 +0530
commita83b57aee80959f11f96ad6a3a738c9fac906e26 (patch)
treef14a18f7e821d87b098a93610ece8772d568563b /testapp/exam/forms.py
parenta022e0145ec8fb1622d58c2e2281c016b1d45b01 (diff)
parent92150265c82f3d1f6e4eb382447ae8e448cd406f (diff)
downloadonline_test-a83b57aee80959f11f96ad6a3a738c9fac906e26.tar.gz
online_test-a83b57aee80959f11f96ad6a3a738c9fac906e26.tar.bz2
online_test-a83b57aee80959f11f96ad6a3a738c9fac906e26.zip
Merge pull request #48 from ankitjavalkar/add-docs
Re apply docs directory in testapp directory and other changes
Diffstat (limited to 'testapp/exam/forms.py')
-rw-r--r--testapp/exam/forms.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py
index 93584a6..b56e545 100644
--- a/testapp/exam/forms.py
+++ b/testapp/exam/forms.py
@@ -1,5 +1,5 @@
from django import forms
-from exam.models import Profile, Quiz, Question, TestCase
+from testapp.exam.models import Profile, Quiz, Question, TestCase
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
@@ -187,7 +187,7 @@ class QuestionForm(forms.ModelForm):
description = forms.CharField(widget=forms.Textarea\
(attrs={'cols': 40, 'rows': 1}))
points = forms.FloatField()
- solution = forms.CharField(widget=forms.Textarea\
+ test = forms.CharField(widget=forms.Textarea\
(attrs={'cols': 40, 'rows': 1}), required=False)
options = forms.CharField(widget=forms.Textarea\
(attrs={'cols': 40, 'rows': 1}), required=False)
@@ -206,6 +206,7 @@ class QuestionForm(forms.ModelForm):
summary = self.cleaned_data.get("summary")
description = self.cleaned_data.get("description")
points = self.cleaned_data.get("points")
+ test = self.cleaned_data.get("test")
options = self.cleaned_data.get("options")
language = self.cleaned_data.get("language")
type = self.cleaned_data.get("type")
@@ -216,7 +217,7 @@ class QuestionForm(forms.ModelForm):
new_question.summary = summary
new_question.description = description
new_question.points = points
- # new_question.test = test
+ new_question.test = test
new_question.options = options
new_question.language = language
new_question.type = type