@@ -6,7 +6,7 @@ |
||
6 | 6 | * @author Laurent Opprecht |
7 | 7 | */ |
8 | 8 | |
9 | -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; |
|
10 | -require_once dirname(__FILE__) . '/lib/static_plugin.class.php'; |
|
9 | +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; |
|
10 | +require_once dirname(__FILE__).'/lib/static_plugin.class.php'; |
|
11 | 11 | |
12 | 12 | $plugin_info = StaticPlugin::create()->get_info(); |
13 | 13 | \ No newline at end of file |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once dirname(__FILE__) . '/lib/search_course_widget.class.php'; |
|
3 | +require_once dirname(__FILE__).'/lib/search_course_widget.class.php'; |
|
4 | 4 | $widget = new SearchCourseWidget(); |
5 | 5 | $widget->run(); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @author Laurent Opprecht |
6 | 6 | */ |
7 | 7 | |
8 | -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; |
|
9 | -require_once dirname(__FILE__) . '/lib/search_course_plugin.class.php'; |
|
8 | +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; |
|
9 | +require_once dirname(__FILE__).'/lib/search_course_plugin.class.php'; |
|
10 | 10 | |
11 | 11 | $plugin_info = SearchCoursePlugin::create()->get_info(); |
12 | 12 | \ No newline at end of file |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once dirname(__FILE__) . '/register_course_widget.class.php'; |
|
3 | +require_once dirname(__FILE__).'/register_course_widget.class.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Search course widget. |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | $url = self::server('REQUEST_URI'); |
61 | 61 | $url = explode('?', $url); |
62 | 62 | $url = reset($url); |
63 | - $url = self::server('SERVER_NAME') . $url; |
|
63 | + $url = self::server('SERVER_NAME').$url; |
|
64 | 64 | |
65 | 65 | $root = api_get_path('WEB_PATH'); |
66 | 66 | $root = str_replace('https://', '', $root); |
67 | 67 | $root = str_replace('http://', '', $root); |
68 | - $index_url = $root . 'index.php'; |
|
68 | + $index_url = $root.'index.php'; |
|
69 | 69 | |
70 | 70 | return $url == $index_url || $url == $root; |
71 | 71 | } |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | $url = self::server('REQUEST_URI'); |
81 | 81 | $url = explode('?', $url); |
82 | 82 | $url = reset($url); |
83 | - $url = self::server('SERVER_NAME') . $url; |
|
83 | + $url = self::server('SERVER_NAME').$url; |
|
84 | 84 | |
85 | 85 | $root = api_get_path('WEB_PATH'); |
86 | 86 | $root = str_replace('https://', '', $root); |
87 | 87 | $root = str_replace('http://', '', $root); |
88 | - $index_url = $root . 'user_portal.php'; |
|
88 | + $index_url = $root.'user_portal.php'; |
|
89 | 89 | |
90 | 90 | return $url == $index_url || $url == $root; |
91 | 91 | } |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | $parameters[self::PARAM_ACTION] = $action; |
154 | 154 | } |
155 | 155 | $parameters = implode('&', $parameters); |
156 | - $parameters = $parameters ? '?' . $parameters : ''; |
|
157 | - return $self . $parameters; |
|
156 | + $parameters = $parameters ? '?'.$parameters : ''; |
|
157 | + return $self.$parameters; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | $details = implode(' - ', $details); |
242 | 242 | $title = $course['title']; |
243 | 243 | |
244 | - $href = api_get_path(WEB_COURSE_PATH).$course['code'] .'/index.php'; |
|
245 | - echo '<tr><td><b><a href="' . $href . '">' . "$title</a></b><br/>$details</td><td>"; |
|
244 | + $href = api_get_path(WEB_COURSE_PATH).$course['code'].'/index.php'; |
|
245 | + echo '<tr><td><b><a href="'.$href.'">'."$title</a></b><br/>$details</td><td>"; |
|
246 | 246 | if (!api_is_anonymous()) { |
247 | 247 | if ($course['registration_code']) { |
248 | 248 | Display::display_icon( |
@@ -336,13 +336,13 @@ discard block |
||
336 | 336 | |
337 | 337 | if (api_is_anonymous()) |
338 | 338 | { |
339 | - $course_fiter = 'visibility = ' . COURSE_VISIBILITY_OPEN_WORLD; |
|
339 | + $course_fiter = 'visibility = '.COURSE_VISIBILITY_OPEN_WORLD; |
|
340 | 340 | } |
341 | 341 | else |
342 | 342 | { |
343 | - $course_fiter = 'visibility = ' . COURSE_VISIBILITY_OPEN_WORLD . ' OR '; |
|
344 | - $course_fiter .= 'visibility = ' . COURSE_VISIBILITY_OPEN_PLATFORM . ' OR '; |
|
345 | - $course_fiter .= '(visibility = ' . COURSE_VISIBILITY_REGISTERED . ' AND subscribe = 1)'; |
|
343 | + $course_fiter = 'visibility = '.COURSE_VISIBILITY_OPEN_WORLD.' OR '; |
|
344 | + $course_fiter .= 'visibility = '.COURSE_VISIBILITY_OPEN_PLATFORM.' OR '; |
|
345 | + $course_fiter .= '(visibility = '.COURSE_VISIBILITY_REGISTERED.' AND subscribe = 1)'; |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | $sql = <<<EOT |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | // Show the CAS button to logout to your CAS session |
3 | 3 | global $_user; |
4 | -$_template['show_message'] = false; |
|
4 | +$_template['show_message'] = false; |
|
5 | 5 | |
6 | 6 | if (!api_is_anonymous() && |
7 | 7 | api_get_setting('cas_activate') == 'true' && |
8 | 8 | $_user['auth_source'] == CAS_AUTH_SOURCE |
9 | 9 | ) { |
10 | - $_template['show_message'] = true; |
|
10 | + $_template['show_message'] = true; |
|
11 | 11 | // the default title |
12 | 12 | $logout_label = "Deconnexion de CAS"; |
13 | 13 | if (!empty($plugin_info['settings']['add_cas_logout_button_cas_logout_label'])) { |
14 | 14 | $logout_label = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_label']); |
15 | 15 | } |
16 | 16 | // the comm |
17 | - $logout_comment = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_comment']);; |
|
17 | + $logout_comment = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_comment']); ; |
|
18 | 18 | // URL of the image |
19 | 19 | $logout_image_url = $plugin_info['settings']['add_cas_logout_button_cas_logout_image_url']; |
20 | 20 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | //the plugin title |
13 | -$plugin_info['title'] = 'Add a button to logout from CAS'; |
|
13 | +$plugin_info['title'] = 'Add a button to logout from CAS'; |
|
14 | 14 | |
15 | 15 | //the comments that go with the plugin |
16 | 16 | $plugin_info['comment'] = "If CAS is activated, this plugin add a text and a button on the user page to logout from a CAS session. Configure plugin to add title, comment and logo."; |
@@ -36,4 +36,4 @@ discard block |
||
36 | 36 | $plugin_info['settings_form'] = $form; |
37 | 37 | |
38 | 38 | // Set the templates that are going to be used |
39 | -$plugin_info['templates'] = array('template.tpl'); |
|
39 | +$plugin_info['templates'] = array('template.tpl'); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | if (!isset($_GET['id'])) { |
62 | 62 | if (api_get_setting('allow_social_tool') == 'true') { |
63 | 63 | if (!api_is_anonymous()) { |
64 | - $query = isset($_GET['q']) ? $_GET['q']: null; |
|
64 | + $query = isset($_GET['q']) ? $_GET['q'] : null; |
|
65 | 65 | $social_search = UserManager::get_search_form($query); |
66 | 66 | } |
67 | 67 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $time_limit = 60; |
78 | 78 | } |
79 | 79 | |
80 | - $online_time = time() - $time_limit*60; |
|
80 | + $online_time = time() - $time_limit * 60; |
|
81 | 81 | $current_date = api_get_utc_datetime($online_time); |
82 | 82 | |
83 | 83 | $students_online = array(); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $result = Database::query($sql); |
99 | 99 | |
100 | - while($user_list = Database::fetch_array($result)) { |
|
100 | + while ($user_list = Database::fetch_array($result)) { |
|
101 | 101 | $students_online[$user_list['access_user_id']] = $user_list; |
102 | 102 | } |
103 | 103 | } |
@@ -27,8 +27,8 @@ |
||
27 | 27 | $array_keys = array_keys($_GET); |
28 | 28 | |
29 | 29 | if (!empty($array_keys)) { |
30 | - $username = substr($array_keys[0],0,20); // max len of an username |
|
31 | - $friend_id = UserManager::get_user_id_from_username($username); |
|
30 | + $username = substr($array_keys[0], 0, 20); // max len of an username |
|
31 | + $friend_id = UserManager::get_user_id_from_username($username); |
|
32 | 32 | |
33 | 33 | if ($friend_id) { |
34 | 34 | SocialManager::display_individual_user($friend_id); |