Modified script to accommodate for both student and professor users.:
Added new exception 'nopermission'