Here is the source

   samplequiz.tex

and the companion macros
   macrosquiz.tex