@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | // Breadcrumbs. |
67 | 67 | if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') { |
68 | - $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin')); |
|
69 | - $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList')); |
|
68 | + $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin')); |
|
69 | + $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList')); |
|
70 | 70 | $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.api_get_session_id(), 'name' => get_lang('SessionOverview')); |
71 | 71 | } |
72 | 72 | |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | |
135 | 135 | echo '<span style="float:right; padding-top:0px;">'; |
136 | 136 | echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
137 | - Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
137 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
138 | 138 | |
139 | 139 | echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&id_session='.api_get_session_id().'&export=csv"> |
140 | - '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
140 | + '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
141 | 141 | |
142 | 142 | echo '</span>'; |
143 | 143 | echo '</div>'; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $quiz_avg_score = round(($quiz_avg_score / $studentCount), 2).'%'; |
251 | 251 | $url = api_get_path( |
252 | 252 | WEB_CODE_PATH |
253 | - ) . 'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
253 | + ).'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
254 | 254 | |
255 | 255 | echo '<tr><td>'.Display::url( |
256 | 256 | $quiz['title'], |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | $html = '<table class="table table-striped table-hover">'; |
40 | 40 | $html .= '<thead>'; |
41 | 41 | $html .= '<tr>'; |
42 | - $html .= '<th width="10">' . get_lang('Number') . '</th>'; |
|
43 | - $html .= '<th width="10">' . get_lang('True') . '</th>'; |
|
44 | - $html .= '<th width="50%">' . get_lang('Comment') . '</th>'; |
|
45 | - $html .= '<th width="50%">' . get_lang('Answer') . '</th>'; |
|
42 | + $html .= '<th width="10">'.get_lang('Number').'</th>'; |
|
43 | + $html .= '<th width="10">'.get_lang('True').'</th>'; |
|
44 | + $html .= '<th width="50%">'.get_lang('Comment').'</th>'; |
|
45 | + $html .= '<th width="50%">'.get_lang('Answer').'</th>'; |
|
46 | 46 | $html .= '</tr>'; |
47 | 47 | $html .= '</thead>'; |
48 | 48 | $html .= '<tbody>'; |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | $form->addHtml('<tr>'); |
75 | 75 | |
76 | 76 | if (is_object($answer)) { |
77 | - $defaults['answer[' . $i . ']'] = $answer->answer[$i]; |
|
78 | - $defaults['comment[' . $i . ']'] = $answer->comment[$i]; |
|
79 | - $defaults['weighting[' . $i . ']'] = float_format($answer->weighting[$i], 1); |
|
80 | - $defaults['correct[' . $i . ']'] = $answer->correct[$i]; |
|
77 | + $defaults['answer['.$i.']'] = $answer->answer[$i]; |
|
78 | + $defaults['comment['.$i.']'] = $answer->comment[$i]; |
|
79 | + $defaults['weighting['.$i.']'] = float_format($answer->weighting[$i], 1); |
|
80 | + $defaults['correct['.$i.']'] = $answer->correct[$i]; |
|
81 | 81 | } else { |
82 | 82 | $defaults['answer[1]'] = get_lang('DefaultMultipleAnswer2'); |
83 | 83 | $defaults['comment[1]'] = get_lang('DefaultMultipleComment2'); |
@@ -93,44 +93,44 @@ discard block |
||
93 | 93 | |
94 | 94 | $renderer->setElementTemplate( |
95 | 95 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
96 | - 'correct[' . $i . ']' |
|
96 | + 'correct['.$i.']' |
|
97 | 97 | ); |
98 | 98 | $renderer->setElementTemplate( |
99 | 99 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
100 | - 'counter[' . $i . ']' |
|
100 | + 'counter['.$i.']' |
|
101 | 101 | ); |
102 | 102 | $renderer->setElementTemplate( |
103 | 103 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
104 | - 'answer[' . $i . ']' |
|
104 | + 'answer['.$i.']' |
|
105 | 105 | ); |
106 | 106 | $renderer->setElementTemplate( |
107 | 107 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
108 | - 'comment[' . $i . ']' |
|
108 | + 'comment['.$i.']' |
|
109 | 109 | ); |
110 | 110 | |
111 | - $answer_number = $form->addElement('text', 'counter[' . $i . ']', null, 'value="' . $i . '"'); |
|
111 | + $answer_number = $form->addElement('text', 'counter['.$i.']', null, 'value="'.$i.'"'); |
|
112 | 112 | $answer_number->freeze(); |
113 | 113 | |
114 | 114 | $form->addElement('checkbox', |
115 | - 'correct[' . $i . ']', |
|
115 | + 'correct['.$i.']', |
|
116 | 116 | null, |
117 | 117 | null, |
118 | 118 | 'class="checkbox" style="margin-left: 0em;"' |
119 | 119 | ); |
120 | - $boxes_names[] = 'correct[' . $i . ']'; |
|
120 | + $boxes_names[] = 'correct['.$i.']'; |
|
121 | 121 | |
122 | 122 | $form->addElement( |
123 | 123 | 'html_editor', |
124 | - 'answer[' . $i . ']', |
|
124 | + 'answer['.$i.']', |
|
125 | 125 | null, |
126 | 126 | array(), |
127 | 127 | array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100') |
128 | 128 | ); |
129 | - $form->addRule('answer[' . $i . ']', get_lang('ThisFieldIsRequired'), 'required'); |
|
129 | + $form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required'); |
|
130 | 130 | |
131 | 131 | $form->addElement( |
132 | 132 | 'html_editor', |
133 | - 'comment[' . $i . ']', |
|
133 | + 'comment['.$i.']', |
|
134 | 134 | null, |
135 | 135 | array(), |
136 | 136 | array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100') |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | function return_header($feedback_type = null, $counter = null, $score = null) |
227 | 227 | { |
228 | 228 | $header = parent::return_header($feedback_type, $counter, $score); |
229 | - $header .= '<table class="'.$this->question_table_class .'"> |
|
229 | + $header .= '<table class="'.$this->question_table_class.'"> |
|
230 | 230 | <tr> |
231 | 231 | <th>'.get_lang("Choice").'</th> |
232 | 232 | <th>'. get_lang("ExpectedChoice").'</th> |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | $data[$question_id]['type'] = $question_obj->get_question_type_name(); |
62 | 62 | $percentange = 0; |
63 | 63 | if ($count_students) { |
64 | - $percentange = $count_users / $count_students*100; |
|
64 | + $percentange = $count_users / $count_students * 100; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $data[$question_id]['students_who_try_exercise'] = Display::bar_progress( |
68 | 68 | $percentange, |
69 | 69 | false, |
70 | - $count_users .' / '.$count_students |
|
70 | + $count_users.' / '.$count_students |
|
71 | 71 | ); |
72 | 72 | $data[$question_id]['lowest_score'] = round($exercise_stats['min'], 2); |
73 | 73 | $data[$question_id]['average_score'] = round($exercise_stats['average'], 2); |
@@ -142,23 +142,23 @@ discard block |
||
142 | 142 | } else { |
143 | 143 | $data[$id]['name'] = '-'; |
144 | 144 | } |
145 | - $data[$id]['answer'] = $answer_item; |
|
145 | + $data[$id]['answer'] = $answer_item; |
|
146 | 146 | |
147 | 147 | $answer_item = api_substr($answer_item, 1); |
148 | - $answer_item = api_substr($answer_item, 0, api_strlen($answer_item) -1); |
|
148 | + $answer_item = api_substr($answer_item, 0, api_strlen($answer_item) - 1); |
|
149 | 149 | |
150 | - $data[$id]['answer'] = $answer_item; |
|
150 | + $data[$id]['answer'] = $answer_item; |
|
151 | 151 | |
152 | - $data[$id]['correct'] = '-'; |
|
152 | + $data[$id]['correct'] = '-'; |
|
153 | 153 | |
154 | 154 | $count = ExerciseLib::getNumberStudentsFillBlanksAnwserCount($question_id, $exercise_id); |
155 | 155 | $count = $count[$counter]; |
156 | 156 | |
157 | 157 | $percentange = 0; |
158 | 158 | if (!empty($count_students)) { |
159 | - $percentange = $count/$count_students*100; |
|
159 | + $percentange = $count / $count_students * 100; |
|
160 | 160 | } |
161 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
161 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
162 | 162 | $id++; |
163 | 163 | $counter++; |
164 | 164 | } |
@@ -194,9 +194,9 @@ discard block |
||
194 | 194 | ); |
195 | 195 | $percentange = 0; |
196 | 196 | if (!empty($count_students)) { |
197 | - $percentange = $count/$count_students*100; |
|
197 | + $percentange = $count / $count_students * 100; |
|
198 | 198 | } |
199 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
199 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
200 | 200 | } |
201 | 201 | break; |
202 | 202 | case HOT_SPOT: |
@@ -217,9 +217,9 @@ discard block |
||
217 | 217 | ); |
218 | 218 | $percentange = 0; |
219 | 219 | if (!empty($count_students)) { |
220 | - $percentange = $count/$count_students*100; |
|
220 | + $percentange = $count / $count_students * 100; |
|
221 | 221 | } |
222 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
222 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
223 | 223 | break; |
224 | 224 | default: |
225 | 225 | if ($answer_id == 1) { |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | ); |
240 | 240 | $percentange = 0; |
241 | 241 | if (!empty($count_students)) { |
242 | - $percentange = $count/$count_students*100; |
|
242 | + $percentange = $count / $count_students * 100; |
|
243 | 243 | } |
244 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
244 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
245 | 245 | } |
246 | 246 | $id++; |
247 | 247 | } |
@@ -273,8 +273,8 @@ discard block |
||
273 | 273 | $interbreadcrumb[] = array("url" => "admin.php?exerciseId=$exercise_id&".api_get_cidreq(), "name" => $objExercise->name); |
274 | 274 | |
275 | 275 | $tpl = new Template(get_lang('ReportByQuestion')); |
276 | -$actions = '<a href="exercise_report.php?exerciseId='.intval($_GET['exerciseId']).'&'.api_get_cidreq().'">' . |
|
277 | - Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
276 | +$actions = '<a href="exercise_report.php?exerciseId='.intval($_GET['exerciseId']).'&'.api_get_cidreq().'">'. |
|
277 | + Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
278 | 278 | $actions = Display::div($actions, array('class'=> 'actions')); |
279 | 279 | $content = $actions.$content; |
280 | 280 | $tpl->assign('content', $content); |
@@ -34,20 +34,20 @@ discard block |
||
34 | 34 | $html = '<table class="data_table"> |
35 | 35 | <tr> |
36 | 36 | <th width="10px"> |
37 | - ' . get_lang('Number') . ' |
|
37 | + ' . get_lang('Number').' |
|
38 | 38 | </th> |
39 | 39 | <th width="10px"> |
40 | - ' . get_lang('True') . ' |
|
40 | + ' . get_lang('True').' |
|
41 | 41 | </th> |
42 | 42 | <th width="50%"> |
43 | - ' . get_lang('Answer') . ' |
|
43 | + ' . get_lang('Answer').' |
|
44 | 44 | </th>'; |
45 | 45 | |
46 | - $html .='<th>' . get_lang('Comment') . '</th>'; |
|
47 | - $html .='</tr>'; |
|
46 | + $html .= '<th>'.get_lang('Comment').'</th>'; |
|
47 | + $html .= '</tr>'; |
|
48 | 48 | $form->addElement( |
49 | 49 | 'label', |
50 | - get_lang('Answers') . |
|
50 | + get_lang('Answers'). |
|
51 | 51 | '<br /> '.Display::return_icon('fill_field.png'), |
52 | 52 | $html |
53 | 53 | ); |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | for ($i = 1; $i <= $nb_answers; ++$i) { |
83 | 83 | /* si la reponse est de type objet */ |
84 | 84 | if (is_object($answer)) { |
85 | - $defaults['answer[' . $i . ']'] = $answer->answer[$i]; |
|
86 | - $defaults['comment[' . $i . ']'] = $answer->comment[$i]; |
|
87 | - $defaults['correct[' . $i . ']'] = $answer->correct[$i]; |
|
85 | + $defaults['answer['.$i.']'] = $answer->answer[$i]; |
|
86 | + $defaults['comment['.$i.']'] = $answer->comment[$i]; |
|
87 | + $defaults['correct['.$i.']'] = $answer->correct[$i]; |
|
88 | 88 | |
89 | 89 | // start |
90 | 90 | $scoreA = $answer->weighting[$i]; |
@@ -106,16 +106,16 @@ discard block |
||
106 | 106 | $renderer->setElementTemplate('<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', 'comment['.$i.']'); |
107 | 107 | //$renderer->setElementTemplate('<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', 'weighting['.$i.']'); |
108 | 108 | |
109 | - $answer_number = $form->addElement('text', 'counter[' . $i . ']', null, 'value="' . $i . '"'); |
|
109 | + $answer_number = $form->addElement('text', 'counter['.$i.']', null, 'value="'.$i.'"'); |
|
110 | 110 | $answer_number->freeze(); |
111 | 111 | |
112 | - $form->addElement('checkbox', 'correct[' . $i . ']', null, null, 'class="checkbox"'); |
|
113 | - $boxes_names[] = 'correct[' . $i . ']'; |
|
112 | + $form->addElement('checkbox', 'correct['.$i.']', null, null, 'class="checkbox"'); |
|
113 | + $boxes_names[] = 'correct['.$i.']'; |
|
114 | 114 | |
115 | - $form->addElement('html_editor', 'answer[' . $i . ']', null, array(), array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')); |
|
116 | - $form->addRule('answer[' . $i . ']', get_lang('ThisFieldIsRequired'), 'required'); |
|
115 | + $form->addElement('html_editor', 'answer['.$i.']', null, array(), array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')); |
|
116 | + $form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required'); |
|
117 | 117 | |
118 | - $form->addElement('html_editor', 'comment[' . $i . ']', null, array(), array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')); |
|
118 | + $form->addElement('html_editor', 'comment['.$i.']', null, array(), array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')); |
|
119 | 119 | |
120 | 120 | $form->addElement('html', '</tr>'); |
121 | 121 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | // Reponses correctes |
182 | 182 | $nbr_corrects = 0; |
183 | 183 | for ($i = 1; $i <= $nb_answers; $i++) { |
184 | - $goodAnswer = trim($form->getSubmitValue('correct[' . $i . ']')); |
|
184 | + $goodAnswer = trim($form->getSubmitValue('correct['.$i.']')); |
|
185 | 185 | if ($goodAnswer) { |
186 | 186 | $nbr_corrects++; |
187 | 187 | } |
@@ -200,9 +200,9 @@ discard block |
||
200 | 200 | $test = $form->getSubmitValue('pts'); |
201 | 201 | |
202 | 202 | for ($i = 1; $i <= $nb_answers; $i++) { |
203 | - $answer = trim($form->getSubmitValue('answer[' . $i . ']')); |
|
204 | - $comment = trim($form->getSubmitValue('comment[' . $i . ']')); |
|
205 | - $goodAnswer = trim($form->getSubmitValue('correct[' . $i . ']')); |
|
203 | + $answer = trim($form->getSubmitValue('answer['.$i.']')); |
|
204 | + $comment = trim($form->getSubmitValue('comment['.$i.']')); |
|
205 | + $goodAnswer = trim($form->getSubmitValue('correct['.$i.']')); |
|
206 | 206 | |
207 | 207 | if ($goodAnswer) { |
208 | 208 | $weighting = abs($answer_score); |
@@ -230,12 +230,12 @@ discard block |
||
230 | 230 | $score = null |
231 | 231 | ) { |
232 | 232 | $header = parent::return_header($feedback_type, $counter, $score); |
233 | - $header .= '<table class="'.$this->question_table_class .'"> |
|
233 | + $header .= '<table class="'.$this->question_table_class.'"> |
|
234 | 234 | <tr> |
235 | - <th>' . get_lang("Choice") . '</th> |
|
236 | - <th>' . get_lang("ExpectedChoice") . '</th> |
|
237 | - <th>' . get_lang("Answer") . '</th>'; |
|
238 | - $header .= '<th>' . get_lang("Comment") . '</th>'; |
|
235 | + <th>' . get_lang("Choice").'</th> |
|
236 | + <th>' . get_lang("ExpectedChoice").'</th> |
|
237 | + <th>' . get_lang("Answer").'</th>'; |
|
238 | + $header .= '<th>'.get_lang("Comment").'</th>'; |
|
239 | 239 | $header .= '</tr>'; |
240 | 240 | |
241 | 241 | return $header; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | api_protect_course_script(false); |
12 | 12 | |
13 | -$isAllowedToEdit = api_is_allowed_to_edit(null,true); |
|
13 | +$isAllowedToEdit = api_is_allowed_to_edit(null, true); |
|
14 | 14 | |
15 | 15 | if (!$isAllowedToEdit) { |
16 | 16 | api_not_allowed(true); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $objQuestion = Question::read($questionId); |
23 | 23 | $_course = api_get_course_info(); |
24 | 24 | |
25 | -$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
|
25 | +$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
|
26 | 26 | |
27 | 27 | $picturePath = $documentPath.'/images'; |
28 | 28 | $pictureName = $objQuestion->selectPicture(); |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | $answers = $_SESSION['tmp_answers']; |
66 | 66 | $nbrAnswers = count($answers['answer']); |
67 | 67 | |
68 | -for ($i=1;$i <= $nbrAnswers; $i++) { |
|
68 | +for ($i = 1; $i <= $nbrAnswers; $i++) { |
|
69 | 69 | $hotSpot = []; |
70 | 70 | $hotSpot['id'] = null; |
71 | - $hotSpot['answer']= $answers['answer'][$i]; |
|
71 | + $hotSpot['answer'] = $answers['answer'][$i]; |
|
72 | 72 | |
73 | 73 | if ($answer_type == HOT_SPOT_DELINEATION) { |
74 | - if ($i==1) { |
|
74 | + if ($i == 1) { |
|
75 | 75 | $hotSpot['type'] = 'delineation'; |
76 | 76 | } else { |
77 | 77 | $hotSpot['type'] = 'oar'; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | get_lang('MultiplicationStar')."\n". |
8 | 8 | get_lang('DivisionSlash')."\n". |
9 | 9 | get_lang('ExponentiationCircumflex')."\n". |
10 | -get_lang('ModuloPercentage') . "\n" . |
|
10 | +get_lang('ModuloPercentage')."\n". |
|
11 | 11 | "\n". |
12 | 12 | get_lang('SquareRootSqrt')."\n". |
13 | 13 | get_lang('AbsoluteValueAbs')."\n". |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $file = file(api_get_path(SYS_LANG_PATH).'english/hotspot.inc.php'); |
19 | 19 | |
20 | 20 | foreach ($file as &$value) { |
21 | - $variable = explode('=', $value , 2); |
|
21 | + $variable = explode('=', $value, 2); |
|
22 | 22 | if (count($variable) > 1) { |
23 | 23 | $variable = substr(trim($variable[0]), 1); |
24 | 24 | $variable = '&'.$variable.'='.api_utf8_encode(get_lang($variable)).' '; |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | for ($i = 1; $i <= $answer->nbrAnswers; $i++) { |
73 | 73 | if ($answer->isCorrect($i)) { |
74 | 74 | $nb_matches++; |
75 | - $defaults['answer[' . $nb_matches . ']'] = $answer->selectAnswer($i); |
|
76 | - $defaults['weighting[' . $nb_matches . ']'] = float_format($answer->selectWeighting($i), 1); |
|
77 | - $defaults['matches[' . $nb_matches . ']'] = $answer->correct[$i]; |
|
75 | + $defaults['answer['.$nb_matches.']'] = $answer->selectAnswer($i); |
|
76 | + $defaults['weighting['.$nb_matches.']'] = float_format($answer->selectWeighting($i), 1); |
|
77 | + $defaults['matches['.$nb_matches.']'] = $answer->correct[$i]; |
|
78 | 78 | } else { |
79 | 79 | $nb_options++; |
80 | - $defaults['option[' . $nb_options . ']'] = $answer->selectAnswer($i); |
|
80 | + $defaults['option['.$nb_options.']'] = $answer->selectAnswer($i); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | } |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | $html = '<table class="table table-striped table-hover"> |
109 | 109 | <thead> |
110 | 110 | <tr> |
111 | - <th width="5%">' . get_lang('Number') . '</th> |
|
112 | - <th width="70%">' . get_lang('Answer') . '</th> |
|
113 | - <th width="15%">' . get_lang('MatchesTo') . '</th> |
|
114 | - <th width="10%">' . get_lang('Weighting') . '</th> |
|
111 | + <th width="5%">' . get_lang('Number').'</th> |
|
112 | + <th width="70%">' . get_lang('Answer').'</th> |
|
113 | + <th width="15%">' . get_lang('MatchesTo').'</th> |
|
114 | + <th width="10%">' . get_lang('Weighting').'</th> |
|
115 | 115 | </tr> |
116 | 116 | </thead> |
117 | 117 | <tbody>'; |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | $html = '<table class="table table-striped table-hover"> |
163 | 163 | <thead> |
164 | 164 | <tr> |
165 | - <th width="15%">' . get_lang('Number') . '</th> |
|
166 | - <th width="85%">' . get_lang('Answer') . '</th> |
|
165 | + <th width="15%">' . get_lang('Number').'</th> |
|
166 | + <th width="85%">' . get_lang('Answer').'</th> |
|
167 | 167 | </tr> |
168 | 168 | </thead> |
169 | 169 | <tbody>'; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | $form->addHtml('<tr>'); |
187 | 187 | |
188 | - $form->addHtml('<td>' . chr(64 + $i) . '</td>'); |
|
188 | + $form->addHtml('<td>'.chr(64 + $i).'</td>'); |
|
189 | 189 | $form->addText("option[$i]", null); |
190 | 190 | |
191 | 191 | $form->addHtml('</tr>'); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | public function return_header($feedback_type = null, $counter = null, $score = null) |
268 | 268 | { |
269 | 269 | $header = parent::return_header($feedback_type, $counter, $score); |
270 | - $header .= '<table class="'.$this->question_table_class .'">'; |
|
270 | + $header .= '<table class="'.$this->question_table_class.'">'; |
|
271 | 271 | $header .= '<tr> |
272 | 272 | <th>'.get_lang('ElementList').'</th> |
273 | 273 | <th>'.get_lang('CorrespondsTo').'</th> |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | if ($title == '') { |
67 | 67 | $title = basename($fname); |
68 | 68 | } |
69 | - return (string)$title; |
|
69 | + return (string) $title; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | if ($src == '') { |
177 | 177 | return ''; |
178 | 178 | } else { |
179 | - $tmp_src = basename($src) ; |
|
179 | + $tmp_src = basename($src); |
|
180 | 180 | if ($tmp_src == '') { |
181 | 181 | return $src; |
182 | 182 | } else { |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | { |
199 | 199 | // Select src tag from img tag. |
200 | 200 | $match = array(); |
201 | - preg_match("|(src=\".*\" )|U", $imgtag, $match); //src |
|
201 | + preg_match("|(src=\".*\" )|U", $imgtag, $match); //src |
|
202 | 202 | list($key, $srctag) = each($match); |
203 | 203 | $src = substr($srctag, 5, (strlen($srctag) - 7)); |
204 | 204 | if (stristr($src, 'http') === false) { |
@@ -230,8 +230,8 @@ discard block |
||
230 | 230 | while (list($key, $imgtag) = each($match)) { |
231 | 231 | $imgname = GetImgName($imgtag); |
232 | 232 | if ($imgname != '' && !in_array($imgname, $imgparams)) { |
233 | - array_push($imgparams, $imgname); // name (+ type) of the images in the html test |
|
234 | - $imgcount = $imgcount + 1; // number of images in the html test |
|
233 | + array_push($imgparams, $imgname); // name (+ type) of the images in the html test |
|
234 | + $imgcount = $imgcount + 1; // number of images in the html test |
|
235 | 235 | } |
236 | 236 | } |
237 | 237 | } |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | if ($file != '..') { |
405 | 405 | $full_name = $folder.'/'.$file; |
406 | 406 | if (is_dir($full_name)) { |
407 | - $dflag = 1; // first directory |
|
407 | + $dflag = 1; // first directory |
|
408 | 408 | } |
409 | 409 | } |
410 | 410 | } |