summaryrefslogtreecommitdiff
path: root/server/user_session.py
diff options
context:
space:
mode:
authorMartin <martin@leo.fri1.uni-lj.si>2015-09-21 10:13:22 +0200
committerMartin <martin@leo.fri1.uni-lj.si>2015-09-21 10:13:22 +0200
commit63dff6d770ecb98d7f8f9337449b3450d3abb0de (patch)
tree3365ea612bb1c4dc4003120ab9d48141add483b4 /server/user_session.py
parentf352ad0ea7e6e85ab42e56822779a4bf06400f04 (diff)
parentdce8ec719b1d85acf3c753effae3f28629dd847c (diff)
Merge branch 'master' of ssh://212.235.189.51:22122/codeq-server
Diffstat (limited to 'server/user_session.py')
-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()