@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | <!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}{element}$div_upload_limit |
| 136 | 136 | <!-- BEGIN error --><br /><span class="form_error">{error}</span><!-- END error --> |
| 137 | 137 | </div> |
| 138 | -EOT; |
|
| 138 | +eot; |
|
| 139 | 139 | $renderer->setElementTemplate($user_file_template, 'user_file'); |
| 140 | 140 | |
| 141 | 141 | // set template for other elements |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | <!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}{element} |
| 146 | 146 | <!-- BEGIN error --><br /><span class="form_error">{error}</span><!-- END error --> |
| 147 | 147 | </div> |
| 148 | -EOT; |
|
| 148 | +eot; |
|
| 149 | 149 | $renderer->setCustomElementTemplate($user_file_template); |
| 150 | 150 | |
| 151 | 151 | $form->addElement('file', 'user_file', Display::return_icon('word_big.gif')); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $result = Database::query("DELETE FROM $tbl_session_rel_course WHERE session_id='$id_session' AND c_id IN($idChecked)"); |
| 47 | 47 | $nbr_affected_rows = Database::affected_rows($result); |
| 48 | 48 | Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE session_id='$id_session' AND c_id IN($idChecked)"); |
| 49 | - Database::query("UPDATE $tbl_session SET nbr_courses=nbr_courses-$nbr_affected_rows WHERE id='$id_session'"); |
|
| 49 | + Database::query("update $tbl_session SET nbr_courses=nbr_courses-$nbr_affected_rows WHERE id='$id_session'"); |
|
| 50 | 50 | } |
| 51 | 51 | header('Location: '.api_get_self().'?id_session='.$id_session.'&sort='.$sort); |
| 52 | 52 | exit(); |
@@ -112,8 +112,8 @@ |
||
| 112 | 112 | //With this function we can add actions to the jgrid (edit, delete, etc) |
| 113 | 113 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
| 114 | 114 | return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'. |
| 115 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'. |
|
| 116 | - '\'; |
|
| 115 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'. |
|
| 116 | + '\'; |
|
| 117 | 117 | }'; |
| 118 | 118 | ?> |
| 119 | 119 | <script> |
@@ -365,7 +365,7 @@ |
||
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | if (array_key_exists('add_teachers_to_sessions_courses', $courseInfo)) { |
| 368 | - $sql = "UPDATE $course_table SET |
|
| 368 | + $sql = "update $course_table SET |
|
| 369 | 369 | add_teachers_to_sessions_courses = '$addTeacherToSessionCourses' |
| 370 | 370 | WHERE id = ".$courseInfo['real_id']; |
| 371 | 371 | Database::query($sql); |
@@ -183,11 +183,14 @@ discard block |
||
| 183 | 183 | while ($row = multiquery_fetch_row($result)) { |
| 184 | 184 | echo '<tr>'; |
| 185 | 185 | for ($i = 0; $i < $nfields; $i++) { |
| 186 | - if (!$columns_islink[$i]) { // ignore links |
|
| 187 | - if ($columns_link[$i] != '') // link is defined |
|
| 186 | + if (!$columns_islink[$i]) { |
|
| 187 | +// ignore links |
|
| 188 | + if ($columns_link[$i] != '') { |
|
| 189 | + // link is defined |
|
| 188 | 190 | { |
| 189 | 191 | if (substr($columns_link[$i], 0, 10) == 'javascript') { |
| 190 | 192 | echo '<td><a href="#" onclick="'.$row[$columns_link[$i]].'">'.$row[$i].'</a></td>'; |
| 193 | + } |
|
| 191 | 194 | } else { |
| 192 | 195 | echo '<td><a href="'.$row[$columns_link[$i]].'">'.$row[$i].'</a></td>'; |
| 193 | 196 | } |
@@ -229,10 +232,12 @@ discard block |
||
| 229 | 232 | echo "\n"; |
| 230 | 233 | while ($row = multiquery_fetch_row($result)) { |
| 231 | 234 | for ($i = 0; $i < $nfields; $i++) { |
| 232 | - if (!$columns_islink[$i]) // ignore links |
|
| 235 | + if (!$columns_islink[$i]) { |
|
| 236 | + // ignore links |
|
| 233 | 237 | { |
| 234 | 238 | echo csv_escaping($row[$i]).','; |
| 235 | 239 | } |
| 240 | + } |
|
| 236 | 241 | } // fixme |
| 237 | 242 | echo "\n"; |
| 238 | 243 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | <option value = "%">--</option> |
| 200 | 200 | <?php |
| 201 | 201 | echo Display :: get_alphabet_options(); |
| 202 | - ?> |
|
| 202 | + ?> |
|
| 203 | 203 | </select> |
| 204 | 204 | <?php echo '<br />'; ?> |
| 205 | 205 | </td> |
@@ -210,31 +210,31 @@ discard block |
||
| 210 | 210 | <td align="center"> |
| 211 | 211 | <div id="content_source"> |
| 212 | 212 | <?php |
| 213 | - if (!($add_type == 'multiple')) { |
|
| 213 | + if (!($add_type == 'multiple')) { |
|
| 214 | 214 | ?> |
| 215 | 215 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" /> |
| 216 | 216 | <div id="ajax_list_users_single"></div> |
| 217 | 217 | <?php |
| 218 | - } else { |
|
| 219 | - ?> |
|
| 218 | + } else { |
|
| 219 | + ?> |
|
| 220 | 220 | <div id="ajax_list_multiple"> |
| 221 | 221 | <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?> |
| 222 | 222 | </div> |
| 223 | 223 | <?php |
| 224 | - } |
|
| 225 | - ?> |
|
| 224 | + } |
|
| 225 | + ?> |
|
| 226 | 226 | </div> |
| 227 | 227 | </td> |
| 228 | 228 | <td width="10%" valign="middle" align="center"> |
| 229 | 229 | <?php |
| 230 | - if ($ajax_search) { |
|
| 231 | - ?> |
|
| 230 | + if ($ajax_search) { |
|
| 231 | + ?> |
|
| 232 | 232 | <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('elements_in'))" > |
| 233 | 233 | <em class="fa fa-arrow-left"></em> |
| 234 | 234 | </button> |
| 235 | 235 | <?php |
| 236 | - } else { |
|
| 237 | - ?> |
|
| 236 | + } else { |
|
| 237 | + ?> |
|
| 238 | 238 | <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'))"> |
| 239 | 239 | <em class="fa fa-arrow-right"></em> |
| 240 | 240 | </button> |
@@ -243,8 +243,8 @@ discard block |
||
| 243 | 243 | <em class="fa fa-arrow-left"></em> |
| 244 | 244 | </button> |
| 245 | 245 | <?php |
| 246 | - } |
|
| 247 | - ?> |
|
| 246 | + } |
|
| 247 | + ?> |
|
| 248 | 248 | <br /><br /><br /><br /><br /><br /> |
| 249 | 249 | </td> |
| 250 | 250 | <td align="center"> |
@@ -117,7 +117,8 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | //checking for extra field with filter on |
| 119 | 119 | |
| 120 | -function search_usergroup_sessions($needle, $type) { |
|
| 120 | +function search_usergroup_sessions($needle, $type) |
|
| 121 | +{ |
|
| 121 | 122 | global $elements_in; |
| 122 | 123 | $xajax_response = new xajaxResponse(); |
| 123 | 124 | $return = ''; |
@@ -172,7 +173,10 @@ discard block |
||
| 172 | 173 | echo '<div id="advancedSearch" style="display: none">'.get_lang('SearchSessions'); ?> : |
| 173 | 174 | <input name="SearchSession" onchange = "xajax_search_usergroup_sessions(this.value,'searchbox')" onkeyup="this.onchange()"> |
| 174 | 175 | </div> |
| 175 | -<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();"'; }?>> |
|
| 176 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) { |
|
| 177 | + echo '&add=true'; |
|
| 178 | +} |
|
| 179 | +?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>> |
|
| 176 | 180 | <?php |
| 177 | 181 | echo '<legend>'.$data['name'].': '.$tool_name.'</legend>'; |
| 178 | 182 | echo Display::input('hidden', 'id', $id); |
@@ -120,7 +120,10 @@ discard block |
||
| 120 | 120 | <?php |
| 121 | 121 | foreach ($db_users as $user) { |
| 122 | 122 | ?> |
| 123 | - <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $users)) echo 'selected="selected"'; ?>> |
|
| 123 | + <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $users)) { |
|
| 124 | + echo 'selected="selected"'; |
|
| 125 | +} |
|
| 126 | +?>> |
|
| 124 | 127 | <?php echo api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')'; ?> |
| 125 | 128 | </option> |
| 126 | 129 | <?php |
@@ -136,7 +139,10 @@ discard block |
||
| 136 | 139 | <?php |
| 137 | 140 | foreach ($db_urls as $url_obj) { |
| 138 | 141 | ?> |
| 139 | - <option value="<?php echo $url_obj['id']; ?>" <?php if (in_array($url_obj['id'], $url_list)) echo 'selected="selected"'; ?>> |
|
| 142 | + <option value="<?php echo $url_obj['id']; ?>" <?php if (in_array($url_obj['id'], $url_list)) { |
|
| 143 | + echo 'selected="selected"'; |
|
| 144 | +} |
|
| 145 | +?>> |
|
| 140 | 146 | <?php echo $url_obj['url']; ?> |
| 141 | 147 | </option> |
| 142 | 148 | <?php |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | foreach ($data_array as $item) { |
| 119 | 119 | $row = array(); |
| 120 | 120 | if ($this->iscourse == '1') { |
| 121 | - $row[] = $item['result_id']; |
|
| 121 | + $row[] = $item['result_id']; |
|
| 122 | 122 | } |
| 123 | 123 | if ($is_western_name_order) { |
| 124 | 124 | $row[] = $item['firstname']; |
@@ -10,24 +10,24 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | class ScoreDisplayForm extends FormValidator |
| 12 | 12 | { |
| 13 | - /** |
|
| 14 | - * @param $form_name |
|
| 15 | - * @param null $action |
|
| 16 | - */ |
|
| 17 | - public function __construct($form_name, $action = null) |
|
| 18 | - { |
|
| 19 | - parent::__construct($form_name, 'post', $action); |
|
| 20 | - $displayscore = ScoreDisplay::instance(); |
|
| 21 | - $customdisplays = $displayscore->get_custom_score_display_settings(); |
|
| 22 | - |
|
| 23 | - $nr_items = (count($customdisplays) != '0') ? count($customdisplays) : '1'; |
|
| 24 | - $this->setDefaults(array( |
|
| 13 | + /** |
|
| 14 | + * @param $form_name |
|
| 15 | + * @param null $action |
|
| 16 | + */ |
|
| 17 | + public function __construct($form_name, $action = null) |
|
| 18 | + { |
|
| 19 | + parent::__construct($form_name, 'post', $action); |
|
| 20 | + $displayscore = ScoreDisplay::instance(); |
|
| 21 | + $customdisplays = $displayscore->get_custom_score_display_settings(); |
|
| 22 | + |
|
| 23 | + $nr_items = (count($customdisplays) != '0') ? count($customdisplays) : '1'; |
|
| 24 | + $this->setDefaults(array( |
|
| 25 | 25 | 'scorecolpercent' => $displayscore->get_color_split_value() |
| 26 | - )); |
|
| 26 | + )); |
|
| 27 | 27 | |
| 28 | - $this->addElement('hidden', 'maxvalue', '100'); |
|
| 29 | - $this->addElement('hidden', 'minvalue', '0'); |
|
| 30 | - $counter = 1; |
|
| 28 | + $this->addElement('hidden', 'maxvalue', '100'); |
|
| 29 | + $this->addElement('hidden', 'minvalue', '0'); |
|
| 30 | + $counter = 1; |
|
| 31 | 31 | |
| 32 | 32 | //setting the default values |
| 33 | 33 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | $scorecol = array(); |
| 44 | 44 | |
| 45 | - //settings for the colored score |
|
| 45 | + //settings for the colored score |
|
| 46 | 46 | $this->addElement('header', get_lang('ScoreEdit')); |
| 47 | 47 | |
| 48 | 48 | if ($displayscore->is_coloring_enabled()) { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $this->addRule(array('scorecolpercent', 'minvalue'), get_lang('UnderMin'), 'compare', '>'); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - //Settings for the scoring system |
|
| 70 | + //Settings for the scoring system |
|
| 71 | 71 | |
| 72 | 72 | if ($displayscore->is_custom()) { |
| 73 | 73 | $this->addElement('html', '<br /><b>'.get_lang('ScoringSystem').'</b>'); |