Update message function for teacher