diff options
author | ankitjavalkar | 2015-05-13 18:20:26 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-05-20 14:58:05 +0530 |
commit | 92150265c82f3d1f6e4eb382447ae8e448cd406f (patch) | |
tree | f14a18f7e821d87b098a93610ece8772d568563b /testapp/exam/views.py | |
parent | 13317f56278969cb6568026d099e15166bfc5d6c (diff) | |
download | online_test-92150265c82f3d1f6e4eb382447ae8e448cd406f.tar.gz online_test-92150265c82f3d1f6e4eb382447ae8e448cd406f.tar.bz2 online_test-92150265c82f3d1f6e4eb382447ae8e448cd406f.zip |
Fix import paths, formatting, views and minor errors
- Submitted file path should be set after changing directory
- Change timeout duration in java test case
- Set shell=True in _compile_command
- Fix errors in code as per tests
Diffstat (limited to 'testapp/exam/views.py')
-rw-r--r-- | testapp/exam/views.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py index 621ec94..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 @@ -914,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') |