diff options
author | prathamesh | 2017-09-08 13:41:40 +0530 |
---|---|---|
committer | prathamesh | 2017-09-08 14:13:52 +0530 |
commit | ad020f9039e33fc6c29e9f0e1de8fd56c2f78406 (patch) | |
tree | 5a97db6d45a5da9d4fa5e0d6decc93a216ae09f8 /yaksh/views.py | |
parent | 09c00608a215df7a44782ab3f7c97cb912664bfd (diff) | |
download | online_test-ad020f9039e33fc6c29e9f0e1de8fd56c2f78406.tar.gz online_test-ad020f9039e33fc6c29e9f0e1de8fd56c2f78406.tar.bz2 online_test-ad020f9039e33fc6c29e9f0e1de8fd56c2f78406.zip |
Modification as per comments on the PR
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 0b601f2..97da29c 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -31,7 +31,7 @@ except ImportError: from io import BytesIO as string_io import re # Local imports. -from yaksh.code_server import get_result, SERVER_POOL_PORT +from yaksh.code_server import get_result as get_result_from_code_server, SERVER_POOL_PORT from yaksh.models import ( Answer, AnswerPaper, AssignmentUpload, Course, FileUpload, FloatTestCase, HookTestCase, IntegerTestCase, McqTestCase, Profile, @@ -616,7 +616,7 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None): if current_question.type in ['code', 'upload']: if paper.time_left() <= 0: url = 'http://localhost:%s' % SERVER_POOL_PORT - result = get_result(url, uid, block=True) + result = get_result_from_code_server(url, uid, block=True) result = json.loads(result.get('result')) next_question, error_message, paper = _update_paper(request, uid, result) @@ -631,10 +631,10 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None): @csrf_exempt -def get_results(request, uid): +def get_result(request, uid): result = {} url = 'http://localhost:%s' % SERVER_POOL_PORT - result_state = get_result(url, uid) + result_state = get_result_from_code_server(url, uid) result['status'] = result_state.get('status') if result['status'] == 'done': result = json.loads(result_state.get('result')) |