summaryrefslogtreecommitdiff
path: root/testapp/exam/xmlrpc_clients.py
diff options
context:
space:
mode:
authorankitjavalkar2015-02-16 16:53:18 +0530
committerankitjavalkar2015-04-26 19:37:06 +0530
commit591c261ebbbaa0a052ed7b82428a3627ddaa7b1a (patch)
treedca857718de55e1f829a1545fc7cacb472025873 /testapp/exam/xmlrpc_clients.py
parentecb202633d3b90c55128030adb7817387bf28c95 (diff)
downloadonline_test-591c261ebbbaa0a052ed7b82428a3627ddaa7b1a.tar.gz
online_test-591c261ebbbaa0a052ed7b82428a3627ddaa7b1a.tar.bz2
online_test-591c261ebbbaa0a052ed7b82428a3627ddaa7b1a.zip
Modify method of returning answers from code server
Diffstat (limited to 'testapp/exam/xmlrpc_clients.py')
-rw-r--r--testapp/exam/xmlrpc_clients.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testapp/exam/xmlrpc_clients.py b/testapp/exam/xmlrpc_clients.py
index 320d627..692fbb5 100644
--- a/testapp/exam/xmlrpc_clients.py
+++ b/testapp/exam/xmlrpc_clients.py
@@ -29,7 +29,7 @@ class CodeServerProxy(object):
"scilab": "run_scilab_code",
}
- def run_code(self, answer, test_code, test_parameter, user_dir, language): ####
+ def run_code(self, answer, test_parameter, user_dir, language):
"""Tests given code (`answer`) with the `test_code` supplied. If the
optional `in_dir` keyword argument is supplied it changes the directory
to that directory (it does not change it back to the original when
@@ -55,9 +55,9 @@ class CodeServerProxy(object):
try:
server = self._get_server()
method = getattr(server, method_name)
- result = method(answer, test_code, test_parameter, user_dir) ####
+ result = method(answer, test_parameter, user_dir) ####
except ConnectionError:
- result = [False, 'Unable to connect to any code servers!']
+ result = {'success': False, 'error': 'Unable to connect to any code servers!'}
return result
def _get_server(self):