Fixing error when clicking the view as student button see BT#6369