summaryrefslogtreecommitdiff
path: root/testapp/exam/views.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/views.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/views.py')
-rw-r--r--testapp/exam/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py
index 5b7baac..0ca404d 100644
--- a/testapp/exam/views.py
+++ b/testapp/exam/views.py
@@ -20,7 +20,7 @@ from testapp.exam.models import Quiz, Question, QuestionPaper, QuestionSet
from testapp.exam.models import Profile, Answer, AnswerPaper, User, TestCase
from testapp.exam.forms import UserRegisterForm, UserLoginForm, QuizForm,\
QuestionForm, RandomQuestionForm, TestCaseFormSet
-from exam.xmlrpc_clients import code_server
+from testapp.exam.xmlrpc_clients import code_server
from settings import URL_ROOT
from testapp.exam.models import AssignmentUpload
@@ -291,6 +291,7 @@ def edit_question(request):
description = request.POST.getlist('description')
points = request.POST.getlist('points')
options = request.POST.getlist('options')
+ test = request.POST.getlist('test')
type = request.POST.getlist('type')
active = request.POST.getlist('active')
language = request.POST.getlist('language')
@@ -913,9 +914,8 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None):
if not user.is_authenticated() or paper.end_time < datetime.datetime.now():
return my_redirect('/exam/login/')
+
question = get_object_or_404(Question, pk=q_id)
- q_paper = QuestionPaper.objects.get(id=questionpaper_id)
- paper = AnswerPaper.objects.get(user=request.user, question_paper=q_paper)
test_cases = TestCase.objects.filter(question=question)
snippet_code = request.POST.get('snippet')