## Have alternative questions for some students? (Subject A / Subject B)

Is there any way to ask AMC to produce different questions (not just in a different orders) for different students? Ideally, based on the parity (odd or even) of the subject number? I am not familiar with lualatex, but maybe there is a way to do it with this?

To explain it better, here is what I am used to doing: When writing a latex test subject outside of AMC I use a macro so that some of the text has two different versions: version A and version B, depending on a latex command line parameter. For example:

What is the capital of \vavb{France}{Germany}?

I then compile twice with two different values of the parameter, and get two test subjects that I combine in one pdf. I then print this n/2 times for n students, and distribute them one by one, so that a student's neighbors will always have a different version of that question, making cheating harder.

### Replies (7)

#### RE: Have alternative questions for some students? (Subject A / Subject B) - Added by Rafael Rodriguezover 2 years ago

Maybe you could try using groups:
For instance I use the group "all" with 1 question from group tema01c, 1 from tema01b, etc. for a total of 12 questions.

cleargroup{all}
\shufflegroup{tema01c}\copygroup[1]{tema01c}{all}
\shufflegroup{tema01b}\copygroup[1]{tema01b}{all}
\shufflegroup{tema01}\copygroup[5]{tema01}{all}
\shufflegroup{tema01a}\copygroup[1]{tema01a}{all}
\shufflegroup{tema02a}\copygroup[1]{tema02a}{all}
\shufflegroup{tema02b}\copygroup[1]{tema02b}{all}
\shufflegroup{tema02}\copygroup[2]{tema02}{all}
\insertgroup{all}


Best regards,
Rafael

#### RE: Have alternative questions for some students? (Subject A / Subject B) - Added by Rafael Rodriguezover 2 years ago

The numbers after copygroup should be inside square brackets.

#### RE: Have alternative questions for some students? (Subject A / Subject B) - Added by Frédéric Bréalover 2 years ago

A command is already defined \exemplairepair

\element{Capitale}{
\exemplairepair

\begin{question}{Paris}
What is the capital of France ?

\begin{reponses}
\bonne{Paris}
\mauvaise{Marseille}
\end{reponses}
\end{question}

\else

\begin{question}{Berlin}
What is the capital of Germany ?

\begin{reponses}
\bonne{Berlin}
\mauvaise{Bonn}
\end{reponses}
\end{question}

\fi
}


#### RE: Have alternative questions for some students? (Subject A / Subject B) - Added by Alex Alexover 2 years ago

Amazing, thank you!

It's so nice to see that someone had the exact same goal as me and already created \exemplairepair. It's perfect.

I also need to toy a bit more with groups, seems like a powerful way to set up things. Combining \exemplairepair and \copygroup is probably the best way to keep things organized.

It also made me realize that the pdf documentation (https://download.auto-multiple-choice.net/automultiplechoice.pdf) is the comprehensive one. The html doc that is accessible through the gui doesn't seem to mention this command.

#### RE: Have alternative questions for some students? (Subject A / Subject B) - Added by Alex Alexover 2 years ago

Btw I know it is nitpicking, but given the name I would have expected it to work as "\exemplairepair Even \else Odd \fi", and it's actually "\exemplairepair Odd \else Even \fi". I've also learned today that latex has an \ifodd does not an \ifeven command.

#### RE: Have alternative questions for some students? (Subject A / Subject B) - Added by Alex Alexover 2 years ago

(Can't find how to delete a post; please ignore.)

#### RE: Have alternative questions for some students? (Subject A / Subject B) - Added by Alex Alexover 2 years ago

To clarify I was wrong, exemplairepair does correctly select even, and not odd subjects.

(1-7/7)