private function MatchingQuestion::remove_repeated in Quiz 7.4
1 call to MatchingQuestion::remove_repeated()
- MatchingQuestion::getAnsweringForm in question_types/
matching/ matching.classes.inc - Implementation of getAnsweringForm
File
- question_types/
matching/ matching.classes.inc, line 249 - matching.classes
Class
- MatchingQuestion
- Extension of QuizQuestion.
Code
private function remove_repeated(&$form) {
foreach ($form as $index => &$question) {
if (isset($question['tries[' . $index . ']']['#options'])) {
$question['tries[' . $index . ']']['#options'] = array_unique($question['tries[' . $index . ']']['#options']);
}
}
}