Refactor code, add basic test case
Add test case for masquerade mode
Merge branch 'master' into Issue1841
[1841] Clean up InstructorCourseDetailsPageAction

fixes #1841
one more boundary condition edit that was missed from last time
Merge branch 'master' of https://github.com/TEAMMATES/repo into Issue1847