@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | // STEP 2: at least one file has to be selected. If not we return an error message |
43 | 43 | $ids = isset($_GET['id']) ? $_GET['id'] : array(); |
44 | - if (count($ids)>0) { |
|
44 | + if (count($ids) > 0) { |
|
45 | 45 | $checked_file_ids = $_POST['id']; |
46 | 46 | } else { |
47 | 47 | foreach ($_POST as $key => $value) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | $cat = get_dropbox_category($id); |
136 | - if (count($cat)==0) { |
|
136 | + if (count($cat) == 0) { |
|
137 | 137 | return false; |
138 | 138 | } |
139 | 139 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | WHERE c_id = $course_id AND cat_id='".intval($id)."'"; |
167 | 167 | $result = Database::query($sql); |
168 | 168 | |
169 | - while($row = Database::fetch_array($result)) { |
|
169 | + while ($row = Database::fetch_array($result)) { |
|
170 | 170 | $dropboxfile = new Dropbox_Person($user_id, $is_courseAdmin, $is_courseTutor); |
171 | 171 | if ($action == 'deletereceivedcategory') { |
172 | 172 | $dropboxfile->deleteReceivedWork($row[$id_field]); |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | |
658 | 658 | $full_name = $userInfo['complete_name'].$groupNameListToString; |
659 | 659 | $current_user_id = $current_user['user_id']; |
660 | - $options['user_' . $current_user_id] = $full_name; |
|
660 | + $options['user_'.$current_user_id] = $full_name; |
|
661 | 661 | } |
662 | 662 | } |
663 | 663 | } |
@@ -706,11 +706,11 @@ discard block |
||
706 | 706 | |
707 | 707 | $mailingId = $id - dropbox_cnf('mailingIdBase'); |
708 | 708 | if ($mailingId > 0) { |
709 | - return get_lang('MailingAsUsername', '') . $mailingId; |
|
709 | + return get_lang('MailingAsUsername', '').$mailingId; |
|
710 | 710 | } |
711 | 711 | $id = intval($id); |
712 | 712 | $sql = "SELECT ".(api_is_western_name_order() ? "CONCAT(firstname,' ', lastname)" : "CONCAT(lastname,' ', firstname)")." AS name |
713 | - FROM " . $dropbox_cnf['tbl_user'] . " |
|
713 | + FROM " . $dropbox_cnf['tbl_user']." |
|
714 | 714 | WHERE user_id='$id'"; |
715 | 715 | $result = Database::query($sql); |
716 | 716 | $res = Database::fetch_array($result); |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | { |
731 | 731 | $id = intval($id); |
732 | 732 | $sql = "SELECT username |
733 | - FROM " . dropbox_cnf('tbl_user') . " |
|
733 | + FROM " . dropbox_cnf('tbl_user')." |
|
734 | 734 | WHERE user_id='$id'"; |
735 | 735 | $result = Database::query($sql); |
736 | 736 | $res = Database::fetch_array($result); |
@@ -762,8 +762,8 @@ discard block |
||
762 | 762 | |
763 | 763 | // select all files that aren't referenced anymore |
764 | 764 | $sql = "SELECT DISTINCT f.id, f.filename |
765 | - FROM " . dropbox_cnf('tbl_file') . " f |
|
766 | - LEFT JOIN " . dropbox_cnf('tbl_person') . " p |
|
765 | + FROM " . dropbox_cnf('tbl_file')." f |
|
766 | + LEFT JOIN " . dropbox_cnf('tbl_person')." p |
|
767 | 767 | ON (f.id = p.file_id) |
768 | 768 | WHERE p.user_id IS NULL AND |
769 | 769 | f.c_id = $course_id |
@@ -771,14 +771,14 @@ discard block |
||
771 | 771 | $result = Database::query($sql); |
772 | 772 | while ($res = Database::fetch_array($result)) { |
773 | 773 | //delete the selected files from the post and file tables |
774 | - $sql = "DELETE FROM " . dropbox_cnf('tbl_post') . " |
|
775 | - WHERE c_id = $course_id AND file_id = '" . $res['id'] . "'"; |
|
774 | + $sql = "DELETE FROM ".dropbox_cnf('tbl_post')." |
|
775 | + WHERE c_id = $course_id AND file_id = '".$res['id']."'"; |
|
776 | 776 | Database::query($sql); |
777 | - $sql = "DELETE FROM " . dropbox_cnf('tbl_file') . " |
|
778 | - WHERE c_id = $course_id AND id ='" . $res['id'] . "'"; |
|
777 | + $sql = "DELETE FROM ".dropbox_cnf('tbl_file')." |
|
778 | + WHERE c_id = $course_id AND id ='".$res['id']."'"; |
|
779 | 779 | Database::query($sql); |
780 | 780 | //delete file from server |
781 | - @unlink( dropbox_cnf('sysPath') . '/' . $res['filename']); |
|
781 | + @unlink(dropbox_cnf('sysPath').'/'.$res['filename']); |
|
782 | 782 | } |
783 | 783 | } |
784 | 784 | |
@@ -801,11 +801,11 @@ discard block |
||
801 | 801 | |
802 | 802 | $mailingPseudoId = intval($mailingPseudoId); |
803 | 803 | $sql = "SELECT f.uploader_id |
804 | - FROM " . $dropbox_cnf['tbl_file'] . " f |
|
805 | - LEFT JOIN " . $dropbox_cnf['tbl_post'] . " p |
|
804 | + FROM " . $dropbox_cnf['tbl_file']." f |
|
805 | + LEFT JOIN " . $dropbox_cnf['tbl_post']." p |
|
806 | 806 | ON (f.id = p.file_id AND f.c_id = $course_id AND p.c_id = $course_id) |
807 | 807 | WHERE |
808 | - p.dest_user_id = '" . $mailingPseudoId . "' AND |
|
808 | + p.dest_user_id = '".$mailingPseudoId."' AND |
|
809 | 809 | p.c_id = $course_id |
810 | 810 | "; |
811 | 811 | $result = Database::query($sql); |
@@ -832,20 +832,20 @@ discard block |
||
832 | 832 | // for all content files, replace mailingPseudoId by owner as uploader |
833 | 833 | $file_id = intval($file_id); |
834 | 834 | $sql = "SELECT p.dest_user_id |
835 | - FROM " . $dropbox_cnf['tbl_post'] . " p |
|
836 | - WHERE c_id = $course_id AND p.file_id = '" . $file_id . "'"; |
|
835 | + FROM " . $dropbox_cnf['tbl_post']." p |
|
836 | + WHERE c_id = $course_id AND p.file_id = '".$file_id."'"; |
|
837 | 837 | $result = Database::query($sql); |
838 | 838 | |
839 | 839 | if ($res = Database::fetch_array($result)) { |
840 | 840 | $mailingPseudoId = $res['dest_user_id']; |
841 | 841 | if ($mailingPseudoId > dropbox_cnf('mailingIdBase')) { |
842 | - $sql = "DELETE FROM " . dropbox_cnf('tbl_person') . " |
|
843 | - WHERE c_id = $course_id AND user_id='" . $mailingPseudoId . "'"; |
|
842 | + $sql = "DELETE FROM ".dropbox_cnf('tbl_person')." |
|
843 | + WHERE c_id = $course_id AND user_id='".$mailingPseudoId."'"; |
|
844 | 844 | Database::query($sql); |
845 | 845 | |
846 | - $sql = "UPDATE " . dropbox_cnf('tbl_file') ." |
|
847 | - SET uploader_id='" . api_get_user_id() . "' |
|
848 | - WHERE c_id = $course_id AND uploader_id='" . $mailingPseudoId . "'"; |
|
846 | + $sql = "UPDATE ".dropbox_cnf('tbl_file')." |
|
847 | + SET uploader_id='" . api_get_user_id()."' |
|
848 | + WHERE c_id = $course_id AND uploader_id='".$mailingPseudoId."'"; |
|
849 | 849 | Database::query($sql); |
850 | 850 | } |
851 | 851 | } |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | } |
985 | 985 | } |
986 | 986 | } else { // rename file to login_filename_uniqueId format |
987 | - $dropbox_filename = getLoginFromId($_user['user_id']) . "_" . $dropbox_filename . "_".uniqid(''); |
|
987 | + $dropbox_filename = getLoginFromId($_user['user_id'])."_".$dropbox_filename."_".uniqid(''); |
|
988 | 988 | } |
989 | 989 | |
990 | 990 | // creating the array that contains all the users who will receive the file |
@@ -1002,7 +1002,7 @@ discard block |
||
1002 | 1002 | } |
1003 | 1003 | } |
1004 | 1004 | |
1005 | - @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath') . '/' . $dropbox_filename); |
|
1005 | + @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath').'/'.$dropbox_filename); |
|
1006 | 1006 | |
1007 | 1007 | $b_send_mail = api_get_course_setting('email_alert_on_new_doc_dropbox'); |
1008 | 1008 | |
@@ -1023,14 +1023,14 @@ discard block |
||
1023 | 1023 | ), |
1024 | 1024 | $recipent_temp['email'], |
1025 | 1025 | get_lang('NewDropboxFileUploaded'), |
1026 | - get_lang('NewDropboxFileUploadedContent').' <a href="'.api_get_path(WEB_CODE_PATH).'dropbox/index.php?' . api_get_cidreq() . '">'.get_lang('SeeFile').'</a>'. |
|
1026 | + get_lang('NewDropboxFileUploadedContent').' <a href="'.api_get_path(WEB_CODE_PATH).'dropbox/index.php?'.api_get_cidreq().'">'.get_lang('SeeFile').'</a>'. |
|
1027 | 1027 | "\n\n". |
1028 | 1028 | api_get_person_name( |
1029 | 1029 | $_user['firstName'], |
1030 | 1030 | $_user['lastName'], |
1031 | 1031 | null, |
1032 | 1032 | PERSON_NAME_EMAIL_ADDRESS |
1033 | - )."\n". get_lang('Email') ." : ".$_user['mail'], |
|
1033 | + )."\n".get_lang('Email')." : ".$_user['mail'], |
|
1034 | 1034 | api_get_person_name( |
1035 | 1035 | $_user['firstName'], |
1036 | 1036 | $_user['lastName'], |
@@ -1308,7 +1308,7 @@ discard block |
||
1308 | 1308 | // Adding the content. |
1309 | 1309 | $return .= "\n<tr>"; |
1310 | 1310 | foreach ($column as $column_key => $column_value) { |
1311 | - if (!in_array($column_value,$dont_show_columns)) { |
|
1311 | + if (!in_array($column_value, $dont_show_columns)) { |
|
1312 | 1312 | $return .= "\n\t<td>"; |
1313 | 1313 | if (in_array($column_value, $make_link)) { |
1314 | 1314 | $return .= '<a href="'.$value[$column_value].'">'.$value[$column_value].'</a>'; |
@@ -1341,7 +1341,7 @@ discard block |
||
1341 | 1341 | WHERE c_id = $course_id GROUP BY file_id"; |
1342 | 1342 | $result = Database::query($sql); |
1343 | 1343 | $return = array(); |
1344 | - while ($row=Database::fetch_array($result)) { |
|
1344 | + while ($row = Database::fetch_array($result)) { |
|
1345 | 1345 | $return[$row['file_id']] = $row['total']; |
1346 | 1346 | } |
1347 | 1347 | return $return; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $result = Database::query($sql); |
34 | 34 | |
35 | 35 | if (Database::num_rows($result)) { |
36 | - $files = Database::store_result($result); |
|
36 | + $files = Database::store_result($result); |
|
37 | 37 | $rows = array(); |
38 | 38 | foreach ($files as $file) { |
39 | 39 | //Check if I have this file: |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $is_courseTutor = api_is_course_tutor(); |
127 | 127 | $is_courseAdmin = api_is_course_admin(); |
128 | 128 | |
129 | -$current_course_tool = TOOL_DROPBOX; |
|
129 | +$current_course_tool = TOOL_DROPBOX; |
|
130 | 130 | |
131 | 131 | // the dropbox configuration parameters |
132 | 132 | $dropbox_cnf = require_once 'dropbox_config.inc.php'; |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | $javascript .= " |
279 | 279 | </script>"; |
280 | 280 | $htmlHeadXtra[] = $javascript; |
281 | -$htmlHeadXtra[] ="<script> |
|
281 | +$htmlHeadXtra[] = "<script> |
|
282 | 282 | function confirmation (name) |
283 | 283 | { |
284 | - if (confirm(\" ". get_lang("AreYouSureToDeleteJS") ." \"+ name + \" ?\")) |
|
284 | + if (confirm(\" ". get_lang("AreYouSureToDeleteJS")." \"+ name + \" ?\")) |
|
285 | 285 | {return true;} |
286 | 286 | else |
287 | 287 | {return false;} |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | if ((!$is_allowed_in_course || !$is_course_member) && !api_is_allowed_to_edit(null, true)) { |
323 | 323 | if ($origin != 'learnpath') { |
324 | - api_not_allowed(true);//print headers/footers |
|
324 | + api_not_allowed(true); //print headers/footers |
|
325 | 325 | } else { |
326 | 326 | api_not_allowed(); |
327 | 327 | } |
@@ -220,23 +220,23 @@ discard block |
||
220 | 220 | |
221 | 221 | if (api_get_session_id() == 0) { |
222 | 222 | echo '<div class="actions">'; |
223 | - if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
|
224 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
223 | + if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
|
224 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
225 | 225 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> '; |
226 | 226 | $movelist[0] = 'Root'; // move_received selectbox content |
227 | 227 | } else { |
228 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
228 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
229 | 229 | } |
230 | 230 | echo '</div>'; |
231 | 231 | } else { |
232 | 232 | if (api_is_allowed_to_session_edit(false, true)) { |
233 | 233 | echo '<div class="actions">'; |
234 | 234 | if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
235 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
235 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
236 | 236 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> '; |
237 | 237 | $movelist[0] = 'Root'; // move_received selectbox content |
238 | 238 | } else { |
239 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
239 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
240 | 240 | } |
241 | 241 | echo '</div>'; |
242 | 242 | } |
@@ -256,13 +256,13 @@ discard block |
||
256 | 256 | if (api_get_session_id() == 0) { |
257 | 257 | echo '<div class="actions">'; |
258 | 258 | if ($view_dropbox_category_sent != 0) { |
259 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
259 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
260 | 260 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> '; |
261 | 261 | } else { |
262 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n"; |
|
262 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n"; |
|
263 | 263 | } |
264 | 264 | if (empty($viewSentCategory)) { |
265 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
265 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
266 | 266 | } |
267 | 267 | echo '</div>'; |
268 | 268 | } else { |
@@ -270,12 +270,12 @@ discard block |
||
270 | 270 | echo '<div class="actions">'; |
271 | 271 | if ($view_dropbox_category_sent != 0) { |
272 | 272 | echo get_lang('CurrentlySeeing').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> '; |
273 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
273 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
274 | 274 | } else { |
275 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n"; |
|
275 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n"; |
|
276 | 276 | } |
277 | 277 | if (empty($viewSentCategory)) { |
278 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
278 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
279 | 279 | } |
280 | 280 | echo '</div>'; |
281 | 281 | } |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | |
329 | 329 | if (api_get_session_id() == 0) { |
330 | 330 | $column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"'); |
331 | - } elseif (api_is_allowed_to_session_edit(false,true)) { |
|
331 | + } elseif (api_is_allowed_to_session_edit(false, true)) { |
|
332 | 332 | $column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"'); |
333 | 333 | } |
334 | 334 | |
@@ -373,13 +373,13 @@ discard block |
||
373 | 373 | if ($dropbox_file->last_upload_date > $last_access && |
374 | 374 | !in_array($dropbox_file->id, $_SESSION['_seen'][$_course['id']][TOOL_DROPBOX]) |
375 | 375 | ) { |
376 | - $new_icon = ' '.Display::return_icon('new_dropbox_message.png', get_lang('New'),'',ICON_SIZE_SMALL); |
|
376 | + $new_icon = ' '.Display::return_icon('new_dropbox_message.png', get_lang('New'), '', ICON_SIZE_SMALL); |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | $link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">'; |
380 | 380 | $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>'; |
381 | 381 | $dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'. |
382 | - Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description; |
|
382 | + Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description; |
|
383 | 383 | $file_size = $dropbox_file->filesize; |
384 | 384 | $dropbox_file_data[] = format_file_size($file_size); |
385 | 385 | $dropbox_file_data[] = $dropbox_file->author; |
@@ -389,10 +389,10 @@ discard block |
||
389 | 389 | api_format_date($last_upload_date).'</span>'; |
390 | 390 | |
391 | 391 | $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' |
392 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a> |
|
393 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a> |
|
392 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a> |
|
393 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a> |
|
394 | 394 | <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'. |
395 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
395 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
396 | 396 | |
397 | 397 | // This is a hack to have an additional row in a sortable table |
398 | 398 | |
@@ -426,12 +426,12 @@ discard block |
||
426 | 426 | // The icon of the category |
427 | 427 | $link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$category['cat_id'].'&view_sent_category='.$viewSentCategory.'&view='.$view.'">'; |
428 | 428 | $dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', $category['cat_name']).'</a>'; |
429 | - $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>'; |
|
429 | + $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>'; |
|
430 | 430 | $dropbox_category_data[] = ''; |
431 | 431 | $dropbox_category_data[] = ''; |
432 | 432 | $dropbox_category_data[] = ''; |
433 | - $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a> |
|
434 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
433 | + $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a> |
|
434 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
435 | 435 | } |
436 | 436 | if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) { |
437 | 437 | $dropbox_data_recieved[] = $dropbox_category_data; |
@@ -451,8 +451,8 @@ discard block |
||
451 | 451 | ); |
452 | 452 | |
453 | 453 | if (is_array($movelist)) { |
454 | - foreach ($movelist as $catid => $catname){ |
|
455 | - $selectlist['move_received_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname); |
|
454 | + foreach ($movelist as $catid => $catname) { |
|
455 | + $selectlist['move_received_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname); |
|
456 | 456 | } |
457 | 457 | } |
458 | 458 | |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">'; |
547 | 547 | $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>'; |
548 | 548 | $dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'. |
549 | - Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description; |
|
549 | + Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description; |
|
550 | 550 | $file_size = $dropbox_file->filesize; |
551 | 551 | $dropbox_file_data[] = format_file_size($file_size); |
552 | 552 | $receivers_celldata = null; |
@@ -563,9 +563,9 @@ discard block |
||
563 | 563 | $receivers_celldata = ''; |
564 | 564 | |
565 | 565 | $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' |
566 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a> |
|
567 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a> |
|
568 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
566 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a> |
|
567 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a> |
|
568 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
569 | 569 | // This is a hack to have an additional row in a sortable table |
570 | 570 | if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) { |
571 | 571 | $action_icons .= "</td></tr>\n"; // ending the normal row of the sortable table |
@@ -594,16 +594,16 @@ discard block |
||
594 | 594 | // This is where the checkbox icon for the files appear. |
595 | 595 | $link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$category['cat_id'].'&view='.$view.'">'; |
596 | 596 | $dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', Security::remove_XSS($category['cat_name'])).'</a>'; |
597 | - $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>'; |
|
597 | + $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>'; |
|
598 | 598 | //$dropbox_category_data[] = ''; |
599 | 599 | $dropbox_category_data[] = ''; |
600 | 600 | //$dropbox_category_data[] = ''; |
601 | 601 | $dropbox_category_data[] = ''; |
602 | 602 | $dropbox_category_data[] = ''; |
603 | 603 | $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'. |
604 | - Display::return_icon('edit.png', get_lang('Edit'),'',ICON_SIZE_SMALL).'</a> |
|
604 | + Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a> |
|
605 | 605 | <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'. |
606 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
606 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
607 | 607 | } |
608 | 608 | if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) { |
609 | 609 | $dropbox_data_sent[] = $dropbox_category_data; |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | |
626 | 626 | if (!empty($moveList)) { |
627 | 627 | foreach ($moveList as $catid => $catname) { |
628 | - $selectlist['move_sent_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname); |
|
628 | + $selectlist['move_sent_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname); |
|
629 | 629 | } |
630 | 630 | } |
631 | 631 |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | // the author or description field is empty |
26 | - if (!isset($_POST['authors']) || !isset( $_POST['description'])) { |
|
26 | + if (!isset($_POST['authors']) || !isset($_POST['description'])) { |
|
27 | 27 | $error = true; |
28 | 28 | $errormsg = get_lang('BadFormData'); |
29 | - } elseif (!isset( $_POST['recipients']) || count( $_POST['recipients']) <= 0) { |
|
29 | + } elseif (!isset($_POST['recipients']) || count($_POST['recipients']) <= 0) { |
|
30 | 30 | $error = true; |
31 | 31 | $errormsg = get_lang('NoUserSelected'); |
32 | 32 | } else { |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | // we are doing a mailing but an additional recipient is selected |
51 | - if ($thisIsAMailing && ( count($_POST['recipients']) != 1)) { |
|
51 | + if ($thisIsAMailing && (count($_POST['recipients']) != 1)) { |
|
52 | 52 | $error = true; |
53 | 53 | $errormsg = get_lang('MailingSelectNoOther'); |
54 | 54 | } |
55 | 55 | // we are doing a just upload but an additional recipient is selected. |
56 | - elseif ( $thisIsJustUpload && ( count($_POST['recipients']) != 1)) { |
|
56 | + elseif ($thisIsJustUpload && (count($_POST['recipients']) != 1)) { |
|
57 | 57 | $error = true; |
58 | 58 | $errormsg = get_lang('MailingJustUploadSelectNoOther'); |
59 | 59 | } elseif (empty($_FILES['file']['name'])) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | } else { |
127 | 127 | // rename file to login_filename_uniqueId format |
128 | - $dropbox_filename = getLoginFromId( $_user['user_id']) . '_' . $dropbox_filename . '_'.uniqid(''); |
|
128 | + $dropbox_filename = getLoginFromId($_user['user_id']).'_'.$dropbox_filename.'_'.uniqid(''); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | if (!is_dir(dropbox_cnf('sysPath'))) { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $newWorkRecipients = dropbox_cnf('mailingIdBase'); |
148 | 148 | } else { |
149 | 149 | $error = true; |
150 | - $errormsg = $dropbox_title . ': ' . get_lang('MailingWrongZipfile'); |
|
150 | + $errormsg = $dropbox_title.': '.get_lang('MailingWrongZipfile'); |
|
151 | 151 | } |
152 | 152 | } elseif ($thisIsJustUpload) { |
153 | 153 | $newWorkRecipients = array(); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | // After uploading the file, create the db entries |
172 | 172 | |
173 | 173 | if (!$error) { |
174 | - @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath') . '/' . $dropbox_filename) |
|
174 | + @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath').'/'.$dropbox_filename) |
|
175 | 175 | or die(get_lang('UploadError').' (code 407)'); |
176 | 176 | new Dropbox_SentWork($_user['user_id'], $dropbox_title, $_POST['description'], strip_tags($_POST['authors']), $dropbox_filename, $dropbox_filesize, $newWorkRecipients); |
177 | 177 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * - EDIT FEEDBACK |
199 | 199 | */ |
200 | 200 | if (isset($_GET['deleteReceived']) || isset($_GET['deleteSent']) |
201 | - || isset( $_GET['showFeedback']) || isset( $_GET['editFeedback'])) { |
|
201 | + || isset($_GET['showFeedback']) || isset($_GET['editFeedback'])) { |
|
202 | 202 | if ($_GET['mailing']) { |
203 | 203 | getUserOwningThisMailing($_GET['mailing'], $_user['user_id'], '408'); |
204 | 204 | $dropbox_person = new Dropbox_Person($_GET['mailing'], $is_courseAdmin, $is_courseTutor); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | if ($_GET['deleteReceived'] == 'all') { |
224 | 224 | $dropbox_person->deleteAllReceivedWork(); |
225 | 225 | } elseif (is_numeric($_GET['deleteReceived'])) { |
226 | - $dropbox_person->deleteReceivedWork( $_GET['deleteReceived']); |
|
226 | + $dropbox_person->deleteReceivedWork($_GET['deleteReceived']); |
|
227 | 227 | } else { |
228 | 228 | die(get_lang('GeneralError').' (code 409)'); |
229 | 229 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | if ($current_session == $details['lp_session']) { |
332 | 332 | $dsp_edit_lp = Display::url( |
333 | 333 | Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL), |
334 | - "lp_controller.php?" . api_get_cidreq() . "&action=edit&lp_id=$id" |
|
334 | + "lp_controller.php?".api_get_cidreq()."&action=edit&lp_id=$id" |
|
335 | 335 | ); |
336 | 336 | } else { |
337 | 337 | $dsp_edit_lp = Display::return_icon( |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | if ($details['lp_type'] == 1 || $details['lp_type'] == 2) { |
348 | 348 | $dsp_build = Display::url( |
349 | 349 | Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL), |
350 | - 'lp_controller.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
350 | + 'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([ |
|
351 | 351 | 'action' => 'add_item', |
352 | 352 | 'type' => 'step', |
353 | 353 | 'lp_id' => $id, |
@@ -381,19 +381,19 @@ discard block |
||
381 | 381 | if ($details['lp_visibility'] == 0) { |
382 | 382 | $dsp_visible = Display::url( |
383 | 383 | Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL), |
384 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=1" |
|
384 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1" |
|
385 | 385 | ); |
386 | 386 | } else { |
387 | 387 | $dsp_visible = Display::url( |
388 | 388 | Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL), |
389 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=0" |
|
389 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0" |
|
390 | 390 | ); |
391 | 391 | } |
392 | 392 | } |
393 | 393 | |
394 | 394 | //Tracking command |
395 | 395 | $trackingActionUrl = 'lp_controller.php?' |
396 | - . api_get_cidreq() . '&' |
|
396 | + . api_get_cidreq().'&' |
|
397 | 397 | . http_build_query([ |
398 | 398 | 'action' => 'report', |
399 | 399 | 'lp_id' => $id |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | '', |
415 | 415 | ICON_SIZE_SMALL |
416 | 416 | ), |
417 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=v" |
|
417 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=v" |
|
418 | 418 | ); |
419 | 419 | } else { |
420 | 420 | $dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>". |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | '', |
432 | 432 | ICON_SIZE_SMALL |
433 | 433 | ), |
434 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=i" |
|
434 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i" |
|
435 | 435 | ); |
436 | 436 | } |
437 | 437 | } else { |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | '', |
460 | 460 | ICON_SIZE_SMALL |
461 | 461 | ), |
462 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id" |
|
462 | + "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id" |
|
463 | 463 | ); |
464 | 464 | } |
465 | 465 | if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 1) { //single mode | next = multiple |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | '', |
471 | 471 | ICON_SIZE_SMALL |
472 | 472 | ), |
473 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id" |
|
473 | + "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id" |
|
474 | 474 | ); |
475 | 475 | } |
476 | 476 | if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 0) { //multiple mode | next = seriousgame |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | '', |
482 | 482 | ICON_SIZE_SMALL |
483 | 483 | ), |
484 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id" |
|
484 | + "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id" |
|
485 | 485 | ); |
486 | 486 | } |
487 | 487 | } else { |
@@ -504,8 +504,8 @@ discard block |
||
504 | 504 | '', |
505 | 505 | ICON_SIZE_SMALL |
506 | 506 | ), |
507 | - 'lp_controller.php?' . api_get_cidreq() |
|
508 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
507 | + 'lp_controller.php?'.api_get_cidreq() |
|
508 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
509 | 509 | ); |
510 | 510 | break; |
511 | 511 | case 'embedded': |
@@ -516,8 +516,8 @@ discard block |
||
516 | 516 | '', |
517 | 517 | ICON_SIZE_SMALL |
518 | 518 | ), |
519 | - 'lp_controller.php?' . api_get_cidreq() |
|
520 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
519 | + 'lp_controller.php?'.api_get_cidreq() |
|
520 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
521 | 521 | ); |
522 | 522 | break; |
523 | 523 | case 'embedframe': |
@@ -528,8 +528,8 @@ discard block |
||
528 | 528 | '', |
529 | 529 | ICON_SIZE_SMALL |
530 | 530 | ), |
531 | - 'lp_controller.php?' . api_get_cidreq() |
|
532 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
531 | + 'lp_controller.php?'.api_get_cidreq() |
|
532 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
533 | 533 | ); |
534 | 534 | break; |
535 | 535 | case 'impress': |
@@ -540,8 +540,8 @@ discard block |
||
540 | 540 | '', |
541 | 541 | ICON_SIZE_SMALL |
542 | 542 | ), |
543 | - 'lp_controller.php?' . api_get_cidreq() |
|
544 | - . '&action=switch_view_mode&lp_id=' . $id . $token_parameter |
|
543 | + 'lp_controller.php?'.api_get_cidreq() |
|
544 | + . '&action=switch_view_mode&lp_id='.$id.$token_parameter |
|
545 | 545 | ); |
546 | 546 | break; |
547 | 547 | } |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | '', |
574 | 574 | ICON_SIZE_SMALL |
575 | 575 | ), |
576 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id" |
|
576 | + "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id" |
|
577 | 577 | ); |
578 | 578 | } else { |
579 | 579 | $dsp_debug = Display::url( |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | '', |
584 | 584 | ICON_SIZE_SMALL |
585 | 585 | ), |
586 | - "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id" |
|
586 | + "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id" |
|
587 | 587 | ); |
588 | 588 | } |
589 | 589 | } |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | array(), |
609 | 609 | ICON_SIZE_SMALL |
610 | 610 | ), |
611 | - api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id&export_name=".api_replace_dangerous_char($name, 'strict' ).".zip" |
|
611 | + api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id&export_name=".api_replace_dangerous_char($name, 'strict').".zip" |
|
612 | 612 | ); |
613 | 613 | } else { |
614 | 614 | $dsp_disk = Display::return_icon( |
@@ -646,12 +646,12 @@ discard block |
||
646 | 646 | $autolaunch_exists = true; |
647 | 647 | $lp_auto_launch_icon = Display::url( |
648 | 648 | Display::return_icon('launch.png', get_lang('DisableLPAutoLaunch')), |
649 | - api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=0&lp_id=$id" |
|
649 | + api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=0&lp_id=$id" |
|
650 | 650 | ); |
651 | 651 | } else { |
652 | 652 | $lp_auto_launch_icon = Display::url( |
653 | 653 | Display::return_icon('launch_na.png', get_lang('EnableLPAutoLaunch')), |
654 | - api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=1&lp_id=$id" |
|
654 | + api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=1&lp_id=$id" |
|
655 | 655 | ); |
656 | 656 | } |
657 | 657 | } |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | '', |
665 | 665 | ICON_SIZE_SMALL |
666 | 666 | ), |
667 | - api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id" |
|
667 | + api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id" |
|
668 | 668 | ); |
669 | 669 | |
670 | 670 | /* Delete */ |
@@ -676,8 +676,8 @@ discard block |
||
676 | 676 | '', |
677 | 677 | ICON_SIZE_SMALL |
678 | 678 | ), |
679 | - 'lp_controller.php?' . api_get_cidreq() . "&action=delete&lp_id=$id", |
|
680 | - ['onclick' => "javascript: return confirmation('" . addslashes($name) . "');"] |
|
679 | + 'lp_controller.php?'.api_get_cidreq()."&action=delete&lp_id=$id", |
|
680 | + ['onclick' => "javascript: return confirmation('".addslashes($name)."');"] |
|
681 | 681 | ); |
682 | 682 | } else { |
683 | 683 | $dsp_delete = Display::return_icon( |
@@ -694,23 +694,23 @@ discard block |
||
694 | 694 | if ($details['lp_display_order'] == 1 && $max != 1) { |
695 | 695 | $dsp_order .= Display::url( |
696 | 696 | Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL), |
697 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id" |
|
697 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id" |
|
698 | 698 | ); |
699 | 699 | } elseif ($current == $max - 1 && $max != 1) { |
700 | 700 | $dsp_order .= Display::url( |
701 | 701 | Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL), |
702 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id" |
|
702 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id" |
|
703 | 703 | ); |
704 | 704 | } elseif ($max == 1) { |
705 | 705 | $dsp_order = ''; |
706 | 706 | } else { |
707 | 707 | $dsp_order .= Display::url( |
708 | 708 | Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL), |
709 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id" |
|
709 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id" |
|
710 | 710 | ); |
711 | 711 | $dsp_order .= Display::url( |
712 | 712 | Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL), |
713 | - "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id" |
|
713 | + "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id" |
|
714 | 714 | ); |
715 | 715 | } |
716 | 716 | } |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | if ($details['seriousgame_mode'] == 0) { |
726 | 726 | $actionSeriousGame = Display::toolbarButton( |
727 | 727 | null, |
728 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame", |
|
728 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame", |
|
729 | 729 | 'trophy', |
730 | 730 | 'default', |
731 | 731 | [ |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | } else { |
737 | 737 | $actionSeriousGame = Display::toolbarButton( |
738 | 738 | null, |
739 | - api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame", |
|
739 | + api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame", |
|
740 | 740 | 'trophy', |
741 | 741 | 'warning', |
742 | 742 | [ |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | // Student |
751 | 751 | $export_icon = Display::url( |
752 | 752 | Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL), |
753 | - api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id" |
|
753 | + api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id" |
|
754 | 754 | ); |
755 | 755 | } |
756 | 756 |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | 'hasAttachments' => $hasAttachments, |
119 | 119 | 'platform' => array( |
120 | 120 | 'website' => api_get_path(WEB_PATH), |
121 | - 'messagingTool' => api_get_path(WEB_PATH) . 'main/messages/inbox.php' |
|
121 | + 'messagingTool' => api_get_path(WEB_PATH).'main/messages/inbox.php' |
|
122 | 122 | ) |
123 | 123 | ); |
124 | 124 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | $headers = [ |
204 | - 'Authorization: key=' . $gdcApiKey, |
|
204 | + 'Authorization: key='.$gdcApiKey, |
|
205 | 205 | 'Content-Type: application/json' |
206 | 206 | ]; |
207 | 207 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | // Including the global initialization file. |
28 | 28 | require_once '../inc/global.inc.php'; |
29 | -$current_course_tool = TOOL_FORUM; |
|
29 | +$current_course_tool = TOOL_FORUM; |
|
30 | 30 | |
31 | 31 | // Notification for unauthorized people. |
32 | 32 | api_protect_course_script(true); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | // Course |
79 | 79 | if ( |
80 | - !api_is_allowed_to_edit(false, true) && //is a student |
|
80 | + !api_is_allowed_to_edit(false, true) && //is a student |
|
81 | 81 | (($current_forum_category && $current_forum_category['visibility'] == 0) || |
82 | 82 | $current_forum['visibility'] == 0 || !$user_has_access_in_group) |
83 | 83 | ) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } else { |
87 | 87 | //Course |
88 | 88 | if ( |
89 | - !api_is_allowed_to_edit(false, true) && //is a student |
|
89 | + !api_is_allowed_to_edit(false, true) && //is a student |
|
90 | 90 | ( |
91 | 91 | ($current_forum_category && $current_forum_category['visibility'] == 0) || |
92 | 92 | $current_forum['visibility'] == 0 |
@@ -102,12 +102,12 @@ discard block |
||
102 | 102 | $my_action = isset($_GET['action']) ? $_GET['action'] : ''; |
103 | 103 | |
104 | 104 | $gradebook = null; |
105 | -if (isset($_SESSION['gradebook'])){ |
|
105 | +if (isset($_SESSION['gradebook'])) { |
|
106 | 106 | $gradebook = $_SESSION['gradebook']; |
107 | 107 | } |
108 | 108 | |
109 | 109 | if (!empty($gradebook) && $gradebook == 'view') { |
110 | - $interbreadcrumb[] = array ( |
|
110 | + $interbreadcrumb[] = array( |
|
111 | 111 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
112 | 112 | 'name' => get_lang('ToolGradebook') |
113 | 113 | ); |
@@ -117,25 +117,25 @@ discard block |
||
117 | 117 | |
118 | 118 | if ($origin == 'group') { |
119 | 119 | $interbreadcrumb[] = array( |
120 | - 'url' => api_get_path(WEB_CODE_PATH) . 'group/group.php?'.api_get_cidreq(), |
|
120 | + 'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(), |
|
121 | 121 | 'name' => get_lang('Groups') |
122 | 122 | ); |
123 | 123 | $interbreadcrumb[] = array( |
124 | - 'url' => api_get_path(WEB_CODE_PATH) . 'group/group_space.php?' . api_get_cidreq(), |
|
125 | - 'name' => get_lang('GroupSpace') . ' ' . $group_properties['name'] |
|
124 | + 'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(), |
|
125 | + 'name' => get_lang('GroupSpace').' '.$group_properties['name'] |
|
126 | 126 | ); |
127 | 127 | $interbreadcrumb[] = array( |
128 | 128 | 'url' => '#', |
129 | - 'name' => get_lang('Forum') . ' ' . Security::remove_XSS($current_forum['forum_title']) |
|
129 | + 'name' => get_lang('Forum').' '.Security::remove_XSS($current_forum['forum_title']) |
|
130 | 130 | ); |
131 | 131 | } else { |
132 | 132 | $interbreadcrumb[] = array( |
133 | - 'url' => $forumUrl . 'index.php?search=' . Security::remove_XSS($my_search), |
|
133 | + 'url' => $forumUrl.'index.php?search='.Security::remove_XSS($my_search), |
|
134 | 134 | 'name' => get_lang('ForumCategories') |
135 | 135 | ); |
136 | 136 | $interbreadcrumb[] = array( |
137 | - 'url' => $forumUrl . 'viewforumcategory.php?forumcategory=' . $current_forum_category['cat_id'] |
|
138 | - . '&search=' . Security::remove_XSS(urlencode($my_search)), |
|
137 | + 'url' => $forumUrl.'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'] |
|
138 | + . '&search='.Security::remove_XSS(urlencode($my_search)), |
|
139 | 139 | 'name' => prepare4display($current_forum_category['cat_title']) |
140 | 140 | ); |
141 | 141 | $interbreadcrumb[] = array( |
@@ -243,25 +243,25 @@ discard block |
||
243 | 243 | break; |
244 | 244 | } |
245 | 245 | |
246 | - $table_list = Display::page_subheader(get_lang('ThreadUsersList') . ': ' . get_name_thread_by_id($_GET['id'])); |
|
246 | + $table_list = Display::page_subheader(get_lang('ThreadUsersList').': '.get_name_thread_by_id($_GET['id'])); |
|
247 | 247 | |
248 | 248 | if ($nrorow3 > 0 || $nrorow3 == -2) { |
249 | - $url = 'cidReq=' . Security::remove_XSS($_GET['cidReq']) . |
|
250 | - '&forum=' . Security::remove_XSS($my_forum) . '&action=' |
|
251 | - . Security::remove_XSS($_GET['action']) . '&content=' |
|
252 | - . Security::remove_XSS($_GET['content'], STUDENT) . '&id=' . intval($_GET['id']); |
|
249 | + $url = 'cidReq='.Security::remove_XSS($_GET['cidReq']). |
|
250 | + '&forum='.Security::remove_XSS($my_forum).'&action=' |
|
251 | + . Security::remove_XSS($_GET['action']).'&content=' |
|
252 | + . Security::remove_XSS($_GET['content'], STUDENT).'&id='.intval($_GET['id']); |
|
253 | 253 | $tabs = array( |
254 | 254 | array( |
255 | 255 | 'content' => get_lang('AllStudents'), |
256 | - 'url' => $forumUrl . 'viewforum.php?' . $url . '&origin=' . $origin . '&list=all' |
|
256 | + 'url' => $forumUrl.'viewforum.php?'.$url.'&origin='.$origin.'&list=all' |
|
257 | 257 | ), |
258 | 258 | array( |
259 | 259 | 'content' => get_lang('StudentsQualified'), |
260 | - 'url' => $forumUrl . 'viewforum.php?' . $url . '&origin=' . $origin . '&list=qualify' |
|
260 | + 'url' => $forumUrl.'viewforum.php?'.$url.'&origin='.$origin.'&list=qualify' |
|
261 | 261 | ), |
262 | 262 | array( |
263 | 263 | 'content' => get_lang('StudentsNotQualified'), |
264 | - 'url' => $forumUrl . 'viewforum.php?' . $url . '&origin=' . $origin . '&list=notqualify' |
|
264 | + 'url' => $forumUrl.'viewforum.php?'.$url.'&origin='.$origin.'&list=notqualify' |
|
265 | 265 | ), |
266 | 266 | ); |
267 | 267 | $table_list .= Display::tabsOnlyLink($tabs, $active); |
@@ -270,32 +270,32 @@ discard block |
||
270 | 270 | $table_list .= '<center><br /><table class="data_table" style="width:50%">'; |
271 | 271 | // The column headers (TODO: Make this sortable). |
272 | 272 | $table_list .= '<tr >'; |
273 | - $table_list .= '<th height="24">' . get_lang('NamesAndLastNames') . '</th>'; |
|
273 | + $table_list .= '<th height="24">'.get_lang('NamesAndLastNames').'</th>'; |
|
274 | 274 | |
275 | 275 | if ($listType == 'qualify') { |
276 | - $table_list .= '<th>' . get_lang('Qualification') . '</th>'; |
|
276 | + $table_list .= '<th>'.get_lang('Qualification').'</th>'; |
|
277 | 277 | } |
278 | 278 | if (api_is_allowed_to_edit(null, true)) { |
279 | - $table_list .= '<th>' . get_lang('Qualify') . '</th>'; |
|
279 | + $table_list .= '<th>'.get_lang('Qualify').'</th>'; |
|
280 | 280 | } |
281 | 281 | $table_list .= '</tr>'; |
282 | 282 | $max_qualify = showQualify('2', $userId, $_GET['id']); |
283 | 283 | $counter_stdlist = 0; |
284 | 284 | |
285 | 285 | if (Database::num_rows($student_list) > 0) { |
286 | - while ($row_student_list=Database::fetch_array($student_list)) { |
|
286 | + while ($row_student_list = Database::fetch_array($student_list)) { |
|
287 | 287 | $userInfo = api_get_user_info($row_student_list['id']); |
288 | 288 | if ($counter_stdlist % 2 == 0) { |
289 | 289 | $class_stdlist = 'row_odd'; |
290 | 290 | } else { |
291 | 291 | $class_stdlist = 'row_even'; |
292 | 292 | } |
293 | - $table_list .= '<tr class="' . $class_stdlist . '"><td>'; |
|
293 | + $table_list .= '<tr class="'.$class_stdlist.'"><td>'; |
|
294 | 294 | $table_list .= UserManager::getUserProfileLink($userInfo); |
295 | 295 | |
296 | 296 | $table_list .= '</td>'; |
297 | 297 | if ($listType == 'qualify') { |
298 | - $table_list .= '<td>' . $row_student_list['qualify'] . '/' . $max_qualify . '</td>'; |
|
298 | + $table_list .= '<td>'.$row_student_list['qualify'].'/'.$max_qualify.'</td>'; |
|
299 | 299 | } |
300 | 300 | if (api_is_allowed_to_edit(null, true)) { |
301 | 301 | $current_qualify_thread = showQualify( |
@@ -304,20 +304,20 @@ discard block |
||
304 | 304 | $_GET['id'] |
305 | 305 | ); |
306 | 306 | $table_list .= '<td> |
307 | - <a href="' . $forumUrl . 'forumqualify.php?' . api_get_cidreq() |
|
308 | - . '&forum=' . Security::remove_XSS($my_forum) . '&thread=' |
|
309 | - . Security::remove_XSS($_GET['id']) . '&user=' . $row_student_list['id'] |
|
310 | - . '&user_id=' . $row_student_list['id'] . '&idtextqualify=' |
|
311 | - . $current_qualify_thread . '&origin=' . $origin . '">' |
|
312 | - . Display::return_icon($icon_qualify, get_lang('Qualify')) . '</a></td></tr>'; |
|
307 | + <a href="' . $forumUrl.'forumqualify.php?'.api_get_cidreq() |
|
308 | + . '&forum='.Security::remove_XSS($my_forum).'&thread=' |
|
309 | + . Security::remove_XSS($_GET['id']).'&user='.$row_student_list['id'] |
|
310 | + . '&user_id='.$row_student_list['id'].'&idtextqualify=' |
|
311 | + . $current_qualify_thread.'&origin='.$origin.'">' |
|
312 | + . Display::return_icon($icon_qualify, get_lang('Qualify')).'</a></td></tr>'; |
|
313 | 313 | } |
314 | 314 | $counter_stdlist++; |
315 | 315 | } |
316 | 316 | } else { |
317 | 317 | if ($listType == 'qualify') { |
318 | - $table_list .= '<tr><td colspan="2">' . get_lang('ThereIsNotQualifiedLearners') . '</td></tr>'; |
|
318 | + $table_list .= '<tr><td colspan="2">'.get_lang('ThereIsNotQualifiedLearners').'</td></tr>'; |
|
319 | 319 | } else { |
320 | - $table_list .= '<tr><td colspan="2">' . get_lang('ThereIsNotUnqualifiedLearners') . '</td></tr>'; |
|
320 | + $table_list .= '<tr><td colspan="2">'.get_lang('ThereIsNotUnqualifiedLearners').'</td></tr>'; |
|
321 | 321 | } |
322 | 322 | } |
323 | 323 | |
@@ -343,14 +343,14 @@ discard block |
||
343 | 343 | echo '<div class="actions">'; |
344 | 344 | |
345 | 345 | if ($origin != 'learnpath') { |
346 | - if ($origin=='group') { |
|
347 | - echo '<a href="' . api_get_path(WEB_CODE_PATH) . 'group/group_space.php?' |
|
348 | - . api_get_cidreq() . '&gradebook=' . $gradebook . '">' |
|
346 | + if ($origin == 'group') { |
|
347 | + echo '<a href="'.api_get_path(WEB_CODE_PATH).'group/group_space.php?' |
|
348 | + . api_get_cidreq().'&gradebook='.$gradebook.'">' |
|
349 | 349 | . Display::return_icon('back.png', get_lang('BackTo') |
350 | - . ' ' . get_lang('Groups'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
350 | + . ' '.get_lang('Groups'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
351 | 351 | } else { |
352 | 352 | echo '<span style="float:right;">'.search_link().'</span>'; |
353 | - echo '<a href="' . $forumUrl . 'index.php?' . api_get_cidreq() . '">' |
|
353 | + echo '<a href="'.$forumUrl.'index.php?'.api_get_cidreq().'">' |
|
354 | 354 | . Display::return_icon('back.png', get_lang('BackToForumOverview'), '', ICON_SIZE_MEDIUM) |
355 | 355 | . '</a>'; |
356 | 356 | } |
@@ -368,14 +368,14 @@ discard block |
||
368 | 368 | if ($current_forum['locked'] <> 1 AND $current_forum['locked'] <> 1) { |
369 | 369 | if (!api_is_anonymous() && !api_is_invitee()) { |
370 | 370 | if ($my_forum == strval(intval($my_forum))) { |
371 | - echo '<a href="' . $forumUrl . 'newthread.php?' . api_get_cidreq() . '&forum=' |
|
372 | - . Security::remove_XSS($my_forum) . $origin_string . '">' |
|
371 | + echo '<a href="'.$forumUrl.'newthread.php?'.api_get_cidreq().'&forum=' |
|
372 | + . Security::remove_XSS($my_forum).$origin_string.'">' |
|
373 | 373 | . Display::return_icon('new_thread.png', get_lang('NewTopic'), '', ICON_SIZE_MEDIUM) |
374 | 374 | . '</a>'; |
375 | 375 | } else { |
376 | 376 | $my_forum = strval(intval($my_forum)); |
377 | - echo '<a href="' . $forumUrl . 'newthread.php?' . api_get_cidreq() |
|
378 | - . '&forum=' . $my_forum . $origin_string . '">' |
|
377 | + echo '<a href="'.$forumUrl.'newthread.php?'.api_get_cidreq() |
|
378 | + . '&forum='.$my_forum.$origin_string.'">' |
|
379 | 379 | . Display::return_icon('new_thread.png', get_lang('NewTopic'), '', ICON_SIZE_MEDIUM) |
380 | 380 | . '</a>'; |
381 | 381 | } |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | if ($origin != 'learnpath') { |
403 | 403 | $html .= Display::tag( |
404 | 404 | 'h3', |
405 | - $iconForum .' '. $titleForum, |
|
405 | + $iconForum.' '.$titleForum, |
|
406 | 406 | array( |
407 | 407 | 'class' => 'title-forum') |
408 | 408 | ); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | } |
445 | 445 | |
446 | 446 | if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) { |
447 | - $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL); |
|
447 | + $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL); |
|
448 | 448 | } else { |
449 | 449 | $newPost = ''; |
450 | 450 | } |
@@ -454,12 +454,12 @@ discard block |
||
454 | 454 | } |
455 | 455 | |
456 | 456 | $name = api_get_person_name($row['firstname'], $row['lastname']); |
457 | - $linkPostForum = '<a href="viewthread.php?' . api_get_cidreq() . '&forum=' . Security::remove_XSS($my_forum) |
|
457 | + $linkPostForum = '<a href="viewthread.php?'.api_get_cidreq().'&forum='.Security::remove_XSS($my_forum) |
|
458 | 458 | . "&origin=$origin&thread={$row['thread_id']}$origin_string&search=" |
459 | - . Security::remove_XSS(urlencode($my_search)) . '">' |
|
460 | - . $row['thread_title'] . '</a>'; |
|
459 | + . Security::remove_XSS(urlencode($my_search)).'">' |
|
460 | + . $row['thread_title'].'</a>'; |
|
461 | 461 | $html = ''; |
462 | - $html .= '<div class="panel panel-default forum '.($row['thread_sticky']?'sticky':'').'">'; |
|
462 | + $html .= '<div class="panel panel-default forum '.($row['thread_sticky'] ? 'sticky' : '').'">'; |
|
463 | 463 | $html .= '<div class="panel-body">'; |
464 | 464 | $html .= '<div class="row">'; |
465 | 465 | $html .= '<div class="col-md-6">'; |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | ); |
492 | 492 | } |
493 | 493 | |
494 | - $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>'; |
|
494 | + $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>'; |
|
495 | 495 | $html .= '</div>'; |
496 | 496 | $html .= '<div class="col-md-10">'; |
497 | 497 | $html .= Display::tag( |
@@ -501,8 +501,8 @@ discard block |
||
501 | 501 | 'class' => 'title' |
502 | 502 | ) |
503 | 503 | ); |
504 | - $html .= '<p>'. get_lang('By') .' ' .$authorName.'</p>'; |
|
505 | - $html .= '<p>' . api_convert_and_format_date($row['insert_date']) . '</p>'; |
|
504 | + $html .= '<p>'.get_lang('By').' '.$authorName.'</p>'; |
|
505 | + $html .= '<p>'.api_convert_and_format_date($row['insert_date']).'</p>'; |
|
506 | 506 | $html .= '</div>'; |
507 | 507 | $html .= '</div>'; |
508 | 508 | |
@@ -511,13 +511,13 @@ discard block |
||
511 | 511 | $html .= '<div class="row">'; |
512 | 512 | $html .= '<div class="col-md-4">' |
513 | 513 | . Display::return_icon('post-forum.png', null, null, ICON_SIZE_SMALL) |
514 | - . " {$row['thread_replies']} " . get_lang('Replies') . '<br>'; |
|
515 | - $html .= Display::return_icon( |
|
514 | + . " {$row['thread_replies']} ".get_lang('Replies').'<br>'; |
|
515 | + $html .= Display::return_icon( |
|
516 | 516 | 'post-forum.png', |
517 | 517 | null, |
518 | 518 | null, |
519 | 519 | ICON_SIZE_SMALL |
520 | - ) . ' ' . $row['thread_views'] . ' ' . get_lang('Views') . '<br>' . $newPost; |
|
520 | + ).' '.$row['thread_views'].' '.get_lang('Views').'<br>'.$newPost; |
|
521 | 521 | $html .= '</div>'; |
522 | 522 | |
523 | 523 | $last_post_info = get_last_post_by_thread( |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | if ($last_post_info) { |
532 | 532 | $poster_info = api_get_user_info($last_post_info['poster_id']); |
533 | 533 | $post_date = api_convert_and_format_date($last_post_info['post_date']); |
534 | - $last_post = $post_date . '<br>' . get_lang('By') . ' ' . display_user_link( |
|
534 | + $last_post = $post_date.'<br>'.get_lang('By').' '.display_user_link( |
|
535 | 535 | $last_post_info['poster_id'], |
536 | 536 | $poster_info['complete_name'], |
537 | 537 | '', |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | |
542 | 542 | $html .= '<div class="col-md-5">' |
543 | 543 | . Display::return_icon('post-item.png', null, null, ICON_SIZE_TINY) |
544 | - . ' ' . $last_post; |
|
544 | + . ' '.$last_post; |
|
545 | 545 | $html .= '</div>'; |
546 | 546 | $html .= '<div class="col-md-3">'; |
547 | 547 | $cidreq = api_get_cidreq(); |
@@ -556,11 +556,11 @@ discard block |
||
556 | 556 | if (api_is_allowed_to_edit(false, true) && |
557 | 557 | !(api_is_course_coach() && $current_forum['session_id'] != $sessionId) |
558 | 558 | ) { |
559 | - $iconsEdit .= '<a href="' . $forumUrl . 'editthread.php?' . $cidreq |
|
560 | - . '&forum=' . intval($my_forum) . '&thread=' |
|
559 | + $iconsEdit .= '<a href="'.$forumUrl.'editthread.php?'.$cidreq |
|
560 | + . '&forum='.intval($my_forum).'&thread=' |
|
561 | 561 | . intval($row['thread_id']) |
562 | - . '&id_attach=' . $id_attach . '">' |
|
563 | - . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
|
562 | + . '&id_attach='.$id_attach.'">' |
|
563 | + . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>'; |
|
564 | 564 | if (api_resource_is_locked_by_gradebook($row['thread_id'], LINK_FORUM_THREAD)) { |
565 | 565 | $iconsEdit .= Display::return_icon( |
566 | 566 | 'delete_na.png', |
@@ -569,13 +569,13 @@ discard block |
||
569 | 569 | ICON_SIZE_SMALL |
570 | 570 | ); |
571 | 571 | } else { |
572 | - $iconsEdit.= '<a href="' . api_get_self() . '?' . $cidreq . '&forum=' |
|
573 | - . intval($my_forum) . '&action=delete&content=thread&id=' |
|
574 | - . $row['thread_id'] . $origin_string |
|
572 | + $iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum=' |
|
573 | + . intval($my_forum).'&action=delete&content=thread&id=' |
|
574 | + . $row['thread_id'].$origin_string |
|
575 | 575 | . "\" onclick=\"javascript:if(!confirm('" |
576 | 576 | . addslashes(api_htmlentities(get_lang('DeleteCompleteThread'), ENT_QUOTES)) |
577 | 577 | . "')) return false;\">" |
578 | - . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>'; |
|
578 | + . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>'; |
|
579 | 579 | } |
580 | 580 | |
581 | 581 | $iconsEdit .= return_visible_invisible_icon( |
@@ -598,9 +598,9 @@ discard block |
||
598 | 598 | 'gidReq' => api_get_group_id() |
599 | 599 | ) |
600 | 600 | ); |
601 | - $iconsEdit .= '<a href="viewforum.php?' . $cidreq . '&forum=' |
|
601 | + $iconsEdit .= '<a href="viewforum.php?'.$cidreq.'&forum=' |
|
602 | 602 | . intval($my_forum) |
603 | - . '&action=move&thread=' . $row['thread_id'] . $origin_string . '">' |
|
603 | + . '&action=move&thread='.$row['thread_id'].$origin_string.'">' |
|
604 | 604 | . Display::return_icon('move.png', get_lang('MoveThread'), array(), ICON_SIZE_SMALL) |
605 | 605 | . '</a>'; |
606 | 606 | } |
@@ -617,17 +617,17 @@ discard block |
||
617 | 617 | } |
618 | 618 | $icon_liststd = 'user.png'; |
619 | 619 | if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
620 | - $iconsEdit .= '<a href="' . api_get_self() . '?' . $cidreq . '&forum=' |
|
620 | + $iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum=' |
|
621 | 621 | . Security::remove_XSS($my_forum) |
622 | 622 | . "&origin=$origin&action=notify&content=thread&id={$row['thread_id']}" |
623 | - . '">' . Display::return_icon($iconnotify, get_lang('NotifyMe')) . '</a>'; |
|
623 | + . '">'.Display::return_icon($iconnotify, get_lang('NotifyMe')).'</a>'; |
|
624 | 624 | } |
625 | 625 | |
626 | 626 | if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath') { |
627 | - $iconsEdit .= '<a href="' . api_get_self() . '?' . $cidreq . '&forum=' |
|
627 | + $iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum=' |
|
628 | 628 | . Security::remove_XSS($my_forum) |
629 | 629 | . "&origin=$origin&action=liststd&content=thread&id={$row['thread_id']}" |
630 | - . '">' . Display::return_icon($icon_liststd, get_lang('StudentList'), array(), ICON_SIZE_SMALL) |
|
630 | + . '">'.Display::return_icon($icon_liststd, get_lang('StudentList'), array(), ICON_SIZE_SMALL) |
|
631 | 631 | . '</a>'; |
632 | 632 | } |
633 | 633 | $html .= $iconsEdit; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $origin = ''; |
32 | 32 | if (isset($_GET['origin'])) { |
33 | - $origin = Security::remove_XSS($_GET['origin']); |
|
33 | + $origin = Security::remove_XSS($_GET['origin']); |
|
34 | 34 | $origin_string = '&origin='.$origin; |
35 | 35 | } |
36 | 36 | |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | // We are getting all the information about the current forum and forum category. |
45 | 45 | // Note pcool: I tried to use only one sql statement (and function) for this, |
46 | 46 | // but the problem is that the visibility of the forum AND forum cateogory are stored in the item_property table. |
47 | -$current_thread = get_thread_information($_GET['thread']); // Note: This has to be validated that it is an existing thread. |
|
48 | -$current_forum = get_forum_information($current_thread['forum_id']); // Note: This has to be validated that it is an existing forum. |
|
47 | +$current_thread = get_thread_information($_GET['thread']); // Note: This has to be validated that it is an existing thread. |
|
48 | +$current_forum = get_forum_information($current_thread['forum_id']); // Note: This has to be validated that it is an existing forum. |
|
49 | 49 | $current_forum_category = get_forumcategory_information(Security::remove_XSS($current_forum['forum_category'])); |
50 | 50 | |
51 | 51 | /* Is the user allowed here? */ |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | /* Breadcrumbs */ |
81 | 81 | |
82 | 82 | $gradebook = null; |
83 | -if (isset($_SESSION['gradebook'])){ |
|
83 | +if (isset($_SESSION['gradebook'])) { |
|
84 | 84 | $gradebook = Security::remove_XSS($_SESSION['gradebook']); |
85 | 85 | } |
86 | 86 | |
87 | 87 | if (!empty($gradebook) && $gradebook == 'view') { |
88 | - $interbreadcrumb[] = array ( |
|
88 | + $interbreadcrumb[] = array( |
|
89 | 89 | 'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']), |
90 | 90 | 'name' => get_lang('ToolGradebook') |
91 | 91 | ); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | /* End new display forum */ |
189 | 189 | // The form for the reply |
190 | 190 | $my_action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : ''; |
191 | -$my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : ''; |
|
191 | +$my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : ''; |
|
192 | 192 | $my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : ''; |
193 | 193 | $values = show_add_post_form( |
194 | 194 | $current_forum, |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | //@todo split the show_add_post_form function |
203 | 203 | $origin = isset($_GET['origin']) && $_GET['origin'] === 'learnpath' ? 'learnpath' : null; |
204 | 204 | |
205 | - $url = 'viewthread.php?' . http_build_query([ |
|
205 | + $url = 'viewthread.php?'.http_build_query([ |
|
206 | 206 | 'forum' => $current_thread['forum_id'], |
207 | 207 | 'gradebook' => $gradebook, |
208 | 208 | 'thread' => intval($_GET['thread']), |