0

I am a math teacher and I have a .tex template for my quizzes that looks something like this:

    \begin{document}
    \begin{flushleft}
      Name: \underline{\hspace{2in}} \hfill /XX % where XX is the total possible points
    \end{flushleft}
    %\includeQuestionFrom{"../Questions/bankA.tex"} %Randomly chooses question from file "bankA.tex".
    %\includeQuestionFrom{"../Questions/bankB.tex"} %Randomly chooses question from file "bankB.tex".
     \includeQuestionFrom{"../Questions/bankC.tex"} %Randomly chooses question from file "bankC.tex".
    %\includeQuestionFrom{"../Questions/bankD.tex"} %Randomly chooses question from file "bankD.tex".
     \includeQuestionFrom{"../Questions/bankE.tex"} %Randomly chooses question from file "bankE.tex".
    .
    .
    .
    %\includeQuestionFrom{"../Questions/bankZ.tex"} %Randomly chooses question from file "bankZ.tex".
    \end{document}

In this case the generated quiz would have one question from bankC and one question from bankE. So far this system has been working great, however, I find myself fussing about with commenting and uncommenting lines more than I would care to admit, as such, I am trying to write myself a program or script to essentially do the commenting/uncommenting bit for me. I imagine the interface to be simple, similar to

Sample Quiz Generator. Created in HTML

The only problem is that I have absolutely no idea where to start on the backend.

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Gabe
  • 1
  • 1
    I hope that you use Linux, because then you can use AMC (wtih the automultiplechoice LaTeX package) that allow you to select randomly questions (for all of every student), but also in random order and with answers in random order too, and even you can raise just the same problem to all student but with different values each time. Score manually this type of test of course is a nightmare, but AMC is also a Linux program (unfortunately, only for this OS) that score automatically every exam from scanned images. – Fran Jun 01 '22 at 09:50
  • Your frontend example looks like an html page, is that correct? Given that you need to write to the filesystem and run LaTeX you need a backend that actually has permissions to do this. Apache+php would be an option, or if you know Python then Flask is suitable for this use case. But indeed as Fran commented there are various packages (AMC but also xsim for example) that allow you to create (versions of) exercise sheets and exams easily. – Marijn Jun 01 '22 at 19:54

0 Answers0