123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?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'),'size="5"');
- 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, $counter = null) {
- parent::return_header($feedback_type, $counter);
- $header = '<table width="100%" border="0" cellspacing="3" cellpadding="3">
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><i>'.get_lang("Answer").'</i> </td>
- </tr>
- <tr>
- <td> </td>
- </tr>';
- return $header;
- }
-
- }
- endif;
|