@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | if (!$is_allowedToEdit) { |
48 | - // api_not_allowed(); |
|
48 | + // api_not_allowed(); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if (!empty($_REQUEST['path'])) { |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | get_lang('Actions') |
191 | 191 | ); |
192 | 192 | |
193 | - // Column config |
|
194 | - // @todo fix search firstname/lastname that doesn't work. rmove search for the moment |
|
195 | - $column_model = array( |
|
193 | + // Column config |
|
194 | + // @todo fix search firstname/lastname that doesn't work. rmove search for the moment |
|
195 | + $column_model = array( |
|
196 | 196 | array('name'=>'firstname', 'index'=>'firstname', 'width'=>'50', 'align'=>'left', 'search' => 'false'), |
197 | 197 | array('name'=>'lastname', 'index'=>'lastname', 'width'=>'50', 'align'=>'left', 'formatter'=>'action_formatter', 'search' => 'false'), |
198 | 198 | array('name'=>'login', 'hidden'=>'true', 'index'=>'username', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
@@ -16,7 +16,6 @@ |
||
16 | 16 | * @author Patrick Cool |
17 | 17 | * @author René Haentjens, added CSV file import (October 2004) |
18 | 18 | * @package chamilo.link |
19 | - |
|
20 | 19 | */ |
21 | 20 | |
22 | 21 | // Including libraries |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $actions = array('listing', 'store_user_block', 'disable_block'); |
27 | 27 | $action = 'listing'; |
28 | 28 | if (isset($_GET['action']) && in_array($_GET['action'],$actions)) { |
29 | - $action = $_GET['action']; |
|
29 | + $action = $_GET['action']; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | // load styles from dashboard plugins |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $dashboard_controller = new DashboardController(); |
38 | 38 | |
39 | 39 | if (isset($_GET['path'])) { |
40 | - $path = $_GET['path']; |
|
40 | + $path = $_GET['path']; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // distpacher actions to controller |
@@ -21,17 +21,17 @@ |
||
21 | 21 | |
22 | 22 | if ($ldap_login_success) |
23 | 23 | { |
24 | - //error_log('Found user '.$login.' on LDAP server',0); |
|
25 | - /* |
|
24 | + //error_log('Found user '.$login.' on LDAP server',0); |
|
25 | + /* |
|
26 | 26 | In here, we know that |
27 | 27 | - the user does not exist in dokeos |
28 | 28 | - the users login and password are correct |
29 | 29 | */ |
30 | - $info_array = ldap_find_user_info($login); |
|
31 | - ldap_put_user_info_locally($login, $info_array); |
|
30 | + $info_array = ldap_find_user_info($login); |
|
31 | + ldap_put_user_info_locally($login, $info_array); |
|
32 | 32 | } else { |
33 | 33 | //error_log('Could not find '.$login.' on LDAP server',0); |
34 | - $loginFailed = true; |
|
35 | - unset($_user['user_id']); |
|
36 | - $uidReset = false; |
|
34 | + $loginFailed = true; |
|
35 | + unset($_user['user_id']); |
|
36 | + $uidReset = false; |
|
37 | 37 | } |
@@ -20,16 +20,16 @@ |
||
20 | 20 | $users = Database::get_main_table(TABLE_MAIN_USER); |
21 | 21 | $string=''; |
22 | 22 | foreach ($list as $mail) { |
23 | - $mail = trim($mail); |
|
24 | - $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n"; |
|
25 | - $res = Database::query($sql); |
|
26 | - if ($res === false) { die(mysql_error());} |
|
27 | - if (Database::num_rows($res) == 0) { |
|
23 | + $mail = trim($mail); |
|
24 | + $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n"; |
|
25 | + $res = Database::query($sql); |
|
26 | + if ($res === false) { die(mysql_error());} |
|
27 | + if (Database::num_rows($res) == 0) { |
|
28 | 28 | $string .= 'No encontrado;'.$row['email']; |
29 | - } else { |
|
29 | + } else { |
|
30 | 30 | $row = Database::fetch_assoc($res); |
31 | - $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n"; |
|
32 | - } |
|
31 | + $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n"; |
|
32 | + } |
|
33 | 33 | } |
34 | 34 | echo $string; |
35 | 35 | file_put_contents('/tmp/list.txt',$string); |
@@ -29,20 +29,20 @@ discard block |
||
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); |
|
33 | - $access_url_id = api_get_current_access_url_id(); |
|
34 | - if ($access_url_id != -1){ |
|
35 | - $sql = "SELECT code,visual_code,title |
|
32 | + $tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
|
33 | + $access_url_id = api_get_current_access_url_id(); |
|
34 | + if ($access_url_id != -1){ |
|
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 |
38 | 38 | ON (c.id = course_rel_url.c_id) |
39 | 39 | WHERE access_url_id = $access_url_id |
40 | 40 | ORDER BY visual_code"; |
41 | - } |
|
41 | + } |
|
42 | 42 | } |
43 | 43 | $result = Database::query($sql); |
44 | 44 | while ($course = Database::fetch_object($result)) { |
45 | - $courses[$course->code] = $course->visual_code.' - '.$course->title; |
|
45 | + $courses[$course->code] = $course->visual_code.' - '.$course->title; |
|
46 | 46 | } |
47 | 47 | $form = new FormValidator('export_users'); |
48 | 48 | $form->addElement('header', $tool_name); |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | $form->setDefaults(array('file_type' => 'csv')); |
57 | 57 | |
58 | 58 | if ($form->validate()) { |
59 | - $export = $form->exportValues(); |
|
60 | - $file_type = $export['file_type']; |
|
61 | - $course_code = Database::escape_string($export['course_code']); |
|
62 | - $courseInfo = api_get_course_info($course_code); |
|
63 | - $courseId = $courseInfo['real_id']; |
|
59 | + $export = $form->exportValues(); |
|
60 | + $file_type = $export['file_type']; |
|
61 | + $course_code = Database::escape_string($export['course_code']); |
|
62 | + $courseInfo = api_get_course_info($course_code); |
|
63 | + $courseId = $courseInfo['real_id']; |
|
64 | 64 | |
65 | - $sql = "SELECT |
|
65 | + $sql = "SELECT |
|
66 | 66 | u.user_id AS UserId, |
67 | 67 | u.lastname AS LastName, |
68 | 68 | u.firstname AS FirstName, |
@@ -73,96 +73,96 @@ discard block |
||
73 | 73 | u.status AS Status, |
74 | 74 | u.official_code AS OfficialCode, |
75 | 75 | u.phone AS Phone"; |
76 | - if (strlen($course_code) > 0) { |
|
77 | - $sql .= " FROM $user_table u, $course_user_table cu |
|
76 | + if (strlen($course_code) > 0) { |
|
77 | + $sql .= " FROM $user_table u, $course_user_table cu |
|
78 | 78 | WHERE |
79 | 79 | u.user_id = cu.user_id AND |
80 | 80 | cu.c_id = $courseId AND |
81 | 81 | cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." |
82 | 82 | ORDER BY lastname,firstname"; |
83 | - $filename = 'export_users_'.$course_code.'_'.api_get_local_time(); |
|
84 | - } else { |
|
85 | - if (api_is_multiple_url_enabled()) { |
|
86 | - $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
87 | - $access_url_id = api_get_current_access_url_id(); |
|
88 | - if ($access_url_id != -1) { |
|
89 | - $sql.= " FROM $user_table u |
|
83 | + $filename = 'export_users_'.$course_code.'_'.api_get_local_time(); |
|
84 | + } else { |
|
85 | + if (api_is_multiple_url_enabled()) { |
|
86 | + $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
87 | + $access_url_id = api_get_current_access_url_id(); |
|
88 | + if ($access_url_id != -1) { |
|
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 |
93 | 93 | ORDER BY lastname,firstname"; |
94 | - } |
|
95 | - } else { |
|
96 | - $sql .= " FROM $user_table u ORDER BY lastname,firstname"; |
|
97 | - } |
|
98 | - $filename = 'export_users_'.api_get_local_time(); |
|
99 | - } |
|
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') { |
|
103 | - if ($_configuration['password_encryption'] != 'none') { |
|
104 | - $data[] = array( |
|
105 | - 'UserId', |
|
106 | - 'LastName', |
|
107 | - 'FirstName', |
|
108 | - 'Email', |
|
109 | - 'UserName', |
|
110 | - 'AuthSource', |
|
111 | - 'Status', |
|
112 | - 'OfficialCode', |
|
113 | - 'PhoneNumber', |
|
114 | - ); |
|
115 | - } else { |
|
116 | - $data[] = array( |
|
117 | - 'UserId', |
|
118 | - 'LastName', |
|
119 | - 'FirstName', |
|
120 | - 'Email', |
|
121 | - 'UserName', |
|
122 | - 'Password', |
|
123 | - 'AuthSource', |
|
124 | - 'Status', |
|
125 | - 'OfficialCode', |
|
126 | - 'PhoneNumber', |
|
127 | - ); |
|
128 | - } |
|
129 | - |
|
130 | - foreach($extra_fields as $extra) { |
|
131 | - $data[0][]=$extra[1]; |
|
132 | - } |
|
133 | - } |
|
134 | - |
|
135 | - $res = Database::query($sql); |
|
136 | - while($user = Database::fetch_array($res,'ASSOC')) { |
|
137 | - $student_data = UserManager:: get_extra_user_data( |
|
138 | - $user['UserId'], |
|
139 | - true, |
|
140 | - false |
|
141 | - ); |
|
142 | - foreach($student_data as $key=>$value) { |
|
143 | - $key = substr($key, 6); |
|
144 | - if (is_array($value)) { |
|
145 | - $user[$key] = $value[$key]; |
|
146 | - } else { |
|
147 | - $user[$key] = $value; |
|
148 | - } |
|
149 | - } |
|
150 | - $data[] = $user ; |
|
151 | - } |
|
152 | - |
|
153 | - switch ($file_type) { |
|
154 | - case 'xml': |
|
155 | - Export::arrayToXml($data, $filename, 'Contact', 'Contacts'); |
|
156 | - exit; |
|
157 | - break; |
|
158 | - case 'csv': |
|
159 | - Export::arrayToCsv($data, $filename); |
|
160 | - exit; |
|
161 | - case 'xls': |
|
162 | - Export::arrayToXls($data, $filename); |
|
163 | - exit; |
|
164 | - break; |
|
165 | - } |
|
94 | + } |
|
95 | + } else { |
|
96 | + $sql .= " FROM $user_table u ORDER BY lastname,firstname"; |
|
97 | + } |
|
98 | + $filename = 'export_users_'.api_get_local_time(); |
|
99 | + } |
|
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') { |
|
103 | + if ($_configuration['password_encryption'] != 'none') { |
|
104 | + $data[] = array( |
|
105 | + 'UserId', |
|
106 | + 'LastName', |
|
107 | + 'FirstName', |
|
108 | + 'Email', |
|
109 | + 'UserName', |
|
110 | + 'AuthSource', |
|
111 | + 'Status', |
|
112 | + 'OfficialCode', |
|
113 | + 'PhoneNumber', |
|
114 | + ); |
|
115 | + } else { |
|
116 | + $data[] = array( |
|
117 | + 'UserId', |
|
118 | + 'LastName', |
|
119 | + 'FirstName', |
|
120 | + 'Email', |
|
121 | + 'UserName', |
|
122 | + 'Password', |
|
123 | + 'AuthSource', |
|
124 | + 'Status', |
|
125 | + 'OfficialCode', |
|
126 | + 'PhoneNumber', |
|
127 | + ); |
|
128 | + } |
|
129 | + |
|
130 | + foreach($extra_fields as $extra) { |
|
131 | + $data[0][]=$extra[1]; |
|
132 | + } |
|
133 | + } |
|
134 | + |
|
135 | + $res = Database::query($sql); |
|
136 | + while($user = Database::fetch_array($res,'ASSOC')) { |
|
137 | + $student_data = UserManager:: get_extra_user_data( |
|
138 | + $user['UserId'], |
|
139 | + true, |
|
140 | + false |
|
141 | + ); |
|
142 | + foreach($student_data as $key=>$value) { |
|
143 | + $key = substr($key, 6); |
|
144 | + if (is_array($value)) { |
|
145 | + $user[$key] = $value[$key]; |
|
146 | + } else { |
|
147 | + $user[$key] = $value; |
|
148 | + } |
|
149 | + } |
|
150 | + $data[] = $user ; |
|
151 | + } |
|
152 | + |
|
153 | + switch ($file_type) { |
|
154 | + case 'xml': |
|
155 | + Export::arrayToXml($data, $filename, 'Contact', 'Contacts'); |
|
156 | + exit; |
|
157 | + break; |
|
158 | + case 'csv': |
|
159 | + Export::arrayToCsv($data, $filename); |
|
160 | + exit; |
|
161 | + case 'xls': |
|
162 | + Export::arrayToXls($data, $filename); |
|
163 | + exit; |
|
164 | + break; |
|
165 | + } |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | Display :: display_header($tool_name); |
@@ -13,19 +13,19 @@ discard block |
||
13 | 13 | $s->register( |
14 | 14 | 'WSSession.CreateSession', |
15 | 15 | array( |
16 | - 'secret_key' => 'xsd:string', |
|
17 | - 'name' => 'xsd:string', |
|
18 | - 'start_date' => 'xsd:string', |
|
19 | - 'end_date' => 'xsd:string', |
|
20 | - 'nb_days_access_before' => 'xsd:int', |
|
21 | - 'nb_days_access_after' => 'xsd:int', |
|
22 | - 'nolimit' => 'xsd:int', |
|
23 | - 'visibility' => 'xsd:int', |
|
24 | - 'user_id_field_name' => 'xsd:string', |
|
25 | - 'user_id_value' => 'xsd:string', |
|
26 | - 'session_id_field_name' => 'xsd:string', |
|
27 | - 'session_id_value' => 'xsd:string', |
|
28 | - 'extras' => 'tns:extra_field' |
|
16 | + 'secret_key' => 'xsd:string', |
|
17 | + 'name' => 'xsd:string', |
|
18 | + 'start_date' => 'xsd:string', |
|
19 | + 'end_date' => 'xsd:string', |
|
20 | + 'nb_days_access_before' => 'xsd:int', |
|
21 | + 'nb_days_access_after' => 'xsd:int', |
|
22 | + 'nolimit' => 'xsd:int', |
|
23 | + 'visibility' => 'xsd:int', |
|
24 | + 'user_id_field_name' => 'xsd:string', |
|
25 | + 'user_id_value' => 'xsd:string', |
|
26 | + 'session_id_field_name' => 'xsd:string', |
|
27 | + 'session_id_value' => 'xsd:string', |
|
28 | + 'extras' => 'tns:extra_field' |
|
29 | 29 | ), |
30 | 30 | array('return' => 'xsd:int') |
31 | 31 | ); |
@@ -33,50 +33,50 @@ discard block |
||
33 | 33 | $s->register( |
34 | 34 | 'WSSession.DeleteSession', |
35 | 35 | array( |
36 | - 'secret_key' => 'xsd:string', |
|
37 | - 'session_id_field_name' => 'xsd:string', |
|
38 | - 'session_id_value' => 'xsd:string' |
|
36 | + 'secret_key' => 'xsd:string', |
|
37 | + 'session_id_field_name' => 'xsd:string', |
|
38 | + 'session_id_value' => 'xsd:string' |
|
39 | 39 | ) |
40 | 40 | ); |
41 | 41 | |
42 | 42 | $s->register( |
43 | 43 | 'WSSession.EditSession', |
44 | 44 | array( |
45 | - 'secret_key' => 'xsd:string', |
|
46 | - 'name' => 'xsd:string', |
|
47 | - 'start_date' => 'xsd:string', |
|
48 | - 'end_date' => 'xsd:string', |
|
49 | - 'nb_days_access_before' => 'xsd:int', |
|
50 | - 'nb_days_access_after' => 'xsd:int', |
|
51 | - 'nolimit' => 'xsd:int', |
|
52 | - 'visibility' => 'xsd:int', |
|
53 | - 'user_id_field_name' => 'xsd:string', |
|
54 | - 'user_id_value' => 'xsd:string', |
|
55 | - 'session_id_field_name' => 'xsd:string', |
|
56 | - 'session_id_value' => 'xsd:string', |
|
57 | - 'extras' => 'tns:extra_field' |
|
45 | + 'secret_key' => 'xsd:string', |
|
46 | + 'name' => 'xsd:string', |
|
47 | + 'start_date' => 'xsd:string', |
|
48 | + 'end_date' => 'xsd:string', |
|
49 | + 'nb_days_access_before' => 'xsd:int', |
|
50 | + 'nb_days_access_after' => 'xsd:int', |
|
51 | + 'nolimit' => 'xsd:int', |
|
52 | + 'visibility' => 'xsd:int', |
|
53 | + 'user_id_field_name' => 'xsd:string', |
|
54 | + 'user_id_value' => 'xsd:string', |
|
55 | + 'session_id_field_name' => 'xsd:string', |
|
56 | + 'session_id_value' => 'xsd:string', |
|
57 | + 'extras' => 'tns:extra_field' |
|
58 | 58 | ) |
59 | 59 | ); |
60 | 60 | |
61 | 61 | $s->register( |
62 | 62 | 'WSSession.SubscribeUserToSession', |
63 | 63 | array( |
64 | - 'secret_key' => 'xsd:string', |
|
65 | - 'user_id_field_name' => 'xsd:string', |
|
66 | - 'user_id_value' => 'xsd:string', |
|
67 | - 'session_id_field_name' => 'xsd:string', |
|
68 | - 'session_id_value' => 'xsd:string' |
|
64 | + 'secret_key' => 'xsd:string', |
|
65 | + 'user_id_field_name' => 'xsd:string', |
|
66 | + 'user_id_value' => 'xsd:string', |
|
67 | + 'session_id_field_name' => 'xsd:string', |
|
68 | + 'session_id_value' => 'xsd:string' |
|
69 | 69 | ) |
70 | 70 | ); |
71 | 71 | |
72 | 72 | $s->register( |
73 | 73 | 'WSSession.UnsubscribeUserFromSession', |
74 | 74 | array( |
75 | - 'secret_key' => 'xsd:string', |
|
76 | - 'user_id_field_name' => 'xsd:string', |
|
77 | - 'user_id_value' => 'xsd:string', |
|
78 | - 'session_id_field_name' => 'xsd:string', |
|
79 | - 'session_id_value' => 'xsd:string' |
|
75 | + 'secret_key' => 'xsd:string', |
|
76 | + 'user_id_field_name' => 'xsd:string', |
|
77 | + 'user_id_value' => 'xsd:string', |
|
78 | + 'session_id_field_name' => 'xsd:string', |
|
79 | + 'session_id_value' => 'xsd:string' |
|
80 | 80 | ) |
81 | 81 | ); |
82 | 82 | |
@@ -84,46 +84,46 @@ discard block |
||
84 | 84 | 'WSSession.SubscribeTeacherToSessionCourse', |
85 | 85 | array( |
86 | 86 | 'secret_key' => 'xsd:string', |
87 | - 'user_id_field_name' => 'xsd:string', |
|
88 | - 'user_id_value' => 'xsd:string', |
|
89 | - 'session_id_field_name' => 'xsd:string', |
|
90 | - 'session_id_value' => 'xsd:string', |
|
87 | + 'user_id_field_name' => 'xsd:string', |
|
88 | + 'user_id_value' => 'xsd:string', |
|
89 | + 'session_id_field_name' => 'xsd:string', |
|
90 | + 'session_id_value' => 'xsd:string', |
|
91 | 91 | 'course_id_field_name' => 'xsd:string', |
92 | - 'course_id_value' => 'xsd:string' |
|
92 | + 'course_id_value' => 'xsd:string' |
|
93 | 93 | ) |
94 | 94 | ); |
95 | 95 | |
96 | 96 | $s->register( |
97 | 97 | 'WSSession.UnsubscribeTeacherFromSessionCourse', |
98 | 98 | array( |
99 | - 'secret_key' => 'xsd:string', |
|
100 | - 'user_id_field_name' => 'xsd:string', |
|
101 | - 'user_id_value' => 'xsd:string', |
|
102 | - 'session_id_field_name' => 'xsd:string', |
|
103 | - 'session_id_value' => 'xsd:string', |
|
99 | + 'secret_key' => 'xsd:string', |
|
100 | + 'user_id_field_name' => 'xsd:string', |
|
101 | + 'user_id_value' => 'xsd:string', |
|
102 | + 'session_id_field_name' => 'xsd:string', |
|
103 | + 'session_id_value' => 'xsd:string', |
|
104 | 104 | 'course_id_field_name' => 'xsd:string', |
105 | - 'course_id_value' => 'xsd:string' |
|
105 | + 'course_id_value' => 'xsd:string' |
|
106 | 106 | ) |
107 | 107 | ); |
108 | 108 | |
109 | 109 | $s->register( |
110 | 110 | 'WSSession.SubscribeCourseToSession', |
111 | 111 | array( |
112 | - 'secret_key' => 'xsd:string', |
|
113 | - 'course_id_field_name' => 'xsd:string', |
|
114 | - 'course_id_value' => 'xsd:string', |
|
115 | - 'session_id_field_name' => 'xsd:string', |
|
116 | - 'session_id_value' => 'xsd:string' |
|
112 | + 'secret_key' => 'xsd:string', |
|
113 | + 'course_id_field_name' => 'xsd:string', |
|
114 | + 'course_id_value' => 'xsd:string', |
|
115 | + 'session_id_field_name' => 'xsd:string', |
|
116 | + 'session_id_value' => 'xsd:string' |
|
117 | 117 | ) |
118 | 118 | ); |
119 | 119 | |
120 | 120 | $s->register( |
121 | 121 | 'WSSession.UnsubscribeCourseFromSession', |
122 | 122 | array( |
123 | - 'secret_key' => 'xsd:string', |
|
124 | - 'course_id_field_name' => 'xsd:string', |
|
125 | - 'course_id_value' => 'xsd:string', |
|
126 | - 'session_id_field_name' => 'xsd:string', |
|
127 | - 'session_id_value' => 'xsd:string' |
|
123 | + 'secret_key' => 'xsd:string', |
|
124 | + 'course_id_field_name' => 'xsd:string', |
|
125 | + 'course_id_value' => 'xsd:string', |
|
126 | + 'session_id_field_name' => 'xsd:string', |
|
127 | + 'session_id_value' => 'xsd:string' |
|
128 | 128 | ) |
129 | 129 | ); |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | $from_myspace = false; |
12 | 12 | $from_link = ''; |
13 | 13 | if (isset($_GET['from']) && $_GET['from'] == 'myspace') { |
14 | - $from_link = '&from=myspace'; |
|
15 | - $this_section = SECTION_TRACKING; |
|
14 | + $from_link = '&from=myspace'; |
|
15 | + $this_section = SECTION_TRACKING; |
|
16 | 16 | } else { |
17 | - $this_section = SECTION_COURSES; |
|
17 | + $this_section = SECTION_COURSES; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | $session_id = isset($_REQUEST['id_session']) && !empty($_REQUEST['id_session']) ? intval($_REQUEST['id_session']) : api_get_session_id(); |
@@ -35,19 +35,19 @@ discard block |
||
35 | 35 | if (!api_is_platform_admin(true) && |
36 | 36 | !CourseManager :: is_course_teacher(api_get_user_id(), $courseCode) && |
37 | 37 | !Tracking :: is_allowed_to_coach_student(api_get_user_id(), $user_id) && !api_is_drh() && !api_is_course_tutor()) { |
38 | - api_not_allowed(); |
|
38 | + api_not_allowed(); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | if ($origin == 'user_course') { |
42 | - $interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['name']); |
|
43 | - $interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$courseCode, "name" => get_lang("Users")); |
|
42 | + $interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['name']); |
|
43 | + $interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$courseCode, "name" => get_lang("Users")); |
|
44 | 44 | } else if($origin == 'tracking_course') { |
45 | - $interbreadcrumb[] = array ("url" => "../tracking/courseLog.php?cidReq=".$courseCode.'&id_session='.$session_id, "name" => get_lang("Tracking")); |
|
45 | + $interbreadcrumb[] = array ("url" => "../tracking/courseLog.php?cidReq=".$courseCode.'&id_session='.$session_id, "name" => get_lang("Tracking")); |
|
46 | 46 | } else { |
47 | - $interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
48 | - $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents")); |
|
49 | - $interbreadcrumb[] = array ("url" => "myStudents.php?student=".$user_id, "name" => get_lang("StudentDetails")); |
|
50 | - $nameTools=get_lang("DetailsStudentInCourse"); |
|
47 | + $interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
|
48 | + $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents")); |
|
49 | + $interbreadcrumb[] = array ("url" => "myStudents.php?student=".$user_id, "name" => get_lang("StudentDetails")); |
|
50 | + $nameTools=get_lang("DetailsStudentInCourse"); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $interbreadcrumb[] = array("url" => "myStudents.php?student=".$user_id."&course=".$courseCode."&details=true&origin=".$origin , "name" => get_lang("DetailsStudentInCourse")); |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | # |
101 | 101 | if (!function_exists('xml_parser_create')) { |
102 | 102 | $this->error( "Failed to load PHP's XML Extension. " . |
103 | - "http://www.php.net/manual/en/ref.xml.php", |
|
104 | - E_USER_ERROR ); |
|
103 | + "http://www.php.net/manual/en/ref.xml.php", |
|
104 | + E_USER_ERROR ); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | list($parser, $source) = $this->create_parser($source, |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | |
111 | 111 | if (!is_resource($parser)) { |
112 | 112 | $this->error( "Failed to create an instance of PHP's XML parser. " . |
113 | - "http://www.php.net/manual/en/ref.xml.php", |
|
114 | - E_USER_ERROR ); |
|
113 | + "http://www.php.net/manual/en/ref.xml.php", |
|
114 | + E_USER_ERROR ); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | |
@@ -447,9 +447,9 @@ discard block |
||
447 | 447 | } |
448 | 448 | |
449 | 449 | /** |
450 | - * return XML parser, and possibly re-encoded source |
|
451 | - * |
|
452 | - */ |
|
450 | + * return XML parser, and possibly re-encoded source |
|
451 | + * |
|
452 | + */ |
|
453 | 453 | public function create_parser($source, $out_enc, $in_enc, $detect) { |
454 | 454 | if ( substr(phpversion(),0,1) == 5) { |
455 | 455 | $parser = $this->php5_create_parser($in_enc, $detect); |
@@ -466,14 +466,14 @@ discard block |
||
466 | 466 | } |
467 | 467 | |
468 | 468 | /** |
469 | - * Instantiate an XML parser under PHP5 |
|
470 | - * |
|
471 | - * PHP5 will do a fine job of detecting input encoding |
|
472 | - * if passed an empty string as the encoding. |
|
473 | - * |
|
474 | - * All hail libxml2! |
|
475 | - * |
|
476 | - */ |
|
469 | + * Instantiate an XML parser under PHP5 |
|
470 | + * |
|
471 | + * PHP5 will do a fine job of detecting input encoding |
|
472 | + * if passed an empty string as the encoding. |
|
473 | + * |
|
474 | + * All hail libxml2! |
|
475 | + * |
|
476 | + */ |
|
477 | 477 | public function php5_create_parser($in_enc, $detect) { |
478 | 478 | // by default php5 does a fine job of detecting input encodings |
479 | 479 | if(!$detect && $in_enc) { |
@@ -485,20 +485,20 @@ discard block |
||
485 | 485 | } |
486 | 486 | |
487 | 487 | /** |
488 | - * Instaniate an XML parser under PHP4 |
|
489 | - * |
|
490 | - * Unfortunately PHP4's support for character encodings |
|
491 | - * and especially XML and character encodings sucks. As |
|
492 | - * long as the documents you parse only contain characters |
|
493 | - * from the ISO-8859-1 character set (a superset of ASCII, |
|
494 | - * and a subset of UTF-8) you're fine. However once you |
|
495 | - * step out of that comfy little world things get mad, bad, |
|
496 | - * and dangerous to know. |
|
497 | - * |
|
498 | - * The following code is based on SJM's work with FoF |
|
499 | - * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss |
|
500 | - * |
|
501 | - */ |
|
488 | + * Instaniate an XML parser under PHP4 |
|
489 | + * |
|
490 | + * Unfortunately PHP4's support for character encodings |
|
491 | + * and especially XML and character encodings sucks. As |
|
492 | + * long as the documents you parse only contain characters |
|
493 | + * from the ISO-8859-1 character set (a superset of ASCII, |
|
494 | + * and a subset of UTF-8) you're fine. However once you |
|
495 | + * step out of that comfy little world things get mad, bad, |
|
496 | + * and dangerous to know. |
|
497 | + * |
|
498 | + * The following code is based on SJM's work with FoF |
|
499 | + * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss |
|
500 | + * |
|
501 | + */ |
|
502 | 502 | public function php4_create_parser($source, $in_enc, $detect) { |
503 | 503 | if ( !$detect ) { |
504 | 504 | return array(xml_parser_create($in_enc), $source); |
@@ -542,8 +542,8 @@ discard block |
||
542 | 542 | |
543 | 543 | // else |
544 | 544 | $this->error("Feed is in an unsupported character encoding. ($in_enc) " . |
545 | - "You may see strange artifacts, and mangled characters.", |
|
546 | - E_USER_NOTICE); |
|
545 | + "You may see strange artifacts, and mangled characters.", |
|
546 | + E_USER_NOTICE); |
|
547 | 547 | |
548 | 548 | return array(xml_parser_create(), $source); |
549 | 549 | } |
@@ -589,17 +589,17 @@ discard block |
||
589 | 589 | // courtesy, Ryan Currie, [email protected] |
590 | 590 | |
591 | 591 | if (!function_exists('array_change_key_case')) { |
592 | - define("CASE_UPPER",1); |
|
593 | - define("CASE_LOWER",0); |
|
592 | + define("CASE_UPPER",1); |
|
593 | + define("CASE_LOWER",0); |
|
594 | 594 | |
595 | 595 | |
596 | - function array_change_key_case($array,$case=CASE_LOWER) { |
|
597 | - if ($case=CASE_LOWER) $cmd=strtolower; |
|
598 | - elseif ($case=CASE_UPPER) $cmd=strtoupper; |
|
599 | - foreach($array as $key=>$value) { |
|
600 | - $output[$cmd($key)]=$value; |
|
601 | - } |
|
602 | - return $output; |
|
603 | - } |
|
596 | + function array_change_key_case($array,$case=CASE_LOWER) { |
|
597 | + if ($case=CASE_LOWER) $cmd=strtolower; |
|
598 | + elseif ($case=CASE_UPPER) $cmd=strtoupper; |
|
599 | + foreach($array as $key=>$value) { |
|
600 | + $output[$cmd($key)]=$value; |
|
601 | + } |
|
602 | + return $output; |
|
603 | + } |
|
604 | 604 | |
605 | 605 | } |