diff options
author | Prabhu Ramachandran | 2016-11-17 12:54:56 +0530 |
---|---|---|
committer | GitHub | 2016-11-17 12:54:56 +0530 |
commit | aa6ed71496c4a36faed9b42104c8426345bdc2e3 (patch) | |
tree | e5ff410809c60e735cc1a64ce667ba1d4caa6cf5 /yaksh/xmlrpc_clients.py | |
parent | 7ae8584a4f4d095e005d6239102c0f26611ac006 (diff) | |
parent | c4a39baa980578b4e35452d7e1978b1bf0b38e13 (diff) | |
download | online_test-aa6ed71496c4a36faed9b42104c8426345bdc2e3.tar.gz online_test-aa6ed71496c4a36faed9b42104c8426345bdc2e3.tar.bz2 online_test-aa6ed71496c4a36faed9b42104c8426345bdc2e3.zip |
Merge pull request #152 from ankitjavalkar/partial
Partial Grading
Diffstat (limited to 'yaksh/xmlrpc_clients.py')
-rw-r--r-- | yaksh/xmlrpc_clients.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/yaksh/xmlrpc_clients.py b/yaksh/xmlrpc_clients.py index 4da70dd..bb8260d 100644 --- a/yaksh/xmlrpc_clients.py +++ b/yaksh/xmlrpc_clients.py @@ -55,14 +55,21 @@ class CodeServerProxy(object): Returns ------- - A json string of a dict: {success: success, err: error message}. + A json string of a dict containing: + {"success": success, "weight": weight, "error": error message} + + success - Boolean, indicating if code was executed successfully, correctly + weight - Float, indicating total weight of all successful test cases + error - String, error message if success is false """ try: server = self._get_server() result = server.check_code(language, test_case_type, json_data, user_dir) except ConnectionError: - result = json.dumps({'success': False, 'error': 'Unable to connect to any code servers!'}) + result = json.dumps({'success': False, + 'weight': 0.0, + 'error': 'Unable to connect to any code servers!'}) return result def _get_server(self): |