|
2 | 2 |
|
3 | 3 | /* For licensing terms, see /license.txt */ |
4 | 4 |
|
5 | | -/** |
6 | | - * This class handles the SCORM export of free-answer questions. |
7 | | - */ |
8 | | -class ScormAnswerFree extends Answer |
9 | | -{ |
10 | | - /** |
11 | | - * Export the text with missing words. |
12 | | - * |
13 | | - * As a side effect, it stores two lists in the class : |
14 | | - * the missing words and their respective weightings. |
15 | | - */ |
16 | | - public function export() |
17 | | - { |
18 | | - $js = ''; |
19 | | - $identifier = 'question_'.$this->questionJSId.'_free'; |
20 | | - // currently the free answers cannot be displayed, so ignore the textarea |
21 | | - $html = '<tr><td colspan="2">'; |
22 | | - $type = $this->getQuestionType(); |
23 | | - |
24 | | - if (ORAL_EXPRESSION == $type) { |
25 | | - $html = '<tr><td colspan="2">'.get_lang('This learning object or activity is not SCORM compliant. That\'s why it is not exportable.').'</td></tr>'; |
26 | | - |
27 | | - return [$js, $html]; |
28 | | - } |
29 | | - |
30 | | - $html .= '<textarea minlength="20" name="'.$identifier.'" id="'.$identifier.'" ></textarea>'; |
31 | | - $html .= '</td></tr>'; |
32 | | - $js .= 'questions_answers['.$this->questionJSId.'] = new Array();'; |
33 | | - $js .= 'questions_answers_correct['.$this->questionJSId.'] = "";'; |
34 | | - $js .= 'questions_types['.$this->questionJSId.'] = \'free\';'; |
35 | | - $jstmpw = 'questions_answers_ponderation['.$this->questionJSId.'] = "0";'; |
36 | | - $js .= $jstmpw; |
37 | | - |
38 | | - return [$js, $html]; |
39 | | - } |
40 | | -} |
41 | | - |
42 | 5 | /** |
43 | 6 | * This class handles the SCORM export of hotpot questions. |
44 | 7 | */ |
@@ -95,11 +58,11 @@ public function export() |
95 | 58 | // Get the answers, make a list |
96 | 59 | $nbrAnswers = $this->selectNbrAnswers(); |
97 | 60 |
|
98 | | - $answerList = '<div |
99 | | - style="padding: 10px; |
100 | | - margin-left: -8px; |
101 | | - border: 1px solid #4271b5; |
102 | | - height: 448px; |
| 61 | + $answerList = '<div |
| 62 | + style="padding: 10px; |
| 63 | + margin-left: -8px; |
| 64 | + border: 1px solid #4271b5; |
| 65 | + height: 448px; |
103 | 66 | width: 200px;"><b>'.get_lang('Image zones').'</b><ol>'; |
104 | 67 | for ($answerId = 1; $answerId <= $nbrAnswers; $answerId++) { |
105 | 68 | $answerList .= '<li>'.$this->selectAnswer($answerId).'</li>'; |
|
0 commit comments