You are here

public function QuizfileuploadQuestion::getCreationForm in Quiz File Upload 7

Same name and namespace in other branches
  1. 6 quizfileupload.classes.inc \QuizfileuploadQuestion::getCreationForm()
  2. 7.5 quizfileupload.classes.inc \QuizfileuploadQuestion::getCreationForm()
  3. 7.4 quizfileupload.classes.inc \QuizfileuploadQuestion::getCreationForm()

Implementation of getCreationForm

See also

QuizQuestion#getCreationForm()

File

./quizfileupload.classes.inc, line 164
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;
}