From f951642d04015065ae585788f4a08624b0c04de8 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 18 Sep 2015 16:15:00 +0200 Subject: Send the plan definition in get_problem_data --- server/user_session.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- cgit v1.2.1