update security for question page

- takes into accoutn prof releasing settings and checks whether all
students have written the exam or not
- fixed check in results page for whether all students have written the
exam