summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-09-18 16:15:00 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-09-18 16:15:00 +0200
commitf951642d04015065ae585788f4a08624b0c04de8 (patch)
treeb4d5d5dc9f284d7cc059fa1790033c6492c3c1d8
parentfe545bd1c782f5228323d360181d7aeccfce0324 (diff)
Send the plan definition in get_problem_data
-rw-r--r--server/user_session.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/user_session.py b/server/user_session.py
index 0d8535c..00ea039 100644
--- a/server/user_session.py
+++ b/server/user_session.py
@@ -73,6 +73,7 @@ class UserSession(object):
# Get generic and problem-specific hints.
hint = dict(mod_language.hint)
hint.update(mod.hint)
+ plan = mod.plan if hasattr(mod, 'plan') else []
conn = db.get_connection()
try:
@@ -84,7 +85,7 @@ class UserSession(object):
result = {
'language': {'id': row[0], 'identifier': language, 'name': row[1]},
'problem_group': {'id': row[2], 'identifier': problem_group, 'name': row[3]},
- 'problem': {'id': problem_id, 'identifier': problem, 'name': row[5], 'slug': mod.slug, 'description': mod.description, 'hint': hint}
+ 'problem': {'id': problem_id, 'identifier': problem, 'name': row[5], 'slug': mod.slug, 'description': mod.description, 'hint': hint, 'plan': plan}
}
cur.execute("select content from solution where problem_id = %s and codeq_user_id = %s", (problem_id, self.uid))
row = cur.fetchone()