edurange/edurange — pull request #11 by kahea (2014-08-03 23:18:44+00:00)
Title: User Management

I've added user management. There are three types of users "student", "instructor", "admin". Each has their own respective home pages where they can do various things according to their role explained below.

- student: see which scenarios are running and view login information for those scenarios
- instructor: add students to groups and launch scenarios
- admin: add instructors

The new scenario page has been updated to be able to attach student groups to scenarios at launch which will create Player entries for them. Right now it creates a random password but in the future we can have students upload public keys for use. Parititioning of student groups is not available yet, that will come soon.

Made some smal changes to the schema:
- Scenario now has user_id which is the id of the instructor that created it
- Player now has user_id which was needed for students to view which scenarios are running for them
- Group now has scenario_id, which i think was mostly just a needed shortcut for getting all the groups in a scenario.

Also scenario destroy was not complete, fixed that using the manual method not the "dependent: :destroy" way. I still need to update this properly but for now I needed a quick fix.