@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$reports_modules['course'] = array (); |
|
3 | +$reports_modules['course'] = array(); |
|
4 | 4 | |
5 | 5 | |
6 | 6 | function reports_modules_course_init() { |
@@ -24,6 +24,6 @@ discard block |
||
24 | 24 | 'NULL as progress, '. |
25 | 25 | '(sum(logout_course_date) - sum(login_course_date)) as time, null as ts from '. |
26 | 26 | Database::get_main_table(TABLE_STATISTIC_TRACK_E_COURSE_ACCESS). |
27 | - ' where c_id = ' . $course['real_id'] . |
|
27 | + ' where c_id = '.$course['real_id']. |
|
28 | 28 | ' group by user_id'); |
29 | 29 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $this_section = SECTION_REPORTS; |
25 | 25 | |
26 | 26 | // setting the name of the tool |
27 | -$tool_name=get_lang('Reports'); |
|
27 | +$tool_name = get_lang('Reports'); |
|
28 | 28 | |
29 | 29 | // loading templates |
30 | 30 | reports_loadTemplates(); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | // outputing a link to csv file instead of outputing csv data directly |
71 | -if ($_REQUEST['format'] == 'csv') { |
|
71 | +if ($_REQUEST['format'] == 'csv') { |
|
72 | 72 | // converting post vars to get uri |
73 | 73 | $params = ''; |
74 | 74 | $kv = array(); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | if (is_array($reports_template[$_REQUEST['type']])) { |
98 | 98 | $query = $reports_template[$_REQUEST['type']]['getSQL'](); |
99 | - if (! is_array($query)) |
|
99 | + if (!is_array($query)) |
|
100 | 100 | $query = array($query); |
101 | 101 | if ($_REQUEST['format'] == 'sql') |
102 | 102 | die(var_export($query, true)); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $columns = array(); |
151 | 151 | $columns_islink = array(); |
152 | 152 | echo '<thead><tr>'; |
153 | - for ($i=0; $i < $nfields; $i++) { |
|
153 | + for ($i = 0; $i < $nfields; $i++) { |
|
154 | 154 | $columns[$i] = multiquery_field_name($result, $i); |
155 | 155 | if (substr($columns[$i], -5, 5) != '_link') { |
156 | 156 | $column_islink[$i] = false; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | // checking resolving link column id |
163 | 163 | $columns_flip = array_flip($columns); |
164 | 164 | $columns_link = array(); |
165 | - for ($i=0; $i < $nfields; $i++) |
|
165 | + for ($i = 0; $i < $nfields; $i++) |
|
166 | 166 | if ($column_islink[$i] == false && array_key_exists($columns[$i].'_link', $columns_flip)) |
167 | 167 | $columns_link[$i] = $columns_flip[$columns[$i].'_link']; |
168 | 168 | else |
@@ -170,10 +170,10 @@ discard block |
||
170 | 170 | echo '</tr></thead><tbody>'; |
171 | 171 | while ($row = multiquery_fetch_row($result)) { |
172 | 172 | echo '<tr>'; |
173 | - for ($i = 0; $i<$nfields; $i++) |
|
174 | - if (!$columns_islink[$i]){ // ignore links |
|
173 | + for ($i = 0; $i < $nfields; $i++) |
|
174 | + if (!$columns_islink[$i]) { // ignore links |
|
175 | 175 | if ($columns_link[$i] != '') // link is defined |
176 | - if (substr($columns_link[$i],0,10) == 'javascript') { |
|
176 | + if (substr($columns_link[$i], 0, 10) == 'javascript') { |
|
177 | 177 | echo '<td><a href="#" onclick="'.$row[$columns_link[$i]].'">'.$row[$i].'</a></td>'; |
178 | 178 | } |
179 | 179 | else { |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $nfields = multiquery_num_fields($result); |
202 | 202 | $columns = array(); |
203 | 203 | $columns_islink = array(); |
204 | - for ($i=0; $i < $nfields; $i++) { |
|
204 | + for ($i = 0; $i < $nfields; $i++) { |
|
205 | 205 | $columns[$i] = multiquery_field_name($result, $i); |
206 | 206 | if (substr($columns[$i], -5, 5) != '_link') { |
207 | 207 | $column_islink[$i] = false; |
@@ -212,16 +212,16 @@ discard block |
||
212 | 212 | |
213 | 213 | echo "\n"; |
214 | 214 | while ($row = multiquery_fetch_row($result)) { |
215 | - for ($i = 0; $i<$nfields; $i++) |
|
215 | + for ($i = 0; $i < $nfields; $i++) |
|
216 | 216 | if (!$columns_islink[$i]) // ignore links |
217 | - echo csv_escaping($row[$i]).','; // fixme |
|
217 | + echo csv_escaping($row[$i]).','; // fixme |
|
218 | 218 | echo "\n"; |
219 | 219 | } |
220 | 220 | } else die(get_lang('UnknownFormat')); |
221 | 221 | |
222 | 222 | function csv_escaping($value, $csv_separator = ',') { |
223 | - $value = str_replace('"','""',$value); |
|
224 | - if (strpos($value, '""') or strpos($value, $csv_separator) or $value != trim($value) ) { |
|
223 | + $value = str_replace('"', '""', $value); |
|
224 | + if (strpos($value, '""') or strpos($value, $csv_separator) or $value != trim($value)) { |
|
225 | 225 | $value = '"'.$value.'"'; |
226 | 226 | } |
227 | 227 | return $value; |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | $teachers = CourseManager::get_teacher_list_from_course_code($course_code); |
37 | - $teacher_list = array(); |
|
37 | + $teacher_list = array(); |
|
38 | 38 | |
39 | 39 | if (!empty($teachers)) { |
40 | - foreach($teachers as $teacher) { |
|
41 | - $teacher_list[]= $teacher['firstname'].' '.$teacher['lastname']; |
|
40 | + foreach ($teachers as $teacher) { |
|
41 | + $teacher_list[] = $teacher['firstname'].' '.$teacher['lastname']; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $students[] = $student['user_id']; |
55 | 55 | } |
56 | 56 | |
57 | - $t_lp = Database :: get_course_table(TABLE_LP_MAIN); |
|
57 | + $t_lp = Database :: get_course_table(TABLE_LP_MAIN); |
|
58 | 58 | $sql_lp = "SELECT lp.name, lp.id FROM $t_lp lp |
59 | 59 | WHERE c_id = $course_id AND lp.session_id = 0"; |
60 | 60 | $rs_lp = Database::query($sql_lp); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | ); |
68 | 68 | |
69 | 69 | $total_tools = 0; |
70 | - foreach($total_tools_list as $tool) { |
|
70 | + foreach ($total_tools_list as $tool) { |
|
71 | 71 | $total_tools += $tool['count_access_tool']; |
72 | 72 | } |
73 | 73 | |
@@ -93,16 +93,16 @@ discard block |
||
93 | 93 | if (!empty($students)) { |
94 | 94 | foreach ($students as $student_id) { |
95 | 95 | $avg_student_progress = Tracking::get_avg_student_progress($student_id, $course_code, array($lp_id), $session_id); |
96 | - $myavg_temp = Tracking::get_avg_student_score($student_id, $course_code, array($lp_id), $session_id); |
|
96 | + $myavg_temp = Tracking::get_avg_student_score($student_id, $course_code, array($lp_id), $session_id); |
|
97 | 97 | $avg_progress_in_course = Tracking::get_avg_student_progress($student_id, $course_code, array($lp_id), $session_id); |
98 | 98 | |
99 | 99 | if (intval($avg_progress_in_course) == 100) { |
100 | 100 | $count_students_complete_all_activities++; |
101 | 101 | } |
102 | 102 | if (intval($avg_progress_in_course) > 0 && intval($avg_progress_in_course) <= 50) { |
103 | - $count_students_complete_all_activities_at_50 ++; |
|
103 | + $count_students_complete_all_activities_at_50++; |
|
104 | 104 | } |
105 | - $total_average_progress +=$avg_progress_in_course; |
|
105 | + $total_average_progress += $avg_progress_in_course; |
|
106 | 106 | |
107 | 107 | $time_spent = Tracking::get_time_spent_on_the_course($student_id, $course_id, $session_id); |
108 | 108 | $total_time_spent += $time_spent; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ORDER BY item_type"; |
140 | 140 | $res_lpi = Database::query($sql_lpi); |
141 | 141 | while ($row_lpi = Database::fetch_array($res_lpi)) { |
142 | - switch($row_lpi['item_type']) { |
|
142 | + switch ($row_lpi['item_type']) { |
|
143 | 143 | case 'document': |
144 | 144 | $array[$i]['learnpath_docs']++; |
145 | 145 | break; |
@@ -171,10 +171,10 @@ discard block |
||
171 | 171 | |
172 | 172 | if (!empty($student_count)) { |
173 | 173 | $array[$i]['count_students_accessing'] = $count_students_accessing; |
174 | - $array[$i]['count_students_accessing_percentage'] = round($count_students_accessing / $student_count *100 , 0); |
|
174 | + $array[$i]['count_students_accessing_percentage'] = round($count_students_accessing / $student_count * 100, 0); |
|
175 | 175 | $array[$i]['count_students_complete_all_activities_at_50'] = $count_students_complete_all_activities; |
176 | - $array[$i]['count_students_complete_all_activities'] = round($count_students_complete_all_activities / $student_count *100 , 0);; |
|
177 | - $array[$i]['average_percentage_activities_completed_per_student'] = round($count_students_complete_all_activities/$student_count*100,2); |
|
176 | + $array[$i]['count_students_complete_all_activities'] = round($count_students_complete_all_activities / $student_count * 100, 0); ; |
|
177 | + $array[$i]['average_percentage_activities_completed_per_student'] = round($count_students_complete_all_activities / $student_count * 100, 2); |
|
178 | 178 | $array[$i]['total_time_spent'] = 0; |
179 | 179 | $array[$i]['average_time_spent_per_student'] = 0; |
180 | 180 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | exit; |
242 | 242 | } |
243 | 243 | |
244 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
244 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
245 | 245 | |
246 | 246 | Display::display_header(get_lang('CurrentCourses')); |
247 | 247 |
@@ -89,15 +89,15 @@ discard block |
||
89 | 89 | $group[] =& $form->createElement('select', 'auth_source', null, $auth_sources); |
90 | 90 | $group[] =& $form->createElement('static', '', '', '<br />'); |
91 | 91 | }*/ |
92 | -$group[] =& $form->createElement('radio', 'password_auto', get_lang('Password'), get_lang('AutoGeneratePassword').'<br />', 1); |
|
93 | -$group[] =& $form->createElement('radio', 'password_auto', 'id="radio_user_password"', null, 0); |
|
94 | -$group[] =& $form->createElement('password', 'password', null, array('onkeydown' => 'javascript: password_switch_radio_button(document.user_add,"password[password_auto]");')); |
|
92 | +$group[] = & $form->createElement('radio', 'password_auto', get_lang('Password'), get_lang('AutoGeneratePassword').'<br />', 1); |
|
93 | +$group[] = & $form->createElement('radio', 'password_auto', 'id="radio_user_password"', null, 0); |
|
94 | +$group[] = & $form->createElement('password', 'password', null, array('onkeydown' => 'javascript: password_switch_radio_button(document.user_add,"password[password_auto]");')); |
|
95 | 95 | $form->addGroup($group, 'password', get_lang('Password'), ''); |
96 | 96 | |
97 | 97 | // Send email |
98 | 98 | $group = array(); |
99 | -$group[] =& $form->createElement('radio', 'send_mail', null, get_lang('Yes'), 1); |
|
100 | -$group[] =& $form->createElement('radio', 'send_mail', null, get_lang('No'), 0); |
|
99 | +$group[] = & $form->createElement('radio', 'send_mail', null, get_lang('Yes'), 1); |
|
100 | +$group[] = & $form->createElement('radio', 'send_mail', null, get_lang('No'), 0); |
|
101 | 101 | $form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), ' '); |
102 | 102 | |
103 | 103 | // Set default values |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $form->setDefaults($defaults); |
110 | 110 | // Submit button |
111 | -$select_level = array (); |
|
111 | +$select_level = array(); |
|
112 | 112 | $html_results_enabled[] = $form->addButtonUpdate(get_lang('Update'), 'submit', true); |
113 | 113 | $form->addGroup($html_results_enabled); |
114 | 114 | // Validate form |
@@ -169,17 +169,17 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | $emailbody = get_lang('Dear')." ".stripslashes(api_get_person_name($userInfo['firstname'], $userInfo['lastname'])).",\n\n". |
172 | - get_lang('YouAreReg')." ". api_get_setting('siteName') ." ".get_lang('WithTheFollowingSettings')."\n\n". |
|
173 | - get_lang('Username')." : ". $username ."\n". get_lang('Pass')." : ".stripslashes($password)."\n\n" . |
|
174 | - get_lang('Address') ." ". api_get_setting('siteName') ." ". |
|
175 | - get_lang('Is') ." : ".$portal_url."\n\n". |
|
176 | - get_lang('Problem'). "\n\n". |
|
172 | + get_lang('YouAreReg')." ".api_get_setting('siteName')." ".get_lang('WithTheFollowingSettings')."\n\n". |
|
173 | + get_lang('Username')." : ".$username."\n".get_lang('Pass')." : ".stripslashes($password)."\n\n". |
|
174 | + get_lang('Address')." ".api_get_setting('siteName')." ". |
|
175 | + get_lang('Is')." : ".$portal_url."\n\n". |
|
176 | + get_lang('Problem')."\n\n". |
|
177 | 177 | get_lang('SignatureFormula').",\n\n". |
178 | 178 | api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n". |
179 | - get_lang('Manager'). " ". |
|
179 | + get_lang('Manager')." ". |
|
180 | 180 | api_get_setting('siteName')."\nT. ". |
181 | - api_get_setting('administratorTelephone')."\n" . |
|
182 | - get_lang('Email') ." : ".api_get_setting('emailAdministrator'); |
|
181 | + api_get_setting('administratorTelephone')."\n". |
|
182 | + get_lang('Email')." : ".api_get_setting('emailAdministrator'); |
|
183 | 183 | |
184 | 184 | api_mail_html( |
185 | 185 | api_get_person_name($userInfo['firstname'], $userInfo['lastname'], null, PERSON_NAME_EMAIL_ADDRESS), |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | $session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0; |
28 | 28 | |
29 | 29 | $is_coach = api_is_coach($session_id); |
30 | -$is_platform_admin = api_is_platform_admin(); |
|
31 | -$is_drh = api_is_drh(); |
|
32 | -$is_session_admin = api_is_session_admin(); |
|
30 | +$is_platform_admin = api_is_platform_admin(); |
|
31 | +$is_drh = api_is_drh(); |
|
32 | +$is_session_admin = api_is_session_admin(); |
|
33 | 33 | |
34 | -$count_sessions = 0; |
|
35 | -$count_courses = 0; |
|
36 | -$title = null; |
|
34 | +$count_sessions = 0; |
|
35 | +$count_courses = 0; |
|
36 | +$title = null; |
|
37 | 37 | |
38 | 38 | // Access control |
39 | 39 | api_block_anonymous_users(); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | echo '</span>'; |
125 | 125 | |
126 | 126 | if (!empty($session_id) && |
127 | - !in_array($display, array('accessoverview','lpprogressoverview','progressoverview','exerciseprogress', 'surveyoverview')) |
|
127 | + !in_array($display, array('accessoverview', 'lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview')) |
|
128 | 128 | ) { |
129 | 129 | echo '<a href="index.php">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
130 | 130 | if (!api_is_platform_admin()) { |
@@ -144,19 +144,19 @@ discard block |
||
144 | 144 | } |
145 | 145 | } else { |
146 | 146 | echo Display::url( |
147 | - Display::return_icon('stats.png', get_lang('MyStats'),'',ICON_SIZE_MEDIUM), |
|
147 | + Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), |
|
148 | 148 | api_get_path(WEB_CODE_PATH)."auth/my_progress.php" |
149 | 149 | ); |
150 | 150 | echo Display::url( |
151 | 151 | Display::return_icon("certificate_list.png", get_lang("GradebookSeeListOfStudentsCertificates"), array(), ICON_SIZE_MEDIUM), |
152 | - api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php" |
|
152 | + api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php" |
|
153 | 153 | ); |
154 | 154 | } |
155 | 155 | |
156 | 156 | // Actions menu |
157 | 157 | $nb_menu_items = count($menu_items); |
158 | 158 | if (empty($session_id) || |
159 | - in_array($display, array('accessoverview','lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview')) |
|
159 | + in_array($display, array('accessoverview', 'lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview')) |
|
160 | 160 | ) { |
161 | 161 | if ($nb_menu_items > 1) { |
162 | 162 | foreach ($menu_items as $key => $item) { |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | echo '</div>'; |
169 | 169 | |
170 | -$userId = api_get_user_id(); |
|
170 | +$userId = api_get_user_id(); |
|
171 | 171 | $stats = Tracking::getStats($userId); |
172 | 172 | |
173 | 173 | $students = $stats['students']; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | if (!empty($students)) { |
208 | 208 | // Students |
209 | 209 | $nb_students = count($students); |
210 | - $progress = Tracking::get_avg_student_progress($studentIds); |
|
210 | + $progress = Tracking::get_avg_student_progress($studentIds); |
|
211 | 211 | $countAssignments = Tracking::count_student_assignments($studentIds); |
212 | 212 | $studentIds = array_values($students); |
213 | 213 | $countHumanResourcesUsers = count($humanResourcesUsers); |
@@ -16,14 +16,14 @@ |
||
16 | 16 | $this_section = SECTION_TRACKING; |
17 | 17 | |
18 | 18 | api_block_anonymous_users(); |
19 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
19 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
20 | 20 | Display :: display_header($nameTools); |
21 | 21 | |
22 | 22 | // Database Table Definitions |
23 | -$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
24 | -$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
23 | +$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
24 | +$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
25 | 25 | $tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
26 | -$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
26 | +$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
27 | 27 | $tbl_track_exercice = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
28 | 28 | |
29 | 29 | /* |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | $nameTools = get_lang('Tutors'); |
17 | 17 | |
18 | 18 | api_block_anonymous_users(); |
19 | -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
19 | +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); |
|
20 | 20 | |
21 | 21 | if (isset($_GET["id_student"])) { |
22 | - $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang('Students')); |
|
22 | + $interbreadcrumb[] = array("url" => "student.php", "name" => get_lang('Students')); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | Display :: display_header($nameTools); |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | api_display_tool_title($nameTools); |
28 | 28 | |
29 | 29 | // Database Table Definitions |
30 | -$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
31 | -$tbl_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); |
|
32 | -$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
33 | -$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
34 | -$tbl_session_rel_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
35 | -$tbl_session_rel_course_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
36 | -$tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER); |
|
37 | -$tbl_track_login = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
|
30 | +$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
31 | +$tbl_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); |
|
32 | +$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
33 | +$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
34 | +$tbl_session_rel_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
35 | +$tbl_session_rel_course_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
36 | +$tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER); |
|
37 | +$tbl_track_login = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * MAIN PART |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | } |
215 | 215 | echo '</table>'; |
216 | 216 | |
217 | -if (isset($_POST['export'])){ |
|
217 | +if (isset($_POST['export'])) { |
|
218 | 218 | export_csv($header, $data, 'coaches.csv'); |
219 | 219 | } |
220 | 220 | |
@@ -222,8 +222,8 @@ discard block |
||
222 | 222 | echo " |
223 | 223 | <br /><br /> |
224 | 224 | <form method='post' action='coaches.php'> |
225 | - <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'> |
|
226 | - " . get_lang('ExportExcel') . " |
|
225 | + <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel')."'> |
|
226 | + " . get_lang('ExportExcel')." |
|
227 | 227 | </button> |
228 | 228 | <form> |
229 | 229 | "; |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | $tool_name = get_lang('ImportUserListXMLCSV'); |
16 | 16 | api_block_anonymous_users(); |
17 | 17 | |
18 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
18 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('MySpace')); |
|
19 | 19 | $id_session = ''; |
20 | 20 | if (isset($_GET['id_session']) && $_GET['id_session'] != '') { |
21 | 21 | $id_session = intval($_GET['id_session']); |
22 | - $interbreadcrumb[] = array ('url' => 'session.php', 'name' => get_lang('Sessions')); |
|
23 | - $interbreadcrumb[] = array ('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); |
|
22 | + $interbreadcrumb[] = array('url' => 'session.php', 'name' => get_lang('Sessions')); |
|
23 | + $interbreadcrumb[] = array('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | // Set this option to true to enforce strict purification for usenames. |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | if (count($errors) == 0) { |
64 | 64 | if (!empty($id_session)) { |
65 | - $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
65 | + $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
66 | 66 | // Selecting all the courses from the session id requested. |
67 | 67 | $sql = "SELECT c_id FROM $tbl_session_rel_course WHERE session_id ='$id_session'"; |
68 | 68 | $result = Database::query($sql); |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | |
104 | 104 | $form = new FormValidator('user_import'); |
105 | 105 | $form->addElement('hidden', 'formSent'); |
106 | -$form->addElement('hidden', 'id_session',$id_session); |
|
106 | +$form->addElement('hidden', 'id_session', $id_session); |
|
107 | 107 | $form->addElement('file', 'import_file', get_lang('ImportFileLocation')); |
108 | 108 | $form->addRule('import_file', get_lang('ThisFieldIsRequired'), 'required'); |
109 | -$allowed_file_types = array ('xml', 'csv'); |
|
109 | +$allowed_file_types = array('xml', 'csv'); |
|
110 | 110 | $form->addRule('import_file', get_lang('InvalidExtension').' ('.implode(',', $allowed_file_types).')', 'filetype', $allowed_file_types); |
111 | 111 | $form->addElement('radio', 'file_type', get_lang('FileType'), 'XML (<a href="../admin/example.xml" target="_blank">'.get_lang('ExampleXMLFile').'</a>)', 'xml'); |
112 | 112 | $form->addElement('radio', 'file_type', null, 'CSV (<a href="../admin/example.csv" target="_blank">'.get_lang('ExampleCSVFile').'</a>)', 'csv'); |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | } |
36 | 36 | $sql = "SELECT user.user_id,lastname,firstname,email |
37 | 37 | FROM $tbl_user as user, $tbl_admin as admin |
38 | - WHERE admin.user_id=user.user_id" . $order_clause; |
|
38 | + WHERE admin.user_id=user.user_id".$order_clause; |
|
39 | 39 | $result_admins = Database::query($sql); |
40 | 40 | |
41 | 41 | if (api_is_western_name_order()) { |
42 | - echo '<table class="data_table"><tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
42 | + echo '<table class="data_table"><tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
43 | 43 | } else { |
44 | - echo '<table class="data_table"><tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
44 | + echo '<table class="data_table"><tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | $css_class = "row_odd"; |
66 | 66 | if ($i % 20 == 0 && $i != 0) { |
67 | 67 | if (api_is_western_name_order()) { |
68 | - echo '<tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
68 | + echo '<tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
69 | 69 | } else { |
70 | - echo '<tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>'; |
|
70 | + echo '<tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | } else { |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $i++; |
78 | 78 | |
79 | 79 | if (api_is_western_name_order()) { |
80 | - echo "<tr class=" . $css_class . "><td>$firstname</td><td>$lastname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>"; |
|
80 | + echo "<tr class=".$css_class."><td>$firstname</td><td>$lastname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; |
|
81 | 81 | } else { |
82 | - echo "<tr class=" . $css_class . "><td>$lastname</td><td>$firstname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>"; |
|
82 | + echo "<tr class=".$css_class."><td>$lastname</td><td>$firstname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | } else { |
95 | 95 | // No results |
96 | - echo '<tr><td colspan="3">' . get_lang('NoResults') . '</td></tr>'; |
|
96 | + echo '<tr><td colspan="3">'.get_lang('NoResults').'</td></tr>'; |
|
97 | 97 | } |
98 | 98 | echo '</table>'; |
99 | 99 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | echo " |
105 | 105 | <br /><br /> |
106 | 106 | <form method='post' action='admin.php'> |
107 | - <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'> |
|
108 | - " . get_lang('ExportExcel') . " |
|
107 | + <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel')."'> |
|
108 | + " . get_lang('ExportExcel')." |
|
109 | 109 | </button> |
110 | 110 | <form> |
111 | 111 | "; |