@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | foreach ($data as $row) { |
101 | 101 | $string = implode("</td><td>", $row); |
102 | - $string = '<tr><td>' . $string . '</td></tr>'; |
|
102 | + $string = '<tr><td>'.$string.'</td></tr>'; |
|
103 | 103 | if ($encoding != 'utf-8') { |
104 | 104 | $string = api_convert_encoding($string, $encoding, $systemEncoding); |
105 | 105 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | fwrite($handle, '<'.$wrapper_tagname.'>'); |
174 | 174 | } |
175 | 175 | $s = self::_export_complex_table_xml_helper($data); |
176 | - fwrite($handle,$s); |
|
176 | + fwrite($handle, $s); |
|
177 | 177 | if (!is_null($wrapper_tagname)) { |
178 | 178 | fwrite($handle, '</'.$wrapper_tagname.'>'."\n"); |
179 | 179 | } |
@@ -195,10 +195,10 @@ discard block |
||
195 | 195 | } |
196 | 196 | $string = ''; |
197 | 197 | foreach ($data as $row) { |
198 | - $string .= "\n".str_repeat("\t",$level).'<'.$row['name'].'>'; |
|
198 | + $string .= "\n".str_repeat("\t", $level).'<'.$row['name'].'>'; |
|
199 | 199 | if (is_array($row['value'])) { |
200 | - $string .= self::_export_complex_table_xml_helper($row['value'],$level+1)."\n"; |
|
201 | - $string .= str_repeat("\t",$level).'</'.$row['name'].'>'; |
|
200 | + $string .= self::_export_complex_table_xml_helper($row['value'], $level + 1)."\n"; |
|
201 | + $string .= str_repeat("\t", $level).'</'.$row['name'].'>'; |
|
202 | 202 | } else { |
203 | 203 | $string .= $row['value']; |
204 | 204 | $string .= '</'.$row['name'].'>'; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $to_user_id, |
187 | 187 | $message, |
188 | 188 | $printResult = true, |
189 | - $sanitize = true |
|
189 | + $sanitize = true |
|
190 | 190 | ) |
191 | 191 | { |
192 | 192 | $user_friend_relation = SocialManager::get_relation_between_contacts( |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $messagesan = $message; |
207 | 207 | } |
208 | 208 | |
209 | - error_log(print_r($sanitize) . '----' . $messagesan); |
|
209 | + error_log(print_r($sanitize).'----'.$messagesan); |
|
210 | 210 | |
211 | 211 | if (!isset($_SESSION['chatHistory'][$to_user_id])) { |
212 | 212 | $_SESSION['chatHistory'][$to_user_id] = array(); |
@@ -289,9 +289,9 @@ discard block |
||
289 | 289 | */ |
290 | 290 | public static function disableChat() |
291 | 291 | { |
292 | - if (!empty($_SESSION['disable_chat'])){ |
|
292 | + if (!empty($_SESSION['disable_chat'])) { |
|
293 | 293 | $status = $_SESSION['disable_chat']; |
294 | - if ($status == true){ |
|
294 | + if ($status == true) { |
|
295 | 295 | $_SESSION['disable_chat'] = null; |
296 | 296 | return true; |
297 | 297 | } |
@@ -110,10 +110,10 @@ discard block |
||
110 | 110 | { |
111 | 111 | $old_locale = setlocale(LC_ALL, null); |
112 | 112 | $code = api_get_language_isocode(); |
113 | - $locale_list = array($code.'.utf8', 'en.utf8','en_US.utf8','en_GB.utf8'); |
|
113 | + $locale_list = array($code.'.utf8', 'en.utf8', 'en_US.utf8', 'en_GB.utf8'); |
|
114 | 114 | $try_sort = false; |
115 | 115 | |
116 | - foreach($locale_list as $locale) { |
|
116 | + foreach ($locale_list as $locale) { |
|
117 | 117 | $my_local = setlocale(LC_COLLATE, $locale); |
118 | 118 | if ($my_local) { |
119 | 119 | $try_sort = true; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $flatten = array(); |
152 | 152 | array_walk_recursive( |
153 | 153 | $array, |
154 | - function ($value) use (&$flatten) { |
|
154 | + function($value) use (&$flatten) { |
|
155 | 155 | $flatten[] = $value; |
156 | 156 | } |
157 | 157 | ); |
@@ -78,9 +78,7 @@ discard block |
||
78 | 78 | Database::query($sql); |
79 | 79 | |
80 | 80 | // Auto subscribe |
81 | - $user_status = $userInfo['status'] == SESSIONADMIN ? 'sessionadmin' : |
|
82 | - $userInfo['status'] == COURSEMANAGER ? 'teacher' : |
|
83 | - $userInfo['status'] == DRH ? 'DRH' : 'student'; |
|
81 | + $user_status = $userInfo['status'] == SESSIONADMIN ? 'sessionadmin' : $userInfo['status'] == COURSEMANAGER ? 'teacher' : $userInfo['status'] == DRH ? 'DRH' : 'student'; |
|
84 | 82 | $autoSubscribe = api_get_setting($user_status.'_autosubscribe'); |
85 | 83 | if ($autoSubscribe) { |
86 | 84 | $autoSubscribe = explode('|', $autoSubscribe); |
@@ -334,7 +332,7 @@ discard block |
||
334 | 332 | global $debug; |
335 | 333 | |
336 | 334 | if ($debug) error_log('Called to update_event_exercice'); |
337 | - if ($debug) error_log('duration:' . $duration); |
|
335 | + if ($debug) error_log('duration:'.$duration); |
|
338 | 336 | |
339 | 337 | if ($exeid != '') { |
340 | 338 | /* |
@@ -382,7 +380,7 @@ discard block |
||
382 | 380 | status = '".$status."', |
383 | 381 | questions_to_check = '".$remind_list."', |
384 | 382 | data_tracking = '".implode(',', $question_list)."', |
385 | - user_ip = '" . Database::escape_string(api_get_real_ip()) . "' |
|
383 | + user_ip = '" . Database::escape_string(api_get_real_ip())."' |
|
386 | 384 | WHERE exe_id = '".Database::escape_string($exeid)."'"; |
387 | 385 | $res = Database::query($sql); |
388 | 386 | |
@@ -1036,15 +1034,15 @@ discard block |
||
1036 | 1034 | |
1037 | 1035 | if (!empty($exe_list) && is_array($exe_list) && count($exe_list) > 0) { |
1038 | 1036 | $sql = "DELETE FROM $track_e_exercises |
1039 | - WHERE exe_id IN (" . implode(',', $exe_list) . ")"; |
|
1037 | + WHERE exe_id IN (".implode(',', $exe_list).")"; |
|
1040 | 1038 | Database::query($sql); |
1041 | 1039 | |
1042 | 1040 | $sql = "DELETE FROM $track_attempts |
1043 | - WHERE exe_id IN (" . implode(',', $exe_list) . ")"; |
|
1041 | + WHERE exe_id IN (".implode(',', $exe_list).")"; |
|
1044 | 1042 | Database::query($sql); |
1045 | 1043 | |
1046 | 1044 | $sql = "DELETE FROM $recording_table |
1047 | - WHERE exe_id IN (" . implode(',', $exe_list) . ")"; |
|
1045 | + WHERE exe_id IN (".implode(',', $exe_list).")"; |
|
1048 | 1046 | Database::query($sql); |
1049 | 1047 | } |
1050 | 1048 | |
@@ -1086,7 +1084,7 @@ discard block |
||
1086 | 1084 | Event::addEvent( |
1087 | 1085 | LOG_EXERCISE_RESULT_DELETE, |
1088 | 1086 | LOG_EXERCISE_AND_USER_ID, |
1089 | - $exercise_id . '-' . $user_id, |
|
1087 | + $exercise_id.'-'.$user_id, |
|
1090 | 1088 | null, |
1091 | 1089 | null, |
1092 | 1090 | $course_id, |
@@ -1458,7 +1456,7 @@ discard block |
||
1458 | 1456 | $res = Database::query($sql); |
1459 | 1457 | $list = array(); |
1460 | 1458 | while ($row = Database::fetch_array($res, 'ASSOC')) { |
1461 | - $list[$row['exe_id']] = $row; /* |
|
1459 | + $list[$row['exe_id']] = $row; /* |
|
1462 | 1460 | $sql = "SELECT * FROM $table_track_attempt WHERE exe_id = {$row['exe_id']}"; |
1463 | 1461 | $res_question = Database::query($sql); |
1464 | 1462 | while($row_q = Database::fetch_array($res_question,'ASSOC')) { |
@@ -1684,7 +1682,7 @@ discard block |
||
1684 | 1682 | Event::addEvent( |
1685 | 1683 | LOG_QUESTION_RESULT_DELETE, |
1686 | 1684 | LOG_EXERCISE_ATTEMPT_QUESTION_ID, |
1687 | - $exe_id . '-' . $question_id, |
|
1685 | + $exe_id.'-'.$question_id, |
|
1688 | 1686 | null, |
1689 | 1687 | null, |
1690 | 1688 | $courseId, |
@@ -1720,7 +1718,7 @@ discard block |
||
1720 | 1718 | Event::addEvent( |
1721 | 1719 | LOG_QUESTION_RESULT_DELETE, |
1722 | 1720 | LOG_EXERCISE_ATTEMPT_QUESTION_ID, |
1723 | - $exe_id . '-' . $question_id, |
|
1721 | + $exe_id.'-'.$question_id, |
|
1724 | 1722 | null, |
1725 | 1723 | null, |
1726 | 1724 | $courseId, |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | friend_user_id<>'.((int) $user_id).' AND |
110 | 110 | user_id='.((int) $user_id); |
111 | 111 | if (isset($id_group) && $id_group > 0) { |
112 | - $sql.=' AND relation_type='.$id_group; |
|
112 | + $sql .= ' AND relation_type='.$id_group; |
|
113 | 113 | } |
114 | 114 | if (isset($search_name)) { |
115 | 115 | $search_name = trim($search_name); |
116 | 116 | $search_name = str_replace(' ', '', $search_name); |
117 | - $sql.=' AND friend_user_id IN ( |
|
117 | + $sql .= ' AND friend_user_id IN ( |
|
118 | 118 | SELECT user_id FROM '.$tbl_my_user.' |
119 | 119 | WHERE |
120 | 120 | firstName LIKE "%'.Database::escape_string($search_name).'%" OR |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | |
369 | 369 | $user_info = api_get_user_info($userfriend_id); |
370 | 370 | $succes = get_lang('MessageSentTo'); |
371 | - $succes.= ' : '.api_get_person_name($user_info['firstName'], $user_info['lastName']); |
|
371 | + $succes .= ' : '.api_get_person_name($user_info['firstName'], $user_info['lastName']); |
|
372 | 372 | |
373 | 373 | if (isset($subject_message) && isset($content_message) && isset($userfriend_id)) { |
374 | 374 | $send_message = MessageManager::send_message($userfriend_id, $subject_message, $content_message); |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | $user_in_course_status = CourseManager :: get_user_in_course_status(api_get_user_id(), $course_code); |
486 | 486 | |
487 | 487 | //$valor = api_get_settings_params(); |
488 | - $course_path = api_get_path(SYS_COURSE_PATH).$course_directory; // course path |
|
488 | + $course_path = api_get_path(SYS_COURSE_PATH).$course_directory; // course path |
|
489 | 489 | if (api_get_setting('course_images_in_courses_list') === 'true') { |
490 | 490 | if (file_exists($course_path.'/course-pic85x85.png')) { |
491 | 491 | $image = $my_course['course_info']['course_image']; |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | if ($course_visibility != COURSE_VISIBILITY_HIDDEN && |
511 | 511 | ($course_visibility != COURSE_VISIBILITY_CLOSED || $user_in_course_status == COURSEMANAGER) |
512 | 512 | ) { |
513 | - $result .= '<span class="title">' . $course_title . '<span>'; |
|
513 | + $result .= '<span class="title">'.$course_title.'<span>'; |
|
514 | 514 | } else { |
515 | 515 | $result .= $course_title." "." ".get_lang('CourseClosed').""; |
516 | 516 | } |
@@ -729,57 +729,57 @@ discard block |
||
729 | 729 | $links = '<ul class="nav nav-pills nav-stacked">'; |
730 | 730 | $active = $show == 'home' ? 'active' : null; |
731 | 731 | $links .= ' |
732 | - <li class="home-icon ' . $active . '"> |
|
733 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/home.php"> |
|
734 | - ' . $homeIcon . ' ' . get_lang('Home') . ' |
|
732 | + <li class="home-icon ' . $active.'"> |
|
733 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/home.php"> |
|
734 | + ' . $homeIcon.' '.get_lang('Home').' |
|
735 | 735 | </a> |
736 | 736 | </li>'; |
737 | 737 | $active = $show == 'messages' ? 'active' : null; |
738 | 738 | $links .= ' |
739 | - <li class="messages-icon ' . $active . '"> |
|
740 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'messages/inbox.php?f=social"> |
|
741 | - ' . $messagesIcon . ' ' . get_lang('Messages') . $count_unread_message . ' |
|
739 | + <li class="messages-icon ' . $active.'"> |
|
740 | + <a href="' . api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social"> |
|
741 | + ' . $messagesIcon.' '.get_lang('Messages').$count_unread_message.' |
|
742 | 742 | </a> |
743 | 743 | </li>'; |
744 | 744 | |
745 | 745 | //Invitations |
746 | 746 | $active = $show == 'invitations' ? 'active' : null; |
747 | 747 | $links .= ' |
748 | - <li class="invitations-icon ' . $active . '"> |
|
749 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php"> |
|
750 | - ' . $invitationsIcon . ' ' . get_lang('Invitations') . $total_invitations . ' |
|
748 | + <li class="invitations-icon ' . $active.'"> |
|
749 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/invitations.php"> |
|
750 | + ' . $invitationsIcon.' '.get_lang('Invitations').$total_invitations.' |
|
751 | 751 | </a> |
752 | 752 | </li>'; |
753 | 753 | |
754 | 754 | //Shared profile and groups |
755 | 755 | $active = $show == 'shared_profile' ? 'active' : null; |
756 | 756 | $links .= ' |
757 | - <li class="shared-profile-icon' . $active . '"> |
|
758 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php"> |
|
759 | - ' . $sharedProfileIcon . ' ' . get_lang('ViewMySharedProfile') . ' |
|
757 | + <li class="shared-profile-icon' . $active.'"> |
|
758 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/profile.php"> |
|
759 | + ' . $sharedProfileIcon.' '.get_lang('ViewMySharedProfile').' |
|
760 | 760 | </a> |
761 | 761 | </li>'; |
762 | 762 | $active = $show == 'friends' ? 'active' : null; |
763 | 763 | $links .= ' |
764 | - <li class="friends-icon ' . $active . '"> |
|
765 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/friends.php"> |
|
766 | - ' . $friendsIcon . ' ' . get_lang('Friends') . ' |
|
764 | + <li class="friends-icon ' . $active.'"> |
|
765 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/friends.php"> |
|
766 | + ' . $friendsIcon.' '.get_lang('Friends').' |
|
767 | 767 | </a> |
768 | 768 | </li>'; |
769 | 769 | $active = $show == 'browse_groups' ? 'active' : null; |
770 | 770 | $links .= ' |
771 | - <li class="browse-groups-icon ' . $active . '"> |
|
772 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/groups.php"> |
|
773 | - ' . $groupsIcon . ' ' . get_lang('SocialGroups') . ' |
|
771 | + <li class="browse-groups-icon ' . $active.'"> |
|
772 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/groups.php"> |
|
773 | + ' . $groupsIcon.' '.get_lang('SocialGroups').' |
|
774 | 774 | </a> |
775 | 775 | </li>'; |
776 | 776 | |
777 | 777 | //Search users |
778 | 778 | $active = $show == 'search' ? 'active' : null; |
779 | 779 | $links .= ' |
780 | - <li class="search-icon ' . $active . '"> |
|
781 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/search.php"> |
|
782 | - ' . $searchIcon . ' ' . get_lang('Search') . ' |
|
780 | + <li class="search-icon ' . $active.'"> |
|
781 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/search.php"> |
|
782 | + ' . $searchIcon.' '.get_lang('Search').' |
|
783 | 783 | </a> |
784 | 784 | </li>'; |
785 | 785 | |
@@ -787,9 +787,9 @@ discard block |
||
787 | 787 | $active = $show == 'myfiles' ? 'active' : null; |
788 | 788 | |
789 | 789 | $myFiles = ' |
790 | - <li class="myfiles-icon ' . $active . '"> |
|
791 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/myfiles.php"> |
|
792 | - ' . $filesIcon . ' ' . get_lang('MyFiles') . ' |
|
790 | + <li class="myfiles-icon ' . $active.'"> |
|
791 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/myfiles.php"> |
|
792 | + ' . $filesIcon.' '.get_lang('MyFiles').' |
|
793 | 793 | </a> |
794 | 794 | </li>'; |
795 | 795 | |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | } |
799 | 799 | $links .= $myFiles; |
800 | 800 | |
801 | - $links .='</ul>'; |
|
801 | + $links .= '</ul>'; |
|
802 | 802 | |
803 | 803 | $html .= Display::panelCollapse( |
804 | 804 | get_lang('SocialNetwork'), |
@@ -819,57 +819,57 @@ discard block |
||
819 | 819 | } |
820 | 820 | |
821 | 821 | if ($show == 'shared_profile') { |
822 | - $links = '<ul class="nav nav-pills nav-stacked">'; |
|
822 | + $links = '<ul class="nav nav-pills nav-stacked">'; |
|
823 | 823 | // My own profile |
824 | 824 | if ($show_full_profile && $user_id == intval(api_get_user_id())) { |
825 | 825 | $links .= ' |
826 | - <li class="home-icon ' . $active . '"> |
|
827 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/home.php"> |
|
828 | - ' . $homeIcon . ' ' . get_lang('Home') . ' |
|
826 | + <li class="home-icon ' . $active.'"> |
|
827 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/home.php"> |
|
828 | + ' . $homeIcon.' '.get_lang('Home').' |
|
829 | 829 | </a> |
830 | 830 | </li> |
831 | - <li class="messages-icon ' . $active . '"> |
|
832 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'messages/inbox.php?f=social"> |
|
833 | - ' . $messagesIcon . ' ' . get_lang('Messages') . $count_unread_message . ' |
|
831 | + <li class="messages-icon ' . $active.'"> |
|
832 | + <a href="' . api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social"> |
|
833 | + ' . $messagesIcon.' '.get_lang('Messages').$count_unread_message.' |
|
834 | 834 | </a> |
835 | 835 | </li>'; |
836 | 836 | $active = $show == 'invitations' ? 'active' : null; |
837 | 837 | $links .= ' |
838 | - <li class="invitations-icon' . $active . '"> |
|
839 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php"> |
|
840 | - ' . $invitationsIcon . ' ' . get_lang('Invitations') . $total_invitations . ' |
|
838 | + <li class="invitations-icon' . $active.'"> |
|
839 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/invitations.php"> |
|
840 | + ' . $invitationsIcon.' '.get_lang('Invitations').$total_invitations.' |
|
841 | 841 | </a> |
842 | 842 | </li>'; |
843 | 843 | |
844 | 844 | $links .= ' |
845 | 845 | <li class="shared-profile-icon active"> |
846 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php"> |
|
847 | - ' . $sharedProfileIcon . ' ' . get_lang('ViewMySharedProfile') . ' |
|
846 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/profile.php"> |
|
847 | + ' . $sharedProfileIcon.' '.get_lang('ViewMySharedProfile').' |
|
848 | 848 | </a> |
849 | 849 | </li> |
850 | 850 | <li class="friends-icon"> |
851 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/friends.php"> |
|
852 | - ' . $friendsIcon . ' ' . get_lang('Friends') . ' |
|
851 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/friends.php"> |
|
852 | + ' . $friendsIcon.' '.get_lang('Friends').' |
|
853 | 853 | </a> |
854 | 854 | </li> |
855 | 855 | <li class="browse-groups-icon"> |
856 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/groups.php"> |
|
857 | - ' . $groupsIcon . ' ' . get_lang('SocialGroups') . ' |
|
856 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/groups.php"> |
|
857 | + ' . $groupsIcon.' '.get_lang('SocialGroups').' |
|
858 | 858 | </a> |
859 | 859 | </li>'; |
860 | 860 | $active = $show == 'search' ? 'active' : null; |
861 | 861 | $links .= ' |
862 | - <li class="search-icon ' . $active . '"> |
|
863 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/search.php"> |
|
864 | - ' . $searchIcon . ' ' . get_lang('Search') . ' |
|
862 | + <li class="search-icon ' . $active.'"> |
|
863 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/search.php"> |
|
864 | + ' . $searchIcon.' '.get_lang('Search').' |
|
865 | 865 | </a> |
866 | 866 | </li>'; |
867 | 867 | $active = $show == 'myfiles' ? 'active' : null; |
868 | 868 | |
869 | 869 | $myFiles = ' |
870 | - <li class="myfiles-icon ' . $active . '"> |
|
871 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/myfiles.php"> |
|
872 | - ' . $filesIcon . ' ' . get_lang('MyFiles') . ' |
|
870 | + <li class="myfiles-icon ' . $active.'"> |
|
871 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/myfiles.php"> |
|
872 | + ' . $filesIcon.' '.get_lang('MyFiles').' |
|
873 | 873 | </a> |
874 | 874 | </li>'; |
875 | 875 | |
@@ -915,7 +915,7 @@ discard block |
||
915 | 915 | $links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.Display::return_icon('invitation.png', get_lang('YouAlreadySentAnInvitation')).' '.get_lang('YouAlreadySentAnInvitation').'</a></li>'; |
916 | 916 | } else { |
917 | 917 | if (!$show_full_profile) { |
918 | - $links .= '<li><a class="btn-to-send-invitation" href="#" data-send-to="' . $user_id . '" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('invitation.png', get_lang('SocialInvitationToFriends')).' '.get_lang('SendInvitation').'</a></li>'; |
|
918 | + $links .= '<li><a class="btn-to-send-invitation" href="#" data-send-to="'.$user_id.'" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('invitation.png', get_lang('SocialInvitationToFriends')).' '.get_lang('SendInvitation').'</a></li>'; |
|
919 | 919 | } |
920 | 920 | } |
921 | 921 | |
@@ -1025,10 +1025,10 @@ discard block |
||
1025 | 1025 | foreach ($user_list as $uid) { |
1026 | 1026 | $user_info = api_get_user_info($uid, $checkIfUserOnline = true); |
1027 | 1027 | $lastname = $user_info['lastname']; |
1028 | - $firstname = $user_info['firstname']; |
|
1028 | + $firstname = $user_info['firstname']; |
|
1029 | 1029 | $completeName = $firstname.', '.$lastname; |
1030 | 1030 | |
1031 | - $user_rol = $user_info['status'] == 1 ? Display::return_icon('teacher.png',get_lang('Teacher'),null,ICON_SIZE_TINY) : Display::return_icon('user.png',get_lang('Student'),null,ICON_SIZE_TINY); |
|
1031 | + $user_rol = $user_info['status'] == 1 ? Display::return_icon('teacher.png', get_lang('Teacher'), null, ICON_SIZE_TINY) : Display::return_icon('user.png', get_lang('Student'), null, ICON_SIZE_TINY); |
|
1032 | 1032 | $status_icon_chat = null; |
1033 | 1033 | if ($user_info['user_is_online_in_chat'] == 1) { |
1034 | 1034 | $status_icon_chat = Display::return_icon('online.png', get_lang('Online')); |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | $userPicture = $user_info['avatar']; |
1040 | 1040 | $img = '<img class="img-responsive img-circle" title="'.$completeName.'" alt="'.$completeName.'" src="'.$userPicture.'">'; |
1041 | 1041 | |
1042 | - $url = null; |
|
1042 | + $url = null; |
|
1043 | 1043 | // Anonymous users can't have access to the profile |
1044 | 1044 | if (!api_is_anonymous()) { |
1045 | 1045 | if (api_get_setting('allow_social_tool') == 'true') { |
@@ -1205,13 +1205,13 @@ discard block |
||
1205 | 1205 | case SOCIAL_CENTER_PLUGIN: |
1206 | 1206 | $social_plugins = array(1, 2); |
1207 | 1207 | if (is_array($social_plugins) && count($social_plugins) > 0) { |
1208 | - $content.= '<div id="social-plugins">'; |
|
1208 | + $content .= '<div id="social-plugins">'; |
|
1209 | 1209 | foreach ($social_plugins as $plugin) { |
1210 | - $content.= '<div class="social-plugin-item">'; |
|
1211 | - $content.= $plugin; |
|
1212 | - $content.= '</div>'; |
|
1210 | + $content .= '<div class="social-plugin-item">'; |
|
1211 | + $content .= $plugin; |
|
1212 | + $content .= '</div>'; |
|
1213 | 1213 | } |
1214 | - $content.= '</div>'; |
|
1214 | + $content .= '</div>'; |
|
1215 | 1215 | } |
1216 | 1216 | break; |
1217 | 1217 | case SOCIAL_LEFT_PLUGIN: |
@@ -1279,12 +1279,12 @@ discard block |
||
1279 | 1279 | if (!in_array($extension, $allowedTypes)) { |
1280 | 1280 | $flag = false; |
1281 | 1281 | } else { |
1282 | - $newFileName = uniqid('') . '.' . $extension; |
|
1282 | + $newFileName = uniqid('').'.'.$extension; |
|
1283 | 1283 | if (!file_exists($pathMessageAttach)) { |
1284 | 1284 | @mkdir($pathMessageAttach, api_get_permissions_for_new_directories(), true); |
1285 | 1285 | } |
1286 | 1286 | |
1287 | - $newPath = $pathMessageAttach . $newFileName; |
|
1287 | + $newPath = $pathMessageAttach.$newFileName; |
|
1288 | 1288 | if (is_uploaded_file($fileAttach['tmp_name'])) { |
1289 | 1289 | @copy($fileAttach['tmp_name'], $newPath); |
1290 | 1290 | } |
@@ -1293,9 +1293,9 @@ discard block |
||
1293 | 1293 | $medium = self::resize_picture($newPath, IMAGE_WALL_MEDIUM_SIZE); |
1294 | 1294 | |
1295 | 1295 | $big = new Image($newPath); |
1296 | - $ok = $small && $small->send_image($pathMessageAttach . IMAGE_WALL_SMALL . '_' . $newFileName) && |
|
1297 | - $medium && $medium->send_image($pathMessageAttach . IMAGE_WALL_MEDIUM .'_' . $newFileName) && |
|
1298 | - $big && $big->send_image($pathMessageAttach . IMAGE_WALL_BIG . '_' . $newFileName); |
|
1296 | + $ok = $small && $small->send_image($pathMessageAttach.IMAGE_WALL_SMALL.'_'.$newFileName) && |
|
1297 | + $medium && $medium->send_image($pathMessageAttach.IMAGE_WALL_MEDIUM.'_'.$newFileName) && |
|
1298 | + $big && $big->send_image($pathMessageAttach.IMAGE_WALL_BIG.'_'.$newFileName); |
|
1299 | 1299 | |
1300 | 1300 | // Insert |
1301 | 1301 | $newFileName = $social.$newFileName; |
@@ -1386,7 +1386,7 @@ discard block |
||
1386 | 1386 | $start = '0000-00-00'; |
1387 | 1387 | } |
1388 | 1388 | |
1389 | - $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1389 | + $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1390 | 1390 | $messages = self::getWallMessages($userId, MESSAGE_STATUS_WALL, $idMessage, $start, $limit, $offset); |
1391 | 1391 | $formattedList = '<div class="sub-mediapost">'; |
1392 | 1392 | $users = array(); |
@@ -1401,8 +1401,8 @@ discard block |
||
1401 | 1401 | } |
1402 | 1402 | |
1403 | 1403 | $nameComplete = api_is_western_name_order() |
1404 | - ? $users[$userIdLoop]['firstname'] .' ' . $users[$userIdLoop]['lastname'] |
|
1405 | - : $users[$userIdLoop]['lastname'] . ' ' . $users[$userIdLoop]['firstname']; |
|
1404 | + ? $users[$userIdLoop]['firstname'].' '.$users[$userIdLoop]['lastname'] |
|
1405 | + : $users[$userIdLoop]['lastname'].' '.$users[$userIdLoop]['firstname']; |
|
1406 | 1406 | $url = api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$userIdLoop; |
1407 | 1407 | $media = ''; |
1408 | 1408 | $media .= '<div class="rep-post">'; |
@@ -1413,11 +1413,11 @@ discard block |
||
1413 | 1413 | $media .= '</div>'; |
1414 | 1414 | } |
1415 | 1415 | $media .= '<div class="user-image">'; |
1416 | - $media .= '<a href="'.$url.'" ><img src="'. $users[$userIdLoop]['avatar'] . |
|
1416 | + $media .= '<a href="'.$url.'" ><img src="'.$users[$userIdLoop]['avatar']. |
|
1417 | 1417 | '" alt="'.$users[$userIdLoop]['complete_name'].'" class="avatar-thumb"></a>'; |
1418 | 1418 | $media .= '</div>'; |
1419 | 1419 | $media .= '<div class="user-data">'; |
1420 | - $media .= '<div class="username">' . '<a href="'.$url.'">'.$nameComplete.'</a></div>'; |
|
1420 | + $media .= '<div class="username">'.'<a href="'.$url.'">'.$nameComplete.'</a></div>'; |
|
1421 | 1421 | $media .= '<div class="time timeago" title="'.$date.'">'.$date.'</div>'; |
1422 | 1422 | $media .= '</div>'; |
1423 | 1423 | $media .= '<div class="msg-content">'; |
@@ -1452,12 +1452,12 @@ discard block |
||
1452 | 1452 | * @param int $offset Wall messages offset |
1453 | 1453 | * @return array $data return user's starting wall messages along with message extra data |
1454 | 1454 | */ |
1455 | - public static function getWallMessagesPostHTML($userId, $friendId = 0, $start = null, $limit = 10, $offset= 0) |
|
1455 | + public static function getWallMessagesPostHTML($userId, $friendId = 0, $start = null, $limit = 10, $offset = 0) |
|
1456 | 1456 | { |
1457 | 1457 | if (empty($start)) { |
1458 | 1458 | $start = '0000-00-00'; |
1459 | 1459 | } |
1460 | - $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1460 | + $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1461 | 1461 | $messages = self::getWallMessages($userId, MESSAGE_STATUS_WALL_POST, null, $start, $limit, $offset); |
1462 | 1462 | $users = array(); |
1463 | 1463 | $data = array(); |
@@ -1516,7 +1516,7 @@ discard block |
||
1516 | 1516 | |
1517 | 1517 | $htmlReceiver = ''; |
1518 | 1518 | if ($authorId != $receiverId) { |
1519 | - $htmlReceiver = ' > <a href="'.$urlReceiver.'">' . $nameCompleteReceiver . '</a> '; |
|
1519 | + $htmlReceiver = ' > <a href="'.$urlReceiver.'">'.$nameCompleteReceiver.'</a> '; |
|
1520 | 1520 | } |
1521 | 1521 | |
1522 | 1522 | $wallImage = ''; |
@@ -1551,7 +1551,7 @@ discard block |
||
1551 | 1551 | $html .= '<div class="img-post">'; |
1552 | 1552 | $html .= $wallImage; |
1553 | 1553 | $html .= '</div>'; |
1554 | - $html .= '<p>'. Security::remove_XSS($message['content']).'</p>'; |
|
1554 | + $html .= '<p>'.Security::remove_XSS($message['content']).'</p>'; |
|
1555 | 1555 | $html .= '</div>'; |
1556 | 1556 | $html .= '</div>'; // end mediaPost |
1557 | 1557 | |
@@ -1574,11 +1574,11 @@ discard block |
||
1574 | 1574 | $domain = empty($url) ? parse_url($link) : parse_url($url); |
1575 | 1575 | $domain = $domain['scheme'].'://'.$domain['host']; |
1576 | 1576 | // Trick to verify if the Image Url Exist because of some bad metatag dev |
1577 | - if (self::verifyUrl($image) == false){ |
|
1578 | - if (!($image[0] == '/')){ |
|
1579 | - $domain = $domain . '/'; |
|
1577 | + if (self::verifyUrl($image) == false) { |
|
1578 | + if (!($image[0] == '/')) { |
|
1579 | + $domain = $domain.'/'; |
|
1580 | 1580 | } |
1581 | - $image = $domain . $image; |
|
1581 | + $image = $domain.$image; |
|
1582 | 1582 | } |
1583 | 1583 | $title = $graph->title; |
1584 | 1584 | |
@@ -1630,16 +1630,16 @@ discard block |
||
1630 | 1630 | if (isset($array[2]) && !empty($array[2])) { |
1631 | 1631 | |
1632 | 1632 | if ($size == IMAGE_WALL_SMALL) { |
1633 | - $name = IMAGE_WALL_SMALL. '_' . $array[2]; |
|
1634 | - }else if($size == IMAGE_WALL_MEDIUM){ |
|
1635 | - $name = IMAGE_WALL_MEDIUM. '_' . $array[2]; |
|
1636 | - }else if($size == IMAGE_WALL_BIG){ |
|
1637 | - $name = IMAGE_WALL_BIG. '_' . $array[2]; |
|
1638 | - }else { |
|
1639 | - $name = IMAGE_WALL_SMALL. '_' . $array[2]; |
|
1633 | + $name = IMAGE_WALL_SMALL.'_'.$array[2]; |
|
1634 | + } else if ($size == IMAGE_WALL_MEDIUM) { |
|
1635 | + $name = IMAGE_WALL_MEDIUM.'_'.$array[2]; |
|
1636 | + } else if ($size == IMAGE_WALL_BIG) { |
|
1637 | + $name = IMAGE_WALL_BIG.'_'.$array[2]; |
|
1638 | + } else { |
|
1639 | + $name = IMAGE_WALL_SMALL.'_'.$array[2]; |
|
1640 | 1640 | } |
1641 | 1641 | $lessImage = str_replace($array[2], '', $path); |
1642 | - $name = $lessImage . $name; |
|
1642 | + $name = $lessImage.$name; |
|
1643 | 1643 | } |
1644 | 1644 | |
1645 | 1645 | return $name; |
@@ -1747,18 +1747,18 @@ discard block |
||
1747 | 1747 | if ($number_friends != 0) { |
1748 | 1748 | if ($number_friends > $number_of_images) { |
1749 | 1749 | if (api_get_user_id() == $user_id) { |
1750 | - $friendHtml.= ' <span><a href="friends.php">'.get_lang('SeeAll').'</a></span>'; |
|
1750 | + $friendHtml .= ' <span><a href="friends.php">'.get_lang('SeeAll').'</a></span>'; |
|
1751 | 1751 | } else { |
1752 | - $friendHtml.= ' <span>' |
|
1752 | + $friendHtml .= ' <span>' |
|
1753 | 1753 | .'<a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php' |
1754 | 1754 | .'?view=friends&height=390&width=610&user_id='.$user_id.'"' |
1755 | 1755 | .'class="ajax" data-title="'.get_lang('SeeAll').'" title="'.get_lang('SeeAll').'" >'.get_lang('SeeAll').'</a></span>'; |
1756 | 1756 | } |
1757 | 1757 | } |
1758 | 1758 | |
1759 | - $friendHtml.= '<ul class="nav nav-list">'; |
|
1759 | + $friendHtml .= '<ul class="nav nav-list">'; |
|
1760 | 1760 | $j = 1; |
1761 | - for ($k=0; $k < $number_friends; $k++) { |
|
1761 | + for ($k = 0; $k < $number_friends; $k++) { |
|
1762 | 1762 | if ($j > $number_of_images) break; |
1763 | 1763 | |
1764 | 1764 | if (isset($friends[$k])) { |
@@ -1772,26 +1772,26 @@ discard block |
||
1772 | 1772 | $statusIcon = Display::span('', array('class' => 'offline_user_in_text')); |
1773 | 1773 | } |
1774 | 1774 | |
1775 | - $friendHtml.= '<li>'; |
|
1776 | - $friendHtml.= '<div>'; |
|
1775 | + $friendHtml .= '<li>'; |
|
1776 | + $friendHtml .= '<div>'; |
|
1777 | 1777 | |
1778 | 1778 | // the height = 92 must be the same in the image_friend_network span style in default.css |
1779 | 1779 | $friends_profile = UserManager::getUserPicture($friend['friend_user_id'], USER_IMAGE_SIZE_SMALL); |
1780 | - $friendHtml.= '<img src="'.$friends_profile.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'"/>'; |
|
1780 | + $friendHtml .= '<img src="'.$friends_profile.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'"/>'; |
|
1781 | 1781 | $link_shared = (empty($link_shared)) ? '' : '&'.$link_shared; |
1782 | - $friendHtml.= $statusIcon .'<a href="profile.php?' .'u=' . $friend['friend_user_id'] . $link_shared . '">' . $name_user .'</a>'; |
|
1783 | - $friendHtml.= '</div>'; |
|
1784 | - $friendHtml.= '</li>'; |
|
1782 | + $friendHtml .= $statusIcon.'<a href="profile.php?'.'u='.$friend['friend_user_id'].$link_shared.'">'.$name_user.'</a>'; |
|
1783 | + $friendHtml .= '</div>'; |
|
1784 | + $friendHtml .= '</li>'; |
|
1785 | 1785 | } |
1786 | 1786 | $j++; |
1787 | 1787 | } |
1788 | - $friendHtml.='</ul>'; |
|
1788 | + $friendHtml .= '</ul>'; |
|
1789 | 1789 | } else { |
1790 | - $friendHtml.= '<div class="">'.get_lang('NoFriendsInYourContactList').'<br />' |
|
1791 | - .'<a class="btn btn-primary" href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '. get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1790 | + $friendHtml .= '<div class="">'.get_lang('NoFriendsInYourContactList').'<br />' |
|
1791 | + .'<a class="btn btn-primary" href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '.get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1792 | 1792 | } |
1793 | 1793 | |
1794 | - $friendHtml = Display::panel($friendHtml, get_lang('SocialFriend').' (' . $number_friends . ')' ); |
|
1794 | + $friendHtml = Display::panel($friendHtml, get_lang('SocialFriend').' ('.$number_friends.')'); |
|
1795 | 1795 | |
1796 | 1796 | return $friendHtml; |
1797 | 1797 | } |
@@ -1812,9 +1812,9 @@ discard block |
||
1812 | 1812 | |
1813 | 1813 | if ($number_friends != 0) { |
1814 | 1814 | |
1815 | - $friendHtml.= '<div class="list-group">'; |
|
1815 | + $friendHtml .= '<div class="list-group">'; |
|
1816 | 1816 | $j = 1; |
1817 | - for ($k=0; $k < $number_friends; $k++) { |
|
1817 | + for ($k = 0; $k < $number_friends; $k++) { |
|
1818 | 1818 | if ($j > $number_of_images) break; |
1819 | 1819 | |
1820 | 1820 | if (isset($friends[$k])) { |
@@ -1823,11 +1823,11 @@ discard block |
||
1823 | 1823 | $user_info_friend = api_get_user_info($friend['friend_user_id'], true); |
1824 | 1824 | |
1825 | 1825 | if ($user_info_friend['user_is_online']) { |
1826 | - $statusIcon = Display::return_icon('statusonline.png',get_lang('Online')); |
|
1827 | - $status=1; |
|
1826 | + $statusIcon = Display::return_icon('statusonline.png', get_lang('Online')); |
|
1827 | + $status = 1; |
|
1828 | 1828 | } else { |
1829 | - $statusIcon = Display::return_icon('statusoffline.png',get_lang('Offline')); |
|
1830 | - $status=0; |
|
1829 | + $statusIcon = Display::return_icon('statusoffline.png', get_lang('Offline')); |
|
1830 | + $status = 0; |
|
1831 | 1831 | } |
1832 | 1832 | |
1833 | 1833 | $friendAvatarMedium = UserManager::getUserPicture($friend['friend_user_id'], USER_IMAGE_SIZE_MEDIUM); |
@@ -1836,24 +1836,24 @@ discard block |
||
1836 | 1836 | $showLinkToChat = api_is_global_chat_enabled() && |
1837 | 1837 | $friend['friend_user_id'] != api_get_user_id(); |
1838 | 1838 | |
1839 | - if ($showLinkToChat){ |
|
1839 | + if ($showLinkToChat) { |
|
1840 | 1840 | $friendHtml .= '<a onclick="javascript:chatWith(\''.$friend['friend_user_id'].'\', \''.$name_user.'\', \''.$status.'\',\''.$friendAvatarSmall.'\')" href="javascript:void(0);" class="list-group-item">'; |
1841 | - $friendHtml .= $friend_avatar.' <span class="username">' . $name_user . '</span>'; |
|
1842 | - $friendHtml .= '<span class="status">' . $statusIcon . '</span>'; |
|
1841 | + $friendHtml .= $friend_avatar.' <span class="username">'.$name_user.'</span>'; |
|
1842 | + $friendHtml .= '<span class="status">'.$statusIcon.'</span>'; |
|
1843 | 1843 | } else { |
1844 | 1844 | $link_shared = (empty($link_shared)) ? '' : '&'.$link_shared; |
1845 | - $friendHtml .= '<a href="profile.php?' .'u=' . $friend['friend_user_id'] . $link_shared . '" class="list-group-item">'; |
|
1846 | - $friendHtml .= $friend_avatar.' <span class="username-all">' . $name_user . '</span>'; |
|
1845 | + $friendHtml .= '<a href="profile.php?'.'u='.$friend['friend_user_id'].$link_shared.'" class="list-group-item">'; |
|
1846 | + $friendHtml .= $friend_avatar.' <span class="username-all">'.$name_user.'</span>'; |
|
1847 | 1847 | } |
1848 | 1848 | |
1849 | 1849 | $friendHtml .= '</a>'; |
1850 | 1850 | } |
1851 | 1851 | $j++; |
1852 | 1852 | } |
1853 | - $friendHtml.='</div>'; |
|
1853 | + $friendHtml .= '</div>'; |
|
1854 | 1854 | } else { |
1855 | - $friendHtml.= '<div class="help">'.get_lang('NoFriendsInYourContactList').' ' |
|
1856 | - .'<a href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '. get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1855 | + $friendHtml .= '<div class="help">'.get_lang('NoFriendsInYourContactList').' ' |
|
1856 | + .'<a href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '.get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1857 | 1857 | } |
1858 | 1858 | |
1859 | 1859 | return $friendHtml; |
@@ -1871,7 +1871,7 @@ discard block |
||
1871 | 1871 | 'post', |
1872 | 1872 | api_get_path(WEB_CODE_PATH).'social/profile.php'.$userId, |
1873 | 1873 | null, |
1874 | - array('enctype' => 'multipart/form-data') , |
|
1874 | + array('enctype' => 'multipart/form-data'), |
|
1875 | 1875 | FormValidator::LAYOUT_HORIZONTAL |
1876 | 1876 | ); |
1877 | 1877 |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | { |
735 | 735 | $skill_rel_skill = new SkillRelSkill(); |
736 | 736 | $skills = $skill_rel_skill->get_direct_parents($skill_id, true); |
737 | - foreach($skills as &$skill) { |
|
737 | + foreach ($skills as &$skill) { |
|
738 | 738 | $skill['data'] = self::get($skill['skill_id']); |
739 | 739 | $skill_info2 = $skill_rel_skill->get_skill_info($skill['skill_id']); |
740 | 740 | $skill['data']['parent_id'] = $skill_info2['parent_id']; |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | $attributes = array( |
773 | 773 | 'skill_id' => $skill_id, |
774 | 774 | 'parent_id' => $parent_id, |
775 | - 'relation_type' => (isset($params['relation_type'])?$params['relation_type']:0), |
|
775 | + 'relation_type' => (isset($params['relation_type']) ? $params['relation_type'] : 0), |
|
776 | 776 | //'level' => $params['level'], |
777 | 777 | ); |
778 | 778 | $skill_rel_skill->save($attributes); |
@@ -969,8 +969,8 @@ discard block |
||
969 | 969 | // 2nd node |
970 | 970 | $skills[$skill_id] = $skill_info; |
971 | 971 | // Uncomment code below to hide the searched skill |
972 | - $skills[$skill_id]['data']['parent_id'] = $skill_info['extra']['parent_id']; |
|
973 | - $skills[$skill_id]['parent_id'] = 1; |
|
972 | + $skills[$skill_id]['data']['parent_id'] = $skill_info['extra']['parent_id']; |
|
973 | + $skills[$skill_id]['parent_id'] = 1; |
|
974 | 974 | } |
975 | 975 | } |
976 | 976 | } |
@@ -1033,7 +1033,7 @@ discard block |
||
1033 | 1033 | $skill['data']['skill_has_gradebook'] = true; |
1034 | 1034 | } |
1035 | 1035 | $refs[$skill['id']] = &$skill; |
1036 | - $flat_array[$skill['id']] = &$skill; |
|
1036 | + $flat_array[$skill['id']] = &$skill; |
|
1037 | 1037 | } |
1038 | 1038 | |
1039 | 1039 | // Checking family value |
@@ -1054,7 +1054,7 @@ discard block |
||
1054 | 1054 | $refs['root']['children'][0] = $skills[1]; |
1055 | 1055 | $skills[$skill_id]['data']['family_id'] = 1; |
1056 | 1056 | $refs['root']['children'][0]['children'][0] = $skills[$skill_id]; |
1057 | - $flat_array[$skill_id] = $skills[$skill_id]; |
|
1057 | + $flat_array[$skill_id] = $skills[$skill_id]; |
|
1058 | 1058 | } else { |
1059 | 1059 | // Moving node to the children index of their parents |
1060 | 1060 | |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | $skill['data']['family_id'] = $new_family_array[$skill['id']]; |
1064 | 1064 | } |
1065 | 1065 | $refs[$skill['parent_id']]['children'][] = &$skill; |
1066 | - $flat_array[$my_skill_id] = $skill; |
|
1066 | + $flat_array[$my_skill_id] = $skill; |
|
1067 | 1067 | } |
1068 | 1068 | } |
1069 | 1069 | |
@@ -1161,7 +1161,7 @@ discard block |
||
1161 | 1161 | INNER JOIN {$this->table_skill_rel_user} su |
1162 | 1162 | ON (s.id = su.skill_id) |
1163 | 1163 | WHERE user_id = $user_id"; |
1164 | - $result = Database::query($sql); |
|
1164 | + $result = Database::query($sql); |
|
1165 | 1165 | if (Database::num_rows($result)) { |
1166 | 1166 | $result = Database::fetch_row($result); |
1167 | 1167 | return $result[0]; |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | */ |
1204 | 1204 | public function get_user_list_skill_ranking_count() |
1205 | 1205 | { |
1206 | - $sql = "SELECT count(*) FROM ( |
|
1206 | + $sql = "SELECT count(*) FROM ( |
|
1207 | 1207 | SELECT count(distinct 1) |
1208 | 1208 | FROM {$this->table} s |
1209 | 1209 | INNER JOIN {$this->table_skill_rel_user} su |
@@ -1256,7 +1256,7 @@ discard block |
||
1256 | 1256 | ON c.code = g.course_code |
1257 | 1257 | WHERE sg.skill_id = $skill_id |
1258 | 1258 | AND (g.session_id IS NULL OR g.session_id = 0)"; |
1259 | - $result = Database::query($sql); |
|
1259 | + $result = Database::query($sql); |
|
1260 | 1260 | |
1261 | 1261 | return Database::store_result($result, 'ASSOC'); |
1262 | 1262 | } |
@@ -1443,7 +1443,7 @@ discard block |
||
1443 | 1443 | WHERE sg.skill_id = $skillId |
1444 | 1444 | AND g.session_id > 0"; |
1445 | 1445 | |
1446 | - $result = Database::query($sql); |
|
1446 | + $result = Database::query($sql); |
|
1447 | 1447 | |
1448 | 1448 | return Database::store_result($result, 'ASSOC'); |
1449 | 1449 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | require_once 'xapian.php'; |
9 | -require_once dirname(__FILE__) . '/../IndexableChunk.class.php'; |
|
9 | +require_once dirname(__FILE__).'/../IndexableChunk.class.php'; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Abstract helper class |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | if (!empty($chunk->terms)) { |
131 | 131 | foreach ($chunk->terms as $term) { |
132 | 132 | /* FIXME: think of getting weight */ |
133 | - $doc->add_term($term['flag'] . $term['name'], 1); |
|
133 | + $doc->add_term($term['flag'].$term['name'], 1); |
|
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $doc->clear_terms(); |
216 | 216 | foreach ($terms as $term) { |
217 | 217 | //add directly |
218 | - $doc->add_term($prefix . $term, 1); |
|
218 | + $doc->add_term($prefix.$term, 1); |
|
219 | 219 | } |
220 | 220 | $this->db->replace_document($did, $doc); |
221 | 221 | $this->db->flush(); |
@@ -8,11 +8,11 @@ discard block |
||
8 | 8 | * Code |
9 | 9 | */ |
10 | 10 | require_once 'xapian.php'; |
11 | -require_once dirname(__FILE__) . '/../IndexableChunk.class.php'; |
|
11 | +require_once dirname(__FILE__).'/../IndexableChunk.class.php'; |
|
12 | 12 | //TODO: think another way without including specific fields here |
13 | -require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'; |
|
13 | +require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; |
|
14 | 14 | |
15 | -define('XAPIAN_DB', api_get_path(SYS_UPLOAD_PATH) . 'plugins/xapian/searchdb/'); |
|
15 | +define('XAPIAN_DB', api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb/'); |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Queries the database. |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | // process each specific field prefix |
97 | 97 | foreach ($specific_fields as $specific_field) { |
98 | - $results[$count]['sf-' . $specific_field['code']] = xapian_get_doc_terms($document, $specific_field['code']); |
|
98 | + $results[$count]['sf-'.$specific_field['code']] = xapian_get_doc_terms($document, $specific_field['code']); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | // rest of data |
@@ -261,6 +261,6 @@ discard block |
||
261 | 261 | } else { |
262 | 262 | $message_error = get_lang('SearchOtherXapianError'); |
263 | 263 | } |
264 | - $display_message = get_lang('Error') . ' : ' . $message_error; |
|
264 | + $display_message = get_lang('Error').' : '.$message_error; |
|
265 | 265 | Display::display_error_message($display_message); |
266 | 266 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | /** |
8 | 8 | * code |
9 | 9 | */ |
10 | -require_once dirname(__FILE__) . '/../../global.inc.php'; |
|
10 | +require_once dirname(__FILE__).'/../../global.inc.php'; |
|
11 | 11 | include_once 'xapian/XapianIndexer.class.php'; |
12 | 12 | |
13 | 13 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0)) |
40 | 40 | return FALSE; |
41 | 41 | |
42 | - require_once api_get_path(LIBRARY_PATH) . 'search/xapian/XapianQuery.php'; |
|
42 | + require_once api_get_path(LIBRARY_PATH).'search/xapian/XapianQuery.php'; |
|
43 | 43 | |
44 | 44 | // compare terms |
45 | 45 | $doc = $this->get_document($search_did); |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | |
56 | 56 | // save it to search engine |
57 | 57 | foreach ($missing_terms as $term) { |
58 | - $this->add_term_to_doc($prefix . $term, $doc); |
|
58 | + $this->add_term_to_doc($prefix.$term, $doc); |
|
59 | 59 | } |
60 | 60 | foreach ($deprecated_terms as $term) { |
61 | - $this->remove_term_from_doc($prefix . $term, $doc); |
|
61 | + $this->remove_term_from_doc($prefix.$term, $doc); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | // don't do anything if no change |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @return array Array of terms |
75 | 75 | */ |
76 | 76 | function get_terms_on_db($prefix, $course_code, $tool_id, $ref_id) { |
77 | - require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'; |
|
77 | + require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; |
|
78 | 78 | $terms = get_specific_field_values_list_by_prefix($prefix, $course_code, $tool_id, $ref_id); |
79 | 79 | $prefix_terms = array(); |
80 | 80 | foreach ($terms as $term) { |