@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | exit(); |
64 | 64 | } |
65 | 65 | } elseif ($remove_from_class) { |
66 | - if (count($right_user_list) == 0) |
|
67 | - $error_message = get_lang('AtLeastOneUser'); |
|
68 | - else { |
|
66 | + if (count($right_user_list) == 0) { |
|
67 | + $error_message = get_lang('AtLeastOneUser'); |
|
68 | + } else { |
|
69 | 69 | foreach ($right_user_list as $index => $user_id) { |
70 | 70 | ClassManager :: unsubscribe_user($user_id, $class_id); |
71 | 71 | } |
@@ -122,7 +122,10 @@ discard block |
||
122 | 122 | <?php |
123 | 123 | foreach ($left_users as $user) { |
124 | 124 | ?> |
125 | - <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $left_user_list)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option> |
|
125 | + <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $left_user_list)) { |
|
126 | + echo 'selected="selected"'; |
|
127 | +} |
|
128 | +?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option> |
|
126 | 129 | <?php |
127 | 130 | } |
128 | 131 | ?> |
@@ -138,7 +141,10 @@ discard block |
||
138 | 141 | <?php |
139 | 142 | foreach ($right_users as $user) { |
140 | 143 | ?> |
141 | - <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $right_user_list)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option> |
|
144 | + <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $right_user_list)) { |
|
145 | + echo 'selected="selected"'; |
|
146 | +} |
|
147 | +?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option> |
|
142 | 148 | <?php |
143 | 149 | } |
144 | 150 | ?> |
@@ -24,8 +24,9 @@ |
||
24 | 24 | |
25 | 25 | // Actions |
26 | 26 | if (isset ($_GET['action'])) { |
27 | - if ($_GET['action'] == 'show_message') |
|
28 | - Display :: display_normal_message(Security::remove_XSS(stripslashes($_GET['message']))); |
|
27 | + if ($_GET['action'] == 'show_message') { |
|
28 | + Display :: display_normal_message(Security::remove_XSS(stripslashes($_GET['message']))); |
|
29 | + } |
|
29 | 30 | Security::clear_token(); |
30 | 31 | } |
31 | 32 |
@@ -144,7 +144,10 @@ |
||
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<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();"';}?>> |
|
147 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
148 | + echo '&add=true' ; |
|
149 | +} |
|
150 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
148 | 151 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 152 | |
150 | 153 | if ($add_type=='multiple') { |
@@ -254,10 +254,11 @@ |
||
254 | 254 | <td colspan="3" align="center"> |
255 | 255 | <br /> |
256 | 256 | <?php |
257 | - if(isset($_GET['add'])) |
|
258 | - echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | - else |
|
260 | - echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
257 | + if(isset($_GET['add'])) { |
|
258 | + echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | + } else { |
|
260 | + echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
261 | + } |
|
261 | 262 | ?> |
262 | 263 | </td> |
263 | 264 | </tr> |
@@ -119,7 +119,10 @@ discard block |
||
119 | 119 | <td width="40%" align="center"> |
120 | 120 | <select name="course_list[]" multiple="multiple" size="20" style="width:400px;"> |
121 | 121 | <?php foreach ($db_courses as $course) { ?> |
122 | - <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
122 | + <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) { |
|
123 | + echo 'selected="selected"'; |
|
124 | +} |
|
125 | +?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
123 | 126 | </option> |
124 | 127 | <?php } ?> |
125 | 128 | </select> |
@@ -130,7 +133,10 @@ discard block |
||
130 | 133 | <td width="40%" align="center"> |
131 | 134 | <select name="url_list[]" multiple="multiple" size="20" style="width:300px;"> |
132 | 135 | <?php foreach ($db_urls as $url_obj) { ?> |
133 | - <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) echo 'selected="selected"'; ?>><?php echo $url_obj['url']; ?> |
|
136 | + <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) { |
|
137 | + echo 'selected="selected"'; |
|
138 | +} |
|
139 | +?>><?php echo $url_obj['url']; ?> |
|
134 | 140 | </option> |
135 | 141 | <?php } ?> |
136 | 142 | </select> |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | echo '</form>'; |
64 | 64 | echo '</div>'; |
65 | 65 | |
66 | -} |
|
67 | -elseif(!empty($annee) && empty($id_session)) |
|
66 | +} elseif(!empty($annee) && empty($id_session)) |
|
68 | 67 | { |
69 | 68 | Display::display_header($tool_name); |
70 | 69 | echo '<div style="align:center">'; |
@@ -142,8 +141,7 @@ discard block |
||
142 | 141 | echo '<br /><br />'; |
143 | 142 | echo '</div>'; |
144 | 143 | |
145 | -} |
|
146 | -elseif (!empty($annee) && !empty($id_session) && ($_POST['confirmed']=='yes')) |
|
144 | +} elseif (!empty($annee) && !empty($id_session) && ($_POST['confirmed']=='yes')) |
|
147 | 145 | { |
148 | 146 | $id=$_POST['username_form']; |
149 | 147 | $UserList=array(); |
@@ -118,7 +118,10 @@ discard block |
||
118 | 118 | <?php |
119 | 119 | foreach ($db_users as $user) { |
120 | 120 | ?> |
121 | - <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'], $users)) echo 'selected="selected"'; ?>> |
|
121 | + <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'], $users)) { |
|
122 | + echo 'selected="selected"'; |
|
123 | +} |
|
124 | +?>> |
|
122 | 125 | <?php echo api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')'; ?> |
123 | 126 | </option> |
124 | 127 | <?php |
@@ -134,7 +137,10 @@ discard block |
||
134 | 137 | <?php |
135 | 138 | foreach ($db_urls as $url_obj) { |
136 | 139 | ?> |
137 | - <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) echo 'selected="selected"'; ?>> |
|
140 | + <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) { |
|
141 | + echo 'selected="selected"'; |
|
142 | +} |
|
143 | +?>> |
|
138 | 144 | <?php echo $url_obj['url']; ?> |
139 | 145 | </option> |
140 | 146 | <?php |
@@ -118,8 +118,7 @@ |
||
118 | 118 | if (isset($included) && ($included)) |
119 | 119 | { |
120 | 120 | $message .= "> $name_session: ".count($UserAdd)." ".get_lang('Added').' '.get_lang('And').' '.count($UserUpdate).' '.get_lang('Modified').'<br/>'; |
121 | - } |
|
122 | - else |
|
121 | + } else |
|
123 | 122 | { |
124 | 123 | print "> $name_session: ".count($UserAdd).get_lang('Added').' '.get_lang('And').' '.count($UserUpdate).' '.get_lang('Modified')."\n"; |
125 | 124 | } |
@@ -505,8 +505,14 @@ |
||
505 | 505 | <p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p> |
506 | 506 | <blockquote> |
507 | 507 | <pre> |
508 | -<b>LastName</b>;<b>FirstName</b>;<b>Email</b>;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;<span style="color:red;"><?php if (count($list) > 0) echo implode(';', $list).';'; ?></span>Courses;ClassId; |
|
509 | -<b>xxx</b>;<b>xxx</b>;<b>xxx</b>;xxx;xxx;<?php echo implode('/', $defined_auth_sources); ?>;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br /> |
|
508 | +<b>LastName</b>;<b>FirstName</b>;<b>Email</b>;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;<span style="color:red;"><?php if (count($list) > 0) { |
|
509 | + echo implode(';', $list).';'; |
|
510 | +} |
|
511 | +?></span>Courses;ClassId; |
|
512 | +<b>xxx</b>;<b>xxx</b>;<b>xxx</b>;xxx;xxx;<?php echo implode('/', $defined_auth_sources); ?>;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;<span style="color:red;"><?php if (count($list_reponse) > 0) { |
|
513 | + echo implode(';', $list_reponse).';'; |
|
514 | +} |
|
515 | +?></span>xxx1|xxx2|xxx3;1;<br /> |
|
510 | 516 | </pre> |
511 | 517 | </blockquote> |
512 | 518 | <p><?php echo get_lang('XMLMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p> |