Basic logic of student view in view.php