public function ClozeQuestion::getCreationForm in Cloze 6
Same name and namespace in other branches
- 7 cloze.classes.inc \ClozeQuestion::getCreationForm()
Implementation of getCreationForm
See also
QuizQuestion#getCreationForm($form_state)
File
- ./
cloze.classes.inc, line 177 - The main classes for the short answer question type.
Class
- ClozeQuestion
- Extension of QuizQuestion.
Code
public function getCreationForm(array $form_state = NULL) {
drupal_add_css(drupal_get_path('module', 'cloze') . '/theme/cloze.css');
$form['instructions'] = array(
'#type' => 'markup',
'#value' => '<div class="cloze-instruction">' . t('For free text cloze, mention the correct ansewr inside the square bracket. For multichoice cloze, provide the options separated by commas with correct answer as first. <br/>Example question: [The] Sun raises in the [east, west, north, south]. <br/>Answer: <span class="answer correct correct-answer">The</span> sun raises the <span class="answer correct correct-answer">east</span>.') . '</div>',
'#weight' => -10,
);
return $form;
}