public function LongAnswerQuestion::getQuestionForm in Quiz 6.3
Same name and namespace in other branches
- 6.6 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getQuestionForm()
- 6.5 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::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 LongAnswerQuestion::getQuestionForm()
- LongAnswerQuestion::view in question_types/
long_answer/ long_answer.classes.inc - Retrieve information relevant for viewing the node. This data is generally added to the node's extra field.
File
- question_types/
long_answer/ long_answer.classes.inc, line 67 - Long answer classes.
Class
- LongAnswerQuestion
- Implementation of QuizQuestion.
Code
public function getQuestionForm($node, $context = NULL) {
//print_r($node);exit;
$form['question'] = array(
'#type' => 'markup',
'#value' => $node->body,
);
$form['tries'] = array(
'#type' => 'textarea',
'#title' => t('Answer'),
'#description' => t('Enter your answer here. If you need more space, click on the grey bar at the bottom of this area and drag it down.'),
'#rows' => 15,
'#cols' => 60,
'#required' => FALSE,
);
return $form;
}