Corrected logic for student view in ECA view.php