@@ -51,8 +51,7 @@ discard block |
||
51 | 51 | if ($user_id != $_user['user_id'] && UserManager :: delete_user($_GET['user_id'])) |
52 | 52 | { |
53 | 53 | Display :: display_normal_message(get_lang('UserDeleted')); |
54 | - } |
|
55 | - else |
|
54 | + } else |
|
56 | 55 | { |
57 | 56 | Display :: display_error_message(get_lang('CannotDeleteUser')); |
58 | 57 | } |
@@ -88,8 +87,7 @@ discard block |
||
88 | 87 | { |
89 | 88 | $message .= '- '.$login.'<br />'; |
90 | 89 | } |
91 | - } |
|
92 | - else |
|
90 | + } else |
|
93 | 91 | { |
94 | 92 | $message=get_lang('NoUserAdded'); |
95 | 93 | } |
@@ -100,13 +98,11 @@ discard block |
||
100 | 98 | Display :: display_header($tool_name); |
101 | 99 | } |
102 | 100 | Security::clear_token(); |
103 | - } |
|
104 | - else |
|
101 | + } else |
|
105 | 102 | { |
106 | 103 | Display::display_header($tool_name); |
107 | 104 | } |
108 | -} |
|
109 | -else |
|
105 | +} else |
|
110 | 106 | { |
111 | 107 | Display::display_header($tool_name); |
112 | 108 | } |
@@ -133,8 +129,7 @@ discard block |
||
133 | 129 | if($number_of_selected_users == $number_of_deleted_users) |
134 | 130 | { |
135 | 131 | Display :: display_normal_message(get_lang('SelectedUsersDeleted')); |
136 | - } |
|
137 | - else |
|
132 | + } else |
|
138 | 133 | { |
139 | 134 | Display :: display_error_message(get_lang('SomeUsersNotDeleted')); |
140 | 135 | } |
@@ -150,13 +145,13 @@ discard block |
||
150 | 145 | $UserList[] = ldap_add_user($user_id); |
151 | 146 | } |
152 | 147 | } |
153 | - if (isset($_GET['id_session']) && (trim($_GET['id_session'])!="")) |
|
154 | - addUserToSession($UserList, $_GET['id_session']); |
|
148 | + if (isset($_GET['id_session']) && (trim($_GET['id_session'])!="")) { |
|
149 | + addUserToSession($UserList, $_GET['id_session']); |
|
150 | + } |
|
155 | 151 | if(count($UserList)>0) |
156 | 152 | { |
157 | 153 | Display :: display_normal_message(count($UserList)." ".get_lang('LDAPUsersAdded')); |
158 | - } |
|
159 | - else |
|
154 | + } else |
|
160 | 155 | { |
161 | 156 | Display :: display_normal_message(get_lang('NoUserAdded')); |
162 | 157 | } |
@@ -173,14 +168,14 @@ discard block |
||
173 | 168 | { |
174 | 169 | $form->addText('keyword_firstname', get_lang('FirstName'), false); |
175 | 170 | $form->addText('keyword_lastname', get_lang('LastName'), false); |
176 | -} |
|
177 | -else |
|
171 | +} else |
|
178 | 172 | { |
179 | 173 | $form->addText('keyword_lastname',get_lang('LastName'),false); |
180 | 174 | $form->addText('keyword_firstname',get_lang('FirstName'),false); |
181 | 175 | } |
182 | -if (isset($_GET['id_session'])) |
|
176 | +if (isset($_GET['id_session'])) { |
|
183 | 177 | $form->addElement('hidden','id_session',$_GET['id_session']); |
178 | +} |
|
184 | 179 | |
185 | 180 | $type = array(); |
186 | 181 | $type["all"] = get_lang('All'); |
@@ -201,8 +196,9 @@ discard block |
||
201 | 196 | $parameters['keyword_firstname'] = @$_GET['keyword_firstname'] ?: null; |
202 | 197 | $parameters['keyword_lastname'] = @$_GET['keyword_lastname'] ?: null; |
203 | 198 | $parameters['keyword_email'] = @$_GET['keyword_email'] ?: null; |
204 | -if (isset($_GET['id_session'])) |
|
199 | +if (isset($_GET['id_session'])) { |
|
205 | 200 | $parameters['id_session'] = $_GET['id_session']; |
201 | +} |
|
206 | 202 | // Create a sortable table with user-data |
207 | 203 | |
208 | 204 | $parameters['sec_token'] = Security::get_token(); |
@@ -214,8 +210,7 @@ discard block |
||
214 | 210 | { |
215 | 211 | $table->set_header(2, get_lang('FirstName')); |
216 | 212 | $table->set_header(3, get_lang('LastName')); |
217 | -} |
|
218 | -else |
|
213 | +} else |
|
219 | 214 | { |
220 | 215 | $table->set_header(2, get_lang('LastName')); |
221 | 216 | $table->set_header(3, get_lang('FirstName')); |
@@ -240,10 +240,11 @@ |
||
240 | 240 | <td colspan="3" align="center"> |
241 | 241 | <br /> |
242 | 242 | <?php |
243 | - if(isset($_GET['add'])) |
|
244 | - echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>'; |
|
245 | - else |
|
246 | - echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
|
243 | + if(isset($_GET['add'])) { |
|
244 | + echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>'; |
|
245 | + } else { |
|
246 | + echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
|
247 | + } |
|
247 | 248 | ?> |
248 | 249 | </td> |
249 | 250 | </tr> |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | ?> |
216 | 216 | <div id="message" style="display: none"> |
217 | 217 | <?php |
218 | - if(!empty($message)) |
|
219 | - Display::display_normal_message($message) |
|
218 | + if(!empty($message)) { |
|
219 | + Display::display_normal_message($message) |
|
220 | 220 | ?> |
221 | 221 | </div> |
222 | 222 | |
@@ -297,7 +297,9 @@ discard block |
||
297 | 297 | </div> |
298 | 298 | <div class="row"> |
299 | 299 | <div class="col-md-5"> |
300 | - <?php Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'), array('class'=>'img-responsive')); ?> |
|
300 | + <?php Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'), array('class'=>'img-responsive')); |
|
301 | + } |
|
302 | + ?> |
|
301 | 303 | </div> |
302 | 304 | <div class="col-md-7"> |
303 | 305 | <form method="POST" class="form-horizontal" action="<?php echo api_get_self(); ?>"> |
@@ -341,8 +343,7 @@ discard block |
||
341 | 343 | $defaults[$row['subkey']] = $row['selected_value']; |
342 | 344 | } |
343 | 345 | $form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension'); |
344 | - } |
|
345 | - else { |
|
346 | + } else { |
|
346 | 347 | $defaults['host'] = 'localhost'; |
347 | 348 | $defaults['port'] = '2002'; |
348 | 349 | $defaults['size'] = '720x540'; |
@@ -345,7 +345,10 @@ discard block |
||
345 | 345 | $searchForm->display(); |
346 | 346 | echo '</div>'; |
347 | 347 | ?> |
348 | -<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;"> |
|
348 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
349 | + echo '&add=true' ; |
|
350 | +} |
|
351 | +?>" style="margin:0px;"> |
|
349 | 352 | <?php |
350 | 353 | echo '<legend>'.$tool_name.': '.$data['name'].'</legend>'; |
351 | 354 | |
@@ -420,7 +423,10 @@ discard block |
||
420 | 423 | ?> |
421 | 424 | <br /> |
422 | 425 | <label class="control-label"> |
423 | - <input type="checkbox" <?php if ($user_with_any_group) echo 'checked="checked"';?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id"> |
|
426 | + <input type="checkbox" <?php if ($user_with_any_group) { |
|
427 | + echo 'checked="checked"'; |
|
428 | +} |
|
429 | +?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id"> |
|
424 | 430 | <?php echo get_lang('UsersRegisteredInAnyGroup'); ?> |
425 | 431 | </label> |
426 | 432 | </div> |
@@ -193,7 +193,10 @@ |
||
193 | 193 | while (false!==($file = readdir($handle))) { |
194 | 194 | if ($file != "." && $file != "..") { |
195 | 195 | $Diff = (time() - filemtime("$temp_zip_dir/$file"))/60/60; //the "age" of the file in hours |
196 | - if ($Diff > 4) unlink("$temp_zip_dir/$file"); //delete files older than 4 hours |
|
196 | + if ($Diff > 4) { |
|
197 | + unlink("$temp_zip_dir/$file"); |
|
198 | + } |
|
199 | + //delete files older than 4 hours |
|
197 | 200 | } |
198 | 201 | } |
199 | 202 | closedir($handle); |
@@ -43,7 +43,9 @@ |
||
43 | 43 | //remove last slash if present |
44 | 44 | //$doc_url = ($doc_url{strlen($doc_url)-1}=='/')?substr($doc_url,0,strlen($doc_url)-1):$doc_url; |
45 | 45 | //mod_rewrite can change /some/path/ to /some/path// in some cases, so clean them all off (René) |
46 | - while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul); |
|
46 | + while ($doc_url{$dul = strlen($doc_url)-1}=='/') { |
|
47 | + $doc_url = substr($doc_url,0,$dul); |
|
48 | + } |
|
47 | 49 | //create the path |
48 | 50 | $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path |
49 | 51 | //redirect |
@@ -1132,7 +1132,7 @@ |
||
1132 | 1132 | $questions[$row['sort']]['survey_group_sec1'] = $row['survey_group_sec1']; |
1133 | 1133 | $questions[$row['sort']]['survey_group_sec2'] = $row['survey_group_sec2']; |
1134 | 1134 | $questions[$row['sort']]['survey_group_pri'] = $row['survey_group_pri']; |
1135 | - } else { |
|
1135 | + } else { |
|
1136 | 1136 | // If the type is a page break we are finished loading the questions for this page |
1137 | 1137 | break; |
1138 | 1138 | } |
@@ -1247,7 +1247,7 @@ discard block |
||
1247 | 1247 | '".Database::escape_string($_course['id'])."')"; |
1248 | 1248 | Database::query($sql); |
1249 | 1249 | $shared_question_id = Database::insert_id(); |
1250 | - } else { |
|
1250 | + } else { |
|
1251 | 1251 | // Updating an existing question |
1252 | 1252 | // adding the question to the survey_question table |
1253 | 1253 | $sql = "UPDATE $tbl_survey_question SET |
@@ -2776,14 +2776,12 @@ discard block |
||
2776 | 2776 | echo $answers_of_user[$question_id][$option_id]['value']; |
2777 | 2777 | echo "</td>"; |
2778 | 2778 | } |
2779 | - } |
|
2780 | - else { |
|
2779 | + } else { |
|
2781 | 2780 | echo '<td align="center">'; |
2782 | 2781 | if (!empty($answers_of_user[$question_id][$option_id])) { |
2783 | 2782 | if ($answers_of_user[$question_id][$option_id]['value'] != 0) { |
2784 | 2783 | echo $answers_of_user[$question_id][$option_id]['value']; |
2785 | - } |
|
2786 | - else { |
|
2784 | + } else { |
|
2787 | 2785 | echo 'v'; |
2788 | 2786 | } |
2789 | 2787 | } |
@@ -124,7 +124,9 @@ |
||
124 | 124 | } |
125 | 125 | } |
126 | 126 | |
127 | -if (!empty($survey_data['survey_version'])) echo '<b>'.get_lang('Version').': '.$survey_data['survey_version'].'</b>'; |
|
127 | +if (!empty($survey_data['survey_version'])) { |
|
128 | + echo '<b>'.get_lang('Version').': '.$survey_data['survey_version'].'</b>'; |
|
129 | +} |
|
128 | 130 | |
129 | 131 | // We exit here is the first or last question is a pagebreak (which causes errors) |
130 | 132 | SurveyUtil::check_first_last_question($_GET['survey_id']); |