diff options
-rw-r--r-- | server/user_session.py | 3 |
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() |