Problem with randomization using Python preprocessor

Problem with randomization using Python preprocessor

by Pascal Veron -
Number of replies: 2

Hi,

i would like to have a different question for each of my student. For this, i am usig

random.seed(args['id'])
in the template with Python preprocessor.
But when my students are on the question, it seems that the value id is equal to my id (the one who creates the question), not the student's id.
However the documentation says that it is the id of  the student. Did i miss something ?
Thanks.

In reply to Pascal Veron

Re: Problem with randomization using Python preprocessor

by Richard Lobb -
Are you sure the "Evaluate per student" checkbox is checked? If not, the Preprocessor runs only once, when the question is saved, and uses the ID of the question author.

Evaluating for each student does mean that every such question submits a task to the Jobe server before it can be displayed. This can cause Jobe server overloads with large classes (several hundred students) in tests or exams. Caveat emptor.
In reply to Richard Lobb

Re: Problem with randomization using Python preprocessor

by Pascal Veron -
Thanks a lot ! actually, I hadn't checked the "evaluate per student" checkbox.