beyond-z/beyondz-platform — pull request #39 by adamdruppe (2014-05-02 01:20:56+00:00)
Title: Coaching and admin 1.0

I'm still not fully happy with this, but I've been working on it for a while and it works, so time to share what I have to prepare for the show and tell.

Going to /coaches/ asks you to log in with a coaching account. To create one, there's methods in an admin namespace to create new users and see the coach/student relationships. This interface is very minimal, but allows you to do the basic info with a form (including separation of name into first_name and last_name).

The coaching dashboard tells you what needs attention: tasks that are pending approval, and it includes a (hacky) student's view to see their status. I'm not sure if that's necessary or even really desirable since the student may not want the coach to see anything until it is pending approval anyway.

Each task pending approval has a download link, if file attached, and three buttons: a simple commenting function, an approve button, and a request revisions button.

The assignments view also includes this info. Brian Grayless did the state machine (I pulled his code here too) and reflected that in the main view itself. I added a list of recent coaches comments at the top, giving a quick look at what tasks need revisions and what the coach had to say. (This is the part I'm not happiest about from a UI perspective, but the list concept itself I like, I just don't like the specifics.)

This is a bit of a monster of a pull request, I've been working on this all week and didn't break it up well, but there's nothing overly radical in here, mostly straight forward additions of functions and wiring into the state machine.