Online public schools produce profits but some are failing students