@@ -114,7 +114,7 @@ |
||
114 | 114 | $from = intval($from); |
115 | 115 | $number_of_items = intval($number_of_items); |
116 | 116 | $column = intval($column); |
117 | - $direction = !in_array(strtolower(trim($direction)), ['asc','desc']) ? 'asc' : $direction; |
|
117 | + $direction = !in_array(strtolower(trim($direction)), ['asc', 'desc']) ? 'asc' : $direction; |
|
118 | 118 | |
119 | 119 | $sql = "SELECT |
120 | 120 | id AS col0, |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | |
10 | 10 | api_protect_admin_script(); |
11 | 11 | |
12 | -$new_language = Security::remove_XSS($_REQUEST['new_language']); |
|
13 | -$language_variable = Security::remove_XSS($_REQUEST['variable_language']); |
|
14 | -$file_id = intval($_REQUEST['file_id']); |
|
12 | +$new_language = Security::remove_XSS($_REQUEST['new_language']); |
|
13 | +$language_variable = Security::remove_XSS($_REQUEST['variable_language']); |
|
14 | +$file_id = intval($_REQUEST['file_id']); |
|
15 | 15 | /** |
16 | 16 | * Code |
17 | 17 | */ |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | |
28 | 28 | //update variable language |
29 | 29 | // Replace double quotes to avoid parse errors |
30 | - $new_language = str_replace('"', '\"',$new_language); |
|
30 | + $new_language = str_replace('"', '\"', $new_language); |
|
31 | 31 | // Replace new line signs to avoid parse errors - see #6773 |
32 | - $new_language = str_replace("\n","\\n",$new_language); |
|
33 | - $all_file_of_directory[$language_variable]="\"".$new_language."\";"; |
|
32 | + $new_language = str_replace("\n", "\\n", $new_language); |
|
33 | + $all_file_of_directory[$language_variable] = "\"".$new_language."\";"; |
|
34 | 34 | $result_array = array(); |
35 | 35 | |
36 | 36 | foreach ($all_file_of_directory as $key_value=>$value_info) { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | if (!empty($result_array)) { |
41 | 41 | foreach ($result_array as $key => $result) { |
42 | 42 | if ($result == false) { |
43 | - $variables_with_problems .=$key.' <br />'; |
|
43 | + $variables_with_problems .= $key.' <br />'; |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | $cidReset = true; |
10 | 10 | |
11 | 11 | require_once '../inc/global.inc.php'; |
12 | -$this_section=SECTION_PLATFORM_ADMIN; |
|
12 | +$this_section = SECTION_PLATFORM_ADMIN; |
|
13 | 13 | |
14 | 14 | api_protect_admin_script(); |
15 | 15 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $error_message = ''; |
19 | 19 | $first_letter_class = ''; |
20 | 20 | $first_letter_course = ''; |
21 | -$courses = array (); |
|
21 | +$courses = array(); |
|
22 | 22 | $classes = array(); |
23 | 23 | |
24 | 24 | $tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | $tool_name = get_lang('AddClassesToACourse'); |
28 | 28 | |
29 | -$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin')); |
|
29 | +$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin')); |
|
30 | 30 | |
31 | 31 | Display :: display_header($tool_name); |
32 | 32 | |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | -$sql = "SELECT id,name FROM $tbl_class WHERE name LIKE '".$first_letter_class."%' ORDER BY ". (count($classes) > 0 ? "(id IN('".implode("','", $classes)."')) DESC," : "")." name"; |
|
71 | +$sql = "SELECT id,name FROM $tbl_class WHERE name LIKE '".$first_letter_class."%' ORDER BY ".(count($classes) > 0 ? "(id IN('".implode("','", $classes)."')) DESC," : "")." name"; |
|
72 | 72 | $result = Database::query($sql); |
73 | 73 | $db_classes = Database::store_result($result); |
74 | -$sql = "SELECT code,visual_code,title FROM $tbl_course WHERE visual_code LIKE '".$first_letter_course."%' ORDER BY ". (count($courses) > 0 ? "(code IN('".implode("','", $courses)."')) DESC," : "")." visual_code"; |
|
74 | +$sql = "SELECT code,visual_code,title FROM $tbl_course WHERE visual_code LIKE '".$first_letter_course."%' ORDER BY ".(count($courses) > 0 ? "(code IN('".implode("','", $courses)."')) DESC," : "")." visual_code"; |
|
75 | 75 | $result = Database::query($sql); |
76 | 76 | $db_courses = Database::store_result($result); |
77 | 77 | if (!empty ($error_message)) |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | foreach ($db_classes as $class) |
115 | 115 | { |
116 | 116 | ?> |
117 | - <option value="<?php echo $class['id']; ?>" <?php if(in_array($class['id'],$classes)) echo 'selected="selected"'; ?>><?php echo $class['name']; ?></option> |
|
117 | + <option value="<?php echo $class['id']; ?>" <?php if (in_array($class['id'], $classes)) echo 'selected="selected"'; ?>><?php echo $class['name']; ?></option> |
|
118 | 118 | <?php |
119 | 119 | } |
120 | 120 | ?> |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | foreach ($db_courses as $course) |
132 | 132 | { |
133 | 133 | ?> |
134 | - <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>><?php echo '('.$course['visual_code'].') '.$course['title']; ?></option> |
|
134 | + <option value="<?php echo $course['code']; ?>" <?php if (in_array($course['code'], $courses)) echo 'selected="selected"'; ?>><?php echo '('.$course['visual_code'].') '.$course['title']; ?></option> |
|
135 | 135 | <?php |
136 | 136 | } |
137 | 137 | ?> |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | |
68 | 68 | //Column config |
69 | 69 | $column_model = array( |
70 | - array('name'=>'subject', 'index'=>'subject', 'width'=>'80', 'align'=>'left'), |
|
70 | + array('name'=>'subject', 'index'=>'subject', 'width'=>'80', 'align'=>'left'), |
|
71 | 71 | // array('name'=>'message', 'index'=>'message', 'width'=>'500', 'align'=>'left','sortable'=>'false'), |
72 | - array('name'=>'event_type_name', 'index'=>'event_type_name', 'width'=>'80', 'align'=>'left'), |
|
73 | - array('name'=>'language_id', 'index'=>'language_id', 'width'=>'80', 'align'=>'left'), |
|
74 | - array('name'=>'activated', 'index'=>'activated', 'width'=>'80', 'align'=>'left'), |
|
75 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'100') |
|
72 | + array('name'=>'event_type_name', 'index'=>'event_type_name', 'width'=>'80', 'align'=>'left'), |
|
73 | + array('name'=>'language_id', 'index'=>'language_id', 'width'=>'80', 'align'=>'left'), |
|
74 | + array('name'=>'activated', 'index'=>'activated', 'width'=>'80', 'align'=>'left'), |
|
75 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'100') |
|
76 | 76 | ); |
77 | 77 | //Autowidth |
78 | 78 | $extra_params['autowidth'] = 'true'; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
83 | 83 | $htmlHeadXtra[] = '<script> |
84 | 84 | $(function() { |
85 | - '.Display::grid_js('event_email_template', $url,$columns,$column_model,$extra_params, array(), $action_links,true).' |
|
85 | + '.Display::grid_js('event_email_template', $url, $columns, $column_model, $extra_params, array(), $action_links, true).' |
|
86 | 86 | }); |
87 | 87 | </script>'; |
88 | 88 |
@@ -90,26 +90,26 @@ |
||
90 | 90 | { |
91 | 91 | $baseDir = api_get_path(SYS_ARCHIVE_PATH); |
92 | 92 | $uploadPath = 'pdfimport/'; |
93 | - $errors = array (); |
|
93 | + $errors = array(); |
|
94 | 94 | if (!is_dir($baseDir.$uploadPath)) { |
95 | 95 | @mkdir($baseDir.$uploadPath); |
96 | 96 | } |
97 | - if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024*1024*1024)) { |
|
97 | + if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024 * 1024 * 1024)) { |
|
98 | 98 | error_log('Could not unzip uploaded file in '.__FILE__.', line '.__LINE__); |
99 | 99 | return $errors; |
100 | 100 | } |
101 | 101 | $list = scandir($baseDir.$uploadPath); |
102 | 102 | $i = 0; |
103 | 103 | foreach ($list as $file) { |
104 | - if (substr($file,0,1) == '.' or !is_file($baseDir.$uploadPath.$file)) { |
|
104 | + if (substr($file, 0, 1) == '.' or !is_file($baseDir.$uploadPath.$file)) { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | - $parts = preg_split('/_/',$file); |
|
107 | + $parts = preg_split('/_/', $file); |
|
108 | 108 | $course = api_get_course_info($parts[0]); |
109 | 109 | if (count($course) > 0) { |
110 | 110 | // Build file info because handle_uploaded_document() needs it (name, type, size, tmp_name) |
111 | 111 | $fileSize = filesize($baseDir.$uploadPath.$file); |
112 | - $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2],0,-4)); |
|
112 | + $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2], 0, -4)); |
|
113 | 113 | if ($docId > 0) { |
114 | 114 | if (!is_file($baseDir.$uploadPath.$file)) { |
115 | 115 | error_log($baseDir.$uploadPath.$file.' does not exists in '.__FILE__); |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | api_protect_admin_script(true); |
20 | 20 | |
21 | 21 | // Setting breadcrumbs. |
22 | -$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
23 | -$interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes')); |
|
22 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
23 | +$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes')); |
|
24 | 24 | |
25 | 25 | // Setting the name of the tool. |
26 | 26 | $tool_name = get_lang('SubscribeClassToCourses'); |
27 | 27 | |
28 | 28 | $add_type = 'multiple'; |
29 | -if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){ |
|
29 | +if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
|
30 | 30 | $add_type = Security::remove_XSS($_REQUEST['add_type']); |
31 | 31 | } |
32 | 32 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id); |
99 | 99 | $searchForm->addHeader(get_lang('AdvancedSearch')); |
100 | -$renderer =& $searchForm->defaultRenderer(); |
|
100 | +$renderer = & $searchForm->defaultRenderer(); |
|
101 | 101 | $searchForm->addElement('hidden', 'id', $id); |
102 | 102 | foreach ($filters as $param) { |
103 | 103 | $searchForm->addElement($param['type'], $param['name'], $param['label']); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | //checking for extra field with filter on |
143 | 143 | |
144 | -function search($needle,$type) |
|
144 | +function search($needle, $type) |
|
145 | 145 | { |
146 | 146 | global $elements_in; |
147 | 147 | $xajax_response = new xajaxResponse(); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } else { |
152 | 152 | $list = CourseManager::get_courses_list(0, 0, 2, 'ASC', -1, $needle); |
153 | 153 | } |
154 | - if ($type=='single') { |
|
154 | + if ($type == 'single') { |
|
155 | 155 | } else { |
156 | 156 | $return .= '<select id="elements_not_in" name="elements_not_in_name[]" multiple="multiple" size="15" style="width:360px;">'; |
157 | 157 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | echo '<div class="actions">'; |
185 | -echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>'; |
|
185 | +echo '<a href="usergroups.php">'.Display::return_icon('back.png', get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>'; |
|
186 | 186 | echo Display::url(get_lang('AdvancedSearch'), '#', array('class' => 'advanced_options', 'id' => 'advanced_search')); |
187 | 187 | echo '</div>'; |
188 | 188 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | ?> |
194 | 194 | |
195 | -<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();"';}?>> |
|
195 | +<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();"'; }?>> |
|
196 | 196 | |
197 | 197 | <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>'; |
198 | 198 | echo Display::input('hidden', 'id', $id); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | <td align="center"><b><?php echo get_lang('CoursesInGroup') ?> :</b></td> |
212 | 212 | </tr> |
213 | 213 | |
214 | -<?php if ($add_type=='multiple') { ?> |
|
214 | +<?php if ($add_type == 'multiple') { ?> |
|
215 | 215 | <tr> |
216 | 216 | <td align="center"> |
217 | 217 | <?php echo get_lang('FirstLetterCourseTitle'); ?> : |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | <td align="center"> |
230 | 230 | <div id="content_source"> |
231 | 231 | <?php |
232 | - if (!($add_type=='multiple')) { |
|
232 | + if (!($add_type == 'multiple')) { |
|
233 | 233 | ?> |
234 | 234 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" /> |
235 | 235 | <div id="ajax_list_users_single"></div> |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | } else { |
238 | 238 | ?> |
239 | 239 | <div id="ajax_list_multiple"> |
240 | - <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?> |
|
240 | + <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?> |
|
241 | 241 | </div> |
242 | 242 | <?php |
243 | 243 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | </td> |
269 | 269 | <td align="center"> |
270 | 270 | <?php |
271 | - echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false ); |
|
271 | + echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false); |
|
272 | 272 | unset($sessionUsersList); |
273 | 273 | ?> |
274 | 274 | </td> |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | |
23 | 23 | set_time_limit(0); |
24 | 24 | |
25 | -$courses = array (); |
|
25 | +$courses = array(); |
|
26 | 26 | $courses[''] = '--'; |
27 | 27 | $sql = "SELECT code,visual_code,title FROM $course_table ORDER BY visual_code"; |
28 | 28 | |
29 | 29 | global $_configuration; |
30 | 30 | |
31 | 31 | if (api_is_multiple_url_enabled()) { |
32 | - $tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
|
32 | + $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
|
33 | 33 | $access_url_id = api_get_current_access_url_id(); |
34 | - if ($access_url_id != -1){ |
|
34 | + if ($access_url_id != -1) { |
|
35 | 35 | $sql = "SELECT code,visual_code,title |
36 | 36 | FROM $course_table as c |
37 | 37 | INNER JOIN $tbl_course_rel_access_url as course_rel_url |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | } |
47 | 47 | $form = new FormValidator('export_users'); |
48 | 48 | $form->addElement('header', $tool_name); |
49 | -$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML','xml'); |
|
49 | +$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML', 'xml'); |
|
50 | 50 | $form->addElement('radio', 'file_type', null, 'CSV', 'csv'); |
51 | 51 | $form->addElement('radio', 'file_type', null, 'XLS', 'xls'); |
52 | 52 | |
53 | -$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'),'1'); |
|
53 | +$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'), '1'); |
|
54 | 54 | $form->addElement('select', 'course_code', get_lang('OnlyUsersFromCourse'), $courses); |
55 | 55 | $form->addButtonExport(get_lang('Export')); |
56 | 56 | $form->setDefaults(array('file_type' => 'csv')); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | u.firstname AS FirstName, |
69 | 69 | u.email AS Email, |
70 | 70 | u.username AS UserName, |
71 | - ".(($_configuration['password_encryption']!='none')?" ":"u.password AS Password, ")." |
|
71 | + ".(($_configuration['password_encryption'] != 'none') ? " " : "u.password AS Password, ")." |
|
72 | 72 | u.auth_source AS AuthSource, |
73 | 73 | u.status AS Status, |
74 | 74 | u.official_code AS OfficialCode, |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | $filename = 'export_users_'.$course_code.'_'.api_get_local_time(); |
84 | 84 | } else { |
85 | 85 | if (api_is_multiple_url_enabled()) { |
86 | - $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
86 | + $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
87 | 87 | $access_url_id = api_get_current_access_url_id(); |
88 | 88 | if ($access_url_id != -1) { |
89 | - $sql.= " FROM $user_table u |
|
89 | + $sql .= " FROM $user_table u |
|
90 | 90 | INNER JOIN $tbl_user_rel_access_url as user_rel_url |
91 | 91 | ON (u.user_id= user_rel_url.user_id) |
92 | 92 | WHERE access_url_id = $access_url_id |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | $filename = 'export_users_'.api_get_local_time(); |
99 | 99 | } |
100 | 100 | $data = array(); |
101 | - $extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC',false); |
|
102 | - if ($export['addcsvheader']=='1' AND $export['file_type']=='csv') { |
|
101 | + $extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC', false); |
|
102 | + if ($export['addcsvheader'] == '1' AND $export['file_type'] == 'csv') { |
|
103 | 103 | if ($_configuration['password_encryption'] != 'none') { |
104 | 104 | $data[] = array( |
105 | 105 | 'UserId', |
@@ -127,19 +127,19 @@ discard block |
||
127 | 127 | ); |
128 | 128 | } |
129 | 129 | |
130 | - foreach($extra_fields as $extra) { |
|
131 | - $data[0][]=$extra[1]; |
|
130 | + foreach ($extra_fields as $extra) { |
|
131 | + $data[0][] = $extra[1]; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | |
135 | 135 | $res = Database::query($sql); |
136 | - while($user = Database::fetch_array($res,'ASSOC')) { |
|
136 | + while ($user = Database::fetch_array($res, 'ASSOC')) { |
|
137 | 137 | $student_data = UserManager:: get_extra_user_data( |
138 | 138 | $user['UserId'], |
139 | 139 | true, |
140 | 140 | false |
141 | 141 | ); |
142 | - foreach($student_data as $key=>$value) { |
|
142 | + foreach ($student_data as $key=>$value) { |
|
143 | 143 | $key = substr($key, 6); |
144 | 144 | if (is_array($value)) { |
145 | 145 | $user[$key] = $value[$key]; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $user[$key] = $value; |
148 | 148 | } |
149 | 149 | } |
150 | - $data[] = $user ; |
|
150 | + $data[] = $user; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | switch ($file_type) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | api_not_allowed(); |
22 | 22 | } |
23 | 23 | $user = api_get_user_info($_GET['user_id'], true); |
24 | -$tool_name = $user['complete_name'].(empty($user['official_code'])?'':' ('.$user['official_code'].')'); |
|
24 | +$tool_name = $user['complete_name'].(empty($user['official_code']) ? '' : ' ('.$user['official_code'].')'); |
|
25 | 25 | $table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); |
26 | 26 | $table_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
27 | 27 | |
@@ -47,13 +47,13 @@ discard block |
||
47 | 47 | |
48 | 48 | $exportLink = Display::url( |
49 | 49 | Display::return_icon( |
50 | - 'export_csv.png', get_lang('ExportAsCSV'),'', ICON_SIZE_MEDIUM |
|
50 | + 'export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM |
|
51 | 51 | ), |
52 | 52 | api_get_self().'?user_id='.$user['user_id'].'&action=export' |
53 | 53 | ); |
54 | 54 | $vCardExportLink = Display::url( |
55 | 55 | Display::return_icon( |
56 | - 'vcard.png', get_lang('UserInfo'),'', ICON_SIZE_MEDIUM |
|
56 | + 'vcard.png', get_lang('UserInfo'), '', ICON_SIZE_MEDIUM |
|
57 | 57 | ), |
58 | 58 | api_get_path(WEB_PATH).'main/social/vcard_export.php?userId='.$user['user_id'] |
59 | 59 | ); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | $tools = '<a href="course_information.php?code='.$courseCode.'">'. |
294 | 294 | Display::return_icon('synthese_view.gif', get_lang('Overview')).'</a>'. |
295 | 295 | '<a href="'.$courseInfo['course_public_url'].'">'. |
296 | - Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>' . |
|
296 | + Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>'. |
|
297 | 297 | '<a href="course_edit.php?id='.$course->c_id.'">'. |
298 | 298 | Display::return_icon('edit.gif', get_lang('Edit')).'</a>'; |
299 | 299 | if ($course->status == STUDENT) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | api_protect_admin_script(); |
15 | 15 | |
16 | 16 | $tool_name = get_lang('ExportCourses'); |
17 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
17 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
18 | 18 | |
19 | 19 | set_time_limit(0); |
20 | 20 | |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | |
63 | 63 | $dataToExport = []; |
64 | 64 | foreach ($courses as $course) { |
65 | - $dataToExport['code'] = str_replace(';',',',$course['code']); |
|
66 | - $dataToExport['title'] = str_replace(';',',',$course['title']); |
|
67 | - $dataToExport['category_code'] = str_replace(';',',',$course['category_code']); |
|
68 | - $dataToExport['tutor_name'] = str_replace(';',',',$course['tutor_name']); |
|
69 | - $dataToExport['course_language'] = str_replace(';',',',$course['course_language']); |
|
65 | + $dataToExport['code'] = str_replace(';', ',', $course['code']); |
|
66 | + $dataToExport['title'] = str_replace(';', ',', $course['title']); |
|
67 | + $dataToExport['category_code'] = str_replace(';', ',', $course['category_code']); |
|
68 | + $dataToExport['tutor_name'] = str_replace(';', ',', $course['tutor_name']); |
|
69 | + $dataToExport['course_language'] = str_replace(';', ',', $course['course_language']); |
|
70 | 70 | |
71 | 71 | $dataToExport['students'] = ''; |
72 | 72 | $dataToExport['teachers'] = ''; |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | $form->addHtml('</div>'); |
149 | 149 | } |
150 | 150 | |
151 | -$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null); |
|
152 | -$form->addElement('radio', 'file_type', '' , 'XLS' , 'xls', null); |
|
151 | +$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV', 'csv', null); |
|
152 | +$form->addElement('radio', 'file_type', '', 'XLS', 'xls', null); |
|
153 | 153 | $form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml')); |
154 | 154 | |
155 | 155 | $form->setDefaults(['select_type' => '1', 'file_type' => 'csv']); |