Posts made by Joseph Rézeau

Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
Thanks for your prompt reply, Tim. I thought so!
I do set the "random order" in question.php start_attempt(), but... I have no idea how to "copy" that random order in the renderer. Do you mean I should actually put inside the renderer an exact copy of the script I use in question.php? I have tried that solution but it does not work, because that little script involves shuffling the answers array, and it's shuffled one way in question.php and another way in the renderer, so those 2 random order arrays do not match at runtime!
Rather than using $SESSION (which works fine, by the way), is there a way to use a global variable, which I could set in question.php and retrieve in the renderer? I've tried with no success.
Any suggestions welcome!
Joseph
Average of ratings: Useful (1)
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

I am making good progress on a new qtype (based on the the OU multiple response type).

In my question.php script I define a new, reduced, list of answers LIST B (randomly selected from the current question's answers list LIST A).

I need to use list B in the renderer.php script. What is the best policy to pass LIST B from question.php to renderer.php?

So far I've been successfully using global $SESSION. Is that OK? Are there any drawbacks? Is there a better way?

Average of ratings: Useful (1)
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

@Dominique,

I've started work on the lines you suggest, but based on the All-or-Nothing Multiple Choice question type instead.

You write "To keep things simple, at least as a first step, let's assume that the correct choices all have the same value." Basing development on the All-or-Nothing Multiple Choice question type solves that question.

I will report on my progress here, and ask for opinions about options to be offered on the edit screen.

I have e-mailed Oleg about it, but got no answer so far.

Average of ratings: Useful (1)