respect test start and end dates

A user cannot solve exercises if the test hasn't started yet or was
already closed.