fix bug in student window, add function to student confroller