function qformat_qti2::shuffle_things in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/question/format/qti2/format.php \qformat_qti2::shuffle_things()
returns the given array, shuffled
Parameters
array $things:
Return value
array
1 call to qformat_qti2::shuffle_things()
- qformat_qti2::writequestion in includes/
moodle/ question/ format/ qti2/ format.php - Creates the export text for a question
File
- includes/
moodle/ question/ format/ qti2/ format.php, line 893
Class
Code
function shuffle_things($things) {
$things = swapshuffle_assoc($things);
$oldthings = $things;
$things = array();
foreach ($oldthings as $key => $value) {
$things[] = $value;
// This loses the index key, but doesn't matter
}
return $things;
}