summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/prolog_session.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/prolog_session.py b/server/prolog_session.py
index d83d62d..798c086 100644
--- a/server/prolog_session.py
+++ b/server/prolog_session.py
@@ -120,9 +120,9 @@ class PrologSession(object):
try:
n_correct, n_all = problem_module.test(code)
- return ['Passed {} / {} tests.'.format(n_correct, n_all)]
+ return [{'id': 'test_results', 'args': {'passed': n_correct, 'total': n_all}}]
except AttributeError as ex:
- return ['No test is defined for this problem']
+ return [{'id': 'test_results', 'args': {'passed': 0, 'total': 0}}]
def run_for_user(self, user_id, problem_id, program, query):
"""A "shorthand" method to start a Prolog session, load correct solutions of all user's solved