@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | $rs = Database::query($sql); |
28 | 28 | |
29 | - if (Database::affected_rows($rs)>0){ |
|
29 | + if (Database::affected_rows($rs) > 0) { |
|
30 | 30 | $message = get_lang('ServiceActivated'); |
31 | 31 | } |
32 | 32 | |
@@ -76,18 +76,18 @@ discard block |
||
76 | 76 | WHERE variable LIKE "service_%" AND subkey="active" and selected_value="true"'; |
77 | 77 | |
78 | 78 | $rs = Database::query($sql); |
79 | -while($row = Database::fetch_array($rs)){ |
|
79 | +while ($row = Database::fetch_array($rs)) { |
|
80 | 80 | $listActiveServices[] = $row['variable']; |
81 | 81 | } |
82 | 82 | |
83 | 83 | // javascript to handle accordion behaviour |
84 | 84 | $javascript_message = ''; |
85 | -if(!empty($message)){ |
|
85 | +if (!empty($message)) { |
|
86 | 86 | $javascript_message = ' |
87 | 87 | document.getElementById("message").style.display = "block"; |
88 | 88 | var timer = setTimeout(hideMessage, 5000);'; |
89 | 89 | } |
90 | -$htmlHeadXtra[]= '<script> |
|
90 | +$htmlHeadXtra[] = '<script> |
|
91 | 91 | var listeDiv; |
92 | 92 | var extensionsHeader = new Array(); |
93 | 93 | var extensionsContent = new Array(); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ?> |
136 | 136 | <div id="message" style="display: none"> |
137 | 137 | <?php |
138 | - if(!empty($message)) |
|
138 | + if (!empty($message)) |
|
139 | 139 | Display::display_normal_message($message) |
140 | 140 | ?> |
141 | 141 | </div> |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | $objSkill = new Skill(); |
23 | 23 | $skill = $objSkill->get($skillId); |
24 | 24 | |
25 | -$htmlHeadXtra[] = '<link href="'. api_get_path(WEB_LIBRARY_JS_PATH) .'badge-studio/media/css/core.css" rel="stylesheet">'; |
|
25 | +$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_JS_PATH).'badge-studio/media/css/core.css" rel="stylesheet">'; |
|
26 | 26 | |
27 | 27 | // Add badge studio paths |
28 | 28 | |
29 | 29 | $badgeStudio = [ |
30 | - 'core' => api_get_path(WEB_LIBRARY_JS_PATH) .'badge-studio/', |
|
31 | - 'media' => api_get_path(WEB_LIBRARY_JS_PATH) .'badge-studio/media/', |
|
32 | - 'templates' => api_get_path(WEB_LIBRARY_JS_PATH) .'badge-studio/media/images/templates/', |
|
33 | - 'masks' => api_get_path(WEB_LIBRARY_JS_PATH) .'badge-studio/media/images/masks/', |
|
34 | - 'script_js' => '<script src="'. api_get_path(WEB_LIBRARY_JS_PATH) .'badge-studio/media/js/studio.js?"></script>' |
|
30 | + 'core' => api_get_path(WEB_LIBRARY_JS_PATH).'badge-studio/', |
|
31 | + 'media' => api_get_path(WEB_LIBRARY_JS_PATH).'badge-studio/media/', |
|
32 | + 'templates' => api_get_path(WEB_LIBRARY_JS_PATH).'badge-studio/media/images/templates/', |
|
33 | + 'masks' => api_get_path(WEB_LIBRARY_JS_PATH).'badge-studio/media/images/masks/', |
|
34 | + 'script_js' => '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'badge-studio/media/js/studio.js?"></script>' |
|
35 | 35 | ]; |
36 | 36 | |
37 | 37 | |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | if ($existsBadgesDirectory) { |
60 | 60 | |
61 | 61 | if (!empty($skill['icon'])) { |
62 | - $iconFileAbsolutePath = $badgePath . $skill['icon']; |
|
62 | + $iconFileAbsolutePath = $badgePath.$skill['icon']; |
|
63 | 63 | |
64 | 64 | if (Security::check_abs_path($iconFileAbsolutePath, $badgePath)) { |
65 | - unlink($badgePath . $skill['icon']); |
|
65 | + unlink($badgePath.$skill['icon']); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
@@ -85,24 +85,24 @@ discard block |
||
85 | 85 | |
86 | 86 | $objSkill->update($params); |
87 | 87 | |
88 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'admin/skill_badge_list.php'); |
|
88 | + header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_badge_list.php'); |
|
89 | 89 | exit; |
90 | 90 | } |
91 | 91 | |
92 | 92 | $interbreadcrumb = array( |
93 | 93 | array( |
94 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php', |
|
94 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/index.php', |
|
95 | 95 | 'name' => get_lang('Administration') |
96 | 96 | ), |
97 | 97 | array( |
98 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php', |
|
98 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', |
|
99 | 99 | 'name' => get_lang('Badges') |
100 | 100 | ) |
101 | 101 | ); |
102 | 102 | |
103 | 103 | $toolbar = Display::toolbarButton( |
104 | 104 | get_lang('ManageSkills'), |
105 | - api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php', |
|
105 | + api_get_path(WEB_CODE_PATH).'admin/skill_list.php', |
|
106 | 106 | 'list', |
107 | 107 | 'primary', |
108 | 108 | ['title' => get_lang('ManageSkills')] |
@@ -86,31 +86,31 @@ discard block |
||
86 | 86 | |
87 | 87 | </script>'; |
88 | 88 | |
89 | -$allowed_views = array('mygroups','newest','pop'); |
|
89 | +$allowed_views = array('mygroups', 'newest', 'pop'); |
|
90 | 90 | $content = null; |
91 | 91 | |
92 | -if (isset($_GET['view']) && in_array($_GET['view'],$allowed_views)) { |
|
92 | +if (isset($_GET['view']) && in_array($_GET['view'], $allowed_views)) { |
|
93 | 93 | if ($_GET['view'] == 'mygroups') { |
94 | - $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups')); |
|
95 | - $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('MyGroups')); |
|
96 | - } else if ( $_GET['view'] == 'newest') { |
|
97 | - $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups')); |
|
98 | - $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Newest')); |
|
99 | - } else { |
|
100 | - $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups')); |
|
101 | - $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Popular')); |
|
94 | + $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups')); |
|
95 | + $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('MyGroups')); |
|
96 | + } else if ($_GET['view'] == 'newest') { |
|
97 | + $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups')); |
|
98 | + $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Newest')); |
|
99 | + } else { |
|
100 | + $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups')); |
|
101 | + $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Popular')); |
|
102 | 102 | } |
103 | 103 | } else { |
104 | - $interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups')); |
|
104 | + $interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups')); |
|
105 | 105 | if (!isset($_GET['id'])) { |
106 | - $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('GroupList')); |
|
106 | + $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('GroupList')); |
|
107 | 107 | } else { |
108 | 108 | //$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Group')); |
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | 112 | // getting group information |
113 | -$group_id = isset($_GET['id']) ? intval($_GET['id']) : null; |
|
113 | +$group_id = isset($_GET['id']) ? intval($_GET['id']) : null; |
|
114 | 114 | $relation_group_title = ''; |
115 | 115 | $role = 0; |
116 | 116 | |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | $group_info = $usergroup->get($group_id); |
121 | 121 | |
122 | 122 | |
123 | - $interbreadcrumb[]= array ('url' =>'#','name' => $group_info['name']); |
|
123 | + $interbreadcrumb[] = array('url' =>'#', 'name' => $group_info['name']); |
|
124 | 124 | |
125 | - if (isset($_GET['action']) && $_GET['action']=='leave') { |
|
125 | + if (isset($_GET['action']) && $_GET['action'] == 'leave') { |
|
126 | 126 | $user_leaved = intval($_GET['u']); |
127 | 127 | // I can "leave me myself" |
128 | 128 | if (api_get_user_id() == $user_leaved) { |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | // add a user to a group if its open |
139 | - if (isset($_GET['action']) && $_GET['action']=='join') { |
|
139 | + if (isset($_GET['action']) && $_GET['action'] == 'join') { |
|
140 | 140 | // we add a user only if is a open group |
141 | 141 | $user_join = intval($_GET['u']); |
142 | 142 | if (api_get_user_id() == $user_join && !empty($group_id)) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $group_info = $usergroup->get($group_id); |
166 | 166 | |
167 | 167 | //Loading group information |
168 | -if (isset($_GET['status']) && $_GET['status']=='sent') { |
|
168 | +if (isset($_GET['status']) && $_GET['status'] == 'sent') { |
|
169 | 169 | $social_right_content .= Display::return_message(get_lang('MessageHasBeenSent'), 'confirmation', false); |
170 | 170 | } |
171 | 171 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | if (!$is_group_member && $group_info['visibility'] == GROUP_PERMISSION_CLOSED) { |
176 | 176 | if ($role == GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER) { |
177 | - $social_right_content .= Display::return_message(get_lang('YouAlreadySentAnInvitation')); |
|
177 | + $social_right_content .= Display::return_message(get_lang('YouAlreadySentAnInvitation')); |
|
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
@@ -185,19 +185,19 @@ discard block |
||
185 | 185 | ) { |
186 | 186 | $social_right_content .= '<div class="group-tool">'; |
187 | 187 | $social_right_content .= '<div class="pull-right">'; |
188 | - $social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'. |
|
188 | + $social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'. |
|
189 | 189 | get_lang('JoinGroup').'</a>'; |
190 | - $social_right_content .= '</div>'; |
|
191 | - $social_right_content .= '</div>'; |
|
190 | + $social_right_content .= '</div>'; |
|
191 | + $social_right_content .= '</div>'; |
|
192 | 192 | } elseif ($role == GROUP_USER_PERMISSION_PENDING_INVITATION) { |
193 | 193 | $social_right_content .= '<div class="group-tool">'; |
194 | 194 | $social_right_content .= '<div class="pull-right">'; |
195 | - $social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'. |
|
195 | + $social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'. |
|
196 | 196 | Display::returnFontAwesomeIcon('envelope').' '. |
197 | 197 | get_lang('YouHaveBeenInvitedJoinNow').'</a>'; |
198 | 198 | } |
199 | - $social_right_content .= '</div>'; |
|
200 | - $social_right_content .= '</div>'; |
|
199 | + $social_right_content .= '</div>'; |
|
200 | + $social_right_content .= '</div>'; |
|
201 | 201 | } |
202 | 202 | $content = MessageManager::display_messages_for_group($group_id); |
203 | 203 | if ($is_group_member) { |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | 'action' => 'add_message_group' |
212 | 212 | ]); |
213 | 213 | $create_thread_link = Display::url( |
214 | - Display::returnFontAwesomeIcon('commenting') . ' ' . |
|
214 | + Display::returnFontAwesomeIcon('commenting').' '. |
|
215 | 215 | get_lang('YouShouldCreateATopic'), |
216 | 216 | $createThreadUrl, |
217 | 217 | [ |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | 'action' => 'add_message_group', |
232 | 232 | ]); |
233 | 233 | $create_thread_link = Display::url( |
234 | - Display::returnFontAwesomeIcon('commenting') . ' ' . |
|
234 | + Display::returnFontAwesomeIcon('commenting').' '. |
|
235 | 235 | get_lang('NewTopic'), |
236 | 236 | $createThreadUrl, |
237 | 237 | [ |
@@ -271,21 +271,21 @@ discard block |
||
271 | 271 | foreach ($members as $member) { |
272 | 272 | // if is a member |
273 | 273 | if (in_array($member['relation_type'], |
274 | - array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER,GROUP_USER_PERMISSION_MODERATOR)) |
|
274 | + array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR)) |
|
275 | 275 | ) { |
276 | 276 | //add icons |
277 | 277 | if ($member['relation_type'] == GROUP_USER_PERMISSION_ADMIN) { |
278 | - $icon= Display::return_icon('social_group_admin.png', get_lang('Admin')); |
|
278 | + $icon = Display::return_icon('social_group_admin.png', get_lang('Admin')); |
|
279 | 279 | } elseif ($member['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) { |
280 | - $icon= Display::return_icon('social_group_moderator.png', get_lang('Moderator')); |
|
280 | + $icon = Display::return_icon('social_group_moderator.png', get_lang('Moderator')); |
|
281 | 281 | } else { |
282 | - $icon= ''; |
|
282 | + $icon = ''; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | $userPicture = UserManager::getUserPicture($member['id']); |
286 | 286 | $member_content .= '<div class="col-md-3">'; |
287 | 287 | $member_content .= '<div class="items-user">'; |
288 | - $member_name = Display::url(api_get_person_name(cut($member['user_info']['firstname'],15),cut($member['user_info']['lastname'],15)).' '.$icon, $member['user_info']['profile_url']); |
|
288 | + $member_name = Display::url(api_get_person_name(cut($member['user_info']['firstname'], 15), cut($member['user_info']['lastname'], 15)).' '.$icon, $member['user_info']['profile_url']); |
|
289 | 289 | $member_content .= Display::div('<img class="img-circle" src="'.$userPicture.'"/>', array('class' => 'avatar')); |
290 | 290 | $member_content .= Display::div($member_name, array('class' => 'name')); |
291 | 291 | $member_content .= '</div>'; |
@@ -297,10 +297,10 @@ discard block |
||
297 | 297 | } |
298 | 298 | |
299 | 299 | if (!empty($create_thread_link)) { |
300 | - $create_thread_link = Display::div($create_thread_link, array('class'=>'pull-right')); |
|
300 | + $create_thread_link = Display::div($create_thread_link, array('class'=>'pull-right')); |
|
301 | 301 | } |
302 | 302 | $headers = array(get_lang('Discussions'), get_lang('Members')); |
303 | - $socialForum = Display::tabs($headers, array($content, $member_content),'tabs'); |
|
303 | + $socialForum = Display::tabs($headers, array($content, $member_content), 'tabs'); |
|
304 | 304 | |
305 | 305 | } else { |
306 | 306 | // if I already sent an invitation message |
@@ -312,9 +312,9 @@ discard block |
||
312 | 312 | ) |
313 | 313 | ) |
314 | 314 | ) { |
315 | - $social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('JoinGroup').'</a>'; |
|
315 | + $social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('JoinGroup').'</a>'; |
|
316 | 316 | } elseif ($role == GROUP_USER_PERMISSION_PENDING_INVITATION) { |
317 | - $social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('YouHaveBeenInvitedJoinNow').'</a>'; |
|
317 | + $social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('YouHaveBeenInvitedJoinNow').'</a>'; |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | // Database Table Definitions |
20 | 20 | $tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
21 | -$tbl_group_rel_user = Database::get_main_table(TABLE_USERGROUP_REL_USER); |
|
21 | +$tbl_group_rel_user = Database::get_main_table(TABLE_USERGROUP_REL_USER); |
|
22 | 22 | |
23 | 23 | // setting the name of the tool |
24 | 24 | $tool_name = get_lang('SubscribeUsersToGroup'); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | -$interbreadcrumb[] = array('url' =>'groups.php','name' => get_lang('Groups')); |
|
43 | +$interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups')); |
|
44 | 44 | $interbreadcrumb[] = array('url' => 'group_view.php?id='.$group_id, 'name' => $group_info['name']); |
45 | 45 | $interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('SubscribeUsersToGroup')); |
46 | 46 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | if (is_array($user_list) && count($user_list) > 0) { |
76 | 76 | //send invitation message |
77 | - foreach ($user_list as $user_id){ |
|
77 | + foreach ($user_list as $user_id) { |
|
78 | 78 | $result = MessageManager::send_message( |
79 | 79 | $user_id, |
80 | 80 | $title, |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | |
111 | 111 | if (!isset($group_friend_list[$group_id]) || |
112 | 112 | isset($group_friend_list[$group_id]) && |
113 | - $group_friend_list[$group_id]['relation_type'] == '' ) { |
|
114 | - $Users[$friend['friend_user_id']]= array( |
|
113 | + $group_friend_list[$group_id]['relation_type'] == '') { |
|
114 | + $Users[$friend['friend_user_id']] = array( |
|
115 | 115 | 'user_id' => $friend['friend_user_id'], |
116 | 116 | 'firstname' => $friend['firstName'], |
117 | 117 | 'lastname' => $friend['lastName'], |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ); |
121 | 121 | } |
122 | 122 | } else { |
123 | - $Users[$friend['friend_user_id']]= array( |
|
123 | + $Users[$friend['friend_user_id']] = array( |
|
124 | 124 | 'user_id' => $friend['friend_user_id'], |
125 | 125 | 'firstname' =>$friend['firstName'], |
126 | 126 | 'lastname' => $friend['lastName'], |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | } |
133 | 133 | |
134 | -if (is_array($Users) && count($Users) > 0 ) { |
|
134 | +if (is_array($Users) && count($Users) > 0) { |
|
135 | 135 | foreach ($Users as $user) { |
136 | 136 | if ($user['group_id'] != $group_id) { |
137 | 137 | $nosessionUsersList[$user['user_id']] = api_get_person_name( |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | $social_left_content = SocialManager::show_social_menu('invite_friends', $group_id); |
146 | -$social_right_content = '<h3 class="group-title">'.Security::remove_XSS($group_info['name'], STUDENT, true).'</h3>'; |
|
146 | +$social_right_content = '<h3 class="group-title">'.Security::remove_XSS($group_info['name'], STUDENT, true).'</h3>'; |
|
147 | 147 | |
148 | 148 | if (count($nosessionUsersList) == 0) { |
149 | 149 | $friends = SocialManager::get_friends(api_get_user_id()); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | array(GROUP_USER_PERMISSION_PENDING_INVITATION) |
180 | 180 | ); |
181 | 181 | |
182 | -if (is_array($members) && count($members)>0) { |
|
182 | +if (is_array($members) && count($members) > 0) { |
|
183 | 183 | foreach ($members as &$member) { |
184 | 184 | $image = UserManager::getUserPicture($member['id']); |
185 | 185 | $member['image'] = '<img class="img-circle" src="'.$image.'" width="50px" height="50px" />'; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | 'thematic_advance_delete' |
47 | 47 | ); |
48 | 48 | |
49 | -$action = 'thematic_details'; |
|
49 | +$action = 'thematic_details'; |
|
50 | 50 | if (isset($_REQUEST['action']) && in_array($_REQUEST['action'], $actions)) { |
51 | 51 | $action = $_REQUEST['action']; |
52 | 52 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $thematicControl = Session::read('thematic_control'); |
185 | 185 | |
186 | 186 | if ($action == 'thematic_list') { |
187 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl')); |
|
187 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicControl')); |
|
188 | 188 | } |
189 | 189 | if ($action == 'thematic_add') { |
190 | 190 | $interbreadcrumb[] = array( |
@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | 'url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, |
199 | 199 | 'name' => get_lang('ThematicControl') |
200 | 200 | ); |
201 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('EditThematicSection')); |
|
201 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditThematicSection')); |
|
202 | 202 | } |
203 | 203 | if ($action == 'thematic_details') { |
204 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl')); |
|
204 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicControl')); |
|
205 | 205 | } |
206 | 206 | if ($action == 'thematic_plan_list' || $action == 'thematic_plan_delete') { |
207 | 207 | $interbreadcrumb[] = array( |
@@ -216,22 +216,22 @@ discard block |
||
216 | 216 | } |
217 | 217 | } |
218 | 218 | if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') { |
219 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl')); |
|
220 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')'); |
|
219 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl')); |
|
220 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')'); |
|
221 | 221 | if ($description_type >= ADD_THEMATIC_PLAN) { |
222 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewBloc')); |
|
222 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewBloc')); |
|
223 | 223 | } else { |
224 | - $interbreadcrumb[] = array ('url' => '#', 'name' => $default_thematic_plan_title[$description_type]); |
|
224 | + $interbreadcrumb[] = array('url' => '#', 'name' => $default_thematic_plan_title[$description_type]); |
|
225 | 225 | } |
226 | 226 | } |
227 | 227 | if ($action == 'thematic_advance_list' || $action == 'thematic_advance_delete') { |
228 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl')); |
|
229 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
228 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl')); |
|
229 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
230 | 230 | } |
231 | 231 | if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') { |
232 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl')); |
|
233 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
234 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicAdvance')); |
|
232 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl')); |
|
233 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
234 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewThematicAdvance')); |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | // Distpacher actions to controller |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | // Extra options |
427 | 427 | $plugin_settings = api_get_settings_params( |
428 | 428 | array( |
429 | - "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins','setting') |
|
429 | + "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins', 'setting') |
|
430 | 430 | ) |
431 | 431 | ); |
432 | 432 | |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | if (!empty($obj->course_settings)) { |
533 | 533 | if (is_file(api_get_path(SYS_CODE_PATH).'img/icons/'.ICON_SIZE_SMALL.'/'.$plugin_name.'.png')) { |
534 | 534 | $icon = Display::return_icon( |
535 | - $plugin_name . '.png', |
|
535 | + $plugin_name.'.png', |
|
536 | 536 | Security::remove_XSS($pluginTitle), |
537 | 537 | '', |
538 | 538 | ICON_SIZE_SMALL |
@@ -548,18 +548,18 @@ discard block |
||
548 | 548 | |
549 | 549 | $form->addHtml('<div class="panel panel-default">'); |
550 | 550 | $form->addHtml(' |
551 | - <div class="panel-heading" role="tab" id="heading-' . $plugin_name . '-settings"> |
|
551 | + <div class="panel-heading" role="tab" id="heading-' . $plugin_name.'-settings"> |
|
552 | 552 | <h4 class="panel-title"> |
553 | - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-' . $plugin_name . '-settings" aria-expanded="false" aria-controls="collapse-' . $plugin_name . '-settings"> |
|
553 | + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-' . $plugin_name.'-settings" aria-expanded="false" aria-controls="collapse-'.$plugin_name.'-settings"> |
|
554 | 554 | '); |
555 | - $form->addHtml($icon . ' ' . $pluginTitle); |
|
555 | + $form->addHtml($icon.' '.$pluginTitle); |
|
556 | 556 | $form->addHtml(' |
557 | 557 | </a> |
558 | 558 | </h4> |
559 | 559 | </div> |
560 | 560 | '); |
561 | 561 | $form->addHtml(' |
562 | - <div id="collapse-' . $plugin_name . '-settings" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-' . $plugin_name . '-settings"> |
|
562 | + <div id="collapse-' . $plugin_name.'-settings" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-'.$plugin_name.'-settings"> |
|
563 | 563 | <div class="panel-body"> |
564 | 564 | '); |
565 | 565 |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $global_error_message['description'] = $IncorrectPhpVersionDescription; |
101 | 101 | break; |
102 | 102 | case 2: |
103 | - require __DIR__ . '/../install/version.php'; |
|
103 | + require __DIR__.'/../install/version.php'; |
|
104 | 104 | $global_error_message['section'] = $SectionInstallation; |
105 | 105 | $global_error_message['title'] = $InstallationTitle; |
106 | 106 | if (($pos = strpos($InstallationDescription, '%s')) === false) { |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | |
42 | 42 | protected function build_pdf_export_form() |
43 | 43 | { |
44 | - $renderer =& $this->defaultRenderer(); |
|
44 | + $renderer = & $this->defaultRenderer(); |
|
45 | 45 | $renderer->setCustomElementTemplate('<span>{element}</span>'); |
46 | 46 | $this->addElement('header', get_lang('ChooseOrientation')); |
47 | 47 | $this->addElement('radio', 'orientation', null, get_lang('Portrait'), 'portrait'); |
48 | 48 | $this->addElement('radio', 'orientation', null, get_lang('Landscape'), 'landscape'); |
49 | 49 | $this->addButtonExport(get_lang('Export')); |
50 | - $this->setDefaults(array ( |
|
50 | + $this->setDefaults(array( |
|
51 | 51 | 'orientation' => 'portrait' |
52 | 52 | )); |
53 | 53 | } |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | $this->addElement('radio', 'file_type', null, 'XML (Extensible Markup Language)', 'xml'); |
60 | 60 | $this->addElement('radio', 'file_type', null, 'PDF (Portable Document Format)', 'pdf'); |
61 | 61 | $this->addButtonExport(get_lang('Export')); |
62 | - $this->setDefaults(array ( |
|
62 | + $this->setDefaults(array( |
|
63 | 63 | 'file_type' => 'csv' |
64 | 64 | )); |
65 | 65 | } |
66 | 66 | |
67 | - protected function build_export_form_option($show_pdf=true) |
|
67 | + protected function build_export_form_option($show_pdf = true) |
|
68 | 68 | { |
69 | 69 | $this->addElement('header', get_lang('ChooseFormat')); |
70 | 70 | $this->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV (Comma-Separated Values)', 'csv'); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | array('disabled') |
79 | 79 | ); |
80 | 80 | $this->addButtonExport(get_lang('Export')); |
81 | - $this->setDefaults(array ( |
|
81 | + $this->setDefaults(array( |
|
82 | 82 | 'file_type' => 'csv' |
83 | 83 | )); |
84 | 84 | } |
@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | { |
88 | 88 | $this->addElement('hidden', 'formSent'); |
89 | 89 | $this->addElement('header', get_lang('ImportFileLocation')); |
90 | - $this->addElement('file', 'import_file',get_lang('Location')); |
|
91 | - $allowed_file_types = array ( |
|
90 | + $this->addElement('file', 'import_file', get_lang('Location')); |
|
91 | + $allowed_file_types = array( |
|
92 | 92 | 'xml', |
93 | 93 | 'csv' |
94 | 94 | ); |
95 | 95 | //$this->addRule('file', get_lang('InvalidExtension') . ' (' . implode(',', $allowed_file_types) . ')', 'filetype', $allowed_file_types); |
96 | - $this->addElement('radio', 'file_type', get_lang('FileType'), 'CSV (<a href="docs/example_csv.html" target="_blank">' . get_lang('ExampleCSVFile') . '</a>)', 'csv'); |
|
97 | - $this->addElement('radio', 'file_type', null, 'XML (<a href="docs/example_xml.html" target="_blank">' . get_lang('ExampleXMLFile') . '</a>)', 'xml'); |
|
96 | + $this->addElement('radio', 'file_type', get_lang('FileType'), 'CSV (<a href="docs/example_csv.html" target="_blank">'.get_lang('ExampleCSVFile').'</a>)', 'csv'); |
|
97 | + $this->addElement('radio', 'file_type', null, 'XML (<a href="docs/example_xml.html" target="_blank">'.get_lang('ExampleXMLFile').'</a>)', 'xml'); |
|
98 | 98 | $this->addElement('checkbox', 'overwrite', null, get_lang('OverwriteScores')); |
99 | 99 | $this->addElement('checkbox', 'ignoreerrors', null, get_lang('IgnoreErrors')); |
100 | 100 | $this->addButtonImport(get_lang('Ok')); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $this_section = SECTION_COURSES; |
21 | 21 | |
22 | 22 | if ($lp_controller_touched != 1) { |
23 | - header('location: lp_controller.php?action=view&item_id=' . intval($_REQUEST['item_id'])); |
|
23 | + header('location: lp_controller.php?action=view&item_id='.intval($_REQUEST['item_id'])); |
|
24 | 24 | exit; |
25 | 25 | } |
26 | 26 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | //Impress js |
119 | 119 | if ($_SESSION['oLP']->mode == 'impress') { |
120 | 120 | $lp_id = $_SESSION['oLP']->get_id(); |
121 | - $url = api_get_path(WEB_CODE_PATH) . "lp/lp_impress.php?lp_id=$lp_id&" . api_get_cidreq(); |
|
121 | + $url = api_get_path(WEB_CODE_PATH)."lp/lp_impress.php?lp_id=$lp_id&".api_get_cidreq(); |
|
122 | 122 | header("Location: $url"); |
123 | 123 | exit; |
124 | 124 | } |
@@ -136,15 +136,15 @@ discard block |
||
136 | 136 | |
137 | 137 | // additional APIs |
138 | 138 | $htmlHeadXtra[] = '<script> |
139 | -chamilo_courseCode = "' . $course_code . '"; |
|
139 | +chamilo_courseCode = "' . $course_code.'"; |
|
140 | 140 | </script>'; |
141 | 141 | // Document API |
142 | 142 | $htmlHeadXtra[] = '<script src="js/documentapi.js" type="text/javascript" language="javascript"></script>'; |
143 | 143 | // Storage API |
144 | 144 | $htmlHeadXtra[] = '<script> |
145 | -var sv_user = \'' . api_get_user_id() . '\'; |
|
145 | +var sv_user = \'' . api_get_user_id().'\'; |
|
146 | 146 | var sv_course = chamilo_courseCode; |
147 | -var sv_sco = \'' . $lp_id . '\'; |
|
147 | +var sv_sco = \'' . $lp_id.'\'; |
|
148 | 148 | </script>'; // FIXME fetch sco and userid from a more reliable source directly in sotrageapi.js |
149 | 149 | $htmlHeadXtra[] = '<script type="text/javascript" src="js/storageapi.js"></script>'; |
150 | 150 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | case 3: |
217 | 217 | // aicc |
218 | 218 | $_SESSION['oLP']->stop_previous_item(); // save status manually if asset |
219 | - $htmlHeadXtra[] = '<script src="' . $_SESSION['oLP']->get_js_lib().'" type="text/javascript" language="javascript"></script>'; |
|
219 | + $htmlHeadXtra[] = '<script src="'.$_SESSION['oLP']->get_js_lib().'" type="text/javascript" language="javascript"></script>'; |
|
220 | 220 | $preReqCheck = $_SESSION['oLP']->prerequisites_match($lp_item_id); |
221 | 221 | if ($preReqCheck === true) { |
222 | 222 | $src = $_SESSION['oLP']->get_link( |
@@ -238,10 +238,10 @@ discard block |
||
238 | 238 | // Update status, total_time from lp_item_view table when you finish the exercises in learning path. |
239 | 239 | |
240 | 240 | if ($debug) { |
241 | - error_log('$type_quiz: ' . $type_quiz); |
|
242 | - error_log('$_REQUEST[exeId]: ' . intval($_REQUEST['exeId'])); |
|
243 | - error_log('$lp_id: ' . $lp_id); |
|
244 | - error_log('$_GET[lp_item_id]: ' . intval($_GET['lp_item_id'])); |
|
241 | + error_log('$type_quiz: '.$type_quiz); |
|
242 | + error_log('$_REQUEST[exeId]: '.intval($_REQUEST['exeId'])); |
|
243 | + error_log('$lp_id: '.$lp_id); |
|
244 | + error_log('$_GET[lp_item_id]: '.intval($_GET['lp_item_id'])); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | if ( |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | $safe_item_id == strval(intval($safe_item_id)) |
265 | 265 | ) { |
266 | 266 | $sql = 'SELECT start_date, exe_date, exe_result, exe_weighting, exe_exo_id |
267 | - FROM ' . $TBL_TRACK_EXERCICES . ' |
|
267 | + FROM ' . $TBL_TRACK_EXERCICES.' |
|
268 | 268 | WHERE exe_id = ' . $safe_exe_id; |
269 | 269 | $res = Database::query($sql); |
270 | 270 | $row_dates = Database::fetch_array($res); |
@@ -278,14 +278,14 @@ discard block |
||
278 | 278 | |
279 | 279 | $sql = "UPDATE $TBL_LP_ITEM SET |
280 | 280 | max_score = '$max_score' |
281 | - WHERE c_id = $course_id AND id = '" . $safe_item_id . "'"; |
|
281 | + WHERE c_id = $course_id AND id = '".$safe_item_id."'"; |
|
282 | 282 | Database::query($sql); |
283 | 283 | |
284 | 284 | $sql = "SELECT id FROM $TBL_LP_ITEM_VIEW |
285 | 285 | WHERE |
286 | 286 | c_id = $course_id AND |
287 | 287 | lp_item_id = '$safe_item_id' AND |
288 | - lp_view_id = '" . $_SESSION['oLP']->lp_view_id . "' |
|
288 | + lp_view_id = '".$_SESSION['oLP']->lp_view_id."' |
|
289 | 289 | ORDER BY id DESC |
290 | 290 | LIMIT 1"; |
291 | 291 | $res_last_attempt = Database::query($sql); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | status = '$status', |
315 | 315 | score = $score, |
316 | 316 | total_time = $mytime |
317 | - WHERE id='" . $lp_item_view_id . "' AND c_id = $course_id "; |
|
317 | + WHERE id='".$lp_item_view_id."' AND c_id = $course_id "; |
|
318 | 318 | |
319 | 319 | if ($debug) { |
320 | 320 | error_log($sql); |
@@ -324,17 +324,17 @@ discard block |
||
324 | 324 | |
325 | 325 | $sql = "UPDATE $TBL_TRACK_EXERCICES SET |
326 | 326 | orig_lp_item_view_id = $lp_item_view_id |
327 | - WHERE exe_id = " . $safe_exe_id; |
|
327 | + WHERE exe_id = ".$safe_exe_id; |
|
328 | 328 | Database::query($sql); |
329 | 329 | } |
330 | 330 | } |
331 | 331 | if (intval($_GET['fb_type']) > 0) { |
332 | 332 | $src = 'blank.php?msg=exerciseFinished'; |
333 | 333 | } else { |
334 | - $src = api_get_path(WEB_CODE_PATH) . 'exercise/result.php?origin=learnpath&id=' . $safe_exe_id.'&'.api_get_cidreq(); |
|
334 | + $src = api_get_path(WEB_CODE_PATH).'exercise/result.php?origin=learnpath&id='.$safe_exe_id.'&'.api_get_cidreq(); |
|
335 | 335 | |
336 | 336 | if ($debug) { |
337 | - error_log('Calling URL: ' . $src); |
|
337 | + error_log('Calling URL: '.$src); |
|
338 | 338 | } |
339 | 339 | } |
340 | 340 | $autostart = 'false'; |
@@ -392,8 +392,8 @@ discard block |
||
392 | 392 | $tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM); |
393 | 393 | $show_audioplayer = false; |
394 | 394 | // Getting all the information about the item. |
395 | -$sql = "SELECT audio FROM " . $tbl_lp_item . " |
|
396 | - WHERE c_id = $course_id AND lp_id = '" . $_SESSION['oLP']->lp_id . "'"; |
|
395 | +$sql = "SELECT audio FROM ".$tbl_lp_item." |
|
396 | + WHERE c_id = $course_id AND lp_id = '".$_SESSION['oLP']->lp_id."'"; |
|
397 | 397 | $res_media = Database::query($sql); |
398 | 398 | |
399 | 399 | if (Database::num_rows($res_media) > 0) { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | 'name' => get_lang('LearningPaths') |
415 | 415 | ); |
416 | 416 | $interbreadcrumb[] = array( |
417 | - 'url' => api_get_self() . "?action=add_item&type=step&lp_id={$_SESSION['oLP']->lp_id}&isStudentView=false&".api_get_cidreq(true, true, 'course'), |
|
417 | + 'url' => api_get_self()."?action=add_item&type=step&lp_id={$_SESSION['oLP']->lp_id}&isStudentView=false&".api_get_cidreq(true, true, 'course'), |
|
418 | 418 | 'name' => $_SESSION['oLP']->get_name() |
419 | 419 | ); |
420 | 420 | |
@@ -426,12 +426,12 @@ discard block |
||
426 | 426 | |
427 | 427 | // Return to course home. |
428 | 428 | if ($is_allowed_to_edit) { |
429 | - $buttonHomeUrl = 'lp_controller.php?' . api_get_cidreq(true, true, 'course') . '&' . http_build_query([ |
|
429 | + $buttonHomeUrl = 'lp_controller.php?'.api_get_cidreq(true, true, 'course').'&'.http_build_query([ |
|
430 | 430 | 'isStudentView' => 'false', |
431 | 431 | 'action' => 'return_to_course_homepage' |
432 | 432 | ]); |
433 | 433 | } else { |
434 | - $buttonHomeUrl = 'lp_controller.php?' . api_get_cidreq(true, true, 'course') . '&' . http_build_query([ |
|
434 | + $buttonHomeUrl = 'lp_controller.php?'.api_get_cidreq(true, true, 'course').'&'.http_build_query([ |
|
435 | 435 | 'action' => 'return_to_course_homepage' |
436 | 436 | ]); |
437 | 437 | } |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | |
534 | 534 | $template->assign('lp_author', $_SESSION['oLP']->get_author()); |
535 | 535 | $template->assign('lp_mode', $_SESSION['oLP']->mode); |
536 | -$template->assign('lp_title_scorm',$_SESSION['oLP']->name); |
|
536 | +$template->assign('lp_title_scorm', $_SESSION['oLP']->name); |
|
537 | 537 | $template->assign( |
538 | 538 | 'lp_html_toc', |
539 | 539 | $_SESSION['oLP']->get_html_toc($get_toc_list) |