@@ -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 | } |
@@ -7,4 +7,4 @@ |
||
7 | 7 | // directly to exercise.php. This redirection is enabled for 1.10.x (2015-04-21) |
8 | 8 | // The final goal of this file is to be removed in a few years time, if |
9 | 9 | // considered realistically not harmful |
10 | -require __DIR__ . '/exercise.php'; |
|
10 | +require __DIR__.'/exercise.php'; |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | for ($i = 1; $i <= $answer->nbrAnswers; $i++) { |
68 | 68 | if ($answer->isCorrect($i)) { |
69 | 69 | $nb_matches++; |
70 | - $defaults['answer[' . $nb_matches . ']'] = $answer->selectAnswer($i); |
|
71 | - $defaults['weighting[' . $nb_matches . ']'] = float_format($answer->selectWeighting($i), 1); |
|
72 | - $defaults['matches[' . $nb_matches . ']'] = $answer->correct[$i]; |
|
70 | + $defaults['answer['.$nb_matches.']'] = $answer->selectAnswer($i); |
|
71 | + $defaults['weighting['.$nb_matches.']'] = float_format($answer->selectWeighting($i), 1); |
|
72 | + $defaults['matches['.$nb_matches.']'] = $answer->correct[$i]; |
|
73 | 73 | } else { |
74 | 74 | $nb_options++; |
75 | - $defaults['option[' . $nb_options . ']'] = $answer->selectAnswer($i); |
|
75 | + $defaults['option['.$nb_options.']'] = $answer->selectAnswer($i); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | } |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | $html = '<table class="table table-striped table-hover"> |
104 | 104 | <thead> |
105 | 105 | <tr> |
106 | - <th width="10">' . get_lang('Number') . '</th> |
|
107 | - <th width="85%">' . get_lang('Answer') . '</th> |
|
108 | - <th width="15%">' . get_lang('MatchesTo') . '</th> |
|
109 | - <th width="10">' . get_lang('Weighting') . '</th> |
|
106 | + <th width="10">' . get_lang('Number').'</th> |
|
107 | + <th width="85%">' . get_lang('Answer').'</th> |
|
108 | + <th width="15%">' . get_lang('MatchesTo').'</th> |
|
109 | + <th width="10">' . get_lang('Weighting').'</th> |
|
110 | 110 | </tr> |
111 | 111 | </thead> |
112 | 112 | <tbody>'; |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | $html = '<table class="table table-striped table-hover"> |
155 | 155 | <thead> |
156 | 156 | <tr> |
157 | - <th width="15%">' . get_lang('Number') . '</th> |
|
158 | - <th width="85%">' . get_lang('Answer') . '</th> |
|
157 | + <th width="15%">' . get_lang('Number').'</th> |
|
158 | + <th width="85%">' . get_lang('Answer').'</th> |
|
159 | 159 | </tr> |
160 | 160 | </thead> |
161 | 161 | <tbody>'; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | ); |
177 | 177 | |
178 | 178 | $form->addHtml('<tr>'); |
179 | - $form->addHtml('<td>' . chr(64 + $i) . '</td>'); |
|
179 | + $form->addHtml('<td>'.chr(64 + $i).'</td>'); |
|
180 | 180 | $form->addText("option[$i]", null); |
181 | 181 | $form->addHtml('</tr>'); |
182 | 182 | } |
@@ -258,10 +258,10 @@ discard block |
||
258 | 258 | public function return_header($feedback_type = null, $counter = null, $score = null) |
259 | 259 | { |
260 | 260 | $header = parent::return_header($feedback_type, $counter, $score); |
261 | - $header .= '<table class="' . $this->question_table_class . '"> |
|
261 | + $header .= '<table class="'.$this->question_table_class.'"> |
|
262 | 262 | <tr> |
263 | - <th>' . get_lang('ElementList') . '</th> |
|
264 | - <th>' . get_lang('CorrespondsTo') . '</th> |
|
263 | + <th>' . get_lang('ElementList').'</th> |
|
264 | + <th>' . get_lang('CorrespondsTo').'</th> |
|
265 | 265 | </tr>'; |
266 | 266 | |
267 | 267 | return $header; |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | $html = '<table class="table table-striped table-hover">'; |
45 | 45 | $html .= '<thead>'; |
46 | 46 | $html .= '<tr>'; |
47 | - $html .= '<th>' . get_lang('Number') . '</th>'; |
|
48 | - $html .= '<th>' . get_lang('True') . '</th>'; |
|
49 | - $html .= '<th>' . get_lang('False') . '</th>'; |
|
50 | - $html .= '<th>' . get_lang('Answer') . '</th>'; |
|
47 | + $html .= '<th>'.get_lang('Number').'</th>'; |
|
48 | + $html .= '<th>'.get_lang('True').'</th>'; |
|
49 | + $html .= '<th>'.get_lang('False').'</th>'; |
|
50 | + $html .= '<th>'.get_lang('Answer').'</th>'; |
|
51 | 51 | |
52 | 52 | // show column comment when feedback is enable |
53 | 53 | if ($obj_ex->selectFeedbackType() != EXERCISE_FEEDBACK_TYPE_EXAM) { |
54 | - $html .= '<th>' . get_lang('Comment') . '</th>'; |
|
54 | + $html .= '<th>'.get_lang('Comment').'</th>'; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | $html .= '</tr>'; |
@@ -89,19 +89,19 @@ discard block |
||
89 | 89 | |
90 | 90 | $renderer->setElementTemplate( |
91 | 91 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
92 | - 'correct[' . $i . ']' |
|
92 | + 'correct['.$i.']' |
|
93 | 93 | ); |
94 | 94 | $renderer->setElementTemplate( |
95 | 95 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
96 | - 'counter[' . $i . ']' |
|
96 | + 'counter['.$i.']' |
|
97 | 97 | ); |
98 | 98 | $renderer->setElementTemplate( |
99 | 99 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
100 | - 'answer[' . $i . ']' |
|
100 | + 'answer['.$i.']' |
|
101 | 101 | ); |
102 | 102 | $renderer->setElementTemplate( |
103 | 103 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
104 | - 'comment[' . $i . ']' |
|
104 | + 'comment['.$i.']' |
|
105 | 105 | ); |
106 | 106 | |
107 | 107 | $answer_number = $form->addElement( |
@@ -114,15 +114,15 @@ discard block |
||
114 | 114 | $answer_number->freeze(); |
115 | 115 | |
116 | 116 | if (is_object($answer)) { |
117 | - $defaults['answer[' . $i . ']'] = $answer->answer[$i]; |
|
118 | - $defaults['comment[' . $i . ']'] = $answer->comment[$i]; |
|
117 | + $defaults['answer['.$i.']'] = $answer->answer[$i]; |
|
118 | + $defaults['comment['.$i.']'] = $answer->comment[$i]; |
|
119 | 119 | $correct = $answer->correct[$i]; |
120 | - $defaults['correct[' . $i . ']'] = $correct; |
|
120 | + $defaults['correct['.$i.']'] = $correct; |
|
121 | 121 | |
122 | 122 | $j = 1; |
123 | 123 | if (!empty($optionData)) { |
124 | 124 | foreach ($optionData as $id => $data) { |
125 | - $form->addElement('radio', 'correct[' . $i . ']', null, null, $id); |
|
125 | + $form->addElement('radio', 'correct['.$i.']', null, null, $id); |
|
126 | 126 | $j++; |
127 | 127 | if ($j == 3) { |
128 | 128 | break; |
@@ -130,15 +130,15 @@ discard block |
||
130 | 130 | } |
131 | 131 | } |
132 | 132 | } else { |
133 | - $form->addElement('radio', 'correct[' . $i . ']', null, null, 1); |
|
134 | - $form->addElement('radio', 'correct[' . $i . ']', null, null, 2); |
|
133 | + $form->addElement('radio', 'correct['.$i.']', null, null, 1); |
|
134 | + $form->addElement('radio', 'correct['.$i.']', null, null, 2); |
|
135 | 135 | |
136 | - $defaults['answer[' . $i . ']'] = ''; |
|
137 | - $defaults['comment[' . $i . ']'] = ''; |
|
138 | - $defaults['correct[' . $i . ']'] = ''; |
|
136 | + $defaults['answer['.$i.']'] = ''; |
|
137 | + $defaults['comment['.$i.']'] = ''; |
|
138 | + $defaults['correct['.$i.']'] = ''; |
|
139 | 139 | } |
140 | 140 | |
141 | - $boxes_names[] = 'correct[' . $i . ']'; |
|
141 | + $boxes_names[] = 'correct['.$i.']'; |
|
142 | 142 | |
143 | 143 | $form->addHtmlEditor( |
144 | 144 | "answer[$i]", |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | if ($obj_ex->selectFeedbackType() != EXERCISE_FEEDBACK_TYPE_EXAM) { |
153 | 153 | $form->addElement( |
154 | 154 | 'html_editor', |
155 | - 'comment[' . $i . ']', |
|
155 | + 'comment['.$i.']', |
|
156 | 156 | null, |
157 | 157 | array(), |
158 | 158 | array( |
@@ -170,22 +170,22 @@ discard block |
||
170 | 170 | |
171 | 171 | $correctInputTemplate = '<div class="form-group">'; |
172 | 172 | $correctInputTemplate .= '<label class="col-sm-2 control-label">'; |
173 | - $correctInputTemplate .= '<span class="form_required">*</span>' . get_lang('Score'); |
|
173 | + $correctInputTemplate .= '<span class="form_required">*</span>'.get_lang('Score'); |
|
174 | 174 | $correctInputTemplate .= '</label>'; |
175 | 175 | $correctInputTemplate .= '<div class="col-sm-8">'; |
176 | 176 | $correctInputTemplate .= '<table>'; |
177 | 177 | $correctInputTemplate .= '<tr>'; |
178 | 178 | $correctInputTemplate .= '<td>'; |
179 | - $correctInputTemplate .= get_lang('Correct') . '{element}'; |
|
179 | + $correctInputTemplate .= get_lang('Correct').'{element}'; |
|
180 | 180 | $correctInputTemplate .= '<!-- BEGIN error --><span class="form_error">{error}</span><!-- END error -->'; |
181 | 181 | $correctInputTemplate .= '</td>'; |
182 | 182 | |
183 | 183 | $wrongInputTemplate = '<td>'; |
184 | - $wrongInputTemplate .= get_lang('Wrong') . '{element}'; |
|
184 | + $wrongInputTemplate .= get_lang('Wrong').'{element}'; |
|
185 | 185 | $wrongInputTemplate .= '<!-- BEGIN error --><span class="form_error">{error}</span><!-- END error -->'; |
186 | 186 | $wrongInputTemplate .= '</td>'; |
187 | 187 | |
188 | - $doubtScoreInputTemplate = '<td>' . get_lang('DoubtScore') . '<br>{element}'; |
|
188 | + $doubtScoreInputTemplate = '<td>'.get_lang('DoubtScore').'<br>{element}'; |
|
189 | 189 | $doubtScoreInputTemplate .= '<!-- BEGIN error --><span class="form_error">{error}</span><!-- END error -->'; |
190 | 190 | $doubtScoreInputTemplate .= '</td>'; |
191 | 191 | $doubtScoreInputTemplate .= '</tr>'; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | if (!empty($scores)) { |
216 | 216 | for ($i = 1; $i <= 3; $i++) { |
217 | - $defaults['option[' . $i . ']'] = $scores[$i - 1]; |
|
217 | + $defaults['option['.$i.']'] = $scores[$i - 1]; |
|
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | Question::updateQuestionOption($id, $optionData, $course_id); |
263 | 263 | } |
264 | 264 | } else { |
265 | - for ($i=1 ; $i <= 3 ; $i++) { |
|
265 | + for ($i = 1; $i <= 3; $i++) { |
|
266 | 266 | $last_id = Question::saveQuestionOption( |
267 | 267 | $this->id, |
268 | 268 | $this->options[$i], |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | the true, false, doubt options registered in this format |
288 | 288 | XX:YY:ZZZ where XX is a float score value.*/ |
289 | 289 | $extra_values = array(); |
290 | - for ($i=1 ; $i <= 3 ; $i++) { |
|
290 | + for ($i = 1; $i <= 3; $i++) { |
|
291 | 291 | $score = trim($form -> getSubmitValue('option['.$i.']')); |
292 | - $extra_values[]= $score; |
|
292 | + $extra_values[] = $score; |
|
293 | 293 | } |
294 | 294 | $this->setExtra(implode(':', $extra_values)); |
295 | 295 | |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | } |
305 | 305 | $questionWeighting += $extra_values[0]; //By default 0 has the correct answers |
306 | 306 | |
307 | - $objAnswer->createAnswer($answer, $goodAnswer, $comment,'',$i); |
|
307 | + $objAnswer->createAnswer($answer, $goodAnswer, $comment, '', $i); |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | // saves the answers into the data base |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | function return_header($feedback_type = null, $counter = null, $score = null) |
325 | 325 | { |
326 | 326 | $header = parent::return_header($feedback_type, $counter, $score); |
327 | - $header .= '<table class="'.$this->question_table_class .'"> |
|
327 | + $header .= '<table class="'.$this->question_table_class.'"> |
|
328 | 328 | <tr> |
329 | 329 | <th>'.get_lang("Choice").'</th> |
330 | 330 | <th>'. get_lang("ExpectedChoice").'</th> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $TBL_ANSWER = Database::get_course_table(TABLE_QUIZ_ANSWER); |
14 | 14 | $questionId = intval($_GET['questionId']); |
15 | -$answerId = intval($_GET['answerId']); |
|
15 | +$answerId = intval($_GET['answerId']); |
|
16 | 16 | |
17 | 17 | if ($_GET['type'] == "square" || $_GET['type'] == "circle") { |
18 | 18 | $hotspot_type = $_GET['type']; |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | } |
21 | 21 | if ($_GET['type'] == "poly" || $_GET['type'] == "delineation" || $_GET['type'] == "oar") { |
22 | 22 | $hotspot_type = $_GET['type']; |
23 | - $tmp_coord = explode(",",$_GET['co']); |
|
23 | + $tmp_coord = explode(",", $_GET['co']); |
|
24 | 24 | $i = 0; |
25 | 25 | $hotspot_coordinates = ""; |
26 | 26 | foreach ($tmp_coord as $coord) { |
27 | - if ($i%2 == 0) { |
|
27 | + if ($i % 2 == 0) { |
|
28 | 28 | $delimiter = ";"; |
29 | 29 | } else { |
30 | 30 | $delimiter = "|"; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $hotspot_coordinates .= $coord.$delimiter; |
33 | 33 | $i++; |
34 | 34 | } |
35 | - $hotspot_coordinates = api_substr($hotspot_coordinates,0,-2); |
|
35 | + $hotspot_coordinates = api_substr($hotspot_coordinates, 0, -2); |
|
36 | 36 | } |
37 | 37 | $course_id = api_get_course_int_id(); |
38 | 38 | $sql = "UPDATE $TBL_ANSWER SET |
@@ -13,13 +13,13 @@ discard block |
||
13 | 13 | |
14 | 14 | $hotspot_lang_file = api_get_path(SYS_LANG_PATH); |
15 | 15 | |
16 | -if(isset($_GET['lang'])) { |
|
16 | +if (isset($_GET['lang'])) { |
|
17 | 17 | //$search = array('../','\\0','\\'); |
18 | 18 | $lang = urldecode($_GET['lang']); |
19 | 19 | if (preg_match('/^[a-zA-Z0-9\._-]+$/', $lang)) { |
20 | 20 | //$lang = str_replace($search,$replace,urldecode($_GET['lang'])); |
21 | - if(file_exists($hotspot_lang_file . $lang . '/hotspot.inc.php')) |
|
22 | - $hotspot_lang_file .= $lang . '/hotspot.inc.php'; |
|
21 | + if (file_exists($hotspot_lang_file.$lang.'/hotspot.inc.php')) |
|
22 | + $hotspot_lang_file .= $lang.'/hotspot.inc.php'; |
|
23 | 23 | else |
24 | 24 | $hotspot_lang_file .= 'english/hotspot.inc.php'; |
25 | 25 | } else { |
@@ -33,25 +33,25 @@ discard block |
||
33 | 33 | |
34 | 34 | $temp = array(); |
35 | 35 | |
36 | -foreach($file as $value) |
|
36 | +foreach ($file as $value) |
|
37 | 37 | { |
38 | 38 | $explode = explode('=', $value); |
39 | 39 | |
40 | - if(count($explode) > 1) |
|
40 | + if (count($explode) > 1) |
|
41 | 41 | { |
42 | 42 | $explode[0] = trim($explode[0]); |
43 | - $explode[0] = '&' . substr($explode[0], 1, strlen($explode[0])); |
|
43 | + $explode[0] = '&'.substr($explode[0], 1, strlen($explode[0])); |
|
44 | 44 | |
45 | 45 | $explode[1] = trim($explode[1]); |
46 | 46 | $explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1); |
47 | 47 | $explode[1] = str_replace('"', '', $explode[1]); |
48 | 48 | |
49 | - $temp[] = $explode[0] . '=' . $explode[1]; |
|
49 | + $temp[] = $explode[0].'='.$explode[1]; |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | -foreach($temp as $value) |
|
53 | +foreach ($temp as $value) |
|
54 | 54 | { |
55 | - echo $value . ' '; |
|
55 | + echo $value.' '; |
|
56 | 56 | } |
57 | 57 | ?> |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | // The breadcrumbs. |
33 | 33 | $interbreadcrumb[] = array( |
34 | - 'url' => api_get_path(WEB_CODE_PATH) . '.exercise/exercise.php?' . api_get_cidreq(), |
|
34 | + 'url' => api_get_path(WEB_CODE_PATH).'.exercise/exercise.php?'.api_get_cidreq(), |
|
35 | 35 | 'name' => get_lang('Exercises') |
36 | 36 | ); |
37 | 37 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $_course, |
154 | 154 | $_FILES['userFile'], |
155 | 155 | $document_sys_path, |
156 | - $uploadPath . '/' . $fld, |
|
156 | + $uploadPath.'/'.$fld, |
|
157 | 157 | api_get_user_id(), |
158 | 158 | null, |
159 | 159 | null, |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $imgparams = $_POST['imgparams']; |
166 | 166 | $checked = CheckImageName($imgparams, $filename); |
167 | 167 | if ($checked) { |
168 | - $imgcount = $imgcount-1; |
|
168 | + $imgcount = $imgcount - 1; |
|
169 | 169 | } else { |
170 | 170 | $dialogBox .= $filename.' '.get_lang('NameNotEqual'); |
171 | 171 | my_delete($document_sys_path.$uploadPath.'/'.$fld.'/'.$filename); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | Display::addFlash( |
249 | 249 | Display::return_message(get_lang('MessageSent')) |
250 | 250 | ); |
251 | - header('Location: ' . api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId); |
|
251 | + header('Location: '.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId); |
|
252 | 252 | exit; |
253 | 253 | } |
254 | 254 | } |
@@ -278,8 +278,8 @@ discard block |
||
278 | 278 | api_is_course_tutor() || api_is_course_coach() |
279 | 279 | ) { |
280 | 280 | $actions .= '<a href="admin.php?exerciseId='.intval($_GET['exerciseId']).'">'.Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>'; |
281 | - $actions .='<a href="live_stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('activity_monitor.png', get_lang('LiveResults'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
282 | - $actions .='<a href="stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('statistics.png', get_lang('ReportByQuestion'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
281 | + $actions .= '<a href="live_stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('activity_monitor.png', get_lang('LiveResults'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
282 | + $actions .= '<a href="stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('statistics.png', get_lang('ReportByQuestion'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
283 | 283 | |
284 | 284 | $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&exerciseId='.intval($_GET['exerciseId']).'" >'. |
285 | 285 | Display::return_icon('save.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>'; |