error handled version of the Undergraduate.php