public function TrueFalseQuestion::getQuestionForm in Quiz 6.3
Same name and namespace in other branches
- 6.6 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::getQuestionForm()
- 6.5 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseQuestion::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 TrueFalseQuestion::getQuestionForm()
- TrueFalseQuestion::view in question_types/
quiz_question/ quiz_question.truefalse.inc - Retrieve information relevant for viewing the node. This data is generally added to the node's extra field.
File
- question_types/
quiz_question/ quiz_question.truefalse.inc, line 74 - Defines the classes necessary for a True/False quiz.
Class
- TrueFalseQuestion
- Implementation of QuizQuestion.
Code
public function getQuestionForm($node, $context = NULL) {
// Question first
$form['question'] = array(
'#type' => 'markup',
'#value' => $node->body,
);
// 'tries' is unfortunately required by quiz.module
$form['tries'] = array(
'#type' => 'radios',
'#title' => t('Choose one'),
'#options' => array(
1 => t('True'),
0 => t('False'),
),
//'#default_value' => 1,
'#required' => FALSE,
);
return $form;
}