@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $UserIsSubscribedToSession = SessionManager::isUserSubscribedAsStudent($lastSessionId, $user->getId()); |
43 | 43 | |
44 | 44 | if (!empty($lastSessionId) && $UserIsSubscribedToSession) { |
45 | - $urlWithSession = api_get_self() . '?' . http_build_query([ |
|
45 | + $urlWithSession = api_get_self().'?'.http_build_query([ |
|
46 | 46 | 'session_id' => $lastCourseAccess->getSessionId() |
47 | 47 | ]); |
48 | 48 | |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | foreach ($learningPathList->list as $learningPathId => $learningPath) { |
117 | 117 | $courseData['stats'][] = [ |
118 | 118 | $learningPath['lp_name'], |
119 | - 'lp/lp_controller.php?' . http_build_query([ |
|
119 | + 'lp/lp_controller.php?'.http_build_query([ |
|
120 | 120 | 'action' => 'stats', |
121 | 121 | 'cidReq' => $course->getCode(), |
122 | 122 | 'id_session' => $currentSession->getId(), |
123 | 123 | 'gidReq' => 0, |
124 | 124 | 'lp_id' => $learningPathId |
125 | - ]) . api_get_cidreq() |
|
125 | + ]).api_get_cidreq() |
|
126 | 126 | ]; |
127 | 127 | } |
128 | 128 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php'; |
16 | 16 | require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; |
17 | 17 | |
18 | -$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'. api_get_path(WEB_CODE_PATH) .'lp/lp_list_search.css" />'; |
|
18 | +$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'lp/lp_list_search.css" />'; |
|
19 | 19 | Event::event_access_tool(TOOL_SEARCH); |
20 | 20 | |
21 | 21 | if (isset($_SESSION['gradebook'])) { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | if (!empty($gradebook) && $gradebook == 'view') { |
26 | - $interbreadcrumb[]= array( |
|
26 | + $interbreadcrumb[] = array( |
|
27 | 27 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
28 | 28 | 'name' => get_lang('ToolGradebook') |
29 | 29 | ); |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | $term_array = array(); |
64 | 64 | $specific_fields = get_specific_field_list(); |
65 | 65 | foreach ($specific_fields as $specific_field) { |
66 | - if (!empty($_REQUEST['sf_'. $specific_field['code']])) { |
|
67 | - $values = $_REQUEST['sf_'. $specific_field['code']]; |
|
66 | + if (!empty($_REQUEST['sf_'.$specific_field['code']])) { |
|
67 | + $values = $_REQUEST['sf_'.$specific_field['code']]; |
|
68 | 68 | if (in_array('__all__', $values)) { |
69 | 69 | $sf_terms_for_code = xapian_get_all_terms(1000, $specific_field['code']); |
70 | 70 | foreach ($sf_terms_for_code as $term) { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | foreach ($values as $term) { |
77 | 77 | if (!empty($term)) { |
78 | 78 | $prefix = $specific_field['code']; |
79 | - $term_array[] = chamilo_get_boolean_query($prefix . $term); |
|
79 | + $term_array[] = chamilo_get_boolean_query($prefix.$term); |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | // Get right group of terms to show on multiple select. |
95 | 95 | $fixed_queries = array(); |
96 | 96 | $course_filter = null; |
97 | -if (($cid=api_get_course_id()) != -1 ) { |
|
97 | +if (($cid = api_get_course_id()) != -1) { |
|
98 | 98 | // Results only from actual course. |
99 | - $course_filter = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID . $cid); |
|
99 | + $course_filter = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID.$cid); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | if (count($term_array)) { |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | } |
147 | 147 | |
148 | 148 | if ($mode == 'gallery') { |
149 | - $title = $a_prefix.str_replace('_', ' ', $result['title']). $a_suffix; |
|
149 | + $title = $a_prefix.str_replace('_', ' ', $result['title']).$a_suffix; |
|
150 | 150 | $blocks[] = array(1 => |
151 | - $a_prefix .'<img src="'.$result['thumbnail'].'" />'. $a_suffix .'<br />'.$title.'<br />'.$result['author'], |
|
151 | + $a_prefix.'<img src="'.$result['thumbnail'].'" />'.$a_suffix.'<br />'.$title.'<br />'.$result['author'], |
|
152 | 152 | ); |
153 | 153 | } else { |
154 | - $title = '<div style="text-align:left;">'. $a_prefix . $result['title']. $a_suffix .(!empty($result['author']) ? ' '.$result['author'] : '').'<div>'; |
|
154 | + $title = '<div style="text-align:left;">'.$a_prefix.$result['title'].$a_suffix.(!empty($result['author']) ? ' '.$result['author'] : '').'<div>'; |
|
155 | 155 | $blocks[] = array(1 => $title); |
156 | 156 | } |
157 | 157 | } |
@@ -170,12 +170,12 @@ discard block |
||
170 | 170 | ); |
171 | 171 | $get_params = ''; |
172 | 172 | foreach ($specific_fields as $specific_field) { |
173 | - if (isset($_REQUEST['sf_'. $specific_field['code']])) { |
|
174 | - $values = $_REQUEST['sf_'. $specific_field['code']]; |
|
173 | + if (isset($_REQUEST['sf_'.$specific_field['code']])) { |
|
174 | + $values = $_REQUEST['sf_'.$specific_field['code']]; |
|
175 | 175 | //Sortable additional_parameters doesn't accept multi dimensional arrays |
176 | 176 | //$additional_parameters[ 'sf_'. $specific_field['code'] ] = $values; |
177 | - foreach ( $values as $value ) { |
|
178 | - $get_params .= '&sf_' . $specific_field['code'] .'[]='. $value; |
|
177 | + foreach ($values as $value) { |
|
178 | + $get_params .= '&sf_'.$specific_field['code'].'[]='.$value; |
|
179 | 179 | } |
180 | 180 | $get_params .= '&'; |
181 | 181 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @package chamilo.search |
7 | 7 | */ |
8 | 8 | |
9 | -require_once dirname(__FILE__) . '/../inc/global.inc.php'; |
|
9 | +require_once dirname(__FILE__).'/../inc/global.inc.php'; |
|
10 | 10 | |
11 | 11 | function get_suggestions_from_search_engine($q) |
12 | 12 | { |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | $i = 0; |
28 | 28 | while ($row = Database::fetch_array($sql_result)) { |
29 | 29 | $json[] = [ |
30 | - 'id' => api_convert_encoding($row['value'],'UTF-8',$charset), |
|
31 | - 'value' => api_convert_encoding($row['value'],'UTF-8',$charset), |
|
32 | - 'label' => api_convert_encoding($row['value'],'UTF-8',$charset) |
|
30 | + 'id' => api_convert_encoding($row['value'], 'UTF-8', $charset), |
|
31 | + 'value' => api_convert_encoding($row['value'], 'UTF-8', $charset), |
|
32 | + 'label' => api_convert_encoding($row['value'], 'UTF-8', $charset) |
|
33 | 33 | ]; |
34 | 34 | |
35 | - if ($i<20) { |
|
36 | - $data[ $row['course_code'] ] [ $row['tool_id'] ] [ $row['ref_id'] ] = 1; |
|
35 | + if ($i < 20) { |
|
36 | + $data[$row['course_code']] [$row['tool_id']] [$row['ref_id']] = 1; |
|
37 | 37 | } |
38 | 38 | $i++; |
39 | 39 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } |
96 | 96 | } |
97 | 97 | foreach ($output as $i=>$out) { |
98 | - if (api_stristr($out,$q) === false) {continue;} |
|
98 | + if (api_stristr($out, $q) === false) {continue; } |
|
99 | 99 | $s = api_convert_encoding(substr($out, 0, -3), 'UTF-8', $charset); |
100 | 100 | if (!in_array($s, $more_sugg)) { |
101 | 101 | $more_sugg[] = $s; |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | $newstudents = $evaluation[0]->get_not_subscribed_students(); |
19 | 19 | |
20 | 20 | if (count($newstudents) == '0') { |
21 | - header('Location: gradebook_view_result.php?nouser=&selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq()); |
|
22 | - exit; |
|
21 | + header('Location: gradebook_view_result.php?nouser=&selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq()); |
|
22 | + exit; |
|
23 | 23 | } |
24 | 24 | $add_user_form = new EvalForm( |
25 | 25 | EvalForm :: TYPE_ADD_USERS_TO_EVAL, |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | |
68 | 68 | $interbreadcrumb[]= array ('url' => Security::remove_XSS($_SESSION['gradebook_dest']),'name' => get_lang('Gradebook')); |
69 | 69 | $interbreadcrumb[]= array( |
70 | - 'url' => 'gradebook_view_result.php?selecteval=' .Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
71 | - 'name' => get_lang('ViewResult') |
|
70 | + 'url' => 'gradebook_view_result.php?selecteval=' .Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
71 | + 'name' => get_lang('ViewResult') |
|
72 | 72 | ); |
73 | 73 | Display :: display_header(get_lang('AddUserToEval')); |
74 | 74 | if (isset ($_GET['erroroneuser'])){ |
75 | - Display :: display_warning_message(get_lang('AtLeastOneUser'),false); |
|
75 | + Display :: display_warning_message(get_lang('AtLeastOneUser'),false); |
|
76 | 76 | } |
77 | 77 | DisplayGradebook :: display_header_result($evaluation[0], null, 0,0); |
78 | 78 | echo '<div class="main">'; |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | api_block_anonymous_users(); |
15 | 15 | GradebookUtils::block_students(); |
16 | 16 | |
17 | -$evaluation= Evaluation :: load($_GET['selecteval']); |
|
17 | +$evaluation = Evaluation :: load($_GET['selecteval']); |
|
18 | 18 | $newstudents = $evaluation[0]->get_not_subscribed_students(); |
19 | 19 | |
20 | 20 | if (count($newstudents) == '0') { |
21 | - header('Location: gradebook_view_result.php?nouser=&selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq()); |
|
21 | + header('Location: gradebook_view_result.php?nouser=&selecteval='.Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq()); |
|
22 | 22 | exit; |
23 | 23 | } |
24 | 24 | $add_user_form = new EvalForm( |
@@ -65,16 +65,16 @@ discard block |
||
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | -$interbreadcrumb[]= array ('url' => Security::remove_XSS($_SESSION['gradebook_dest']),'name' => get_lang('Gradebook')); |
|
69 | -$interbreadcrumb[]= array( |
|
70 | - 'url' => 'gradebook_view_result.php?selecteval=' .Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
68 | +$interbreadcrumb[] = array('url' => Security::remove_XSS($_SESSION['gradebook_dest']), 'name' => get_lang('Gradebook')); |
|
69 | +$interbreadcrumb[] = array( |
|
70 | + 'url' => 'gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
71 | 71 | 'name' => get_lang('ViewResult') |
72 | 72 | ); |
73 | 73 | Display :: display_header(get_lang('AddUserToEval')); |
74 | -if (isset ($_GET['erroroneuser'])){ |
|
75 | - Display :: display_warning_message(get_lang('AtLeastOneUser'),false); |
|
74 | +if (isset ($_GET['erroroneuser'])) { |
|
75 | + Display :: display_warning_message(get_lang('AtLeastOneUser'), false); |
|
76 | 76 | } |
77 | -DisplayGradebook :: display_header_result($evaluation[0], null, 0,0); |
|
77 | +DisplayGradebook :: display_header_result($evaluation[0], null, 0, 0); |
|
78 | 78 | echo '<div class="main">'; |
79 | 79 | echo $add_user_form->toHtml(); |
80 | 80 | echo '</div>'; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | foreach ($userSkills as $skill) { |
34 | 34 | $skillId = current($skill); |
35 | 35 | |
36 | - $assertionUrl = api_get_path(WEB_CODE_PATH) . "badge/assertion.php?"; |
|
36 | + $assertionUrl = api_get_path(WEB_CODE_PATH)."badge/assertion.php?"; |
|
37 | 37 | $assertionUrl .= http_build_query(array( |
38 | 38 | 'user' => $userId, |
39 | 39 | 'skill' => $skillId, |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $backpack = $configBackpack; |
52 | 52 | } |
53 | 53 | |
54 | -$htmlHeadXtra[] = '<script src="' . $backpack . 'issuer.js"></script>'; |
|
54 | +$htmlHeadXtra[] = '<script src="'.$backpack.'issuer.js"></script>'; |
|
55 | 55 | |
56 | 56 | $tpl = new Template(get_lang('Badges'), false, false); |
57 | 57 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'content', |
60 | 60 | "<script> |
61 | 61 | $(document).on('ready', function (){ |
62 | - OpenBadges.issue_no_modal(" . json_encode($assertions) . "); |
|
62 | + OpenBadges.issue_no_modal(" . json_encode($assertions)."); |
|
63 | 63 | }); |
64 | 64 | </script>" |
65 | 65 | ); |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | require_once '../inc/global.inc.php'; |
5 | 5 | |
6 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
6 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
7 | 7 | |
8 | 8 | api_protect_course_script(true); |
9 | 9 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | echo '<div class="actions">'; |
80 | 80 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'>'. |
81 | - Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
81 | + Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
82 | 82 | echo '</div>'; |
83 | 83 | |
84 | 84 | if (!empty($my_folder_data['description'])) { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | // setting breadcrumbs |
26 | 26 | //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
27 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
27 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
28 | 28 | $interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$sessionId, "name" => get_lang('SessionOverview')); |
29 | 29 | |
30 | 30 | // Database Table Definitions |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); |
36 | 36 | |
37 | 37 | // setting the name of the tool |
38 | -$tool_name= get_lang('SubscribeCoursesToSession'); |
|
38 | +$tool_name = get_lang('SubscribeCoursesToSession'); |
|
39 | 39 | |
40 | 40 | $add_type = 'multiple'; |
41 | -if (isset($_GET['add_type']) && $_GET['add_type']!=''){ |
|
41 | +if (isset($_GET['add_type']) && $_GET['add_type'] != '') { |
|
42 | 42 | $add_type = Security::remove_XSS($_REQUEST['add_type']); |
43 | 43 | } |
44 | 44 | |
@@ -124,18 +124,18 @@ discard block |
||
124 | 124 | $nosessionCourses = $sessionCourses = array(); |
125 | 125 | if ($ajax_search) { |
126 | 126 | |
127 | - $sql="SELECT course.id, code, title, visual_code, session_id |
|
127 | + $sql = "SELECT course.id, code, title, visual_code, session_id |
|
128 | 128 | FROM $tbl_course course |
129 | 129 | INNER JOIN $tbl_session_rel_course session_rel_course |
130 | 130 | ON |
131 | 131 | course.id = session_rel_course.c_id AND |
132 | 132 | session_rel_course.session_id = ".intval($sessionId)." |
133 | - ORDER BY ".(sizeof($courses)?"(code IN(".implode(',', $courses).")) DESC,":"")." title"; |
|
133 | + ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title"; |
|
134 | 134 | |
135 | 135 | if (api_is_multiple_url_enabled()) { |
136 | 136 | $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
137 | 137 | $access_url_id = api_get_current_access_url_id(); |
138 | - if ($access_url_id != -1){ |
|
138 | + if ($access_url_id != -1) { |
|
139 | 139 | $sql = "SELECT course.id, code, title, visual_code, session_id |
140 | 140 | FROM $tbl_course course |
141 | 141 | INNER JOIN $tbl_session_rel_course session_rel_course |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | INNER JOIN $tbl_course_rel_access_url url_course |
145 | 145 | ON (url_course.c_id = course.id) |
146 | 146 | WHERE access_url_id = $access_url_id |
147 | - ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title"; |
|
147 | + ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title"; |
|
148 | 148 | } |
149 | 149 | } |
150 | 150 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $Courses = Database::store_result($result); |
153 | 153 | |
154 | 154 | foreach ($Courses as $course) { |
155 | - $sessionCourses[$course['id']] = $course ; |
|
155 | + $sessionCourses[$course['id']] = $course; |
|
156 | 156 | } |
157 | 157 | } else { |
158 | 158 | $sql = "SELECT course.id, code, title, visual_code, session_id |
@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | ON |
162 | 162 | course.id = session_rel_course.c_id AND |
163 | 163 | session_rel_course.session_id = ".intval($sessionId)." |
164 | - ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title"; |
|
164 | + ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title"; |
|
165 | 165 | |
166 | 166 | if (api_is_multiple_url_enabled()) { |
167 | 167 | $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
168 | 168 | $access_url_id = api_get_current_access_url_id(); |
169 | - if ($access_url_id != -1){ |
|
169 | + if ($access_url_id != -1) { |
|
170 | 170 | $sql = "SELECT course.id, code, title, visual_code, session_id |
171 | 171 | FROM $tbl_course course |
172 | 172 | LEFT JOIN $tbl_session_rel_course session_rel_course |
@@ -176,16 +176,16 @@ discard block |
||
176 | 176 | INNER JOIN $tbl_course_rel_access_url url_course |
177 | 177 | ON (url_course.c_id = course.id) |
178 | 178 | WHERE access_url_id = $access_url_id |
179 | - ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title"; |
|
179 | + ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title"; |
|
180 | 180 | } |
181 | 181 | } |
182 | 182 | $result = Database::query($sql); |
183 | 183 | $Courses = Database::store_result($result); |
184 | 184 | foreach ($Courses as $course) { |
185 | 185 | if ($course['session_id'] == $sessionId) { |
186 | - $sessionCourses[$course['id']] = $course ; |
|
186 | + $sessionCourses[$course['id']] = $course; |
|
187 | 187 | } else { |
188 | - $nosessionCourses[$course['id']] = $course ; |
|
188 | + $nosessionCourses[$course['id']] = $course; |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | unset($Courses); |
209 | 209 | ?> |
210 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
210 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>> |
|
211 | 211 | <legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend> |
212 | 212 | <input type="hidden" name="formSent" value="1" /> |
213 | 213 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | <div id="ajax_list_courses_multiple"> |
231 | 231 | <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" class="form-control"> |
232 | 232 | <?php foreach ($nosessionCourses as $enreg) { ?> |
233 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>> |
|
233 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')', ENT_QUOTES).'"'; if (in_array($enreg['code'], $CourseList)) echo 'selected="selected"'; ?>> |
|
234 | 234 | <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?> |
235 | 235 | </option> |
236 | 236 | <?php } ?> |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | ?> |
243 | 243 | </div> |
244 | 244 | <div class="col-md-4"> |
245 | - <?php if($add_type == 'multiple') { ?> |
|
245 | + <?php if ($add_type == 'multiple') { ?> |
|
246 | 246 | <div class="code-course"> |
247 | 247 | <?php echo get_lang('FirstLetterCourse'); ?> : |
248 | 248 | |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | <option value="%">--</option> |
251 | 251 | <?php |
252 | 252 | echo Display :: get_alphabet_options(); |
253 | - echo Display :: get_numeric_options(0,9,''); |
|
253 | + echo Display :: get_numeric_options(0, 9, ''); |
|
254 | 254 | ?> |
255 | 255 | </select> |
256 | 256 | </div> |
@@ -306,9 +306,9 @@ discard block |
||
306 | 306 | <select id='destination' name="SessionCoursesList[]" multiple="multiple" size="20" class="form-control"> |
307 | 307 | |
308 | 308 | <?php |
309 | - foreach($sessionCourses as $enreg) { |
|
309 | + foreach ($sessionCourses as $enreg) { |
|
310 | 310 | ?> |
311 | - <option value="<?php echo $enreg['id']; ?>" title="<?php echo htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES); ?>"> |
|
311 | + <option value="<?php echo $enreg['id']; ?>" title="<?php echo htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')', ENT_QUOTES); ?>"> |
|
312 | 312 | <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?> |
313 | 313 | </option> |
314 | 314 | <?php |
@@ -207,7 +207,10 @@ discard block |
||
207 | 207 | |
208 | 208 | unset($Courses); |
209 | 209 | ?> |
210 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
210 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) { |
|
211 | + echo '&add=true' ; |
|
212 | +} |
|
213 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
211 | 214 | <legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend> |
212 | 215 | <input type="hidden" name="formSent" value="1" /> |
213 | 216 | |
@@ -230,7 +233,10 @@ discard block |
||
230 | 233 | <div id="ajax_list_courses_multiple"> |
231 | 234 | <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" class="form-control"> |
232 | 235 | <?php foreach ($nosessionCourses as $enreg) { ?> |
233 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>> |
|
236 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) { |
|
237 | + echo 'selected="selected"'; |
|
238 | +} |
|
239 | +?>> |
|
234 | 240 | <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?> |
235 | 241 | </option> |
236 | 242 | <?php } ?> |
@@ -10,15 +10,15 @@ discard block |
||
10 | 10 | require_once '../inc/global.inc.php'; |
11 | 11 | |
12 | 12 | api_block_anonymous_users(); |
13 | -if (api_get_setting('allow_social_tool') !='true') { |
|
13 | +if (api_get_setting('allow_social_tool') != 'true') { |
|
14 | 14 | api_not_allowed(); |
15 | 15 | } |
16 | 16 | |
17 | 17 | $tok = Security::get_token(); |
18 | 18 | |
19 | 19 | if (isset($_REQUEST['user_friend'])) { |
20 | - $info_user_friend=array(); |
|
21 | - $info_path_friend=array(); |
|
20 | + $info_user_friend = array(); |
|
21 | + $info_path_friend = array(); |
|
22 | 22 | $userfriend_id = intval($_REQUEST['user_friend']); |
23 | 23 | $info_user_friend = api_get_user_info($userfriend_id); |
24 | 24 | $info_path_friend = UserManager::get_user_picture_path_by_id($userfriend_id, 'web'); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $message_id = isset($_GET['message_id']) ? intval($_GET['message_id']) : null; |
29 | 29 | $actions = array('add_message_group', 'edit_message_group', 'reply_message_group'); |
30 | 30 | |
31 | -$allowed_action = isset($_GET['action']) && in_array($_GET['action'],$actions) ? Security::remove_XSS($_GET['action']):''; |
|
31 | +$allowed_action = isset($_GET['action']) && in_array($_GET['action'], $actions) ? Security::remove_XSS($_GET['action']) : ''; |
|
32 | 32 | |
33 | 33 | $to_group = ''; |
34 | 34 | $subject = ''; |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
57 | -$page_item = !empty($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']):1; |
|
58 | -$param_item_page = isset($_GET['items_page_nr']) && isset($_GET['topic_id']) ? ('&items_'.intval($_GET['topic_id']).'_page_nr='.(!empty($_GET['topics_page_nr'])?intval($_GET['topics_page_nr']):1)):''; |
|
57 | +$page_item = !empty($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1; |
|
58 | +$param_item_page = isset($_GET['items_page_nr']) && isset($_GET['topic_id']) ? ('&items_'.intval($_GET['topic_id']).'_page_nr='.(!empty($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1)) : ''; |
|
59 | 59 | if (isset($_GET['topic_id'])) { |
60 | 60 | $param_item_page .= '&topic_id='.intval($_GET['topic_id']); |
61 | 61 | } |
62 | -$page_topic = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1; |
|
63 | -$anchor_topic = isset($_GET['anchor_topic']) ? Security::remove_XSS($_GET['anchor_topic']) : null; |
|
62 | +$page_topic = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : 1; |
|
63 | +$anchor_topic = isset($_GET['anchor_topic']) ? Security::remove_XSS($_GET['anchor_topic']) : null; |
|
64 | 64 | |
65 | 65 | $url = api_get_path(WEB_CODE_PATH).'social/group_topics.php?id='.$group_id.'&anchor_topic='.$anchor_topic.'&topics_page_nr='.$page_topic.$param_item_page; |
66 | 66 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ' |
91 | 91 | <div id="link-more-attach"> |
92 | 92 | <a class="btn btn-default" href="javascript://" onclick="return add_image_form()"> |
93 | - ' . get_lang('AddOneMoreFile') . ' |
|
93 | + ' . get_lang('AddOneMoreFile').' |
|
94 | 94 | </a> |
95 | 95 | </div> |
96 | 96 | ' |
@@ -38,9 +38,9 @@ |
||
38 | 38 | $nameTools = get_lang('AddGroup'); |
39 | 39 | $this_section = SECTION_SOCIAL; |
40 | 40 | |
41 | -$interbreadcrumb[]= array ('url' =>'home.php','name' => get_lang('Social')); |
|
42 | -$interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups')); |
|
43 | -$interbreadcrumb[]= array ('url' =>'#','name' => $nameTools); |
|
41 | +$interbreadcrumb[] = array('url' =>'home.php', 'name' => get_lang('Social')); |
|
42 | +$interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups')); |
|
43 | +$interbreadcrumb[] = array('url' =>'#', 'name' => $nameTools); |
|
44 | 44 | |
45 | 45 | $social_avatar_block = SocialManager::show_social_avatar_block('group_add'); |
46 | 46 | $social_menu_block = SocialManager::show_social_menu('group_add'); |