function for classes shown in teacher dashbord