From bba9b22af18da1ec25b71c05399636ef9f325399 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 26 Aug 2015 13:45:10 +0200 Subject: 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. --- server/problems.py | 12 +++--------- 1 file 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() -- cgit v1.2.1