@@ -372,7 +372,7 @@ |
||
| 372 | 372 | $course_id = $this->course('id'); |
| 373 | 373 | |
| 374 | 374 | $table = Database::get_course_table(TABLE_ANNOUNCEMENT); |
| 375 | - $sql = "UPDATE $table SET |
|
| 375 | + $sql = "update $table SET |
|
| 376 | 376 | email_sent = 1 |
| 377 | 377 | WHERE |
| 378 | 378 | c_id = $course_id AND |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | }); |
| 124 | 124 | }); |
| 125 | 125 | </script> |
| 126 | -JS; |
|
| 126 | +js; |
|
| 127 | 127 | |
| 128 | 128 | /* Is the user allowed here? */ |
| 129 | 129 | |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | }); |
| 159 | 159 | }); |
| 160 | 160 | </script> |
| 161 | -JS; |
|
| 161 | +js; |
|
| 162 | 162 | |
| 163 | 163 | /* End new display forum */ |
| 164 | 164 | // The form for the reply |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | include_once('permissions_functions.inc.php'); |
| 61 | 61 | // ACTIONS |
| 62 | 62 | if (isset($_GET['do'])) { |
| 63 | - if (isset($_GET['permission']) AND isset($_GET['tool']) AND ($_GET['do'] == 'grant' OR $_GET['do'] == 'revoke')) { |
|
| 63 | + if (isset($_GET['permission']) and isset($_GET['tool']) and ($_GET['do'] == 'grant' or $_GET['do'] == 'revoke')) { |
|
| 64 | 64 | $result_message = store_one_permission( |
| 65 | 65 | 'user', |
| 66 | 66 | $_GET['do'], |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $_GET['permission'] |
| 70 | 70 | ); |
| 71 | 71 | } |
| 72 | - if (isset($_GET['role']) AND ($_GET['do'] == 'grant' OR $_GET['do'] == 'revoke')) { |
|
| 72 | + if (isset($_GET['role']) and ($_GET['do'] == 'grant' or $_GET['do'] == 'revoke')) { |
|
| 73 | 73 | $result_message = assign_role( |
| 74 | 74 | 'user', |
| 75 | 75 | $_GET['do'], |
@@ -153,7 +153,8 @@ |
||
| 153 | 153 | echo "\t</tr>\n"; |
| 154 | 154 | |
| 155 | 155 | // the main area with the checkboxes or images |
| 156 | -foreach ($blog_users as $user_id => $user_name) { // $blog_users contains all the users in this blog |
|
| 156 | +foreach ($blog_users as $user_id => $user_name) { |
|
| 157 | +// $blog_users contains all the users in this blog |
|
| 157 | 158 | // --------------------------------------------------- |
| 158 | 159 | // RETRIEVING THE PERMISSIONS OF THE USER |
| 159 | 160 | // --------------------------------------------------- |
@@ -50,7 +50,8 @@ |
||
| 50 | 50 | $question_values = array(); |
| 51 | 51 | |
| 52 | 52 | // Values of question options |
| 53 | - if (is_array($form_content['values'])) { // Check if data is correct |
|
| 53 | + if (is_array($form_content['values'])) { |
|
| 54 | +// Check if data is correct |
|
| 54 | 55 | foreach ($form_content['values'] as $key => & $value) { |
| 55 | 56 | $question_values [] = '<input size="3" type="text" id="values['.$key.']" name="values['.$key.']" value="'.$value.'" />'; |
| 56 | 57 | } |
@@ -534,7 +534,7 @@ |
||
| 534 | 534 | if (count($user_data) > 0) { |
| 535 | 535 | $extras = array(); |
| 536 | 536 | // Build SQL query |
| 537 | - $sql = "UPDATE $table_user SET"; |
|
| 537 | + $sql = "update $table_user SET"; |
|
| 538 | 538 | $update = false; |
| 539 | 539 | $allowedFields = [ |
| 540 | 540 | 'firstname', |
@@ -1153,7 +1153,8 @@ discard block |
||
| 1153 | 1153 | var_Dump($questions); |
| 1154 | 1154 | } |
| 1155 | 1155 | } |
| 1156 | - } else { // In case it's another type than 0 or 1 |
|
| 1156 | + } else { |
|
| 1157 | +// In case it's another type than 0 or 1 |
|
| 1157 | 1158 | echo get_lang('ErrorSurveyTypeUnknown'); |
| 1158 | 1159 | } |
| 1159 | 1160 | } |
@@ -1247,7 +1248,8 @@ discard block |
||
| 1247 | 1248 | // The normal survey as always but with the form profile |
| 1248 | 1249 | if (isset($_GET['show'])) { |
| 1249 | 1250 | $numberofpages = count($paged_questions); |
| 1250 | - if (($show < $numberofpages) || !$_GET['show']) { //$show = $_GET['show'] + 1 |
|
| 1251 | + if (($show < $numberofpages) || !$_GET['show']) { |
|
| 1252 | +//$show = $_GET['show'] + 1 |
|
| 1251 | 1253 | if ($show == 0) { |
| 1252 | 1254 | $form->addButton( |
| 1253 | 1255 | 'next_survey_page', |
@@ -1275,7 +1277,8 @@ discard block |
||
| 1275 | 1277 | } |
| 1276 | 1278 | } |
| 1277 | 1279 | } |
| 1278 | -} elseif ($survey_data['survey_type'] === '1') { //conditional/personality-test type survey |
|
| 1280 | +} elseif ($survey_data['survey_type'] === '1') { |
|
| 1281 | +//conditional/personality-test type survey |
|
| 1279 | 1282 | if (isset($_GET['show']) || isset($_POST['personality'])) { |
| 1280 | 1283 | $numberofpages = count($paged_questions); |
| 1281 | 1284 | if (!empty($paged_questions_sec) && count($paged_questions_sec) > 0) { |
@@ -1008,7 +1008,8 @@ |
||
| 1008 | 1008 | Event::event_access_tool(TOOL_DOCUMENT); |
| 1009 | 1009 | |
| 1010 | 1010 | /* DISPLAY */ |
| 1011 | -if ($groupId != 0) { // Add group name after for group documents |
|
| 1011 | +if ($groupId != 0) { |
|
| 1012 | +// Add group name after for group documents |
|
| 1012 | 1013 | $add_group_to_title = ' ('.$group_properties['name'].')'; |
| 1013 | 1014 | } |
| 1014 | 1015 | |
@@ -241,31 +241,31 @@ discard block |
||
| 241 | 241 | <td align="center"> |
| 242 | 242 | <div id="content_source"> |
| 243 | 243 | <?php |
| 244 | - if (!($add_type == 'multiple')) { |
|
| 244 | + if (!($add_type == 'multiple')) { |
|
| 245 | 245 | ?> |
| 246 | 246 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" /> |
| 247 | 247 | <div id="ajax_list_users_single"></div> |
| 248 | 248 | <?php |
| 249 | - } else { |
|
| 250 | - ?> |
|
| 249 | + } else { |
|
| 250 | + ?> |
|
| 251 | 251 | <div id="ajax_list_multiple"> |
| 252 | 252 | <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?> |
| 253 | 253 | </div> |
| 254 | 254 | <?php |
| 255 | - } |
|
| 256 | - ?> |
|
| 255 | + } |
|
| 256 | + ?> |
|
| 257 | 257 | </div> |
| 258 | 258 | </td> |
| 259 | 259 | <td width="10%" valign="middle" align="center"> |
| 260 | 260 | <?php |
| 261 | - if ($ajax_search) { |
|
| 262 | - ?> |
|
| 261 | + if ($ajax_search) { |
|
| 262 | + ?> |
|
| 263 | 263 | <button class="btn bt-default" type="button" onclick="remove_item(document.getElementById('elements_in'))" > |
| 264 | 264 | <em class="fa fa-arrow-left"></em> |
| 265 | 265 | </button> |
| 266 | 266 | <?php |
| 267 | - } else { |
|
| 268 | - ?> |
|
| 267 | + } else { |
|
| 268 | + ?> |
|
| 269 | 269 | <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))"> |
| 270 | 270 | <em class="fa fa-arrow-right"></em> |
| 271 | 271 | </button> |
@@ -274,8 +274,8 @@ discard block |
||
| 274 | 274 | <em class="fa fa-arrow-left"></em> |
| 275 | 275 | </button> |
| 276 | 276 | <?php |
| 277 | - } |
|
| 278 | - ?> |
|
| 277 | + } |
|
| 278 | + ?> |
|
| 279 | 279 | <br /><br /><br /><br /><br /><br /> |
| 280 | 280 | </td> |
| 281 | 281 | <td align="center"> |
@@ -200,7 +200,10 @@ |
||
| 200 | 200 | $searchForm->display(); |
| 201 | 201 | echo '</div>'; |
| 202 | 202 | ?> |
| 203 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>> |
|
| 203 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) { |
|
| 204 | + echo '&add=true'; |
|
| 205 | +} |
|
| 206 | +?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>> |
|
| 204 | 207 | <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>'; |
| 205 | 208 | echo Display::input('hidden', 'id', $id); |
| 206 | 209 | echo Display::input('hidden', 'form_sent', '1'); |
@@ -248,7 +248,7 @@ |
||
| 248 | 248 | continue; |
| 249 | 249 | } |
| 250 | 250 | $key = Database::escape_string($key); |
| 251 | - $sql = "UPDATE $table_settings_current |
|
| 251 | + $sql = "update $table_settings_current |
|
| 252 | 252 | SET selected_value = 'false' |
| 253 | 253 | WHERE |
| 254 | 254 | variable = '".$key."' AND |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | // Access restrictions. |
| 26 | 26 | api_protect_admin_script(); |
| 27 | 27 | |
| 28 | - // Submit stylesheets. |
|
| 28 | + // Submit stylesheets. |
|
| 29 | 29 | if (isset($_POST['save']) && isset($_GET['category']) && $_GET['category'] === 'Stylesheets') { |
| 30 | 30 | storeStylesheets(); |
| 31 | 31 | Display::addFlash(Display::return_message(get_lang('Saved'))); |