From 55e70f4a90ad32bbde58c4f3ad1dc0862739b75e Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 31 Aug 2015 18:36:46 +0200 Subject: s/Problem.identifier()/Problem.get_identifier() --- server/prolog_session.py | 6 +++--- server/python_session.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server') diff --git a/server/prolog_session.py b/server/prolog_session.py index 798c086..f328670 100644 --- a/server/prolog_session.py +++ b/server/prolog_session.py @@ -89,7 +89,7 @@ class PrologSession(object): self._engine_id = None def hint(self, user_id, problem_id, program): - language, problem_group, problem = Problem.identifier(problem_id) + language, problem_group, problem = Problem.get_identifier(problem_id) # If compilation fails just return compiler messages. engine_id, output = prolog.engine.create(code=program) @@ -110,7 +110,7 @@ class PrologSession(object): return [{'id': 'no_hint'}] def test(self, user_id, problem_id, program): - language, problem_group, problem = Problem.identifier(problem_id) + language, problem_group, problem = Problem.get_identifier(problem_id) problem_module = problems.load_problem(language, problem_group, problem, 'common') solved_problems = [p for p in CodeqUser.solved_problems(user_id, language) @@ -128,7 +128,7 @@ class PrologSession(object): """A "shorthand" method to start a Prolog session, load correct solutions of all user's solved problems and the given program, and ask a query. """ - language, problem_group, problem = Problem.identifier(problem_id) + language, problem_group, problem = Problem.get_identifier(problem_id) problem_module = problems.load_problem(language, problem_group, problem, 'common') solved_problems = [p for p in CodeqUser.solved_problems(user_id, language) diff --git a/server/python_session.py b/server/python_session.py index 24a06f1..641c8ee 100644 --- a/server/python_session.py +++ b/server/python_session.py @@ -46,7 +46,7 @@ class PythonSession(object): self._interpreter = None def hint(self, user_id, problem_id, program): - language, problem_group, problem = Problem.identifier(problem_id) + language, problem_group, problem = Problem.get_identifier(problem_id) # Try problem-specific hints. problem_module = problems.load_problem(language, problem_group, problem, 'common') @@ -59,7 +59,7 @@ class PythonSession(object): return [{'id': 'no_hint'}] def test(self, user_id, problem_id, program): - language, problem_group, problem = Problem.identifier(problem_id) + language, problem_group, problem = Problem.get_identifier(problem_id) problem_module = problems.load_problem(language, problem_group, problem, 'common') try: n_correct, n_all = problem_module.test(program) -- cgit v1.2.1