diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/user_session.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/user_session.py b/server/user_session.py index 9d8a675..41c77ac 100644 --- a/server/user_session.py +++ b/server/user_session.py @@ -266,9 +266,9 @@ class UserSession(object): cur.execute("""select * from( (SELECT distinct - l.name as language, + l.identifier as language, pg.id as problem_group_id, - pg.name as problem_group, + pg.identifier as problem_group, count(distinct p.id) as all, count(CASE s.done WHEN true THEN true END) as done, count(CASE s.done WHEN false THEN true END) as in_progress @@ -276,11 +276,11 @@ class UserSession(object): INNER JOIN language l ON p.language_id = l.id INNER JOIN problem_group pg ON p.problem_group_id = pg.id LEFT JOIN solution s ON s.problem_id = p.id AND s.codeq_user_id = %s - GROUP BY l.name, pg.id, pg.name) + GROUP BY l.identifier, pg.id, pg.identifier) UNION ALL (SELECT distinct - l.name as language, + l.identifier as language, 0 as problem_group_id, null as problem_group, count(distinct p.id) as all, @@ -289,7 +289,7 @@ class UserSession(object): FROM problem p INNER JOIN language l ON p.language_id = l.id LEFT JOIN solution s ON s.problem_id = p.id AND s.codeq_user_id = %s - GROUP BY l.name) + GROUP BY l.identifier) ) as u ORDER BY u.language, problem_group_id""", (uid, uid,)) #return cur.fetchall() |