1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- if(!class_exists('OralExpression')):
- class OralExpression extends Question {
- static $typePicture = 'audio_question.png';
- static $explanationLangVar = 'OralExpression';
-
- function OralExpression(){
- parent::question();
- $this -> type = ORAL_EXPRESSION;
- $this -> isContent = $this-> getIsContent();
- }
-
- function createAnswersForm ($form) {
- $form -> addElement('text','weighting',get_lang('Weighting'), array('class' => 'span1'));
- global $text, $class;
-
- $form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"');
- if (!empty($this->id)) {
- $form -> setDefaults(array('weighting' => float_format($this->weighting, 1)));
- } else {
- if ($this -> isContent == 1) {
- $form -> setDefaults(array('weighting' => '10'));
- }
- }
- }
-
- function processAnswersCreation($form) {
- $this->weighting = $form -> getSubmitValue('weighting');
- $this->save();
- }
-
- function return_header($feedback_type = null, $counter = null, $score = null) {
- $header = parent::return_header($feedback_type, $counter, $score);
- $header .= '<table class="'.$this->question_table_class.'">
- <tr>
- <th> </th>
- </tr>
- <tr>
- <th>'.get_lang("Answer").'</th>
- </tr>
- <tr>
- <th> </th>
- </tr>';
- return $header;
- }
- }
- endif;
|