Пример #1
0
 /**
  * Implementation of getAnweringForm
  *
  * @see QuizQuestion#getAnsweringForm($form_state, $rid)
  */
 public function getAnsweringForm(array $form_state = NULL, $rid)
 {
     $form = parent::getAnsweringForm($form_state, $rid);
     $form['#theme'] = 'long_answer_answering_form';
     $form['tries'] = array('#type' => 'textarea', '#title' => t('Answer'), '#description' => t('Enter your answer here. If you need more space, click on the grey bar at the bottom of this area and drag it down.'), '#rows' => 15, '#cols' => 60, '#required' => FALSE);
     if (isset($rid)) {
         $response = new LongAnswerResponse($rid, $this->node);
         $form['tries']['#default_value'] = $response->getResponse();
     }
     return $form;
 }