The liklihood was that either the school owned copies of the play already, so it wouldn't have been bought it the first place if it wasn't appropriate, or the copies were rented from a supplier, and again the assumption would be that they play was appropriate for children if it was in the list. The synopsis would have said something like "a play with songs about a school with a very special caretaker, suitable for ages xxx to xxx characters..adults and how many needed, children's speaking parts and how many needed, non speaking parts and chorus and how many needed and degree of difficulty.
If the caretaker had been called "Rob the Builder" (can he fix it? yes he can!) then the story wouldn't have been news.