updated onBeforeAction teacher route