MantisBT - ATutor
View Issue Details
0004573ATutorTests/Surveyspublic2010-10-08 08:222010-12-20 10:19
greg 
cindy 
highminoralways
closedfixed 
 
2.0.1 
SVN
0004573: ordering questions are always in order.
There does not seem to be a way to randomize items in ordering questions. I recall there being a correct order select menu before each item in the question editor, but apparently that's not the case. Ordering items must then have been randomized when rendered in a test, but that does not seem to be working. Investigate and try to get this fix into the 2.0.1 release.
No tags attached.
Issue History
2010-10-08 08:22gregNew Issue
2010-10-08 08:22gregAffects version => SVN
2010-10-08 08:22gregNote Added: 0004697
2010-10-09 04:29IndieRectNote Added: 0004707
2010-10-12 06:08gregStatusnew => assigned
2010-10-12 06:08gregAssigned To => cindy
2010-10-19 10:51cindyStatusassigned => resolved
2010-10-19 10:51cindyFixed in Version => 2.0.1
2010-10-19 10:51cindyResolutionopen => fixed
2010-10-19 10:51cindyNote Added: 0004723
2010-12-20 10:19gregStatusresolved => closed

Notes
(0004697)
greg   
2010-10-08 08:22   
see:
http://www.atutor.ca/view/3/20686/1.html [^]
(0004707)
IndieRect   
2010-10-09 04:29   
Normally, an instructor enters answers in the correct order, and then the system shuffles them each time a student takes the test. The order that students get them in is not exactly random; rather, it's designed to be different for different people.

It works fine as of 1.6.3; didn't test it in later versions.
(0004723)
cindy   
2010-10-19 10:51   
SVN revision: 10339

The reason of the problem is that PHP function array_rand() stops returning an array of shuffled array keys since version 5.2.10. The fix is to use srand() and shuffle() to shuffle the question order. This change also leads the change of "view result" of ordering question.

Affected scripts:
mods/_standard/tests/classes/testQuestions.class.php
mods/_standard/tests/edit_question_ordering.php
themes/default/test_questions/ordering_result.tmpl.php