@@ -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 | |
@@ -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); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | ?> |
| 12 | 12 | <html> |
| 13 | 13 | <head> |
| 14 | - <title><?php echo custompages_get_lang('LostPassword');?></title> |
|
| 14 | + <title><?php echo custompages_get_lang('LostPassword'); ?></title> |
|
| 15 | 15 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 16 | 16 | <!--[if !IE 6]><!--> |
| 17 | 17 | <link rel="stylesheet" type="text/css" href="../../custompages/style.css" /> |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | <div id="lostpassword-form-box" class="form-box"> |
| 44 | 44 | <?php |
| 45 | 45 | if (isset($content['info']) && !empty($content['info'])) { |
| 46 | - echo '<div id="registration-form-error" class="form-error"><ul>' . $content['info'] . '</ul></div>'; |
|
| 46 | + echo '<div id="registration-form-error" class="form-error"><ul>'.$content['info'].'</ul></div>'; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | echo isset($content['form']) ? $content['form'] : '' |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | ?> |
| 82 | 82 | <html> |
| 83 | 83 | <head> |
| 84 | - <title><?php echo custompages_get_lang('Registration');?></title> |
|
| 84 | + <title><?php echo custompages_get_lang('Registration'); ?></title> |
|
| 85 | 85 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 86 | 86 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 87 | 87 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
@@ -89,14 +89,14 @@ |
||
| 89 | 89 | ?> |
| 90 | 90 | <form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH)?>index.php" method="post"> |
| 91 | 91 | <div> |
| 92 | - <label for="login">*<?php echo custompages_get_lang('User');?></label> |
|
| 92 | + <label for="login">*<?php echo custompages_get_lang('User'); ?></label> |
|
| 93 | 93 | <input name="login" type="text" /><br /> |
| 94 | - <label for="password">*<?php echo custompages_get_lang('Password');?></label> |
|
| 94 | + <label for="password">*<?php echo custompages_get_lang('Password'); ?></label> |
|
| 95 | 95 | <input name="password" type="password" /><br /> |
| 96 | 96 | </div> |
| 97 | 97 | </form> |
| 98 | 98 | <div id="login-form-submit" class="form-submit" onclick="document.forms['login-form'].submit();"> |
| 99 | - <span><?php echo custompages_get_lang('LoginEnter');?></span> |
|
| 99 | + <span><?php echo custompages_get_lang('LoginEnter'); ?></span> |
|
| 100 | 100 | </div> <!-- #form-submit --> |
| 101 | 101 | <div id="links"> |
| 102 | 102 | |