diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-03-12 10:05:55 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-03-12 10:05:55 +0100 |
commit | 47b94aeba09083cb94d996c6758fa0d5ab64ecf3 (patch) | |
tree | 85c4dc9bd8a8ac27c8522c56d99057264c0142b4 /server/prolog_session.py | |
parent | 312b57ac25e083c890c9dd01a25e9313d3068f0b (diff) |
prolog_session: check for generic hints after specific
Diffstat (limited to 'server/prolog_session.py')
-rw-r--r-- | server/prolog_session.py | 8 |
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) |