public function LongAnswerQuestion::getCreationForm in Quiz 7.5
Same name and namespace in other branches
- 6.6 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getCreationForm()
- 6.3 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getCreationForm()
- 6.4 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getCreationForm()
- 6.5 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getCreationForm()
- 7.6 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getCreationForm()
- 7 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getCreationForm()
- 7.4 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getCreationForm()
Implementation of getCreationForm().
Overrides QuizQuestion::getCreationForm
See also
QuizQuestion::getCreationForm()
File
- question_types/
long_answer/ long_answer.classes.inc, line 160 - Long answer classes.
Class
- LongAnswerQuestion
- Extension of QuizQuestion.
Code
public function getCreationForm(array &$form_state = NULL) {
$form = array();
$form['rubric'] = array(
'#type' => 'text_format',
'#title' => t('Rubric'),
'#description' => t('Specify the criteria for grading the response.'),
'#default_value' => isset($this->node->rubric['value']) ? $this->node->rubric['value'] : '',
'#format' => isset($this->node->rubric['format']) ? $this->node->rubric['format'] : filter_default_format(),
'#size' => 60,
'#required' => FALSE,
);
$form['answer_text_processing'] = array(
'#title' => t('Answer text processing'),
'#description' => t('Allowing filtered text may enable the user to input HTML tags in their answer.'),
'#type' => 'radios',
'#options' => array(
0 => t('Plain text'),
1 => t('Filtered text (user selects text format)'),
),
'#default_value' => isset($this->node->answer_text_processing) ? $this->node->answer_text_processing : 0,
);
return $form;
}