Fixed Class show page bug

This PR fixes a bug where non-Students get an exception due to a coding error.