Forums » Using AMC (english) »
Error on AMCOpen scoring on latest code
Added by Adin Ramirez over 6 years ago
I'm have a script that generates a set of options for open questions (so I can grade them).
Basically, I loop over a set of numbers and create the options. This worked before (I'm just testing the new version) and it seems to be broken.
My default setup is something like:
% macro to automatically create open choices \pgfkeys{ lines/.store in=\@oc@lines, lines/.default=6, max/.store in=\@oc@max, max/.default=4, step/.store in=\@oc@step, step/.default=0.5 } \newcommand{\AMCOpenChoices}[1][]{ \pgfkeys{ % /pgf/number format/fixed, /pgf/number format/precision=1, lines, max, step, #1} \AMCOpen{lines=\@oc@lines,dots=false}{ % \pgfmathparse{\@oc@max-\@oc@step}% \foreach \i in {0, \@oc@step, ...,\pgfmathresult}{ % \pgfmathprintnumberto{\i}{\tmp}% \wrongchoice{\tmp}\scoring{\tmp}% }% \pgfmathprintnumberto{\@oc@max}{\tmp}% \correctchoice{\tmp}\scoring{\tmp}% }% }
As you can see I'm creating a correctchoice and several wrongchoices.
However, with this setup the markings produced 0 for that questions.
When I change the scoring to look something like
\scoring{b=\tmp,v=0,e=0,m=0} \scoring{b=\tmp}
It produces a 1 in the answers (I guess it is picking the default score), regardless of the other values. However, the \tmp macro holds the correct value since the values in the test are printed correctly.
Did the scoring function change? What am I missing?
Replies (6)
RE: Error on AMCOpen scoring on latest code - Added by Alexis Bienvenüe over 6 years ago
This worked before (I'm just testing the new version)
With which AMC version is it working, and with which is it broken?
RE: Error on AMCOpen scoring on latest code - Added by Alexis Bienvenüe over 6 years ago
And can you provide a minimal complete source file?
RE: Error on AMCOpen scoring on latest code - Added by Adin Ramirez over 6 years ago
I'm attaching a MWE so you can see the problems.
To be honest, I don't remember the version that worked before. I use the same script last year at the beginning of the year and it was working.
Now, I'm using the open questions again and it is giving some errors.
Please check the attached example.
Note that the scores of pref questions do not match with the expected scoring. That is, pref should be max 3, and pref-manual should be 3. In my case it shows 7 and 4 respectively.
My AMC version is 1.3.0+hg2018-03-07. And pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017)
Let me know if knowing the version of other packages may help.
test.tex (2.4 kB)
RE: Error on AMCOpen scoring on latest code - Added by Adin Ramirez over 6 years ago
I also tested with the Auto Multiple Choice 1.3.0 version from the amc ppa and I see the same behavior.
Getting 7 and 4 on the scripted and manually created questions. However, I was expecting to see a max of 3 on both.
Any suggestions on how to get the expected behavior?
RE: Error on AMCOpen scoring on latest code - Added by Alexis Bienvenüe over 6 years ago
- the syntax
\scoring{1}
is only valid for simple questions (and ignored in multiple questions). I think that is what you are looking for here, so usequestion
instead ofquestionmult
for your two open questions. - your
\tmp
macro expands to (for example)$1.5$
, and as an argument of\scoring
we need only1.5
(without the$
). Use the unformatted value instead:\i
and\@oc@max
for the two\scoring
calls, instead of\tmp
.
RE: Error on AMCOpen scoring on latest code - Added by Adin Ramirez over 6 years ago
That solve it.
Thank you!
(1-6/6)