Fixing teacher and student view logic