Before you leave the house, ask her if she wants to pee or not. Then outside keep asking her if she wants to pee every 5 mins. Can be annoying but that's what I did. Then inform her to tell teacher if she wants to pee or poo.
My son peed in school twice. after that he used to inform teacher.
Kate