This past year our district agreed to allow our boys to take their AOPS classes in the evening (one evening a week at home). During the school day, during what would be math class, the boys go to the school library or computer room and do their AOPS homework. Because some of the AOPS work takes awhile, the 40 minutes isn't always ideal, but overall it's been a workable solution.