Optimized StudentEventsController.

Gained ~50% speed according to the included benchmark.
Also removed unnecessary access checks, which might yield
significant gains when locked exercises are involved.