fix query, select only clases by courses