Forums » Using AMC (english) »
Accessing Exam ID
Added by Raffaele Borrelli about 9 years ago
Hi all,
is there a way to access an exam ID when they are generated?
I need to define an array of numbers in luatex and then use
each element of the array an an input data for an Exam.
In this possible in AMC?
Thanks,
Lello
Replies (3)
RE: Accessing Exam ID - Added by Alexis Bienvenüe about 9 years ago
The student/page/check code written at the top is
+\the\AMCid@etud/\thepage/\the\AMCid@check+
RE: Accessing Exam ID - Added by Raffaele Borrelli about 9 years ago
Thanks,
do you think it is possible to define a lua array and then use AMCid@etud to access
the elements of the array?
Let's say something like this
\directlua{a={1, 2, 3, 4, 5}} \onecopy{50}{ \directlua{x=a[\the\AMCid@etud]} %%% all the other stuff here }
or similar. Basically I don't want to use random numbers to generate multiple tests but an array
of data defined in the TeX file using lua.
Thanks,
Lello
RE: Accessing Exam ID - Added by Raffaele Borrelli about 9 years ago
Never mind,
I found the solution in one of your previous posts and It works fine.
Using lualatex is a very powerful technique to combine with AMC.
Thanks,
Lello
(1-3/3)