More query cleanup for scheduler

Also, make sure the user is registered for a course that has chapters in the chapter table before initiating a group
Merge branch 'master' of github.com:bnmnetp/runestone