@@ -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> |
@@ -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) { |
@@ -166,13 +166,19 @@ |
||
166 | 166 | |
167 | 167 | <select name="id_coach[]" class="form-control" multiple> |
168 | 168 | <option value="0">----- <?php echo get_lang("Choose") ?> -----</option> |
169 | - <option value="0" <?php if(count($arr_infos) == 0) echo 'selected="selected"'; ?>> |
|
169 | + <option value="0" <?php if(count($arr_infos) == 0) { |
|
170 | + echo 'selected="selected"'; |
|
171 | +} |
|
172 | +?>> |
|
170 | 173 | <?php echo get_lang('None') ?> |
171 | 174 | </option> |
172 | 175 | <?php |
173 | 176 | foreach ($coaches as $enreg) { |
174 | 177 | ?> |
175 | - <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>> |
|
178 | + <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) { |
|
179 | + echo 'selected="selected"'; |
|
180 | +} |
|
181 | +?>> |
|
176 | 182 | <?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?> |
177 | 183 | </option> |
178 | 184 | <?php |
@@ -196,10 +196,11 @@ discard block |
||
196 | 196 | <?php |
197 | 197 | if (!empty($rows_session_category)) { |
198 | 198 | foreach($rows_session_category as $category) { |
199 | - if($category['id'] == $categoryId) |
|
200 | - echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>'; |
|
201 | - else |
|
202 | - echo '<option value="'.$category['id'].'">'.$category['name'].'</option>'; |
|
199 | + if($category['id'] == $categoryId) { |
|
200 | + echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>'; |
|
201 | + } else { |
|
202 | + echo '<option value="'.$category['id'].'">'.$category['name'].'</option>'; |
|
203 | + } |
|
203 | 204 | } |
204 | 205 | } |
205 | 206 | ?> |
@@ -223,7 +224,10 @@ discard block |
||
223 | 224 | <?php |
224 | 225 | foreach($rows_session as $enreg) { |
225 | 226 | ?> |
226 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
227 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) { |
|
228 | + echo 'selected="selected"'; |
|
229 | +} |
|
230 | +?>><?php echo $enreg['name']; ?></option> |
|
227 | 231 | <?php } ?> |
228 | 232 | </select></div> |
229 | 233 | <?php unset($nosessionCourses); ?> |
@@ -245,7 +249,10 @@ discard block |
||
245 | 249 | <select id='destination' name="SessionCategoryList[]" multiple="multiple" size="20" style="width:320px;"> |
246 | 250 | <?php |
247 | 251 | foreach($rows_category_session as $enreg) { ?> |
248 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
252 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) { |
|
253 | + echo 'selected="selected"'; |
|
254 | +} |
|
255 | +?>><?php echo $enreg['name']; ?></option> |
|
249 | 256 | <?php } ?> |
250 | 257 | </select></td> |
251 | 258 | </tr> |