public function QuizfileuploadQuestion::getCreationForm in Quiz File Upload 6
Same name and namespace in other branches
- 7.5 quizfileupload.classes.inc \QuizfileuploadQuestion::getCreationForm()
- 7 quizfileupload.classes.inc \QuizfileuploadQuestion::getCreationForm()
- 7.4 quizfileupload.classes.inc \QuizfileuploadQuestion::getCreationForm()
Implementation of getCreationForm
See also
QuizQuestion#getCreationForm()
File
- ./
quizfileupload.classes.inc, line 145 - The main classes for the multichoice question type.
Class
- QuizfileuploadQuestion
- Extension of QuizQuestion.
Code
public function getCreationForm(array $form_state = NULL) {
$allowed = variable_get('quizfileupload_default_extensions', QUIZFILEUPLOAD_DEFAULT_EXTENSIONS);
$form['filetypes'] = array(
'#type' => 'textfield',
'#title' => t('Allowed extension'),
'#description' => t('Enter the allowed file extensions one per line.'),
'#default_value' => isset($this->node->filetypes) ? $this->node->filetypes : $allowed,
'#required' => TRUE,
);
return $form;
}