@@ -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']); |
@@ -186,7 +186,10 @@ |
||
186 | 186 | <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:320px;"> <?php |
187 | 187 | foreach($nosessionCourses as $enreg) { |
188 | 188 | ?> |
189 | - <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"'; ?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
189 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) { |
|
190 | + echo 'selected="selected"'; |
|
191 | +} |
|
192 | +?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
190 | 193 | <?php |
191 | 194 | } |
192 | 195 | ?> </select></div> <?php |
@@ -98,9 +98,10 @@ discard block |
||
98 | 98 | $cond_user_id = ''; |
99 | 99 | |
100 | 100 | // Only for single & multiple |
101 | - if (in_array($type, array('single','multiple'))) |
|
102 | - if (!empty($id_session)) { |
|
101 | + if (in_array($type, array('single','multiple'))) { |
|
102 | + if (!empty($id_session)) { |
|
103 | 103 | $id_session = intval($id_session); |
104 | + } |
|
104 | 105 | // check id_user from session_rel_user table |
105 | 106 | $sql = 'SELECT user_id FROM '.$tbl_session_rel_user.' |
106 | 107 | WHERE session_id = "'.$id_session.'" AND relation_type<>'.SESSION_RELATION_TYPE_RRHH.' '; |
@@ -558,7 +559,10 @@ discard block |
||
558 | 559 | echo $newLinks; |
559 | 560 | ?> |
560 | 561 | </div> |
561 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) echo '&add=true' ; ?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>> |
|
562 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) { |
|
563 | + echo '&add=true' ; |
|
564 | +} |
|
565 | +?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>> |
|
562 | 566 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
563 | 567 | <?php |
564 | 568 | if ($add_type=='multiple') { |
@@ -613,7 +617,10 @@ discard block |
||
613 | 617 | <?php |
614 | 618 | foreach ($nosessionUsersList as $uid => $enreg) { |
615 | 619 | ?> |
616 | - <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>> |
|
620 | + <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) { |
|
621 | + echo 'selected="selected"'; |
|
622 | +} |
|
623 | +?>> |
|
617 | 624 | <?php |
618 | 625 | $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
619 | 626 | if ($showOfficialCode) { |