@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | $newstudents = $evaluation[0]->get_not_subscribed_students(); |
19 | 19 | |
20 | 20 | if (count($newstudents) == '0') { |
21 | - header('Location: gradebook_view_result.php?nouser=&selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq()); |
|
22 | - exit; |
|
21 | + header('Location: gradebook_view_result.php?nouser=&selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq()); |
|
22 | + exit; |
|
23 | 23 | } |
24 | 24 | $add_user_form = new EvalForm( |
25 | 25 | EvalForm :: TYPE_ADD_USERS_TO_EVAL, |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | |
68 | 68 | $interbreadcrumb[]= array ('url' => Security::remove_XSS($_SESSION['gradebook_dest']),'name' => get_lang('Gradebook')); |
69 | 69 | $interbreadcrumb[]= array( |
70 | - 'url' => 'gradebook_view_result.php?selecteval=' .Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
71 | - 'name' => get_lang('ViewResult') |
|
70 | + 'url' => 'gradebook_view_result.php?selecteval=' .Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
71 | + 'name' => get_lang('ViewResult') |
|
72 | 72 | ); |
73 | 73 | Display :: display_header(get_lang('AddUserToEval')); |
74 | 74 | if (isset ($_GET['erroroneuser'])){ |
75 | - Display :: display_warning_message(get_lang('AtLeastOneUser'),false); |
|
75 | + Display :: display_warning_message(get_lang('AtLeastOneUser'),false); |
|
76 | 76 | } |
77 | 77 | DisplayGradebook :: display_header_result($evaluation[0], null, 0,0); |
78 | 78 | echo '<div class="main">'; |
@@ -7,40 +7,40 @@ |
||
7 | 7 | require_once '../inc/global.inc.php'; |
8 | 8 | api_block_anonymous_users(); |
9 | 9 | if (api_get_setting('allow_message_tool')!='true') { |
10 | - api_not_allowed(); |
|
10 | + api_not_allowed(); |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') { |
14 | - $this_section = SECTION_SOCIAL; |
|
15 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
16 | - $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); |
|
14 | + $this_section = SECTION_SOCIAL; |
|
15 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
16 | + $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); |
|
17 | 17 | } else { |
18 | - $this_section = SECTION_MYPROFILE; |
|
19 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
18 | + $this_section = SECTION_MYPROFILE; |
|
19 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $social_right_content = ''; |
23 | 23 | |
24 | 24 | if (isset($_GET['f']) && $_GET['f']=='social') { |
25 | - $social_parameter = '?f=social'; |
|
25 | + $social_parameter = '?f=social'; |
|
26 | 26 | } else { |
27 | - if (api_get_setting('extended_profile') == 'true') { |
|
28 | - $social_right_content .= '<div class="actions">'; |
|
27 | + if (api_get_setting('extended_profile') == 'true') { |
|
28 | + $social_right_content .= '<div class="actions">'; |
|
29 | 29 | |
30 | - if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') { |
|
31 | - $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'. |
|
30 | + if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') { |
|
31 | + $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'. |
|
32 | 32 | Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>'; |
33 | - } |
|
34 | - if (api_get_setting('allow_message_tool') === 'true') { |
|
35 | - $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
|
33 | + } |
|
34 | + if (api_get_setting('allow_message_tool') === 'true') { |
|
35 | + $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
|
36 | 36 | Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>'; |
37 | 37 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'. |
38 | 38 | Display::return_icon('inbox.png',get_lang('Inbox')).'</a>'; |
39 | 39 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'. |
40 | 40 | Display::return_icon('outbox.png',get_lang('Outbox')).'</a>'; |
41 | - } |
|
42 | - $social_right_content .= '</div>'; |
|
43 | - } |
|
41 | + } |
|
42 | + $social_right_content .= '</div>'; |
|
43 | + } |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | if (empty($_GET['id'])) { |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $message .= '<p><a class="btn btn-primary" href="'.api_get_path(WEB_CODE_PATH).'course_info/maintenance.php?'.api_get_cidreq().'">'. |
45 | 45 | get_lang('No').'</a> <a class="btn btn-danger" href="'.api_get_self().'?delete=yes&'.api_get_cidreq().'">'. |
46 | 46 | get_lang('Yes').'</a></p>'; |
47 | - $interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance')); |
|
47 | + $interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance')); |
|
48 | 48 | } |
49 | 49 | Display :: display_header($tool_name, 'Settings'); |
50 | 50 | echo Display::page_header($tool_name); |
@@ -115,13 +115,13 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
118 | - * Export tabular data to XML-file |
|
119 | - * @param array Simple array of data to put in XML |
|
120 | - * @param string Name of file to be given to the user |
|
121 | - * @param string Name of common tag to place each line in |
|
122 | - * @param string Name of the root element. A root element should always be given. |
|
123 | - * @param string Encoding in which the data is provided |
|
124 | - */ |
|
118 | + * Export tabular data to XML-file |
|
119 | + * @param array Simple array of data to put in XML |
|
120 | + * @param string Name of file to be given to the user |
|
121 | + * @param string Name of common tag to place each line in |
|
122 | + * @param string Name of the root element. A root element should always be given. |
|
123 | + * @param string Encoding in which the data is provided |
|
124 | + */ |
|
125 | 125 | public static function arrayToXml( |
126 | 126 | $data, |
127 | 127 | $filename = 'export', |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | foreach ($data as $row) { |
201 | 201 | $string .= "\n".str_repeat("\t",$level).'<'.$row['name'].'>'; |
202 | 202 | if (is_array($row['value'])) { |
203 | - $string .= self::_export_complex_table_xml_helper($row['value'],$level+1)."\n"; |
|
203 | + $string .= self::_export_complex_table_xml_helper($row['value'],$level+1)."\n"; |
|
204 | 204 | $string .= str_repeat("\t",$level).'</'.$row['name'].'>'; |
205 | 205 | } else { |
206 | 206 | $string .= $row['value']; |
@@ -25,29 +25,29 @@ |
||
25 | 25 | function search_courses($needle,$type) |
26 | 26 | { |
27 | 27 | $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
28 | - $xajax_response = new xajaxResponse(); |
|
29 | - $return = ''; |
|
30 | - if(!empty($needle) && !empty($type)) { |
|
31 | - // xajax send utf8 datas... datas in db can be non-utf8 datas |
|
32 | - $charset = api_get_system_encoding(); |
|
33 | - $needle = api_convert_encoding($needle, $charset, 'utf-8'); |
|
34 | - $needle = Database::escape_string($needle); |
|
28 | + $xajax_response = new xajaxResponse(); |
|
29 | + $return = ''; |
|
30 | + if(!empty($needle) && !empty($type)) { |
|
31 | + // xajax send utf8 datas... datas in db can be non-utf8 datas |
|
32 | + $charset = api_get_system_encoding(); |
|
33 | + $needle = api_convert_encoding($needle, $charset, 'utf-8'); |
|
34 | + $needle = Database::escape_string($needle); |
|
35 | 35 | |
36 | - $sql = 'SELECT * FROM '.$tbl_session.' WHERE name LIKE "'.$needle.'%" ORDER BY id'; |
|
36 | + $sql = 'SELECT * FROM '.$tbl_session.' WHERE name LIKE "'.$needle.'%" ORDER BY id'; |
|
37 | 37 | |
38 | - $rs = Database::query($sql); |
|
39 | - $course_list = array(); |
|
38 | + $rs = Database::query($sql); |
|
39 | + $course_list = array(); |
|
40 | 40 | |
41 | - $return .= '<select id="origin" name="NoSessionCategoryList[]" multiple="multiple" size="20" style="width:340px;">'; |
|
42 | - while($course = Database :: fetch_array($rs)) { |
|
43 | - $course_list[] = $course['id']; |
|
44 | - $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['name'],ENT_QUOTES).'">'.$course['name'].'</option>'; |
|
45 | - } |
|
46 | - $return .= '</select>'; |
|
47 | - $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return)); |
|
48 | - } |
|
49 | - $_SESSION['course_list'] = $course_list; |
|
41 | + $return .= '<select id="origin" name="NoSessionCategoryList[]" multiple="multiple" size="20" style="width:340px;">'; |
|
42 | + while($course = Database :: fetch_array($rs)) { |
|
43 | + $course_list[] = $course['id']; |
|
44 | + $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['name'],ENT_QUOTES).'">'.$course['name'].'</option>'; |
|
45 | + } |
|
46 | + $return .= '</select>'; |
|
47 | + $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return)); |
|
48 | + } |
|
49 | + $_SESSION['course_list'] = $course_list; |
|
50 | 50 | |
51 | - return $xajax_response; |
|
52 | - } |
|
51 | + return $xajax_response; |
|
52 | + } |
|
53 | 53 | } |
@@ -137,7 +137,7 @@ |
||
137 | 137 | array('\r', '\n', '\x3c', '\x3e', '\x26'), |
138 | 138 | addslashes($var) |
139 | 139 | ).'"'; |
140 | - case 'array': |
|
140 | + case 'array': |
|
141 | 141 | // Arrays in JSON can't be associative. If the array is empty or if it |
142 | 142 | // has sequential whole number keys starting with 0, it's not associative |
143 | 143 | // so we can go ahead and convert it as an array. |
@@ -304,9 +304,9 @@ discard block |
||
304 | 304 | */ |
305 | 305 | public static function remove_XSS($var, $user_status = null, $filter_terms = false) |
306 | 306 | { |
307 | - if ($filter_terms) { |
|
308 | - $var = self::filter_terms($var); |
|
309 | - } |
|
307 | + if ($filter_terms) { |
|
308 | + $var = self::filter_terms($var); |
|
309 | + } |
|
310 | 310 | |
311 | 311 | if (empty($user_status)) { |
312 | 312 | if (api_is_anonymous()) { |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | */ |
402 | 402 | public static function filter_terms($text) |
403 | 403 | { |
404 | - static $bad_terms = array(); |
|
404 | + static $bad_terms = array(); |
|
405 | 405 | |
406 | 406 | if (empty($bad_terms)) { |
407 | 407 | $list = api_get_setting('filter_terms'); |
@@ -422,14 +422,14 @@ discard block |
||
422 | 422 | } |
423 | 423 | } |
424 | 424 | |
425 | - $replace = '***'; |
|
426 | - if (!empty($bad_terms)) { |
|
427 | - // Fast way |
|
428 | - $new_text = str_ireplace($bad_terms, $replace, $text, $count); |
|
429 | - $text = $new_text; |
|
430 | - } |
|
425 | + $replace = '***'; |
|
426 | + if (!empty($bad_terms)) { |
|
427 | + // Fast way |
|
428 | + $new_text = str_ireplace($bad_terms, $replace, $text, $count); |
|
429 | + $text = $new_text; |
|
430 | + } |
|
431 | 431 | |
432 | - return $text; |
|
432 | + return $text; |
|
433 | 433 | } |
434 | 434 | |
435 | 435 |
@@ -139,7 +139,7 @@ |
||
139 | 139 | api_get_local_time($glossary_data['update_date']) |
140 | 140 | ); |
141 | 141 | } else { |
142 | - $glossary_data['update_date'] = ''; |
|
142 | + $glossary_data['update_date'] = ''; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | $form->addLabel(get_lang('CreationDate'), $glossary_data['insert_date']); |
@@ -1267,13 +1267,13 @@ discard block |
||
1267 | 1267 | } |
1268 | 1268 | |
1269 | 1269 | /** |
1270 | - * Get the users by ID |
|
1271 | - * @param array $ids student ids |
|
1272 | - * @param string $active |
|
1273 | - * @param string $order |
|
1274 | - * @param string $limit |
|
1275 | - * @return array $result student information |
|
1276 | - */ |
|
1270 | + * Get the users by ID |
|
1271 | + * @param array $ids student ids |
|
1272 | + * @param string $active |
|
1273 | + * @param string $order |
|
1274 | + * @param string $limit |
|
1275 | + * @return array $result student information |
|
1276 | + */ |
|
1277 | 1277 | public static function get_user_list_by_ids($ids = array(), $active = null, $order = null, $limit = null) |
1278 | 1278 | { |
1279 | 1279 | if (empty($ids)) { |
@@ -2314,7 +2314,7 @@ discard block |
||
2314 | 2314 | * |
2315 | 2315 | * @return array with extra data info of a user i.e array('field_variable'=>'value'); |
2316 | 2316 | */ |
2317 | - public static function get_extra_user_data_by_value($variable, $value, $all_visibility = true) |
|
2317 | + public static function get_extra_user_data_by_value($variable, $value, $all_visibility = true) |
|
2318 | 2318 | { |
2319 | 2319 | $extraFieldValue = new ExtraFieldValue('user'); |
2320 | 2320 | $extraField = new ExtraField('user'); |
@@ -3409,12 +3409,12 @@ discard block |
||
3409 | 3409 | if ($tag_id == 0) { |
3410 | 3410 | //the tag doesn't exist |
3411 | 3411 | $sql = "INSERT INTO $table_user_tag (tag, field_id,count) VALUES ('$tag','$field_id', count + 1)"; |
3412 | - Database::query($sql); |
|
3412 | + Database::query($sql); |
|
3413 | 3413 | $last_insert_id = Database::insert_id(); |
3414 | 3414 | } else { |
3415 | 3415 | //the tag exists we update it |
3416 | 3416 | $sql = "UPDATE $table_user_tag SET count = count + 1 WHERE id = $tag_id"; |
3417 | - Database::query($sql); |
|
3417 | + Database::query($sql); |
|
3418 | 3418 | $last_insert_id = $tag_id; |
3419 | 3419 | } |
3420 | 3420 | |
@@ -3610,9 +3610,9 @@ discard block |
||
3610 | 3610 | } |
3611 | 3611 | |
3612 | 3612 | /** |
3613 | - * Get extra filtrable user fields (only type select) |
|
3614 | - * @return array |
|
3615 | - */ |
|
3613 | + * Get extra filtrable user fields (only type select) |
|
3614 | + * @return array |
|
3615 | + */ |
|
3616 | 3616 | public static function get_extra_filtrable_fields() |
3617 | 3617 | { |
3618 | 3618 | $extraFieldList = UserManager::get_extra_fields(); |
@@ -3637,9 +3637,9 @@ discard block |
||
3637 | 3637 | } |
3638 | 3638 | |
3639 | 3639 | /** |
3640 | - * Get extra where clauses for finding users based on extra filtrable user fields (type select) |
|
3641 | - * @return string With AND clauses based on user's ID which have the values to search in extra user fields |
|
3642 | - */ |
|
3640 | + * Get extra where clauses for finding users based on extra filtrable user fields (type select) |
|
3641 | + * @return string With AND clauses based on user's ID which have the values to search in extra user fields |
|
3642 | + */ |
|
3643 | 3643 | public static function get_search_form_where_extra_fields() |
3644 | 3644 | { |
3645 | 3645 | $useExtraFields = false; |
@@ -3958,23 +3958,23 @@ discard block |
||
3958 | 3958 | } |
3959 | 3959 | |
3960 | 3960 | /** |
3961 | - * Get users followed by human resource manager |
|
3962 | - * @param int $userId |
|
3963 | - * @param int $userStatus Filter users by status (STUDENT, COURSEMANAGER, etc) |
|
3964 | - * @param bool $getOnlyUserId |
|
3965 | - * @param bool $getSql |
|
3966 | - * @param bool $getCount |
|
3967 | - * @param int $from |
|
3968 | - * @param int $numberItems |
|
3969 | - * @param int $column |
|
3970 | - * @param string $direction |
|
3971 | - * @param int $active |
|
3972 | - * @param string $lastConnectionDate |
|
3973 | - * @param int $status the function is called by who? COURSEMANAGER, DRH? |
|
3974 | - * @param string $keyword |
|
3961 | + * Get users followed by human resource manager |
|
3962 | + * @param int $userId |
|
3963 | + * @param int $userStatus Filter users by status (STUDENT, COURSEMANAGER, etc) |
|
3964 | + * @param bool $getOnlyUserId |
|
3965 | + * @param bool $getSql |
|
3966 | + * @param bool $getCount |
|
3967 | + * @param int $from |
|
3968 | + * @param int $numberItems |
|
3969 | + * @param int $column |
|
3970 | + * @param string $direction |
|
3971 | + * @param int $active |
|
3972 | + * @param string $lastConnectionDate |
|
3973 | + * @param int $status the function is called by who? COURSEMANAGER, DRH? |
|
3974 | + * @param string $keyword |
|
3975 | 3975 | * |
3976 | - * @return array user list |
|
3977 | - */ |
|
3976 | + * @return array user list |
|
3977 | + */ |
|
3978 | 3978 | public static function getUsersFollowedByUser( |
3979 | 3979 | $userId, |
3980 | 3980 | $userStatus = null, |