type = ORAL_EXPRESSION; $this -> isContent = $this-> getIsContent(); } /** * function which redifines Question::createAnswersForm * @param the formvalidator instance */ function createAnswersForm ($form) { $form -> addElement('text','weighting',get_lang('Weighting'), array('class' => 'span1')); // setting the save button here and not in the question class.php $form->addElement('style_submit_button','submitQuestion',$this->submitText, 'class="'.$this->submitClass.'"'); if (!empty($this->id)) { $form -> setDefaults(array('weighting' => Text::float_format($this->weighting, 1))); } else { if ($this -> isContent == 1) { $form -> setDefaults(array('weighting' => '10')); } } } /** * abstract function which creates the form to create / edit the answers of the question * @param FormValidator instance */ function processAnswersCreation($form) { $this->weighting = $form -> getSubmitValue('weighting'); $this->save(); } /** * {@inheritdoc} */ function return_header($feedback_type = null, $counter = null, $score = null, $show_media = false, $hideTitle = 0) { $header = parent::return_header($feedback_type, $counter, $score, $show_media, $hideTitle); $header .= ''; return $header; } }
 
'.get_lang("Answer").'