@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | use Symfony\Component\Finder\Finder; |
6 | 6 | |
7 | 7 | require_once __DIR__.'/../inc/global.inc.php'; |
8 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
8 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
9 | 9 | |
10 | 10 | api_protect_course_script(true); |
11 | 11 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | if ($upload) { |
82 | 82 | $zip = new PclZip($_FILES['file']['tmp_name']); |
83 | 83 | // Check the zip content (real size and file extension) |
84 | - $zipFileList = (array)$zip->listContent(); |
|
84 | + $zipFileList = (array) $zip->listContent(); |
|
85 | 85 | |
86 | 86 | $realSize = 0; |
87 | 87 | foreach ($zipFileList as & $this_content) { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | foreach ($result as $item) { |
129 | 129 | $title = $item['title_clean']; |
130 | 130 | $insert_date = str_replace(array(':', '-', ' '), '_', api_get_local_time($item['sent_date_from_db'])); |
131 | - $title = api_replace_dangerous_char($insert_date.'_'.$item['username'].'_'.$title); |
|
131 | + $title = api_replace_dangerous_char($insert_date.'_'.$item['username'].'_'.$title); |
|
132 | 132 | $finalResult[$title] = $item['id']; |
133 | 133 | } |
134 | 134 |
@@ -118,8 +118,8 @@ |
||
118 | 118 | while ($j < $number_friends) { |
119 | 119 | if (isset($friends[$j])) { |
120 | 120 | $friend = $friends[$j]; |
121 | - $toolBar = '<button class="btn btn-danger" onclick="delete_friend(this)" id=img_' . $friend['friend_user_id'] . '> |
|
122 | - ' . get_lang('Delete') . ' |
|
121 | + $toolBar = '<button class="btn btn-danger" onclick="delete_friend(this)" id=img_'.$friend['friend_user_id'].'> |
|
122 | + ' . get_lang('Delete').' |
|
123 | 123 | </button>'; |
124 | 124 | $url = api_get_path(WEB_PATH).'main/social/profile.php?u='.$friend['friend_user_id']; |
125 | 125 | $friend['user_info']['complete_name'] = Display::url($friend['user_info']['complete_name'], $url); |
@@ -77,21 +77,21 @@ discard block |
||
77 | 77 | { |
78 | 78 | // @todo getAnswersList() converts the answers using api_html_entity_decode() |
79 | 79 | $this->answerList = $this->getAnswersList(true); |
80 | - $out = ' <choiceInteraction responseIdentifier="' . $questionIdent . '" >' . "\n"; |
|
81 | - $out .= ' <prompt><![CDATA['.formatExerciseQtiTitle($questionStatment) . ']]></prompt>'. "\n"; |
|
80 | + $out = ' <choiceInteraction responseIdentifier="'.$questionIdent.'" >'."\n"; |
|
81 | + $out .= ' <prompt><![CDATA['.formatExerciseQtiTitle($questionStatment).']]></prompt>'."\n"; |
|
82 | 82 | if (is_array($this->answerList)) { |
83 | 83 | foreach ($this->answerList as $current_answer) { |
84 | - $out .= '<simpleChoice identifier="answer_' . $current_answer['id'] . '" fixed="false"> |
|
84 | + $out .= '<simpleChoice identifier="answer_'.$current_answer['id'].'" fixed="false"> |
|
85 | 85 | <![CDATA['.formatExerciseQtiTitle($current_answer['answer']).']]>'; |
86 | 86 | if (isset($current_answer['comment']) && $current_answer['comment'] != '') { |
87 | - $out .= '<feedbackInline identifier="answer_' . $current_answer['id'] . '"> |
|
87 | + $out .= '<feedbackInline identifier="answer_'.$current_answer['id'].'"> |
|
88 | 88 | <![CDATA['.formatExerciseQtiTitle($current_answer['comment']).']]> |
89 | 89 | </feedbackInline>'; |
90 | 90 | } |
91 | - $out .= '</simpleChoice>'. "\n"; |
|
91 | + $out .= '</simpleChoice>'."\n"; |
|
92 | 92 | } |
93 | 93 | } |
94 | - $out .= ' </choiceInteraction>'. "\n"; |
|
94 | + $out .= ' </choiceInteraction>'."\n"; |
|
95 | 95 | |
96 | 96 | return $out; |
97 | 97 | } |
@@ -106,32 +106,32 @@ discard block |
||
106 | 106 | $type = $this->getQuestionType(); |
107 | 107 | if ($type == MCMA) $cardinality = 'multiple'; else $cardinality = 'single'; |
108 | 108 | |
109 | - $out = ' <responseDeclaration identifier="' . $questionIdent . '" cardinality="' . $cardinality . '" baseType="identifier">' . "\n"; |
|
109 | + $out = ' <responseDeclaration identifier="'.$questionIdent.'" cardinality="'.$cardinality.'" baseType="identifier">'."\n"; |
|
110 | 110 | |
111 | 111 | // Match the correct answers. |
112 | 112 | |
113 | - $out .= ' <correctResponse>'. "\n"; |
|
113 | + $out .= ' <correctResponse>'."\n"; |
|
114 | 114 | if (is_array($this->answerList)) { |
115 | - foreach($this->answerList as $current_answer) { |
|
115 | + foreach ($this->answerList as $current_answer) { |
|
116 | 116 | if ($current_answer['correct']) { |
117 | - $out .= ' <value>answer_'. $current_answer['id'] .'</value>'. "\n"; |
|
117 | + $out .= ' <value>answer_'.$current_answer['id'].'</value>'."\n"; |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | } |
121 | - $out .= ' </correctResponse>'. "\n"; |
|
121 | + $out .= ' </correctResponse>'."\n"; |
|
122 | 122 | |
123 | 123 | //Add the grading |
124 | 124 | |
125 | - $out .= ' <mapping>'. "\n"; |
|
125 | + $out .= ' <mapping>'."\n"; |
|
126 | 126 | if (is_array($this->answerList)) { |
127 | - foreach($this->answerList as $current_answer) { |
|
127 | + foreach ($this->answerList as $current_answer) { |
|
128 | 128 | if (isset($current_answer['grade'])) { |
129 | - $out .= ' <mapEntry mapKey="answer_'. $current_answer['id'] .'" mappedValue="'.$current_answer['grade'].'" />'. "\n"; |
|
129 | + $out .= ' <mapEntry mapKey="answer_'.$current_answer['id'].'" mappedValue="'.$current_answer['grade'].'" />'."\n"; |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | } |
133 | - $out .= ' </mapping>'. "\n"; |
|
134 | - $out .= ' </responseDeclaration>'. "\n"; |
|
133 | + $out .= ' </mapping>'."\n"; |
|
134 | + $out .= ' </responseDeclaration>'."\n"; |
|
135 | 135 | |
136 | 136 | return $out; |
137 | 137 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $key = $answer['id']; |
159 | 159 | $answer = $answer['answer']; |
160 | 160 | $len = api_strlen($answer); |
161 | - $text = str_replace('['.$answer.']','<textEntryInteraction responseIdentifier="fill_'.$key.'" expectedLength="'.api_strlen($answer).'"/>', $text); |
|
161 | + $text = str_replace('['.$answer.']', '<textEntryInteraction responseIdentifier="fill_'.$key.'" expectedLength="'.api_strlen($answer).'"/>', $text); |
|
162 | 162 | } |
163 | 163 | } |
164 | 164 | $out = $text; |
@@ -178,17 +178,17 @@ discard block |
||
178 | 178 | foreach ($this->answerList as $answer) { |
179 | 179 | $answerKey = $answer['id']; |
180 | 180 | $answer = $answer['answer']; |
181 | - $out .= ' <responseDeclaration identifier="fill_' . $answerKey . '" cardinality="single" baseType="identifier">' . "\n"; |
|
182 | - $out .= ' <correctResponse>'. "\n"; |
|
183 | - $out .= ' <value><![CDATA['.formatExerciseQtiTitle($answer).']]></value>'. "\n"; |
|
184 | - $out .= ' </correctResponse>'. "\n"; |
|
181 | + $out .= ' <responseDeclaration identifier="fill_'.$answerKey.'" cardinality="single" baseType="identifier">'."\n"; |
|
182 | + $out .= ' <correctResponse>'."\n"; |
|
183 | + $out .= ' <value><![CDATA['.formatExerciseQtiTitle($answer).']]></value>'."\n"; |
|
184 | + $out .= ' </correctResponse>'."\n"; |
|
185 | 185 | if (isset($this->gradeList[$answerKey])) { |
186 | - $out .= ' <mapping>'. "\n"; |
|
187 | - $out .= ' <mapEntry mapKey="'.$answer.'" mappedValue="'.$this->gradeList[$answerKey].'"/>'. "\n"; |
|
188 | - $out .= ' </mapping>'. "\n"; |
|
186 | + $out .= ' <mapping>'."\n"; |
|
187 | + $out .= ' <mapEntry mapKey="'.$answer.'" mappedValue="'.$this->gradeList[$answerKey].'"/>'."\n"; |
|
188 | + $out .= ' </mapping>'."\n"; |
|
189 | 189 | } |
190 | 190 | |
191 | - $out .= ' </responseDeclaration>'. "\n"; |
|
191 | + $out .= ' </responseDeclaration>'."\n"; |
|
192 | 192 | } |
193 | 193 | } |
194 | 194 | |
@@ -210,11 +210,11 @@ discard block |
||
210 | 210 | $this->answerList = $this->getAnswersList(true); |
211 | 211 | $maxAssociation = max(count($this->leftList), count($this->rightList)); |
212 | 212 | |
213 | - $out = '<matchInteraction responseIdentifier="' . $questionIdent . '" maxAssociations="'. $maxAssociation .'">'. "\n"; |
|
213 | + $out = '<matchInteraction responseIdentifier="'.$questionIdent.'" maxAssociations="'.$maxAssociation.'">'."\n"; |
|
214 | 214 | $out .= $questionStatment; |
215 | 215 | |
216 | 216 | //add left column |
217 | - $out .= ' <simpleMatchSet>'. "\n"; |
|
217 | + $out .= ' <simpleMatchSet>'."\n"; |
|
218 | 218 | if (is_array($this->leftList)) { |
219 | 219 | foreach ($this->leftList as $leftKey=>$leftElement) { |
220 | 220 | $out .= ' |
@@ -224,22 +224,22 @@ discard block |
||
224 | 224 | } |
225 | 225 | } |
226 | 226 | |
227 | - $out .= ' </simpleMatchSet>'. "\n"; |
|
227 | + $out .= ' </simpleMatchSet>'."\n"; |
|
228 | 228 | |
229 | 229 | //add right column |
230 | - $out .= ' <simpleMatchSet>'. "\n"; |
|
230 | + $out .= ' <simpleMatchSet>'."\n"; |
|
231 | 231 | $i = 0; |
232 | 232 | |
233 | 233 | if (is_array($this->rightList)) { |
234 | - foreach($this->rightList as $rightKey=>$rightElement) { |
|
234 | + foreach ($this->rightList as $rightKey=>$rightElement) { |
|
235 | 235 | $out .= '<simpleAssociableChoice identifier="right_'.$i.'" > |
236 | 236 | <![CDATA['.formatExerciseQtiTitle($rightElement['answer']).']]> |
237 | 237 | </simpleAssociableChoice>'. "\n"; |
238 | 238 | $i++; |
239 | 239 | } |
240 | 240 | } |
241 | - $out .= ' </simpleMatchSet>'. "\n"; |
|
242 | - $out .= '</matchInteraction>'. "\n"; |
|
241 | + $out .= ' </simpleMatchSet>'."\n"; |
|
242 | + $out .= '</matchInteraction>'."\n"; |
|
243 | 243 | |
244 | 244 | return $out; |
245 | 245 | } |
@@ -250,31 +250,31 @@ discard block |
||
250 | 250 | public function imsExportResponsesDeclaration($questionIdent) |
251 | 251 | { |
252 | 252 | $this->answerList = $this->getAnswersList(true); |
253 | - $out = ' <responseDeclaration identifier="' . $questionIdent . '" cardinality="single" baseType="identifier">' . "\n"; |
|
254 | - $out .= ' <correctResponse>' . "\n"; |
|
253 | + $out = ' <responseDeclaration identifier="'.$questionIdent.'" cardinality="single" baseType="identifier">'."\n"; |
|
254 | + $out .= ' <correctResponse>'."\n"; |
|
255 | 255 | |
256 | 256 | $gradeArray = array(); |
257 | 257 | if (isset($this->leftList) && is_array($this->leftList)) { |
258 | 258 | foreach ($this->leftList as $leftKey => $leftElement) { |
259 | - $i=0; |
|
259 | + $i = 0; |
|
260 | 260 | foreach ($this->rightList as $rightKey=>$rightElement) { |
261 | 261 | if (($leftElement['match'] == $rightElement['code'])) { |
262 | - $out .= ' <value>left_' . $leftKey . ' right_'.$i.'</value>'. "\n"; |
|
263 | - $gradeArray['left_' . $leftKey . ' right_'.$i] = $leftElement['grade']; |
|
262 | + $out .= ' <value>left_'.$leftKey.' right_'.$i.'</value>'."\n"; |
|
263 | + $gradeArray['left_'.$leftKey.' right_'.$i] = $leftElement['grade']; |
|
264 | 264 | } |
265 | 265 | $i++; |
266 | 266 | } |
267 | 267 | } |
268 | 268 | } |
269 | - $out .= ' </correctResponse>'. "\n"; |
|
270 | - $out .= ' <mapping>' . "\n"; |
|
269 | + $out .= ' </correctResponse>'."\n"; |
|
270 | + $out .= ' <mapping>'."\n"; |
|
271 | 271 | if (is_array($gradeArray)) { |
272 | 272 | foreach ($gradeArray as $gradeKey=>$grade) { |
273 | - $out .= ' <mapEntry mapKey="'.$gradeKey.'" mappedValue="'.$grade.'"/>' . "\n"; |
|
273 | + $out .= ' <mapEntry mapKey="'.$gradeKey.'" mappedValue="'.$grade.'"/>'."\n"; |
|
274 | 274 | } |
275 | 275 | } |
276 | - $out .= ' </mapping>' . "\n"; |
|
277 | - $out .= ' </responseDeclaration>'. "\n"; |
|
276 | + $out .= ' </mapping>'."\n"; |
|
277 | + $out .= ' </responseDeclaration>'."\n"; |
|
278 | 278 | |
279 | 279 | return $out; |
280 | 280 | } |
@@ -290,12 +290,12 @@ discard block |
||
290 | 290 | * TODO update this to match hot spots instead of copying matching |
291 | 291 | * Export the question part as a matrix-choice, with only one possible answer per line. |
292 | 292 | */ |
293 | - public function imsExportResponses($questionIdent, $questionStatment, $questionDesc='', $questionMedia='') |
|
293 | + public function imsExportResponses($questionIdent, $questionStatment, $questionDesc = '', $questionMedia = '') |
|
294 | 294 | { |
295 | 295 | $this->answerList = $this->getAnswersList(true); |
296 | 296 | $questionMedia = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/images/'.$questionMedia; |
297 | 297 | $mimetype = mime_content_type($questionMedia); |
298 | - if(empty($mimetype)){ |
|
298 | + if (empty($mimetype)) { |
|
299 | 299 | $mimetype = 'image/jpeg'; |
300 | 300 | } |
301 | 301 | |
@@ -311,26 +311,26 @@ discard block |
||
311 | 311 | //coords are transformed according to QTIv2 rules here: http://www.imsproject.org/question/qtiv2p1pd/imsqti_infov2p1pd.html#element10663 |
312 | 312 | $coords = ''; |
313 | 313 | $type = 'default'; |
314 | - switch($answer['hotspot_type']){ |
|
314 | + switch ($answer['hotspot_type']) { |
|
315 | 315 | case 'square': |
316 | 316 | $type = 'rect'; |
317 | 317 | $res = array(); |
318 | - $coords = preg_match('/^\s*(\d+);(\d+)\|(\d+)\|(\d+)\s*$/',$answer['hotspot_coord'],$res); |
|
319 | - $coords = $res[1].','.$res[2].','.((int)$res[1]+(int)$res[3]).",".((int)$res[2]+(int)$res[4]); |
|
318 | + $coords = preg_match('/^\s*(\d+);(\d+)\|(\d+)\|(\d+)\s*$/', $answer['hotspot_coord'], $res); |
|
319 | + $coords = $res[1].','.$res[2].','.((int) $res[1] + (int) $res[3]).",".((int) $res[2] + (int) $res[4]); |
|
320 | 320 | break; |
321 | 321 | case 'circle': |
322 | 322 | $type = 'circle'; |
323 | 323 | $res = array(); |
324 | - $coords = preg_match('/^\s*(\d+);(\d+)\|(\d+)\|(\d+)\s*$/',$answer['hotspot_coord'],$res); |
|
325 | - $coords = $res[1].','.$res[2].','.sqrt(pow(($res[1]-$res[3]),2)+pow(($res[2]-$res[4]))); |
|
324 | + $coords = preg_match('/^\s*(\d+);(\d+)\|(\d+)\|(\d+)\s*$/', $answer['hotspot_coord'], $res); |
|
325 | + $coords = $res[1].','.$res[2].','.sqrt(pow(($res[1] - $res[3]), 2) + pow(($res[2] - $res[4]))); |
|
326 | 326 | break; |
327 | 327 | case 'poly': |
328 | 328 | $type = 'poly'; |
329 | - $coords = str_replace(array(';','|'),array(',',','),$answer['hotspot_coord']); |
|
329 | + $coords = str_replace(array(';', '|'), array(',', ','), $answer['hotspot_coord']); |
|
330 | 330 | break; |
331 | 331 | case 'delineation' : |
332 | 332 | $type = 'delineation'; |
333 | - $coords = str_replace(array(';','|'),array(',',','),$answer['hotspot_coord']); |
|
333 | + $coords = str_replace(array(';', '|'), array(',', ','), $answer['hotspot_coord']); |
|
334 | 334 | break; |
335 | 335 | } |
336 | 336 | $text .= ' <hotspotChoice shape="'.$type.'" coords="'.$coords.'" identifier="'.$key.'"/>'."\n"; |
@@ -350,18 +350,18 @@ discard block |
||
350 | 350 | $this->answerList = $this->getAnswersList(true); |
351 | 351 | $this->gradeList = $this->getGradesList(); |
352 | 352 | $out = ''; |
353 | - $out .= ' <responseDeclaration identifier="hotspot_'.$questionIdent.'" cardinality="ordered" baseType="identifier">' . "\n"; |
|
354 | - $out .= ' <correctResponse>'. "\n"; |
|
353 | + $out .= ' <responseDeclaration identifier="hotspot_'.$questionIdent.'" cardinality="ordered" baseType="identifier">'."\n"; |
|
354 | + $out .= ' <correctResponse>'."\n"; |
|
355 | 355 | |
356 | 356 | if (is_array($this->answerList)) { |
357 | - foreach ($this->answerList as $answerKey=>$answer) { |
|
357 | + foreach ($this->answerList as $answerKey=>$answer) { |
|
358 | 358 | $answerKey = $answer['id']; |
359 | 359 | $answer = $answer['answer']; |
360 | 360 | $out .= '<value><![CDATA['.formatExerciseQtiTitle($answerKey).']]></value>'; |
361 | 361 | } |
362 | 362 | } |
363 | - $out .= ' </correctResponse>'. "\n"; |
|
364 | - $out .= ' </responseDeclaration>'. "\n"; |
|
363 | + $out .= ' </correctResponse>'."\n"; |
|
364 | + $out .= ' </responseDeclaration>'."\n"; |
|
365 | 365 | |
366 | 366 | return $out; |
367 | 367 | } |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | * TODO implement |
378 | 378 | * Export the question part as a matrix-choice, with only one possible answer per line. |
379 | 379 | */ |
380 | - public function imsExportResponses($questionIdent, $questionStatment, $questionDesc='', $questionMedia='') |
|
380 | + public function imsExportResponses($questionIdent, $questionStatment, $questionDesc = '', $questionMedia = '') |
|
381 | 381 | { |
382 | 382 | return ''; |
383 | 383 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | 0, //howMany |
85 | 85 | 1, //$orderby = 1 |
86 | 86 | 'ASC', |
87 | - -1, //visibility |
|
87 | + -1, //visibility |
|
88 | 88 | $_GET['q'], |
89 | 89 | null, //$urlId |
90 | 90 | true //AlsoSearchCode |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | if (!empty($course['category_code'])) { |
108 | 108 | $parents = CourseCategory::getParentsToString($course['category_code']); |
109 | - $title = $parents . $course['title']; |
|
109 | + $title = $parents.$course['title']; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | $results['items'][] = array( |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | ON u.user_id = r.user_id |
187 | 187 | WHERE session_id = %d AND c_id = '%s' |
188 | 188 | AND (u.firstname LIKE '%s' OR u.username LIKE '%s' OR u.lastname LIKE '%s')"; |
189 | - $needle = '%' . $_GET['q'] . '%'; |
|
189 | + $needle = '%'.$_GET['q'].'%'; |
|
190 | 190 | $sql_query = sprintf($sql, $_GET['session_id'], $course['real_id'], $needle, $needle, $needle); |
191 | 191 | |
192 | 192 | $result = Database::query($sql_query); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | case 'search_exercise_by_course': |
206 | 206 | if (api_is_platform_admin()) { |
207 | 207 | $course = api_get_course_info_by_id($_GET['course_id']); |
208 | - $session_id = (!empty($_GET['session_id'])) ? intval($_GET['session_id']) : 0 ; |
|
208 | + $session_id = (!empty($_GET['session_id'])) ? intval($_GET['session_id']) : 0; |
|
209 | 209 | $exercises = ExerciseLib::get_all_exercises( |
210 | 210 | $course, |
211 | 211 | $session_id, |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | ); |
217 | 217 | |
218 | 218 | foreach ($exercises as $exercise) { |
219 | - $data[] = array('id' => $exercise['id'], 'text' => html_entity_decode($exercise['title']) ); |
|
219 | + $data[] = array('id' => $exercise['id'], 'text' => html_entity_decode($exercise['title'])); |
|
220 | 220 | } |
221 | 221 | if (!empty($data)) { |
222 | 222 | $data[] = array('id' => 'T', 'text' => 'TODOS'); |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | $sql, |
242 | 242 | intval($_GET['course_id']), |
243 | 243 | intval($_GET['session_id']), |
244 | - '%' . Database::escape_string($_GET['q']).'%' |
|
244 | + '%'.Database::escape_string($_GET['q']).'%' |
|
245 | 245 | ); |
246 | 246 | $result = Database::query($sql_query); |
247 | 247 | while ($survey = Database::fetch_assoc($result)) { |
248 | - $survey['title'] .= ($survey['anonymous'] == 1) ? ' (' . get_lang('Anonymous') . ')' : ''; |
|
248 | + $survey['title'] .= ($survey['anonymous'] == 1) ? ' ('.get_lang('Anonymous').')' : ''; |
|
249 | 249 | $data[] = array( |
250 | 250 | 'id' => $survey['id'], |
251 | 251 | 'text' => strip_tags(html_entity_decode($survey['title'])) |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | <div class="row"> |
72 | 72 | <div class="col-sm-10 col-sm-offset-2"> |
73 | 73 | <a class="btn btn-primary" id="send_message_link"> |
74 | - <em class="fa fa-envelope"></em> ' . get_lang('Send') . ' |
|
74 | + <em class="fa fa-envelope"></em> ' . get_lang('Send').' |
|
75 | 75 | </a> |
76 | 76 | </div> |
77 | 77 | </div> |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | $emailsubject = '['.api_get_setting('siteName').'] '.get_lang('YourReg').' '.api_get_setting('siteName'); |
137 | 137 | $email_admin = api_get_setting('emailAdministrator'); |
138 | 138 | $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS); |
139 | - $emailbody=get_lang('Dear')." ".stripslashes($recipient_name).",\n\n"; |
|
139 | + $emailbody = get_lang('Dear')." ".stripslashes($recipient_name).",\n\n"; |
|
140 | 140 | |
141 | - $emailbody.=sprintf(get_lang('YourAccountOnXHasJustBeenApprovedByOneOfOurAdministrators'), api_get_setting('siteName'))."\n"; |
|
142 | - $emailbody.=sprintf(get_lang('YouCanNowLoginAtXUsingTheLoginAndThePasswordYouHaveProvided'), api_get_path(WEB_PATH)).",\n\n"; |
|
143 | - $emailbody.=get_lang('HaveFun')."\n\n"; |
|
141 | + $emailbody .= sprintf(get_lang('YourAccountOnXHasJustBeenApprovedByOneOfOurAdministrators'), api_get_setting('siteName'))."\n"; |
|
142 | + $emailbody .= sprintf(get_lang('YouCanNowLoginAtXUsingTheLoginAndThePasswordYouHaveProvided'), api_get_path(WEB_PATH)).",\n\n"; |
|
143 | + $emailbody .= get_lang('HaveFun')."\n\n"; |
|
144 | 144 | //$emailbody.=get_lang('Problem'). "\n\n". get_lang('SignatureFormula'); |
145 | - $emailbody.=api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n". get_lang('Manager'). " ".api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n" .get_lang('Email') ." : ".api_get_setting('emailAdministrator'); |
|
145 | + $emailbody .= api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".get_lang('Manager')." ".api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n".get_lang('Email')." : ".api_get_setting('emailAdministrator'); |
|
146 | 146 | |
147 | 147 | $additionalParameters = array( |
148 | 148 | 'smsType' => SmsPlugin::ACCOUNT_APPROVED_CONNECT, |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | |
17 | 17 | $this_section = SECTION_SOCIAL; |
18 | 18 | |
19 | -$interbreadcrumb[] = array ('url' =>'profile.php','name' => get_lang('SocialNetwork')); |
|
20 | -$interbreadcrumb[] = array ('url' =>'#','name' => get_lang('Invitations')); |
|
19 | +$interbreadcrumb[] = array('url' =>'profile.php', 'name' => get_lang('SocialNetwork')); |
|
20 | +$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Invitations')); |
|
21 | 21 | |
22 | 22 | $userGroupModel = new UserGroup(); |
23 | 23 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | Display::return_message(get_lang('UserIsNotSubscribedToThisGroup'), 'warning') |
65 | 65 | ); |
66 | 66 | |
67 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php'); |
|
67 | + header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php'); |
|
68 | 68 | exit; |
69 | 69 | break; |
70 | 70 | case 'deny': |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | Display::return_message(get_lang('GroupInvitationWasDeny')) |
75 | 75 | ); |
76 | 76 | |
77 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php'); |
|
77 | + header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php'); |
|
78 | 78 | exit; |
79 | 79 | } |
80 | 80 | } |
@@ -130,24 +130,24 @@ discard block |
||
130 | 130 | $invitationHtml .= '<div class="btn-group btn-group-sm" role="group">'; |
131 | 131 | $invitationHtml .= Display::toolbarButton( |
132 | 132 | null, |
133 | - api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?' . http_build_query([ |
|
133 | + api_get_path(WEB_AJAX_PATH).'social.ajax.php?'.http_build_query([ |
|
134 | 134 | 'a' => 'add_friend', |
135 | 135 | 'friend_id' => $sender_user_id, |
136 | 136 | 'is_my_friend' => 'friend' |
137 | 137 | ]), |
138 | 138 | 'check', |
139 | 139 | 'default', |
140 | - ['id' => 'btn-accept-' . $sender_user_id] |
|
140 | + ['id' => 'btn-accept-'.$sender_user_id] |
|
141 | 141 | ); |
142 | 142 | $invitationHtml .= Display::toolbarButton( |
143 | 143 | null, |
144 | - api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?' . http_build_query([ |
|
144 | + api_get_path(WEB_AJAX_PATH).'social.ajax.php?'.http_build_query([ |
|
145 | 145 | 'a' => 'deny_friend', |
146 | 146 | 'denied_friend_id' => $sender_user_id, |
147 | 147 | ]), |
148 | 148 | 'times', |
149 | 149 | 'default', |
150 | - ['id' => 'btn-deny-' . $sender_user_id] |
|
150 | + ['id' => 'btn-deny-'.$sender_user_id] |
|
151 | 151 | ); |
152 | 152 | $invitationHtml .= '</div>'; |
153 | 153 | $invitationHtml .= '</div>'; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $invitationSentHtml .= '<div class="col-md-9">'; |
185 | 185 | $invitationSentHtml .= '<h4 class="title-profile"><a class="profile_link" href="profile.php?u='.$sender_user_id.'">'.$user_info['complete_name'].'</a></h4>'; |
186 | 186 | $invitationSentHtml .= '<div class="content-invitation">'.$title.' : '.$content.'</div>'; |
187 | - $invitationSentHtml .= '<div class="date-invitation">'. get_lang('DateSend').' : '.$date.'</div>'; |
|
187 | + $invitationSentHtml .= '<div class="date-invitation">'.get_lang('DateSend').' : '.$date.'</div>'; |
|
188 | 188 | $invitationSentHtml .= '</div>'; |
189 | 189 | $invitationSentHtml .= '</div></div>'; |
190 | 190 | } |
@@ -203,9 +203,9 @@ discard block |
||
203 | 203 | ); |
204 | 204 | $img = '<img class="img-responsive" src="'.$picture['file'].'" />'; |
205 | 205 | $invitation['picture_uri'] = '<a href="group_view.php?id='.$invitation['id'].'">'.$img.'</a>'; |
206 | - $invitation['name'] = '<a href="group_view.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a>'; |
|
206 | + $invitation['name'] = '<a href="group_view.php?id='.$invitation['id'].'">'.cut($invitation['name'], 120, true).'</a>'; |
|
207 | 207 | $invitation['description'] = cut($invitation['description'], 220, true); |
208 | - $new_invitation[]=$invitation; |
|
208 | + $new_invitation[] = $invitation; |
|
209 | 209 | $waitingInvitation .= '<div class="panel-invitations"><div class="row">'; |
210 | 210 | $waitingInvitation .= '<div class="col-md-3">'.$invitation['picture_uri'].'</div>'; |
211 | 211 | $waitingInvitation .= '<div class="col-md-9">'; |
@@ -214,19 +214,19 @@ discard block |
||
214 | 214 | $waitingInvitation .= '<div class="btn-group" role="group">'; |
215 | 215 | $waitingInvitation .= Display::toolbarButton( |
216 | 216 | get_lang('AcceptInvitation'), |
217 | - api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['accept' => $invitation['id']]), |
|
217 | + api_get_path(WEB_CODE_PATH).'social/invitations.php?'.http_build_query(['accept' => $invitation['id']]), |
|
218 | 218 | 'check', |
219 | 219 | 'success', |
220 | - ['id' => 'accept-invitation-' . $invitation['id']] |
|
220 | + ['id' => 'accept-invitation-'.$invitation['id']] |
|
221 | 221 | ); |
222 | 222 | $waitingInvitation .= Display::toolbarButton( |
223 | 223 | get_lang('DenyInvitation'), |
224 | - api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['deny' => $invitation['id']]), |
|
224 | + api_get_path(WEB_CODE_PATH).'social/invitations.php?'.http_build_query(['deny' => $invitation['id']]), |
|
225 | 225 | 'times', |
226 | 226 | 'danger', |
227 | - ['id' => 'deny-invitation-' . $invitation['id']] |
|
227 | + ['id' => 'deny-invitation-'.$invitation['id']] |
|
228 | 228 | ); |
229 | - $waitingInvitation .='</div>'; |
|
229 | + $waitingInvitation .= '</div>'; |
|
230 | 230 | $waitingInvitation .= '</div></div>'; |
231 | 231 | } |
232 | 232 | $socialInvitationsBlock .= Display::panel($waitingInvitation, get_lang('GroupsWaitingApproval')); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | require_once __DIR__.'/../config.php'; |
11 | 11 | |
12 | 12 | if (!isset($_REQUEST['t'], $_REQUEST['i'])) { |
13 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
13 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | $currentUserId = api_get_user_id(); |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | $typeUser = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_USER; |
36 | 36 | $typeCourse = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_COURSE; |
37 | 37 | $typeSession = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_SESSION; |
38 | -$typeFinalLp= intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_LP_FINAL_ITEM; |
|
39 | -$queryString = 'i=' . intval($_REQUEST['i']) . '&t=' . intval($_REQUEST['t']).$additionalQueryString; |
|
38 | +$typeFinalLp = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_LP_FINAL_ITEM; |
|
39 | +$queryString = 'i='.intval($_REQUEST['i']).'&t='.intval($_REQUEST['t']).$additionalQueryString; |
|
40 | 40 | |
41 | 41 | $serviceInfo = $plugin->getServices(intval($_REQUEST['i'])); |
42 | 42 | $userInfo = api_get_user_info($currentUserId); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | Display::addFlash( |
51 | 51 | Display::return_message($plugin->get_lang('NeedToSelectPaymentType'), 'error', false) |
52 | 52 | ); |
53 | - header('Location:' . api_get_self() . '?' . $queryString); |
|
53 | + header('Location:'.api_get_self().'?'.$queryString); |
|
54 | 54 | exit; |
55 | 55 | } |
56 | 56 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | Display::addFlash( |
59 | 59 | Display::return_message($plugin->get_lang('AdditionalInfoRequired'), 'error', false) |
60 | 60 | ); |
61 | - header('Location:' . api_get_self() . '?' . $queryString); |
|
61 | + header('Location:'.api_get_self().'?'.$queryString); |
|
62 | 62 | exit; |
63 | 63 | } |
64 | 64 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | if ($serviceSaleId !== false) { |
68 | 68 | $_SESSION['bc_service_sale_id'] = $serviceSaleId; |
69 | 69 | |
70 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_process_confirm.php'); |
|
70 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_process_confirm.php'); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | exit; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | if ($typeUser) { |
100 | 100 | $users = $em->getRepository('ChamiloUserBundle:User')->findAll(); |
101 | - $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']) . ' (' . get_lang('Myself') . ')'; |
|
101 | + $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']).' ('.get_lang('Myself').')'; |
|
102 | 102 | if (!empty($users)) { |
103 | 103 | foreach ($users as $user) { |
104 | 104 | if (intval($userInfo['user_id']) !== intval($user->getId())) { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $thisLpList = $em->getRepository('ChamiloCourseBundle:CLp')->findBy(['cId' => $course->getCourse()->getId()]); |
144 | 144 | foreach ($thisLpList as $lp) { |
145 | 145 | |
146 | - $courseLpList[$lp->getCId()] = $lp->getName() . ' (' . $course->getCourse()->getTitle() . ')';; |
|
146 | + $courseLpList[$lp->getCId()] = $lp->getName().' ('.$course->getCourse()->getTitle().')'; ; |
|
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | //Now only we need the final item and return the current LP |
161 | 161 | if ($item->getItemType() == TOOL_LP_FINAL_ITEM) { |
162 | 162 | $checker = true; |
163 | - $sessionLpList[$lp->getCId()] = $lp->getName() . ' (' . $session->getSession()->getName() . ')'; |
|
163 | + $sessionLpList[$lp->getCId()] = $lp->getName().' ('.$session->getSession()->getName().')'; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | //Now only we need the final item and return the current LP |
176 | 176 | if ($item->getItemType() == TOOL_LP_FINAL_ITEM) { |
177 | 177 | $checker = true; |
178 | - $sessionLpList[$lp->getCId()] = $lp->getName() . ' (' . $session->getSession()->getName() . ')'; |
|
178 | + $sessionLpList[$lp->getCId()] = $lp->getName().' ('.$session->getSession()->getName().')'; |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | <br><br> |
7 | 7 | <img src='//maps.google.com/mapfiles/ms/icons/red-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/blue-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/green-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/yellow-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/purple-dot.png'> |
8 | 8 | <br><br> |
9 | -Follow the link below to see the map : <a href='". api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php'>" . api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php</a>"; |
|
9 | +Follow the link below to see the map : <a href='". api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php'>".api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php</a>"; |
|
10 | 10 | $strings['enable_api'] = "Enable API"; |
11 | 11 | $strings['api_key'] = "Api Key"; |
12 | 12 | $strings['extra_field_name'] = "Extra field name"; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | <br><br> |
7 | 7 | <img src='//maps.google.com/mapfiles/ms/icons/red-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/blue-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/green-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/yellow-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/purple-dot.png'> |
8 | 8 | <br><br> |
9 | -Suivez le lien pour voir la carte : <a href='". api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php'>" . api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php</a>"; |
|
9 | +Suivez le lien pour voir la carte : <a href='". api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php'>".api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php</a>"; |
|
10 | 10 | $strings['enable_api'] = "Enable API"; |
11 | 11 | $strings['api_key'] = "Api Key"; |
12 | 12 | $strings['extra_field_name'] = "Nom de champ supplémentaire"; |