store the attendance of a class in database and use hashmap in coursedatasource