Fix dashboards to handle a database with multiple exams present
Currently we select
all problems/submission, when we should select on exam number.
We should maintain lists of submission/problem IDs. We keep the indices into these lists as our global variables (submission_id, problem_id) and then when getting a new solution, should do a lookup in these lists to get the database IDs. This way we can due true modular arithmetic on the global variables and make no assumptions about contiguous entries int he database.