Made getAttendanceData a static function to be used without object instantiation.