public function MatchingQuestion::customShuffle in Quiz 6.6
Same name and namespace in other branches
- 6.3 question_types/matching/matching.classes.inc \MatchingQuestion::customShuffle()
- 6.4 question_types/matching/matching.classes.inc \MatchingQuestion::customShuffle()
- 6.5 question_types/matching/matching.classes.inc \MatchingQuestion::customShuffle()
- 7.6 question_types/matching/matching.classes.inc \MatchingQuestion::customShuffle()
- 7 question_types/matching/matching.classes.inc \MatchingQuestion::customShuffle()
- 7.4 question_types/matching/matching.classes.inc \MatchingQuestion::customShuffle()
- 7.5 question_types/matching/matching.classes.inc \MatchingQuestion::customShuffle()
1 call to MatchingQuestion::customShuffle()
- MatchingQuestion::getQuestionForm in question_types/
matching/ matching.classes.inc - Get the form that will be displayed to the test-taking user.
File
- question_types/
matching/ matching.classes.inc, line 105 - matching.classes
Class
- MatchingQuestion
- Implementation of Matching.
Code
public function customShuffle($array = array()) {
$new_array = array();
while (count($array)) {
$element = array_rand($array);
$new_array[$element] = $array[$element];
unset($array[$element]);
}
return $new_array;
}