Wow, that's pretty cool. I've trained chickens, parrots, and even my bearded dragon but I am yet to train my quails. I'm hoping to start soon.Birds are actually pretty smart creatures. Quail are often thought of as pretty dumb and I can a test to having owned some very ditzy quail.
There was a big study done at a university in Texas on training Coturnix quail to pick out colors, shapes and count, somewhere there is a video of all this and they indeed learned how to do all of these things. Pretty amazing stuff!
I had trained my quail with a dog clicker to go inside their enclosure at night or during times of emergency, aviary clean up, etc... all 35 of them would file in and not a one was left outside. Several of them learned their names and came when called and some learned to get on my lap by patting my leg.
I used to keep Lovebirds, a type of very small parrot and while parrots are known to be smart, the tinier they are, the dumber they can be! This little bird named Skeebie was a pooper. I mean every 10 mins this bird was pooping! She loved to hang out with me while I sat around on the couch and it got really tiring to just sit down with her and there she goes! So I began to train her to poop on command. I held her on my finger and bounced her up and down while saying the word Poop. Of course if she had just gone, this might take a while to wait out. The moment I saw she was going to poop, I said the word Poop. After many months of this, eventually she DID learn to poop on command! Sometimes she just couldn't go, but I am telling you, she pooped on command.
So, all this being said, if you worked with your quail, I am sure you could train a quail to use a place in your home or area of their enclosure to do their business.