Fix bug in setting flags from cohort page

When setting flags from the cohort show page, the flag was always being set for the first student listed on the page.