AMCnumericChoices - wrong grading and annotation with random in variable

Added by Christophe Mestdag 5 months ago

Hello,

I'm currently facing an issue with the automatic grading by AMCnumericChoices.
In the "Individual solution", the correct answer is provided according to what it should be, however in the grading (marking + annotation) of a student (empty file for test), a wrong answer is marked as "correct", hence in the real case situation, a lot of students got a 0 score, while they filled in the correct answer.
I also wonder why the "Individual solution" has different questions then then the sheet_0001 that is created at the same moment (maybe the random is rerun?).

Hereunder my latex code for 5 questions, in essence the result is always the variable \VQa multiplied with 100.
I tried multiple variations with round / trunc / integer / float, but all FPeval with the random are wrongly marked and annotated.

\element{reeksE}{
  \begin{questionmultx}{reeksE.Q1}
  \FPeval\VQa{round(5.1+(random*5):0)}
\FPeval\VQs{VQa*100}

\iflanguage{dutch}
      {}
    {round(5.1+(random*5):0) with VQa als \VQa  \space with solution *100}

\AMCnumericChoices{\VQs}{digits=4,decimals=0,sign=false, borderwidth=0pt,backgroundcol=lightgray,approx=5}
\end{questionmultx}
}

%
\element{reeksE}{
  \begin{questionmultx}{reeksE.Q2}
  \FPeval\VQa{trunc(5.1+(random*5):0)}
\FPeval\VQs{VQa*100}

\iflanguage{dutch}
      {}
    {trunc(5.1+(random*5):0) with VQa als \VQa \space met oplossing *100}

\AMCnumericChoices{\VQs}{digits=4,decimals=0,sign=false, borderwidth=0pt,backgroundcol=lightgray,approx=5}
\end{questionmultx}
}

%
\element{reeksE}{
  \begin{questionmultx}{reeksE.Q3}
  \FPeval\VQa{trunc(5.0+(random*5):0)}
\FPeval\VQs{VQa*100}

\iflanguage{dutch}
      {}
    {trunc(5.0+(random*5):0 with VQa als \VQa  \space met oplossing *100}

\AMCnumericChoices{\VQs}{digits=4,decimals=0,sign=false, borderwidth=0pt,backgroundcol=lightgray,approx=5}
\end{questionmultx}
}

%
\element{reeksE}{
  \begin{questionmultx}{reeksE.Q4}
  \FPeval\VQa{round(5+(random*5):0)}
\FPeval\VQs{VQa*100}

\iflanguage{dutch}
      {}
    {round(5+(random*5):0) with VQa als \VQa  \space met oplossing *100}

\AMCnumericChoices{\VQs}{digits=4,decimals=0,sign=false, borderwidth=0pt,backgroundcol=lightgray,approx=5}
\end{questionmultx}
}

%
\element{reeksE}{
  \begin{questionmultx}{reeksE.Q5}
  \FPeval\VQa{round(5:0)}
\FPeval\VQs{VQa*100}

\iflanguage{dutch}
      {}
    {round(5:0) met VQa with \VQa \space met oplossing *100}

\AMCnumericChoices{\VQs}{digits=4,decimals=0,sign=false,borderwidth=0pt,backgroundcol=lightgray,approx=5}
\end{questionmultx}
}

This gives the following in the "Individual scoring", where the answer is always correct:

While the marked and annotated file the following gives, with the answers wrong to the 4 questions with random used:

Do I do something wrong in my latex code, or is there a bug somewhere else ?
Thanks in advance for the support !

BR,
Christophe


Replies (5)

RE: AMCnumericChoices - wrong grading and annotation with random in variable - Added by Frédéric Bréal 5 months ago

I apologize for my poor mastery of English, this is a deeple / google / wordreference traduction

maybe the random is rerun?

Use a seed after \begin{document}, default is 0.

\FPseed=1234

Do students use PDF software to fill in the boxes?

If yes, use pdfform option or first convert pdf file to png or jpg image before the automatic input.

pdfimage file.pdf images
mogrify -format jpg *.ppm or *pbm
rm *.ppm or *.pbm

RE: AMCnumericChoices - wrong grading and annotation with random in variable - Added by Christophe Mestdag 5 months ago

si tu préfères, je pourrais aussi continuer en Français :-).
(sauf si cette partie du forum devrait rester en Anglais?)

Do students use PDF software to fill in the boxes?

Les pages sont imprimer, et les étudiants les remplissent sur papier, donc les scores sont marked en bases des scans.

Use a seed after \begin{document}, default is 0.

J'essaierai aujourd'hui si avec le \FPseed=1234, les résultats indiqués par AMC par correction automatique sont alignés avec les formules (variable * 100).

Info en plus: avec X / Y par random, avec une questionnaire multichoice, la réponse correcte est indiquée sur les 4 options, donc ça me semble d'être lier avec l'encodage de la réponse ?

Bonne journée !

RE: AMCnumericChoices - wrong grading and annotation with random in variable - Added by Frédéric Bréal 5 months ago

si tu préfères, je pourrais aussi continuer en Français :-).

Je veux bien parce que l'allemand, j'ai tout oublié.
Avec l'option ignoreblank=true, ça fonctionne ?

\AMCnumericChoices{\VQs}{digits=4,decimals=0,sign=false, borderwidth=0pt,backgroundcol=lightgray,approx=5,ignoreblank=true}

RE: AMCnumericChoices - wrong grading and annotation with random in variable - Added by Christophe Mestdag 5 months ago

Merci pour tes réponses!

J'ai fait des tests supplémentaires, d'abord, en ajoutant:

\FPseed=1234

Mais comme ça ne marchait pas ... j'ai trouvé que FPseed était déclaré une deuxième fois:

\FPseed=\the\time

Après supprimer \the\time, ça ne marchait pas encore ...
Continuer de chercher sur FPseed dans mon fichier tex, j'ai trouvé ceci:

\expandafter\FPseed\expandafter=\pdfuniformdeviate 1000000\relax

En supprimant le dernier, ça fonctionne \o/ !
Apparemment, le FPseed était redéfini plusieurs fois.
Maintenant les valeurs VQa + VQs sont les mêmes dans les scans_0001.pdf, individual_solutions.pdf, et les fichiers "corrected & annotated"

Grand merci pour le support :-)

(1-5/5)