public function MatchingQuestion::getQuestionForm in Quiz 6.5
Same name and namespace in other branches
- 6.6 question_types/matching/matching.classes.inc \MatchingQuestion::getQuestionForm()
- 6.3 question_types/matching/matching.classes.inc \MatchingQuestion::getQuestionForm()
Get the form that will be displayed to the test-taking user.
Parameters
$node: The question node.
$context: The form context.
Return value
Must return a FAPI array.
Overrides QuizQuestion::getQuestionForm
1 call to MatchingQuestion::getQuestionForm()
- MatchingQuestion::view in question_types/
matching/ matching.classes.inc - Retrieve information relevant for viewing the node. This data is generally added to the node's extra field.
File
- question_types/
matching/ matching.classes.inc, line 90 - quiz_directions.classes
Class
- MatchingQuestion
- Implementation of Matching.
Code
public function getQuestionForm($node, $context = NULL) {
list($questions, $select_option) = $this
->getQuestion($node);
foreach ($questions as $question) {
$form['tries[' . $question['match_id'] . ']'] = array(
'#type' => 'select',
'#title' => $question['question'],
'#options' => $this
->customShuffle($select_option),
);
}
return $this
->customShuffle($form);
}