# Change questions after x copies with the same question (Support #841)

Status: Start date: New 07/15/2022 Normal - 0% - -

Description

I have a question to which I didn't find a solution in the docs to.
I want to have a certain number of copies with the same question (their order can be shuffled), let's say four.
After these, I want to change the questions, like it is really nice to do with AMC. Again, for a certain number of copies with the same questions.
This is really nice when having multiple small exam groups, where every group should get another exam, but the exam for every group should stay the same.
My solution right now would be, to just create a certain number of distinct exams, and then manually photocopy them (to let's say four.
But maybe you already implemented a solution to this, but I couldn't find it myself...

### History #### #1 Updated by Frédéric Bréal9 months ago

I do not understand your request.
Do you want something like that :
copies 1 to 4 : questions A & B
copies 5 to 9 : questions C & D
etc
or
copy 1 : questions A, B , C, D
copy 2 : questions E, F, G, H
etc
? #### #2 Updated by Frédéric Bréal9 months ago

Sorry i didn't read the title. My first and not tested idea : trying to use a modulo function with the sheet number. #### #3 Updated by Frédéric Bréal9 months ago

a suggestion #### #4 Updated by Josef Eiglsperger9 months ago

Thanks for your answer, but after playing around I figured out, the simplest way is to just make x different exams and then photocopy it :) #### #5 Updated by Josef Eiglsperger9 months ago

But I'll definitely will try out your suggestion as well! #### #6 Updated by Josef Eiglsperger9 months ago

Nice solution to this problem, I tried it out and it works fine!
But how would you implement it when having multiple groups of questions? So in your example grouß#1, group#2, group#3, etc.?
That would also really nice, but I have no clue, trying to figure that out for a while... #### #7 Updated by Frédéric Bréal9 months ago

two files with a different modulo. #### #8 Updated by Josef Eiglsperger9 months ago

Sorry, I think I stated my question not clear enough.
In your solution, you can sample from two groups, but all groups contain all questions when I understood it correctly.
I thought of having multiple groups of questions like history, physics, biology, etc. And then sample e.g. one question from each group, so one question from biology, one from physics, one from history.
So not just having group#1 like in your script, but like group#1, group#2, group#3, etc. #### #9 Updated by Frédéric Bréal9 months ago

I used a command from an Alexis Bienvenüe's file (\def\fillgroup#1) to create fasterly many groups.
Two files with the common method. #### #10 Updated by Josef Eiglsperger8 months ago

Ah ok, now I fully understand these commands.. thank you!
Works well and is really easy to do so, nice! #### #11 Updated by Josef Eiglsperger8 months ago

One last question maybe to this topic:
By setting the option

noshuffle


the order of the answers stays the same. But the order of the questions itself still changes from sheet to sheet or student to student, respectively. How can I keep the order of the questions for every student, who gets the same test, the same? #### #12 Updated by Frédéric Bréal8 months ago

2 ways

Before onecopy and after \begin{document} : \setdefaultgroupmode{fixed} or option package noshufflegroups. #### #13 Updated by Josef Eiglsperger8 months ago

As far as I can tell, the package noshufflegroups is in conflict with \shufflegroup{group} commands I set, but the \setdefaultgroupmode{fixed} works quite well, thanks!
I recognized that if I change sampling of the questions for every group like you suggested:

\cleargroup{all}
\copygroupfrom{easy1}{all}{\thecalculate}
\copygroupfrom{easy2}{all}{\thecalculate}
\copygroupfrom{easycalculations}{all}{\thecalculate}
\copygroupfrom{semiothers}{all}{\thecalculate}
\copygroupfrom{semiregression}{all}{\thecalculate}
\copygroupfrom{semiclassification}{all}{\thecalculate}
\copygroupfrom{semipreprocessing}{all}{\thecalculate}
\copygroupfrom{semievaluation}{all}{\thecalculate}
\copygroupfrom{hard1}{all}{\thecalculate}
\copygroupfrom{hard2}{all}{\thecalculate}
\insertgroup{all}

\ifthenelse{\intcalcMod{\AMCStudentNumber}{4} = 0}


The questions from one group of questions will stay the same for every group of students, when the students group number exceeds the number of questions in a group. For example, when I sample questions for student group number 5, but questions group semiregression only has 4 questions, student group 5 will get the same questions from question group semiregression like student group 4. That why I reshuffled the questions after this happens:
\ifthenelse{\thecalculate > 2 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{semiregression}}{\relax}
\ifthenelse{\thecalculate > 3 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{semiclassification}}{\relax}
\ifthenelse{\thecalculate > 4 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{easycalculations}}{\relax}
\ifthenelse{\thecalculate > 4 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{semipreprocessing}}{\relax}
\ifthenelse{\thecalculate > 7 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{hard1}}{\relax}
\ifthenelse{\thecalculate > 7 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{hard2}}{\relax}
\ifthenelse{\thecalculate > 8 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{easy1}}{\relax}
\ifthenelse{\thecalculate > 9 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{easy2}}{\relax}
\ifthenelse{\thecalculate > 9 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{semievaluation}}{\relax}
\ifthenelse{\thecalculate > 9 \AND \intcalcMod{\AMCStudentNumber}{4} = 0}{\shufflegroup{semiothers}}{\relax}


And it seems like this doesn't work anymore, when is use the package option noshufflegroups #### #14 Updated by Frédéric Bréal8 months ago

This my fault, i forgot to delete this paragraph :

Once a group is formed, it is possible to shuffle questions inside this group using the <command>\shufflegroup</command> command. For instance<programlisting>\shufflegroup{mygroup}</programlisting>


\shufflegroup is deprecated.
Choose one mode (fixed, cyclic, withreplacement, withoutreplacement) rather \shufflegroup. #### #15 Updated by Josef Eiglsperger8 months ago

But when choosing one mode, the question get shuffled within one group of students or stay the same after reaching the last question of a group of questionss (which means that agter that, every group of students will get the same questions from this group of questions).
To prevent this, I added the code above. So that after reaching the last question of a group of questions and after a new group of students starts, the group of questions will be shuffled again. #### #16 Updated by Frédéric Bréal8 months ago

Could you please post your file on the forum ou mail me (if confidential), if you don’t mind ?
I would like to try an idea. #### #17 Updated by Josef Eiglsperger8 months ago

I tried to make it not confidential, but still kept the answers, for example. That's why I'll send it to you via Mail and please you to treat it as confidential :)

Also available in: Atom PDF