If the plastic bit that activates the magnetic switch is broken, gluing
it may be good enough. But if you want to make sure it won't break again, it's a good idea to reinforce it.
I used an adhesive designed for harder plastics to glue the pieces together, then sanded a little piece of wood to wedge into the gap in order to reinforce the little plastic bit.
Test and reassemble your guitar, and the kids can rock again.