summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/prolog_session.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/prolog_session.py b/server/prolog_session.py
index e07a63c..3491a1c 100644
--- a/server/prolog_session.py
+++ b/server/prolog_session.py
@@ -137,8 +137,8 @@ class PrologSession(server.LanguageSession):
session.update_solution(problem_id, done=True)
else:
hints = []
- if not hints and hasattr(language_module, 'hint'):
- hints = language_module.hint(program, aux_code=aux_code)
+ if not hints and hasattr(language_module, 'check_syntax'):
+ hints = language_module.check_syntax(program, aux_code=aux_code)
# experiment: Prolog hints
#if not hints and hasattr(problem_module, 'hint'):
@@ -158,6 +158,10 @@ class PrologSession(server.LanguageSession):
program, _edits[problem_id], tester, timeout=3)
if solution and steps:
hints = [{'id': 'monkey_main'}] + monkey.fix_hints(program, steps)
+
+ if not hints and hasattr(language_module, 'hint'):
+ hints = language_module.hint(program, aux_code=aux_code)
+
if hints:
msgs.extend(hints)