@@ -15,36 +15,36 @@ discard block |
||
15 | 15 | class BlockSession extends Block |
16 | 16 | { |
17 | 17 | private $user_id; |
18 | - private $sessions; |
|
19 | - private $path; |
|
20 | - private $permission = array(DRH, SESSIONADMIN); |
|
18 | + private $sessions; |
|
19 | + private $path; |
|
20 | + private $permission = array(DRH, SESSIONADMIN); |
|
21 | 21 | |
22 | - /** |
|
23 | - * Constructor |
|
24 | - */ |
|
22 | + /** |
|
23 | + * Constructor |
|
24 | + */ |
|
25 | 25 | public function __construct ($user_id) |
26 | 26 | { |
27 | - $this->user_id = $user_id; |
|
28 | - $this->path = 'block_session'; |
|
29 | - if ($this->is_block_visible_for_user($user_id)) { |
|
27 | + $this->user_id = $user_id; |
|
28 | + $this->path = 'block_session'; |
|
29 | + if ($this->is_block_visible_for_user($user_id)) { |
|
30 | 30 | $this->sessions = SessionManager::get_sessions_followed_by_drh($user_id); |
31 | - } |
|
31 | + } |
|
32 | 32 | } |
33 | 33 | |
34 | - /** |
|
35 | - * This method check if a user is allowed to see the block inside dashboard interface |
|
36 | - * @param int User id |
|
37 | - * @return bool Is block visible for user |
|
38 | - */ |
|
34 | + /** |
|
35 | + * This method check if a user is allowed to see the block inside dashboard interface |
|
36 | + * @param int User id |
|
37 | + * @return bool Is block visible for user |
|
38 | + */ |
|
39 | 39 | public function is_block_visible_for_user($user_id) |
40 | 40 | { |
41 | - $user_info = api_get_user_info($user_id); |
|
42 | - $user_status = $user_info['status']; |
|
43 | - $is_block_visible_for_user = false; |
|
44 | - if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) { |
|
45 | - $is_block_visible_for_user = true; |
|
46 | - } |
|
47 | - return $is_block_visible_for_user; |
|
41 | + $user_info = api_get_user_info($user_id); |
|
42 | + $user_status = $user_info['status']; |
|
43 | + $is_block_visible_for_user = false; |
|
44 | + if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) { |
|
45 | + $is_block_visible_for_user = true; |
|
46 | + } |
|
47 | + return $is_block_visible_for_user; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | public function get_block() |
56 | 56 | { |
57 | 57 | |
58 | - global $charset; |
|
58 | + global $charset; |
|
59 | 59 | |
60 | - $column = 2; |
|
61 | - $data = array(); |
|
60 | + $column = 2; |
|
61 | + $data = array(); |
|
62 | 62 | |
63 | - $content = $this->get_content_html(); |
|
63 | + $content = $this->get_content_html(); |
|
64 | 64 | |
65 | - $content_html = ' |
|
65 | + $content_html = ' |
|
66 | 66 | <div class="panel panel-default" id="intro"> |
67 | 67 | <div class="panel-heading"> |
68 | 68 | '.get_lang('SessionsInformation').' |
@@ -76,78 +76,78 @@ discard block |
||
76 | 76 | </div> |
77 | 77 | '; |
78 | 78 | |
79 | - $data['column'] = $column; |
|
80 | - $data['content_html'] = $content_html; |
|
79 | + $data['column'] = $column; |
|
80 | + $data['content_html'] = $content_html; |
|
81 | 81 | |
82 | - return $data; |
|
82 | + return $data; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
86 | - * This method return a content html, it's used inside get_block method for showing it inside dashboard interface |
|
87 | - * @return string content html |
|
88 | - */ |
|
86 | + * This method return a content html, it's used inside get_block method for showing it inside dashboard interface |
|
87 | + * @return string content html |
|
88 | + */ |
|
89 | 89 | public function get_content_html() |
90 | 90 | { |
91 | 91 | |
92 | - $content = ''; |
|
93 | - $sessions = $this->sessions; |
|
92 | + $content = ''; |
|
93 | + $sessions = $this->sessions; |
|
94 | 94 | |
95 | - //$content = '<div style="margin:10px;">'; |
|
96 | - $content .= '<h4>'.get_lang('YourSessionsList').'</h4>'; |
|
95 | + //$content = '<div style="margin:10px;">'; |
|
96 | + $content .= '<h4>'.get_lang('YourSessionsList').'</h4>'; |
|
97 | 97 | |
98 | - if (count($sessions) > 0) { |
|
99 | - $sessions_table = '<table class="data_table" width:"95%">'; |
|
100 | - $sessions_table .= '<tr> |
|
98 | + if (count($sessions) > 0) { |
|
99 | + $sessions_table = '<table class="data_table" width:"95%">'; |
|
100 | + $sessions_table .= '<tr> |
|
101 | 101 | <th >'.get_lang('Title').'</th> |
102 | 102 | <th >'.get_lang('Date').'</th> |
103 | 103 | <th width="100px">'.get_lang('NbCoursesPerSession').'</th> |
104 | 104 | </tr>'; |
105 | - $i = 1; |
|
106 | - foreach ($sessions as $session) { |
|
105 | + $i = 1; |
|
106 | + foreach ($sessions as $session) { |
|
107 | 107 | |
108 | - $session_id = intval($session['id']); |
|
109 | - $title = $session['name']; |
|
108 | + $session_id = intval($session['id']); |
|
109 | + $title = $session['name']; |
|
110 | 110 | |
111 | - if ($session['access_start_date'] != '0000-00-00 00:00:00' && $session['access_end_date'] != '0000-00-00 00:00:00') { |
|
112 | - $date = get_lang('From').' '.api_convert_and_format_date($session['access_start_date'], DATE_FORMAT_SHORT, date_default_timezone_get()).' '.get_lang('To').' '.api_convert_and_format_date($session['access_end_date'], DATE_FORMAT_SHORT, date_default_timezone_get()); |
|
113 | - } else { |
|
114 | - $date = ' - '; |
|
115 | - } |
|
111 | + if ($session['access_start_date'] != '0000-00-00 00:00:00' && $session['access_end_date'] != '0000-00-00 00:00:00') { |
|
112 | + $date = get_lang('From').' '.api_convert_and_format_date($session['access_start_date'], DATE_FORMAT_SHORT, date_default_timezone_get()).' '.get_lang('To').' '.api_convert_and_format_date($session['access_end_date'], DATE_FORMAT_SHORT, date_default_timezone_get()); |
|
113 | + } else { |
|
114 | + $date = ' - '; |
|
115 | + } |
|
116 | 116 | |
117 | - $count_courses_in_session = count(Tracking::get_courses_list_from_session($session_id)); |
|
117 | + $count_courses_in_session = count(Tracking::get_courses_list_from_session($session_id)); |
|
118 | 118 | |
119 | - if ($i%2 == 0) $class_tr = 'row_odd'; |
|
120 | - else $class_tr = 'row_even'; |
|
119 | + if ($i%2 == 0) $class_tr = 'row_odd'; |
|
120 | + else $class_tr = 'row_even'; |
|
121 | 121 | |
122 | - $sessions_table .= '<tr class="'.$class_tr.'"> |
|
122 | + $sessions_table .= '<tr class="'.$class_tr.'"> |
|
123 | 123 | <td>'.$title.'</td> |
124 | 124 | <td align="center">'.$date.'</td> |
125 | 125 | <td align="center">'.$count_courses_in_session.'</td> |
126 | 126 | </tr>'; |
127 | - $i++; |
|
128 | - } |
|
129 | - $sessions_table .= '</table>'; |
|
130 | - $content .= $sessions_table; |
|
131 | - } else { |
|
132 | - $content .= get_lang('ThereIsNoInformationAboutYourSessions'); |
|
133 | - } |
|
127 | + $i++; |
|
128 | + } |
|
129 | + $sessions_table .= '</table>'; |
|
130 | + $content .= $sessions_table; |
|
131 | + } else { |
|
132 | + $content .= get_lang('ThereIsNoInformationAboutYourSessions'); |
|
133 | + } |
|
134 | 134 | |
135 | - if (count($sessions) > 0) { |
|
136 | - $content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/session.php">'.get_lang('SeeMore').'</a></div>'; |
|
137 | - } |
|
135 | + if (count($sessions) > 0) { |
|
136 | + $content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/session.php">'.get_lang('SeeMore').'</a></div>'; |
|
137 | + } |
|
138 | 138 | |
139 | - //$content .= '</div>'; |
|
139 | + //$content .= '</div>'; |
|
140 | 140 | |
141 | - return $content; |
|
142 | - } |
|
141 | + return $content; |
|
142 | + } |
|
143 | 143 | |
144 | 144 | /** |
145 | - * Get number of sessions |
|
146 | - * @return int |
|
147 | - */ |
|
148 | - function get_number_of_sessions() |
|
145 | + * Get number of sessions |
|
146 | + * @return int |
|
147 | + */ |
|
148 | + function get_number_of_sessions() |
|
149 | 149 | { |
150 | - return count($this->sessions); |
|
151 | - } |
|
150 | + return count($this->sessions); |
|
151 | + } |
|
152 | 152 | |
153 | 153 | } |
@@ -9,194 +9,194 @@ |
||
9 | 9 | // See http://demo.icu-project.org/icu-bin/convexp |
10 | 10 | return array( |
11 | 11 | |
12 | - // UTF-8 multibyte encoding |
|
13 | - |
|
14 | - 'UTF-8' => 'UTF-8', |
|
15 | - 'WINDOWS-65001' => 'UTF-8', |
|
16 | - 'CP65001' => 'UTF-8', |
|
17 | - 'WIN-65001' => 'UTF-8', |
|
18 | - 'WIN65001' => 'UTF-8', |
|
19 | - '65001' => 'UTF-8', |
|
20 | - |
|
21 | - // HTML entities |
|
22 | - |
|
23 | - 'HTML-ENTITIES' => 'HTML-ENTITIES', |
|
24 | - |
|
25 | - // Singlebyte encodings |
|
26 | - |
|
27 | - 'US-ASCII' => 'US-ASCII', |
|
28 | - 'US' => 'US-ASCII', |
|
29 | - 'ASCII' => 'US-ASCII', |
|
30 | - 'CP367' => 'US-ASCII', |
|
31 | - 'ISO646-US' => 'US-ASCII', |
|
32 | - |
|
33 | - 'ISO-8859-1' => '8859-1', |
|
34 | - 'ISO8859-1' => '8859-1', |
|
35 | - '8859-1' => '8859-1', |
|
36 | - 'LATIN1' => '8859-1', |
|
37 | - 'CP819' => '8859-1', |
|
38 | - |
|
39 | - 'ISO-8859-2' => '8859-2', |
|
40 | - 'ISO8859-2' => '8859-2', |
|
41 | - '8859-2' => '8859-2', |
|
42 | - 'LATIN2' => '8859-2', |
|
43 | - 'CP912' => '8859-2', |
|
44 | - |
|
45 | - 'ISO-8859-3' => '8859-3', |
|
46 | - 'ISO8859-3' => '8859-3', |
|
47 | - '8859-3' => '8859-3', |
|
48 | - 'LATIN3' => '8859-3', |
|
49 | - 'CP913' => '8859-3', |
|
50 | - |
|
51 | - 'ISO-8859-4' => '8859-4', |
|
52 | - 'ISO8859-4' => '8859-4', |
|
53 | - '8859-4' => '8859-4', |
|
54 | - 'LATIN4' => '8859-4', |
|
55 | - 'CP914' => '8859-4', |
|
56 | - |
|
57 | - 'ISO-8859-5' => '8859-5', |
|
58 | - 'ISO8859-5' => '8859-5', |
|
59 | - '8859-5' => '8859-5', |
|
60 | - 'CYRILLIC' => '8859-5', |
|
61 | - 'CP915' => '8859-5', |
|
62 | - |
|
63 | - 'ISO-8859-6' => '8859-6', |
|
64 | - 'ISO8859-6' => '8859-6', |
|
65 | - '8859-6' => '8859-6', |
|
66 | - 'ARABIC' => '8859-6', |
|
67 | - 'CP1089' => '8859-6', |
|
68 | - |
|
69 | - 'ISO-8859-7' => '8859-7', |
|
70 | - 'ISO8859-7' => '8859-7', |
|
71 | - '8859-7' => '8859-7', |
|
72 | - 'GREEK' => '8859-7', |
|
73 | - |
|
74 | - 'ISO-8859-8' => '8859-8', |
|
75 | - 'ISO8859-8' => '8859-8', |
|
76 | - '8859-8' => '8859-8', |
|
77 | - 'HEBREW' => '8859-8', |
|
78 | - |
|
79 | - 'ISO-8859-9' => '8859-9', |
|
80 | - 'ISO8859-9' => '8859-9', |
|
81 | - '8859-9' => '8859-9', |
|
82 | - 'LATIN5' => '8859-9', |
|
83 | - 'TURKISH' => '8859-9', |
|
84 | - 'CP920' => '8859-9', |
|
85 | - |
|
86 | - 'ISO-8859-10' => '8859-10', |
|
87 | - 'ISO8859-10' => '8859-10', |
|
88 | - '8859-10' => '8859-10', |
|
89 | - 'LATIN6' => '8859-10', |
|
90 | - |
|
91 | - 'ISO-8859-11' => '8859-11', |
|
92 | - 'ISO8859-11' => '8859-11', |
|
93 | - '8859-11' => '8859-11', |
|
94 | - 'THAI8' => '8859-11', |
|
95 | - |
|
96 | - 'ISO-8859-13' => '8859-13', |
|
97 | - 'ISO8859-13' => '8859-13', |
|
98 | - '8859-13' => '8859-13', |
|
99 | - 'CP921' => '8859-13', |
|
100 | - |
|
101 | - 'ISO-8859-14' => '8859-14', |
|
102 | - 'ISO8859-14' => '8859-14', |
|
103 | - '8859-14' => '8859-14', |
|
104 | - 'LATIN8' => '8859-14', |
|
105 | - 'ISO-CELTIC' => '8859-14', |
|
106 | - |
|
107 | - 'ISO-8859-15' => '8859-15', |
|
108 | - 'ISO8859-15' => '8859-15', |
|
109 | - '8859-15' => '8859-15', |
|
110 | - 'LATIN0' => '8859-15', |
|
111 | - 'LATIN-9' => '8859-15', |
|
112 | - 'CP923' => '8859-15', |
|
113 | - |
|
114 | - 'WINDOWS-855' => 'CP855', |
|
115 | - 'CP855' => 'CP855', |
|
116 | - 'WINDOWS-855' => 'CP855', |
|
117 | - 'WIN-855' => 'CP855', |
|
118 | - 'WIN855' => 'CP855', |
|
119 | - '855' => 'CP855', |
|
120 | - 'IBM-855' => 'CP855', |
|
121 | - 'IBM855' => 'CP855', |
|
122 | - |
|
123 | - 'WINDOWS-866' => 'CP866', |
|
124 | - 'CP866' => 'CP866', |
|
125 | - 'WINDOWS-866' => 'CP866', |
|
126 | - 'WIN-866' => 'CP866', |
|
127 | - 'WIN866' => 'CP866', |
|
128 | - '866' => 'CP866', |
|
129 | - 'IBM-866' => 'CP866', |
|
130 | - 'IBM866' => 'CP866', |
|
131 | - |
|
132 | - 'WINDOWS-874' => 'CP874', |
|
133 | - 'TIS-620' => 'CP874', |
|
134 | - 'CP874' => 'CP874', |
|
135 | - 'EUCTH' => 'CP874', |
|
136 | - 'WIN-874' => 'CP874', |
|
137 | - 'WIN874' => 'CP874', |
|
138 | - '874' => 'CP874', |
|
139 | - |
|
140 | - 'WINDOWS-1250' => 'CP1250', |
|
141 | - 'CP1250' => 'CP1250', |
|
142 | - 'WIN-1250' => 'CP1250', |
|
143 | - 'WIN1250' => 'CP1250', |
|
144 | - '1250' => 'CP1250', |
|
145 | - |
|
146 | - 'WINDOWS-1251' => 'CP1251', |
|
147 | - 'CP1251' => 'CP1251', |
|
148 | - 'ANSI1251' => 'CP1251', |
|
149 | - 'WIN-1251' => 'CP1251', |
|
150 | - 'WIN1251' => 'CP1251', |
|
151 | - '1251' => 'CP1251', |
|
152 | - |
|
153 | - 'WINDOWS-1252' => 'CP1252', |
|
154 | - 'CP1252' => 'CP1252', |
|
155 | - 'WIN-1252' => 'CP1252', |
|
156 | - 'WIN1252' => 'CP1252', |
|
157 | - '1252' => 'CP1252', |
|
158 | - |
|
159 | - 'WINDOWS-1253' => 'CP1253', |
|
160 | - 'CP1253' => 'CP1253', |
|
161 | - 'WIN-1253' => 'CP1253', |
|
162 | - 'WIN1253' => 'CP1253', |
|
163 | - '1253' => 'CP1253', |
|
164 | - |
|
165 | - 'WINDOWS-1254' => 'CP1254', |
|
166 | - 'CP1254' => 'CP1254', |
|
167 | - 'WIN-1254' => 'CP1254', |
|
168 | - 'WIN1254' => 'CP1254', |
|
169 | - '1254' => 'CP1254', |
|
170 | - |
|
171 | - 'WINDOWS-1255' => 'CP1255', |
|
172 | - 'CP1255' => 'CP1255', |
|
173 | - 'WIN-1255' => 'CP1255', |
|
174 | - 'WIN1255' => 'CP1255', |
|
175 | - '1255' => 'CP1255', |
|
176 | - |
|
177 | - 'WINDOWS-1256' => 'CP1256', |
|
178 | - 'CP1256' => 'CP1256', |
|
179 | - 'WIN-1256' => 'CP1256', |
|
180 | - 'WIN1256' => 'CP1256', |
|
181 | - '1256' => 'CP1256', |
|
182 | - |
|
183 | - 'WINDOWS-1257' => 'CP1257', |
|
184 | - 'CP1257' => 'CP1257', |
|
185 | - 'WIN-1257' => 'CP1257', |
|
186 | - 'WIN1257' => 'CP1257', |
|
187 | - '1257' => 'CP1257', |
|
188 | - |
|
189 | - 'WINDOWS-1258' => 'CP1258', |
|
190 | - 'CP1258' => 'CP1258', |
|
191 | - 'WIN-1258' => 'CP1258', |
|
192 | - 'WIN1258' => 'CP1258', |
|
193 | - '1258' => 'CP1258', |
|
194 | - |
|
195 | - 'KOI8-R' => 'KOI8-R', |
|
196 | - 'CP878' => 'KOI8-R', |
|
197 | - 'KOI8R' => 'KOI8-R', |
|
198 | - 'KOI8-RU' => 'KOI8-R', |
|
199 | - |
|
200 | - 'KOI8-U' => 'KOI8-U', |
|
12 | + // UTF-8 multibyte encoding |
|
13 | + |
|
14 | + 'UTF-8' => 'UTF-8', |
|
15 | + 'WINDOWS-65001' => 'UTF-8', |
|
16 | + 'CP65001' => 'UTF-8', |
|
17 | + 'WIN-65001' => 'UTF-8', |
|
18 | + 'WIN65001' => 'UTF-8', |
|
19 | + '65001' => 'UTF-8', |
|
20 | + |
|
21 | + // HTML entities |
|
22 | + |
|
23 | + 'HTML-ENTITIES' => 'HTML-ENTITIES', |
|
24 | + |
|
25 | + // Singlebyte encodings |
|
26 | + |
|
27 | + 'US-ASCII' => 'US-ASCII', |
|
28 | + 'US' => 'US-ASCII', |
|
29 | + 'ASCII' => 'US-ASCII', |
|
30 | + 'CP367' => 'US-ASCII', |
|
31 | + 'ISO646-US' => 'US-ASCII', |
|
32 | + |
|
33 | + 'ISO-8859-1' => '8859-1', |
|
34 | + 'ISO8859-1' => '8859-1', |
|
35 | + '8859-1' => '8859-1', |
|
36 | + 'LATIN1' => '8859-1', |
|
37 | + 'CP819' => '8859-1', |
|
38 | + |
|
39 | + 'ISO-8859-2' => '8859-2', |
|
40 | + 'ISO8859-2' => '8859-2', |
|
41 | + '8859-2' => '8859-2', |
|
42 | + 'LATIN2' => '8859-2', |
|
43 | + 'CP912' => '8859-2', |
|
44 | + |
|
45 | + 'ISO-8859-3' => '8859-3', |
|
46 | + 'ISO8859-3' => '8859-3', |
|
47 | + '8859-3' => '8859-3', |
|
48 | + 'LATIN3' => '8859-3', |
|
49 | + 'CP913' => '8859-3', |
|
50 | + |
|
51 | + 'ISO-8859-4' => '8859-4', |
|
52 | + 'ISO8859-4' => '8859-4', |
|
53 | + '8859-4' => '8859-4', |
|
54 | + 'LATIN4' => '8859-4', |
|
55 | + 'CP914' => '8859-4', |
|
56 | + |
|
57 | + 'ISO-8859-5' => '8859-5', |
|
58 | + 'ISO8859-5' => '8859-5', |
|
59 | + '8859-5' => '8859-5', |
|
60 | + 'CYRILLIC' => '8859-5', |
|
61 | + 'CP915' => '8859-5', |
|
62 | + |
|
63 | + 'ISO-8859-6' => '8859-6', |
|
64 | + 'ISO8859-6' => '8859-6', |
|
65 | + '8859-6' => '8859-6', |
|
66 | + 'ARABIC' => '8859-6', |
|
67 | + 'CP1089' => '8859-6', |
|
68 | + |
|
69 | + 'ISO-8859-7' => '8859-7', |
|
70 | + 'ISO8859-7' => '8859-7', |
|
71 | + '8859-7' => '8859-7', |
|
72 | + 'GREEK' => '8859-7', |
|
73 | + |
|
74 | + 'ISO-8859-8' => '8859-8', |
|
75 | + 'ISO8859-8' => '8859-8', |
|
76 | + '8859-8' => '8859-8', |
|
77 | + 'HEBREW' => '8859-8', |
|
78 | + |
|
79 | + 'ISO-8859-9' => '8859-9', |
|
80 | + 'ISO8859-9' => '8859-9', |
|
81 | + '8859-9' => '8859-9', |
|
82 | + 'LATIN5' => '8859-9', |
|
83 | + 'TURKISH' => '8859-9', |
|
84 | + 'CP920' => '8859-9', |
|
85 | + |
|
86 | + 'ISO-8859-10' => '8859-10', |
|
87 | + 'ISO8859-10' => '8859-10', |
|
88 | + '8859-10' => '8859-10', |
|
89 | + 'LATIN6' => '8859-10', |
|
90 | + |
|
91 | + 'ISO-8859-11' => '8859-11', |
|
92 | + 'ISO8859-11' => '8859-11', |
|
93 | + '8859-11' => '8859-11', |
|
94 | + 'THAI8' => '8859-11', |
|
95 | + |
|
96 | + 'ISO-8859-13' => '8859-13', |
|
97 | + 'ISO8859-13' => '8859-13', |
|
98 | + '8859-13' => '8859-13', |
|
99 | + 'CP921' => '8859-13', |
|
100 | + |
|
101 | + 'ISO-8859-14' => '8859-14', |
|
102 | + 'ISO8859-14' => '8859-14', |
|
103 | + '8859-14' => '8859-14', |
|
104 | + 'LATIN8' => '8859-14', |
|
105 | + 'ISO-CELTIC' => '8859-14', |
|
106 | + |
|
107 | + 'ISO-8859-15' => '8859-15', |
|
108 | + 'ISO8859-15' => '8859-15', |
|
109 | + '8859-15' => '8859-15', |
|
110 | + 'LATIN0' => '8859-15', |
|
111 | + 'LATIN-9' => '8859-15', |
|
112 | + 'CP923' => '8859-15', |
|
113 | + |
|
114 | + 'WINDOWS-855' => 'CP855', |
|
115 | + 'CP855' => 'CP855', |
|
116 | + 'WINDOWS-855' => 'CP855', |
|
117 | + 'WIN-855' => 'CP855', |
|
118 | + 'WIN855' => 'CP855', |
|
119 | + '855' => 'CP855', |
|
120 | + 'IBM-855' => 'CP855', |
|
121 | + 'IBM855' => 'CP855', |
|
122 | + |
|
123 | + 'WINDOWS-866' => 'CP866', |
|
124 | + 'CP866' => 'CP866', |
|
125 | + 'WINDOWS-866' => 'CP866', |
|
126 | + 'WIN-866' => 'CP866', |
|
127 | + 'WIN866' => 'CP866', |
|
128 | + '866' => 'CP866', |
|
129 | + 'IBM-866' => 'CP866', |
|
130 | + 'IBM866' => 'CP866', |
|
131 | + |
|
132 | + 'WINDOWS-874' => 'CP874', |
|
133 | + 'TIS-620' => 'CP874', |
|
134 | + 'CP874' => 'CP874', |
|
135 | + 'EUCTH' => 'CP874', |
|
136 | + 'WIN-874' => 'CP874', |
|
137 | + 'WIN874' => 'CP874', |
|
138 | + '874' => 'CP874', |
|
139 | + |
|
140 | + 'WINDOWS-1250' => 'CP1250', |
|
141 | + 'CP1250' => 'CP1250', |
|
142 | + 'WIN-1250' => 'CP1250', |
|
143 | + 'WIN1250' => 'CP1250', |
|
144 | + '1250' => 'CP1250', |
|
145 | + |
|
146 | + 'WINDOWS-1251' => 'CP1251', |
|
147 | + 'CP1251' => 'CP1251', |
|
148 | + 'ANSI1251' => 'CP1251', |
|
149 | + 'WIN-1251' => 'CP1251', |
|
150 | + 'WIN1251' => 'CP1251', |
|
151 | + '1251' => 'CP1251', |
|
152 | + |
|
153 | + 'WINDOWS-1252' => 'CP1252', |
|
154 | + 'CP1252' => 'CP1252', |
|
155 | + 'WIN-1252' => 'CP1252', |
|
156 | + 'WIN1252' => 'CP1252', |
|
157 | + '1252' => 'CP1252', |
|
158 | + |
|
159 | + 'WINDOWS-1253' => 'CP1253', |
|
160 | + 'CP1253' => 'CP1253', |
|
161 | + 'WIN-1253' => 'CP1253', |
|
162 | + 'WIN1253' => 'CP1253', |
|
163 | + '1253' => 'CP1253', |
|
164 | + |
|
165 | + 'WINDOWS-1254' => 'CP1254', |
|
166 | + 'CP1254' => 'CP1254', |
|
167 | + 'WIN-1254' => 'CP1254', |
|
168 | + 'WIN1254' => 'CP1254', |
|
169 | + '1254' => 'CP1254', |
|
170 | + |
|
171 | + 'WINDOWS-1255' => 'CP1255', |
|
172 | + 'CP1255' => 'CP1255', |
|
173 | + 'WIN-1255' => 'CP1255', |
|
174 | + 'WIN1255' => 'CP1255', |
|
175 | + '1255' => 'CP1255', |
|
176 | + |
|
177 | + 'WINDOWS-1256' => 'CP1256', |
|
178 | + 'CP1256' => 'CP1256', |
|
179 | + 'WIN-1256' => 'CP1256', |
|
180 | + 'WIN1256' => 'CP1256', |
|
181 | + '1256' => 'CP1256', |
|
182 | + |
|
183 | + 'WINDOWS-1257' => 'CP1257', |
|
184 | + 'CP1257' => 'CP1257', |
|
185 | + 'WIN-1257' => 'CP1257', |
|
186 | + 'WIN1257' => 'CP1257', |
|
187 | + '1257' => 'CP1257', |
|
188 | + |
|
189 | + 'WINDOWS-1258' => 'CP1258', |
|
190 | + 'CP1258' => 'CP1258', |
|
191 | + 'WIN-1258' => 'CP1258', |
|
192 | + 'WIN1258' => 'CP1258', |
|
193 | + '1258' => 'CP1258', |
|
194 | + |
|
195 | + 'KOI8-R' => 'KOI8-R', |
|
196 | + 'CP878' => 'KOI8-R', |
|
197 | + 'KOI8R' => 'KOI8-R', |
|
198 | + 'KOI8-RU' => 'KOI8-R', |
|
199 | + |
|
200 | + 'KOI8-U' => 'KOI8-U', |
|
201 | 201 | |
202 | 202 | ); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | // Using the resource linker as a tool for adding resources to the learning path. |
26 | 26 | if ($action == 'add' && $type == 'learnpathitem') { |
27 | - $htmlHeadXtra[] = "<script> |
|
27 | + $htmlHeadXtra[] = "<script> |
|
28 | 28 | window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; |
29 | 29 | </script>"; |
30 | 30 | } |
@@ -44,231 +44,231 @@ |
||
44 | 44 | |
45 | 45 | class PGTStorageFile extends PGTStorage |
46 | 46 | { |
47 | - /** |
|
48 | - * @addtogroup internalPGTStorageFile |
|
49 | - * @{ |
|
50 | - */ |
|
47 | + /** |
|
48 | + * @addtogroup internalPGTStorageFile |
|
49 | + * @{ |
|
50 | + */ |
|
51 | 51 | |
52 | - /** |
|
53 | - * a string telling where PGT's should be stored on the filesystem. Written by |
|
54 | - * PGTStorageFile::PGTStorageFile(), read by getPath(). |
|
55 | - * |
|
56 | - * @private |
|
57 | - */ |
|
58 | - var $_path; |
|
52 | + /** |
|
53 | + * a string telling where PGT's should be stored on the filesystem. Written by |
|
54 | + * PGTStorageFile::PGTStorageFile(), read by getPath(). |
|
55 | + * |
|
56 | + * @private |
|
57 | + */ |
|
58 | + var $_path; |
|
59 | 59 | |
60 | - /** |
|
61 | - * This method returns the name of the directory where PGT's should be stored |
|
62 | - * on the filesystem. |
|
63 | - * |
|
64 | - * @return the name of a directory (with leading and trailing '/') |
|
65 | - * |
|
66 | - * @private |
|
67 | - */ |
|
68 | - function getPath() |
|
60 | + /** |
|
61 | + * This method returns the name of the directory where PGT's should be stored |
|
62 | + * on the filesystem. |
|
63 | + * |
|
64 | + * @return the name of a directory (with leading and trailing '/') |
|
65 | + * |
|
66 | + * @private |
|
67 | + */ |
|
68 | + function getPath() |
|
69 | 69 | { |
70 | - return $this->_path; |
|
70 | + return $this->_path; |
|
71 | 71 | } |
72 | 72 | |
73 | - /** |
|
74 | - * a string telling the format to use to store PGT's (plain or xml). Written by |
|
75 | - * PGTStorageFile::PGTStorageFile(), read by getFormat(). |
|
76 | - * |
|
77 | - * @private |
|
78 | - */ |
|
79 | - var $_format; |
|
73 | + /** |
|
74 | + * a string telling the format to use to store PGT's (plain or xml). Written by |
|
75 | + * PGTStorageFile::PGTStorageFile(), read by getFormat(). |
|
76 | + * |
|
77 | + * @private |
|
78 | + */ |
|
79 | + var $_format; |
|
80 | 80 | |
81 | - /** |
|
82 | - * This method returns the format to use when storing PGT's on the filesystem. |
|
83 | - * |
|
84 | - * @return a string corresponding to the format used (plain or xml). |
|
85 | - * |
|
86 | - * @private |
|
87 | - */ |
|
88 | - function getFormat() |
|
81 | + /** |
|
82 | + * This method returns the format to use when storing PGT's on the filesystem. |
|
83 | + * |
|
84 | + * @return a string corresponding to the format used (plain or xml). |
|
85 | + * |
|
86 | + * @private |
|
87 | + */ |
|
88 | + function getFormat() |
|
89 | 89 | { |
90 | - return $this->_format; |
|
90 | + return $this->_format; |
|
91 | 91 | } |
92 | 92 | |
93 | - // ######################################################################## |
|
94 | - // DEBUGGING |
|
95 | - // ######################################################################## |
|
93 | + // ######################################################################## |
|
94 | + // DEBUGGING |
|
95 | + // ######################################################################## |
|
96 | 96 | |
97 | - /** |
|
98 | - * This method returns an informational string giving the type of storage |
|
99 | - * used by the object (used for debugging purposes). |
|
100 | - * |
|
101 | - * @return an informational string. |
|
102 | - * @public |
|
103 | - */ |
|
104 | - function getStorageType() |
|
97 | + /** |
|
98 | + * This method returns an informational string giving the type of storage |
|
99 | + * used by the object (used for debugging purposes). |
|
100 | + * |
|
101 | + * @return an informational string. |
|
102 | + * @public |
|
103 | + */ |
|
104 | + function getStorageType() |
|
105 | 105 | { |
106 | - return "file"; |
|
106 | + return "file"; |
|
107 | 107 | } |
108 | 108 | |
109 | - /** |
|
110 | - * This method returns an informational string giving informations on the |
|
111 | - * parameters of the storage.(used for debugging purposes). |
|
112 | - * |
|
113 | - * @return an informational string. |
|
114 | - * @public |
|
115 | - */ |
|
116 | - function getStorageInfo() |
|
109 | + /** |
|
110 | + * This method returns an informational string giving informations on the |
|
111 | + * parameters of the storage.(used for debugging purposes). |
|
112 | + * |
|
113 | + * @return an informational string. |
|
114 | + * @public |
|
115 | + */ |
|
116 | + function getStorageInfo() |
|
117 | 117 | { |
118 | - return 'path=`'.$this->getPath().'\', format=`'.$this->getFormat().'\''; |
|
118 | + return 'path=`'.$this->getPath().'\', format=`'.$this->getFormat().'\''; |
|
119 | 119 | } |
120 | 120 | |
121 | - // ######################################################################## |
|
122 | - // CONSTRUCTOR |
|
123 | - // ######################################################################## |
|
121 | + // ######################################################################## |
|
122 | + // CONSTRUCTOR |
|
123 | + // ######################################################################## |
|
124 | 124 | |
125 | - /** |
|
126 | - * The class constructor, called by CASClient::SetPGTStorageFile(). |
|
127 | - * |
|
128 | - * @param $cas_parent the CASClient instance that creates the object. |
|
129 | - * @param $format the format used to store the PGT's (`plain' and `xml' allowed). |
|
130 | - * @param $path the path where the PGT's should be stored |
|
131 | - * |
|
132 | - * @public |
|
133 | - */ |
|
134 | - function PGTStorageFile($cas_parent,$format,$path) |
|
125 | + /** |
|
126 | + * The class constructor, called by CASClient::SetPGTStorageFile(). |
|
127 | + * |
|
128 | + * @param $cas_parent the CASClient instance that creates the object. |
|
129 | + * @param $format the format used to store the PGT's (`plain' and `xml' allowed). |
|
130 | + * @param $path the path where the PGT's should be stored |
|
131 | + * |
|
132 | + * @public |
|
133 | + */ |
|
134 | + function PGTStorageFile($cas_parent,$format,$path) |
|
135 | 135 | { |
136 | - phpCAS::traceBegin(); |
|
137 | - // call the ancestor's constructor |
|
138 | - $this->PGTStorage($cas_parent); |
|
136 | + phpCAS::traceBegin(); |
|
137 | + // call the ancestor's constructor |
|
138 | + $this->PGTStorage($cas_parent); |
|
139 | 139 | |
140 | - if (empty($format) ) $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT; |
|
141 | - if (empty($path) ) $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH; |
|
140 | + if (empty($format) ) $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT; |
|
141 | + if (empty($path) ) $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH; |
|
142 | 142 | |
143 | - // check that the path is an absolute path |
|
144 | - if (getenv("OS")=="Windows_NT"){ |
|
143 | + // check that the path is an absolute path |
|
144 | + if (getenv("OS")=="Windows_NT"){ |
|
145 | 145 | |
146 | - if (!preg_match('`^[a-zA-Z]:`', $path)) { |
|
147 | - phpCAS::error('an absolute path is needed for PGT storage to file'); |
|
148 | - } |
|
146 | + if (!preg_match('`^[a-zA-Z]:`', $path)) { |
|
147 | + phpCAS::error('an absolute path is needed for PGT storage to file'); |
|
148 | + } |
|
149 | 149 | |
150 | - } |
|
151 | - else |
|
152 | - { |
|
150 | + } |
|
151 | + else |
|
152 | + { |
|
153 | 153 | |
154 | - if ( $path[0] != '/' ) { |
|
155 | - phpCAS::error('an absolute path is needed for PGT storage to file'); |
|
156 | - } |
|
154 | + if ( $path[0] != '/' ) { |
|
155 | + phpCAS::error('an absolute path is needed for PGT storage to file'); |
|
156 | + } |
|
157 | 157 | |
158 | - // store the path (with a leading and trailing '/') |
|
159 | - $path = preg_replace('|[/]*$|','/',$path); |
|
160 | - $path = preg_replace('|^[/]*|','/',$path); |
|
161 | - } |
|
158 | + // store the path (with a leading and trailing '/') |
|
159 | + $path = preg_replace('|[/]*$|','/',$path); |
|
160 | + $path = preg_replace('|^[/]*|','/',$path); |
|
161 | + } |
|
162 | 162 | |
163 | - $this->_path = $path; |
|
164 | - // check the format and store it |
|
165 | - switch ($format) { |
|
166 | - case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN: |
|
163 | + $this->_path = $path; |
|
164 | + // check the format and store it |
|
165 | + switch ($format) { |
|
166 | + case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN: |
|
167 | 167 | case CAS_PGT_STORAGE_FILE_FORMAT_XML: |
168 | - $this->_format = $format; |
|
169 | - break; |
|
170 | - default: |
|
171 | - phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)'); |
|
172 | - } |
|
173 | - phpCAS::traceEnd(); |
|
168 | + $this->_format = $format; |
|
169 | + break; |
|
170 | + default: |
|
171 | + phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)'); |
|
172 | + } |
|
173 | + phpCAS::traceEnd(); |
|
174 | 174 | } |
175 | 175 | |
176 | - // ######################################################################## |
|
177 | - // INITIALIZATION |
|
178 | - // ######################################################################## |
|
176 | + // ######################################################################## |
|
177 | + // INITIALIZATION |
|
178 | + // ######################################################################## |
|
179 | 179 | |
180 | - /** |
|
181 | - * This method is used to initialize the storage. Halts on error. |
|
182 | - * |
|
183 | - * @public |
|
184 | - */ |
|
185 | - function init() |
|
180 | + /** |
|
181 | + * This method is used to initialize the storage. Halts on error. |
|
182 | + * |
|
183 | + * @public |
|
184 | + */ |
|
185 | + function init() |
|
186 | 186 | { |
187 | - phpCAS::traceBegin(); |
|
188 | - // if the storage has already been initialized, return immediatly |
|
189 | - if ( $this->isInitialized() ) |
|
190 | - return; |
|
191 | - // call the ancestor's method (mark as initialized) |
|
192 | - parent::init(); |
|
193 | - phpCAS::traceEnd(); |
|
187 | + phpCAS::traceBegin(); |
|
188 | + // if the storage has already been initialized, return immediatly |
|
189 | + if ( $this->isInitialized() ) |
|
190 | + return; |
|
191 | + // call the ancestor's method (mark as initialized) |
|
192 | + parent::init(); |
|
193 | + phpCAS::traceEnd(); |
|
194 | 194 | } |
195 | 195 | |
196 | - // ######################################################################## |
|
197 | - // PGT I/O |
|
198 | - // ######################################################################## |
|
196 | + // ######################################################################## |
|
197 | + // PGT I/O |
|
198 | + // ######################################################################## |
|
199 | 199 | |
200 | - /** |
|
201 | - * This method returns the filename corresponding to a PGT Iou. |
|
202 | - * |
|
203 | - * @param $pgt_iou the PGT iou. |
|
204 | - * |
|
205 | - * @return a filename |
|
206 | - * @private |
|
207 | - */ |
|
208 | - function getPGTIouFilename($pgt_iou) |
|
200 | + /** |
|
201 | + * This method returns the filename corresponding to a PGT Iou. |
|
202 | + * |
|
203 | + * @param $pgt_iou the PGT iou. |
|
204 | + * |
|
205 | + * @return a filename |
|
206 | + * @private |
|
207 | + */ |
|
208 | + function getPGTIouFilename($pgt_iou) |
|
209 | 209 | { |
210 | - phpCAS::traceBegin(); |
|
211 | - $filename = $this->getPath().$pgt_iou.'.'.$this->getFormat(); |
|
212 | - phpCAS::traceEnd($filename); |
|
213 | - return $filename; |
|
210 | + phpCAS::traceBegin(); |
|
211 | + $filename = $this->getPath().$pgt_iou.'.'.$this->getFormat(); |
|
212 | + phpCAS::traceEnd($filename); |
|
213 | + return $filename; |
|
214 | 214 | } |
215 | 215 | |
216 | - /** |
|
217 | - * This method stores a PGT and its corresponding PGT Iou into a file. Echoes a |
|
218 | - * warning on error. |
|
219 | - * |
|
220 | - * @param $pgt the PGT |
|
221 | - * @param $pgt_iou the PGT iou |
|
222 | - * |
|
223 | - * @public |
|
224 | - */ |
|
225 | - function write($pgt,$pgt_iou) |
|
216 | + /** |
|
217 | + * This method stores a PGT and its corresponding PGT Iou into a file. Echoes a |
|
218 | + * warning on error. |
|
219 | + * |
|
220 | + * @param $pgt the PGT |
|
221 | + * @param $pgt_iou the PGT iou |
|
222 | + * |
|
223 | + * @public |
|
224 | + */ |
|
225 | + function write($pgt,$pgt_iou) |
|
226 | 226 | { |
227 | - phpCAS::traceBegin(); |
|
228 | - $fname = $this->getPGTIouFilename($pgt_iou); |
|
229 | - if ( $f=fopen($fname,"w") ) { |
|
230 | - if ( fputs($f,$pgt) === FALSE ) { |
|
231 | - phpCAS::error('could not write PGT to `'.$fname.'\''); |
|
232 | - } |
|
233 | - fclose($f); |
|
234 | - } else { |
|
235 | - phpCAS::error('could not open `'.$fname.'\''); |
|
236 | - } |
|
237 | - phpCAS::traceEnd(); |
|
227 | + phpCAS::traceBegin(); |
|
228 | + $fname = $this->getPGTIouFilename($pgt_iou); |
|
229 | + if ( $f=fopen($fname,"w") ) { |
|
230 | + if ( fputs($f,$pgt) === FALSE ) { |
|
231 | + phpCAS::error('could not write PGT to `'.$fname.'\''); |
|
232 | + } |
|
233 | + fclose($f); |
|
234 | + } else { |
|
235 | + phpCAS::error('could not open `'.$fname.'\''); |
|
236 | + } |
|
237 | + phpCAS::traceEnd(); |
|
238 | 238 | } |
239 | 239 | |
240 | - /** |
|
241 | - * This method reads a PGT corresponding to a PGT Iou and deletes the |
|
242 | - * corresponding file. |
|
243 | - * |
|
244 | - * @param $pgt_iou the PGT iou |
|
245 | - * |
|
246 | - * @return the corresponding PGT, or FALSE on error |
|
247 | - * |
|
248 | - * @public |
|
249 | - */ |
|
250 | - function read($pgt_iou) |
|
240 | + /** |
|
241 | + * This method reads a PGT corresponding to a PGT Iou and deletes the |
|
242 | + * corresponding file. |
|
243 | + * |
|
244 | + * @param $pgt_iou the PGT iou |
|
245 | + * |
|
246 | + * @return the corresponding PGT, or FALSE on error |
|
247 | + * |
|
248 | + * @public |
|
249 | + */ |
|
250 | + function read($pgt_iou) |
|
251 | 251 | { |
252 | - phpCAS::traceBegin(); |
|
253 | - $pgt = FALSE; |
|
254 | - $fname = $this->getPGTIouFilename($pgt_iou); |
|
255 | - if ( !($f=fopen($fname,"r")) ) { |
|
256 | - phpCAS::trace('could not open `'.$fname.'\''); |
|
257 | - } else { |
|
258 | - if ( ($pgt=fgets($f)) === FALSE ) { |
|
259 | - phpCAS::trace('could not read PGT from `'.$fname.'\''); |
|
260 | - } |
|
261 | - fclose($f); |
|
262 | - } |
|
252 | + phpCAS::traceBegin(); |
|
253 | + $pgt = FALSE; |
|
254 | + $fname = $this->getPGTIouFilename($pgt_iou); |
|
255 | + if ( !($f=fopen($fname,"r")) ) { |
|
256 | + phpCAS::trace('could not open `'.$fname.'\''); |
|
257 | + } else { |
|
258 | + if ( ($pgt=fgets($f)) === FALSE ) { |
|
259 | + phpCAS::trace('could not read PGT from `'.$fname.'\''); |
|
260 | + } |
|
261 | + fclose($f); |
|
262 | + } |
|
263 | 263 | |
264 | - // delete the PGT file |
|
265 | - @unlink($fname); |
|
264 | + // delete the PGT file |
|
265 | + @unlink($fname); |
|
266 | 266 | |
267 | - phpCAS::traceEnd($pgt); |
|
268 | - return $pgt; |
|
267 | + phpCAS::traceEnd($pgt); |
|
268 | + return $pgt; |
|
269 | 269 | } |
270 | 270 | |
271 | - /** @} */ |
|
271 | + /** @} */ |
|
272 | 272 | |
273 | 273 | } |
274 | 274 |
@@ -14,223 +14,223 @@ |
||
14 | 14 | $s = WSSoapServer::singleton(); |
15 | 15 | |
16 | 16 | $s->wsdl->addComplexType( |
17 | - 'user_id', |
|
18 | - 'complexType', |
|
19 | - 'struct', |
|
20 | - 'all', |
|
21 | - '', |
|
22 | - array( |
|
23 | - 'user_id_field_name' => array('name' => 'user_id_field_name', 'type' => 'xsd:string'), |
|
24 | - 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string') |
|
25 | - ) |
|
17 | + 'user_id', |
|
18 | + 'complexType', |
|
19 | + 'struct', |
|
20 | + 'all', |
|
21 | + '', |
|
22 | + array( |
|
23 | + 'user_id_field_name' => array('name' => 'user_id_field_name', 'type' => 'xsd:string'), |
|
24 | + 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string') |
|
25 | + ) |
|
26 | 26 | ); |
27 | 27 | |
28 | 28 | $s->wsdl->addComplexType( |
29 | - 'user_result', |
|
30 | - 'complexType', |
|
31 | - 'struct', |
|
32 | - 'all', |
|
33 | - '', |
|
34 | - array( |
|
35 | - 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
36 | - 'result' => array('name' => 'result', 'type' => 'tns:result') |
|
37 | - ) |
|
29 | + 'user_result', |
|
30 | + 'complexType', |
|
31 | + 'struct', |
|
32 | + 'all', |
|
33 | + '', |
|
34 | + array( |
|
35 | + 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
36 | + 'result' => array('name' => 'result', 'type' => 'tns:result') |
|
37 | + ) |
|
38 | 38 | ); |
39 | 39 | |
40 | 40 | $s->wsdl->addComplexType( |
41 | - 'user_result_array', |
|
42 | - 'complexType', |
|
43 | - 'array', |
|
44 | - '', |
|
45 | - 'SOAP-ENC:Array', |
|
46 | - array(), |
|
47 | - array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:user_result[]')), |
|
48 | - 'tns:user_result' |
|
41 | + 'user_result_array', |
|
42 | + 'complexType', |
|
43 | + 'array', |
|
44 | + '', |
|
45 | + 'SOAP-ENC:Array', |
|
46 | + array(), |
|
47 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:user_result[]')), |
|
48 | + 'tns:user_result' |
|
49 | 49 | ); |
50 | 50 | |
51 | 51 | $s->register( |
52 | - 'WSUser.DisableUser', |
|
53 | - array('secret_key' => 'xsd:string', 'user_id_field_name' => 'xsd:string', 'user_id_value' => 'xsd:string') |
|
52 | + 'WSUser.DisableUser', |
|
53 | + array('secret_key' => 'xsd:string', 'user_id_field_name' => 'xsd:string', 'user_id_value' => 'xsd:string') |
|
54 | 54 | ); |
55 | 55 | |
56 | 56 | $s->register( |
57 | - 'WSUser.DisableUsers', |
|
58 | - array('secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'), |
|
59 | - array('return' => 'tns:user_result_array') |
|
57 | + 'WSUser.DisableUsers', |
|
58 | + array('secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'), |
|
59 | + array('return' => 'tns:user_result_array') |
|
60 | 60 | ); |
61 | 61 | |
62 | 62 | $s->register( |
63 | - 'WSUser.EnableUser', |
|
64 | - array('secret_key' => 'xsd:string', 'user_id_field_name' => 'xsd:string', 'user_id_value' => 'xsd:string') |
|
63 | + 'WSUser.EnableUser', |
|
64 | + array('secret_key' => 'xsd:string', 'user_id_field_name' => 'xsd:string', 'user_id_value' => 'xsd:string') |
|
65 | 65 | ); |
66 | 66 | |
67 | 67 | $s->register( |
68 | - 'WSUser.EnableUsers', |
|
69 | - array('secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'), |
|
70 | - array('return' => 'tns:user_result_array') |
|
68 | + 'WSUser.EnableUsers', |
|
69 | + array('secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'), |
|
70 | + array('return' => 'tns:user_result_array') |
|
71 | 71 | ); |
72 | 72 | |
73 | 73 | $s->register( |
74 | - 'WSUser.DeleteUser', |
|
75 | - array('secret_key' => 'xsd:string', 'user_id_field_name' => 'xsd:string', 'user_id_value' => 'xsd:string') |
|
74 | + 'WSUser.DeleteUser', |
|
75 | + array('secret_key' => 'xsd:string', 'user_id_field_name' => 'xsd:string', 'user_id_value' => 'xsd:string') |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | $s->register( |
79 | - 'WSUser.DeleteUsers', |
|
80 | - array('secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'), |
|
81 | - array('return' => 'tns:user_result_array') |
|
79 | + 'WSUser.DeleteUsers', |
|
80 | + array('secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'), |
|
81 | + array('return' => 'tns:user_result_array') |
|
82 | 82 | ); |
83 | 83 | |
84 | 84 | $s->register( |
85 | - 'WSUser.CreateUser', |
|
86 | - array( |
|
87 | - 'secret_key' => 'xsd:string', |
|
88 | - 'firstname' => 'xsd:string', |
|
89 | - 'lastname' => 'xsd:string', |
|
90 | - 'status' => 'xsd:int', |
|
91 | - 'loginname' => 'xsd:string', |
|
92 | - 'password' => 'xsd:string', |
|
93 | - 'encrypt_method' => 'xsd:string', |
|
94 | - 'user_id_field_name' => 'xsd:string', |
|
95 | - 'user_id_value' => 'xsd:string', |
|
96 | - 'visibility' => 'xsd:int', |
|
97 | - 'email' => 'xsd:string', |
|
98 | - 'language' => 'xsd:string', |
|
99 | - 'phone' => 'xsd:string', |
|
100 | - 'expiration_date' => 'xsd:string', |
|
101 | - 'extras' => 'tns:extra_field' |
|
102 | - ), |
|
103 | - array('return' => 'xsd:int') |
|
85 | + 'WSUser.CreateUser', |
|
86 | + array( |
|
87 | + 'secret_key' => 'xsd:string', |
|
88 | + 'firstname' => 'xsd:string', |
|
89 | + 'lastname' => 'xsd:string', |
|
90 | + 'status' => 'xsd:int', |
|
91 | + 'loginname' => 'xsd:string', |
|
92 | + 'password' => 'xsd:string', |
|
93 | + 'encrypt_method' => 'xsd:string', |
|
94 | + 'user_id_field_name' => 'xsd:string', |
|
95 | + 'user_id_value' => 'xsd:string', |
|
96 | + 'visibility' => 'xsd:int', |
|
97 | + 'email' => 'xsd:string', |
|
98 | + 'language' => 'xsd:string', |
|
99 | + 'phone' => 'xsd:string', |
|
100 | + 'expiration_date' => 'xsd:string', |
|
101 | + 'extras' => 'tns:extra_field' |
|
102 | + ), |
|
103 | + array('return' => 'xsd:int') |
|
104 | 104 | ); |
105 | 105 | |
106 | 106 | $s->wsdl->addComplexType( |
107 | - 'user_create', |
|
108 | - 'complexType', |
|
109 | - 'struct', |
|
110 | - 'all', |
|
111 | - '', |
|
112 | - array( |
|
113 | - 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
114 | - 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
115 | - 'status' => array('name' => 'status', 'type' => 'xsd:int'), |
|
116 | - 'loginname' => array('name' => 'loginname', 'type' => 'xsd:string'), |
|
117 | - 'password' => array('name' => 'password', 'type' => 'xsd:string'), |
|
118 | - 'encrypt_method' => array('name' => 'encrypt_method', 'type' => 'xsd:string'), |
|
119 | - 'user_id_field_name' => array('name' => 'user_id_field_name', 'type' => 'xsd:string'), |
|
120 | - 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
121 | - 'visibility' => array('name' => 'visibility', 'type' => 'xsd:int'), |
|
122 | - 'email' => array('name' => 'email', 'type' => 'xsd:string'), |
|
123 | - 'language' => array('name' => 'language', 'type' => 'xsd:string'), |
|
124 | - 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), |
|
125 | - 'expiration_date' => array('name' => 'expiration_date', 'type' => 'xsd:string'), |
|
126 | - 'extras' => array('name' => 'extras', 'type' => 'tns:extra_field') |
|
127 | - ) |
|
107 | + 'user_create', |
|
108 | + 'complexType', |
|
109 | + 'struct', |
|
110 | + 'all', |
|
111 | + '', |
|
112 | + array( |
|
113 | + 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
114 | + 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
115 | + 'status' => array('name' => 'status', 'type' => 'xsd:int'), |
|
116 | + 'loginname' => array('name' => 'loginname', 'type' => 'xsd:string'), |
|
117 | + 'password' => array('name' => 'password', 'type' => 'xsd:string'), |
|
118 | + 'encrypt_method' => array('name' => 'encrypt_method', 'type' => 'xsd:string'), |
|
119 | + 'user_id_field_name' => array('name' => 'user_id_field_name', 'type' => 'xsd:string'), |
|
120 | + 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
121 | + 'visibility' => array('name' => 'visibility', 'type' => 'xsd:int'), |
|
122 | + 'email' => array('name' => 'email', 'type' => 'xsd:string'), |
|
123 | + 'language' => array('name' => 'language', 'type' => 'xsd:string'), |
|
124 | + 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), |
|
125 | + 'expiration_date' => array('name' => 'expiration_date', 'type' => 'xsd:string'), |
|
126 | + 'extras' => array('name' => 'extras', 'type' => 'tns:extra_field') |
|
127 | + ) |
|
128 | 128 | ); |
129 | 129 | |
130 | 130 | $s->wsdl->addComplexType( |
131 | - 'user_create_result', |
|
132 | - 'complexType', |
|
133 | - 'struct', |
|
134 | - 'all', |
|
135 | - '', |
|
136 | - array( |
|
137 | - 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
138 | - 'user_id_generated' => array('name' => 'user_id_generated', 'type' => 'xsd:int'), |
|
139 | - 'result' => array('name' => 'result', 'type' => 'tns:result') |
|
140 | - ) |
|
131 | + 'user_create_result', |
|
132 | + 'complexType', |
|
133 | + 'struct', |
|
134 | + 'all', |
|
135 | + '', |
|
136 | + array( |
|
137 | + 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
138 | + 'user_id_generated' => array('name' => 'user_id_generated', 'type' => 'xsd:int'), |
|
139 | + 'result' => array('name' => 'result', 'type' => 'tns:result') |
|
140 | + ) |
|
141 | 141 | ); |
142 | 142 | |
143 | 143 | $s->wsdl->addComplexType( |
144 | - 'user_create_result_array', |
|
145 | - 'complexType', |
|
146 | - 'array', |
|
147 | - '', |
|
148 | - 'SOAP-ENC:Array', |
|
149 | - array(), |
|
150 | - array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:user_create_result[]')), |
|
151 | - 'tns:user_create_result' |
|
144 | + 'user_create_result_array', |
|
145 | + 'complexType', |
|
146 | + 'array', |
|
147 | + '', |
|
148 | + 'SOAP-ENC:Array', |
|
149 | + array(), |
|
150 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:user_create_result[]')), |
|
151 | + 'tns:user_create_result' |
|
152 | 152 | ); |
153 | 153 | |
154 | 154 | $s->register( |
155 | - 'WSUser.CreateUsers', |
|
156 | - array( |
|
157 | - 'secret_key' => 'xsd:string', |
|
158 | - 'users' => 'tns:user_create[]' |
|
159 | - ), |
|
160 | - array('return' => 'tns:user_create_result_array') |
|
155 | + 'WSUser.CreateUsers', |
|
156 | + array( |
|
157 | + 'secret_key' => 'xsd:string', |
|
158 | + 'users' => 'tns:user_create[]' |
|
159 | + ), |
|
160 | + array('return' => 'tns:user_create_result_array') |
|
161 | 161 | ); |
162 | 162 | |
163 | 163 | $s->register( |
164 | - 'WSUser.EditUser', |
|
165 | - array( |
|
166 | - 'secret_key' => 'xsd:string', |
|
167 | - 'user_id_field_name' => 'xsd:string', |
|
168 | - 'user_id_value' => 'xsd:string', |
|
169 | - 'firstname' => 'xsd:string', |
|
170 | - 'lastname' => 'xsd:string', |
|
171 | - 'status' => 'xsd:int', |
|
172 | - 'loginname' => 'xsd:string', |
|
173 | - 'password' => 'xsd:string', |
|
174 | - 'encrypt_method' => 'xsd:string', |
|
175 | - 'email' => 'xsd:string', |
|
176 | - 'language' => 'xsd:string', |
|
177 | - 'phone' => 'xsd:string', |
|
178 | - 'expiration_date' => 'xsd:string', |
|
179 | - 'extras' => 'tns:extra_field' |
|
180 | - ) |
|
164 | + 'WSUser.EditUser', |
|
165 | + array( |
|
166 | + 'secret_key' => 'xsd:string', |
|
167 | + 'user_id_field_name' => 'xsd:string', |
|
168 | + 'user_id_value' => 'xsd:string', |
|
169 | + 'firstname' => 'xsd:string', |
|
170 | + 'lastname' => 'xsd:string', |
|
171 | + 'status' => 'xsd:int', |
|
172 | + 'loginname' => 'xsd:string', |
|
173 | + 'password' => 'xsd:string', |
|
174 | + 'encrypt_method' => 'xsd:string', |
|
175 | + 'email' => 'xsd:string', |
|
176 | + 'language' => 'xsd:string', |
|
177 | + 'phone' => 'xsd:string', |
|
178 | + 'expiration_date' => 'xsd:string', |
|
179 | + 'extras' => 'tns:extra_field' |
|
180 | + ) |
|
181 | 181 | ); |
182 | 182 | |
183 | 183 | $s->wsdl->addComplexType( |
184 | - 'user_edit', |
|
185 | - 'complexType', |
|
186 | - 'struct', |
|
187 | - 'all', |
|
188 | - '', |
|
189 | - array( |
|
190 | - 'user_id_field_name' => array('name' => 'user_id_field_name', 'type' => 'xsd:string'), |
|
191 | - 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
192 | - 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
193 | - 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
194 | - 'status' => array('name' => 'status', 'type' => 'xsd:int'), |
|
195 | - 'loginname' => array('name' => 'loginname', 'type' => 'xsd:string'), |
|
196 | - 'password' => array('name' => 'password', 'type' => 'xsd:string'), |
|
197 | - 'encrypt_method' => array('name' => 'encrypt_method', 'type' => 'xsd:string'), |
|
198 | - 'email' => array('name' => 'email', 'type' => 'xsd:string'), |
|
199 | - 'language' => array('name' => 'language', 'type' => 'xsd:string'), |
|
200 | - 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), |
|
201 | - 'expiration_date' => array('name' => 'expiration_date', 'type' => 'xsd:string'), |
|
202 | - 'extras' => array('name' => 'extras', 'type' => 'tns:extra_field') |
|
203 | - ) |
|
184 | + 'user_edit', |
|
185 | + 'complexType', |
|
186 | + 'struct', |
|
187 | + 'all', |
|
188 | + '', |
|
189 | + array( |
|
190 | + 'user_id_field_name' => array('name' => 'user_id_field_name', 'type' => 'xsd:string'), |
|
191 | + 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
192 | + 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
193 | + 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
194 | + 'status' => array('name' => 'status', 'type' => 'xsd:int'), |
|
195 | + 'loginname' => array('name' => 'loginname', 'type' => 'xsd:string'), |
|
196 | + 'password' => array('name' => 'password', 'type' => 'xsd:string'), |
|
197 | + 'encrypt_method' => array('name' => 'encrypt_method', 'type' => 'xsd:string'), |
|
198 | + 'email' => array('name' => 'email', 'type' => 'xsd:string'), |
|
199 | + 'language' => array('name' => 'language', 'type' => 'xsd:string'), |
|
200 | + 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), |
|
201 | + 'expiration_date' => array('name' => 'expiration_date', 'type' => 'xsd:string'), |
|
202 | + 'extras' => array('name' => 'extras', 'type' => 'tns:extra_field') |
|
203 | + ) |
|
204 | 204 | ); |
205 | 205 | |
206 | 206 | $s->wsdl->addComplexType( |
207 | - 'user_edit_result', |
|
208 | - 'complexType', |
|
209 | - 'struct', |
|
210 | - 'all', |
|
211 | - '', |
|
212 | - array( |
|
213 | - 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
214 | - 'result' => array('name' => 'result', 'type' => 'tns:result') |
|
215 | - ) |
|
207 | + 'user_edit_result', |
|
208 | + 'complexType', |
|
209 | + 'struct', |
|
210 | + 'all', |
|
211 | + '', |
|
212 | + array( |
|
213 | + 'user_id_value' => array('name' => 'user_id_value', 'type' => 'xsd:string'), |
|
214 | + 'result' => array('name' => 'result', 'type' => 'tns:result') |
|
215 | + ) |
|
216 | 216 | ); |
217 | 217 | |
218 | 218 | $s->wsdl->addComplexType( |
219 | - 'user_edit_result_array', |
|
220 | - 'complexType', |
|
221 | - 'array', |
|
222 | - '', |
|
223 | - 'SOAP-ENC:Array', |
|
224 | - array(), |
|
225 | - array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:user_edit_result[]')), |
|
226 | - 'tns:user_edit_result' |
|
219 | + 'user_edit_result_array', |
|
220 | + 'complexType', |
|
221 | + 'array', |
|
222 | + '', |
|
223 | + 'SOAP-ENC:Array', |
|
224 | + array(), |
|
225 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:user_edit_result[]')), |
|
226 | + 'tns:user_edit_result' |
|
227 | 227 | ); |
228 | 228 | |
229 | 229 | $s->register( |
230 | - 'WSUser.EditUsers', |
|
231 | - array( |
|
232 | - 'secret_key' => 'xsd:string', |
|
233 | - 'users' => 'tns:user_edit[]' |
|
234 | - ), |
|
235 | - array('return' => 'tns:user_edit_result_array') |
|
230 | + 'WSUser.EditUsers', |
|
231 | + array( |
|
232 | + 'secret_key' => 'xsd:string', |
|
233 | + 'users' => 'tns:user_edit[]' |
|
234 | + ), |
|
235 | + array('return' => 'tns:user_edit_result_array') |
|
236 | 236 | ); |
@@ -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 |
@@ -93,10 +93,10 @@ |
||
93 | 93 | // Tool introduction |
94 | 94 | // TODO: These settings to be checked when it is possible. |
95 | 95 | Display::display_introduction_section(TOOL_QUIZ, array( |
96 | - 'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/', |
|
97 | - 'CreateDocumentDir' => '../../../courses/'.api_get_course_path().'/document/', |
|
98 | - 'BaseHref' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/' |
|
99 | - ) |
|
96 | + 'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/', |
|
97 | + 'CreateDocumentDir' => '../../../courses/'.api_get_course_path().'/document/', |
|
98 | + 'BaseHref' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/' |
|
99 | + ) |
|
100 | 100 | ); |
101 | 101 | |
102 | 102 |
@@ -164,7 +164,7 @@ |
||
164 | 164 | $resp = _fetch_remote_file( $url, $request_headers ); |
165 | 165 | |
166 | 166 | if (isset($resp) and $resp) { |
167 | - if ($resp->status == '304' ) { |
|
167 | + if ($resp->status == '304' ) { |
|
168 | 168 | // we have the most current copy |
169 | 169 | if ( MAGPIE_DEBUG > 1) { |
170 | 170 | debug("Got 304 for $url"); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | //$gradebook['name'] = $gradebook['name']; |
56 | 56 | //$gradebook_list[] = $gradebook; |
57 | 57 | } else { |
58 | - // $gradebook['name'] = $gradebook_list[$gradebook['parent_id']]['name'].' > '.$gradebook['name']; |
|
58 | + // $gradebook['name'] = $gradebook_list[$gradebook['parent_id']]['name'].' > '.$gradebook['name']; |
|
59 | 59 | //$gradebook_list[] = $gradebook; |
60 | 60 | } |
61 | 61 | } |