You are here

public function LongAnswerQuestion::getCreationForm in Quiz 8.4

Implementation of getCreationForm

Overrides QuizQuestion::getCreationForm

See also

QuizQuestion#getCreationForm($form_state)

File

question_types/long_answer/lib/Drupal/long_answer/LongAnswerQuestion.php, line 162
Long answer classes.

Class

LongAnswerQuestion
Extension of QuizQuestion.

Namespace

Drupal\long_answer

Code

public function getCreationForm(array &$form_state = NULL) {
  $form['rubric'] = array(
    '#type' => 'textarea',
    '#title' => t('Rubric'),
    '#description' => t('Specify the criteria for grading the response.'),
    '#default_value' => isset($this->node->rubric) ? $this->node->rubric : '',
    '#size' => 60,
    '#maxlength' => 512,
    '#required' => FALSE,
  );
  return $form;
}