diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-08-26 13:45:10 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@araneo.org> | 2015-08-26 13:45:10 +0200 |
commit | bba9b22af18da1ec25b71c05399636ef9f325399 (patch) | |
tree | 0cb85e69b71894f66d2c182b551c9e0dfe57d52f /server | |
parent | 079dd21edc4490bc6bb3f6c6c752a12b2581a9e1 (diff) |
Do not include facts when loading Prolog solutions
Fact library is not a part of the solution, and is loaded separately
when running queries or tests for a particular problem.
Diffstat (limited to 'server')
-rw-r--r-- | server/problems.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/server/problems.py b/server/problems.py index bce72fe..f54237d 100644 --- a/server/problems.py +++ b/server/problems.py @@ -68,19 +68,13 @@ def solutions_for_problems(language, tuples): if not tuples: return '' modules = load_problems(language, tuples, 'common') - solutions = set() - facts = set() + solutions = [] for module in modules: try: - solution = module.solution + solutions.append(module.solution) except AttributeError as me: pass - else: - solutions.add(solution) - f = get_facts(language, module) - if f: - facts.add(f) - return '\n'.join(facts) + '\n' + '\n'.join(solutions) + return '\n'.join(solutions) def list_problems_in_groups(language): conn = get_connection() |