epicodus/epicenter — pull request #68 by dustinbrownman (2014-11-14 06:33:48+00:00)
Title: add belongs_to association on assessments to cohorts

We realized that like attendance records, assessments needed to be
scoped within certain cohorts. We could end up with multiple cohorts
that each have completely different assessments. This allows us to
show students just the assesments that are pertinent to them. This
also sets permissions that do not allow students to view assessments
of other cohorts.

The current_cohort switching for admins now also applies to assessments.
When an admin goes to view assessments, it will be for their current
cohort. They can easily switch using the cohort dropdown in the navbar.
Also, when assessments are created or updated, they will belong to
whatever the admin's current cohort is.