WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
392 stars 630 forks source link

User role inconsistency #9

Closed ragesoss closed 9 years ago

ragesoss commented 9 years ago

If a user is signed up as both instructor and student, they may show up on the Dashboard as either instructor or student. The instructor role takes precedence, so any user who is an instructor for a course should not be listed as a student for that course.

Currently, user ProfTAH shows up as a student in production, and as the instructor on staging: http://dashboard.wikiedu.org/courses/College_of_DuPage/ENGLI1102-057S_(Spring_2015)

http://dashboard-testing.wikiedu.org/courses/College_of_DuPage/ENGLI1102-057S_(Spring_2015)

ragesoss commented 9 years ago

See also: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/app/models/user.rb#L74

ntdb commented 9 years ago

@ragesoss I agree with your note. When I built the role functionality it didn't occur to me that users might have different roles in different courses. On this next.

ntdb commented 9 years ago

Pushed a fix for this in 7defcd7321e6ea879cf05a58185075e17e59160f. Let's make sure to test it pretty well on staging before pushing to production. I'm particularly interested in making sure that the migration and updates work as expected.

ragesoss commented 9 years ago

@ntdb Confirmed that the issue itself is fixed, but I batches on staging seem to be taking several times longer after this update.