If the shop paid full retail for the books for everyone in the class and shipping too, then I could see them charging for the total that they spent. However if they are making a profit on the books, I don't think they should charge for shipping. In any case, I think the full price of the class should have been made available at the time you signed up, and you should have been given the opportunity to buy the book elsewhere. Most quilt books are available at a discount somewhere on the internet, and shipping is often free with a minimum purchase.
My LQS allows us to bring any fabric we want to class. Other shops in the general area give discounts if you buy the fabric from them, but they don't insist on it. If a pattern or book is being used in the class, we are expected to own that book or pattern, although we don't necessarily have to have bought it from that shop.