Added in regrading functionality

Also added automatic grading after training completes

Many code review edits
Merge pull request #370 from edx/gradyward/ai-rescheduling

Gradyward/ai rescheduling