Take into account the case where the student is not registered to the course anymore