summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-08-31 18:36:46 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-08-31 18:36:46 +0200
commit55e70f4a90ad32bbde58c4f3ad1dc0862739b75e (patch)
treeb55a4f163d24e2c1c289cd265cec357e32868ab7 /server
parentc499c2108fd86a4ed696d4e02143f3b725bc8a22 (diff)
s/Problem.identifier()/Problem.get_identifier()
Diffstat (limited to 'server')
-rw-r--r--server/prolog_session.py6
-rw-r--r--server/python_session.py4
2 files changed, 5 insertions, 5 deletions
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)