Implemented proper lesson grouping for progress dialog