@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | $coachStartDate = null; |
55 | 55 | if (!empty($nb_days_access_before)) { |
56 | 56 | $day = intval($nb_days_access_before); |
57 | - $coachStartDate = date('Y-m-d ', strtotime($start_date. ' + '.$day.' days')); |
|
57 | + $coachStartDate = date('Y-m-d ', strtotime($start_date.' + '.$day.' days')); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $coachEndDate = null; |
61 | 61 | if (!empty($nb_days_access_after)) { |
62 | 62 | $day = intval($nb_days_access_after); |
63 | - $coachEndDate = date('Y-m-d ', strtotime($end_date. ' + '.$day.' days')); |
|
63 | + $coachEndDate = date('Y-m-d ', strtotime($end_date.' + '.$day.' days')); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // Try to create the session |
@@ -76,19 +76,19 @@ discard block |
||
76 | 76 | 0, |
77 | 77 | $visibility |
78 | 78 | ); |
79 | - if(!is_int($session_id)) { |
|
79 | + if (!is_int($session_id)) { |
|
80 | 80 | return new WSError(301, 'Could not create the session'); |
81 | 81 | } else { |
82 | 82 | // Add the Original session id to the extra fields |
83 | 83 | $extras_associative = array(); |
84 | - if($session_id_field_name != "chamilo_session_id") { |
|
84 | + if ($session_id_field_name != "chamilo_session_id") { |
|
85 | 85 | $extras_associative[$session_id_field_name] = $session_id_value; |
86 | 86 | } |
87 | - foreach($extras as $extra) { |
|
87 | + foreach ($extras as $extra) { |
|
88 | 88 | $extras_associative[$extra['field_name']] = $extra['field_value']; |
89 | 89 | } |
90 | 90 | // Create the extra fields |
91 | - foreach($extras_associative as $fname => $fvalue) { |
|
91 | + foreach ($extras_associative as $fname => $fvalue) { |
|
92 | 92 | SessionManager::create_session_extra_field($fname, 1, $fname); |
93 | 93 | SessionManager::update_session_extra_field_value( |
94 | 94 | $session_id, |
@@ -120,11 +120,11 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function CreateSession($secret_key, $name, $start_date, $end_date, $nb_days_access_before, $nb_days_access_after, $nolimit, $visibility, $user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value, $extras) { |
122 | 122 | $verifKey = $this->verifyKey($secret_key); |
123 | - if($verifKey instanceof WSError) { |
|
123 | + if ($verifKey instanceof WSError) { |
|
124 | 124 | $this->handleError($verifKey); |
125 | 125 | } else { |
126 | 126 | $session_id = $this->createSessionHelper($name, $start_date, $end_date, $nb_days_access_before, $nb_days_access_after, $nolimit, $visibility, $user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value, $extras); |
127 | - if($session_id instanceof WSError) { |
|
127 | + if ($session_id instanceof WSError) { |
|
128 | 128 | $this->handleError($session_id); |
129 | 129 | } else { |
130 | 130 | return $session_id; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | protected function deleteSessionHelper($session_id_field_name, $session_id_value) { |
143 | 143 | $session_id = $this->getSessionId($session_id_field_name, $session_id_value); |
144 | - if($session_id instanceof WSError) { |
|
144 | + if ($session_id instanceof WSError) { |
|
145 | 145 | return $session_id; |
146 | 146 | } else { |
147 | 147 | SessionManager::delete($session_id, true); |
@@ -158,11 +158,11 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function DeleteSession($secret_key, $session_id_field_name, $session_id_value) { |
160 | 160 | $verifKey = $this->verifyKey($secret_key); |
161 | - if($verifKey instanceof WSError) { |
|
161 | + if ($verifKey instanceof WSError) { |
|
162 | 162 | $this->handleError($verifKey); |
163 | 163 | } else { |
164 | 164 | $result = $this->deleteSessionHelper($session_id_field_name, $session_id_value); |
165 | - if($result instanceof WSError) { |
|
165 | + if ($result instanceof WSError) { |
|
166 | 166 | $this->handleError($result); |
167 | 167 | } |
168 | 168 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $extras |
201 | 201 | ) { |
202 | 202 | $session_id = $this->getSessionId($session_id_field_name, $session_id_value); |
203 | - if($session_id instanceof WSError) { |
|
203 | + if ($session_id instanceof WSError) { |
|
204 | 204 | return $session_id; |
205 | 205 | } else { |
206 | 206 | // Verify that coach exists and get its id |
@@ -212,13 +212,13 @@ discard block |
||
212 | 212 | $coachStartDate = null; |
213 | 213 | if (!empty($nb_days_access_before)) { |
214 | 214 | $day = intval($nb_days_access_before); |
215 | - $coachStartDate = date('Y-m-d ', strtotime($start_date. ' + '.$day.' days')); |
|
215 | + $coachStartDate = date('Y-m-d ', strtotime($start_date.' + '.$day.' days')); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | $coachEndDate = null; |
219 | 219 | if (!empty($nb_days_access_after)) { |
220 | 220 | $day = intval($nb_days_access_after); |
221 | - $coachEndDate = date('Y-m-d ', strtotime($end_date. ' + '.$day.' days')); |
|
221 | + $coachEndDate = date('Y-m-d ', strtotime($end_date.' + '.$day.' days')); |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | $result_id = SessionManager::edit_session( |
@@ -232,18 +232,18 @@ discard block |
||
232 | 232 | $coachEndDate, |
233 | 233 | $user_id, |
234 | 234 | 0, |
235 | - (int)$visibility |
|
235 | + (int) $visibility |
|
236 | 236 | ); |
237 | - if(!is_int($result_id)) { |
|
237 | + if (!is_int($result_id)) { |
|
238 | 238 | return new WSError(302, 'Could not edit the session'); |
239 | 239 | } else { |
240 | - if(!empty($extras)) { |
|
240 | + if (!empty($extras)) { |
|
241 | 241 | $extras_associative = array(); |
242 | - foreach($extras as $extra) { |
|
242 | + foreach ($extras as $extra) { |
|
243 | 243 | $extras_associative[$extra['field_name']] = $extra['field_value']; |
244 | 244 | } |
245 | 245 | // Create the extra fields |
246 | - foreach($extras_associative as $fname => $fvalue) { |
|
246 | + foreach ($extras_associative as $fname => $fvalue) { |
|
247 | 247 | SessionManager::create_session_extra_field($fname, 1, $fname); |
248 | 248 | SessionManager::update_session_extra_field_value($session_id, $fname, $fvalue); |
249 | 249 | } |
@@ -272,11 +272,11 @@ discard block |
||
272 | 272 | */ |
273 | 273 | public function EditSession($secret_key, $name, $start_date, $end_date, $nb_days_access_before, $nb_days_access_after, $nolimit, $visibility, $user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value, $extras) { |
274 | 274 | $verifKey = $this->verifyKey($secret_key); |
275 | - if($verifKey instanceof WSError) { |
|
275 | + if ($verifKey instanceof WSError) { |
|
276 | 276 | $this->handleError($verifKey); |
277 | 277 | } else { |
278 | 278 | $result = $this->editSessionHelper($name, $start_date, $end_date, $nb_days_access_before, $nb_days_access_after, $nolimit, $visibility, $user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value, $extras); |
279 | - if($session_id_value instanceof WSError) { |
|
279 | + if ($session_id_value instanceof WSError) { |
|
280 | 280 | $this->handleError($result); |
281 | 281 | } |
282 | 282 | } |
@@ -294,14 +294,14 @@ discard block |
||
294 | 294 | */ |
295 | 295 | protected function changeUserSubscription($user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value, $state) { |
296 | 296 | $session_id = $this->getSessionId($session_id_field_name, $session_id_value); |
297 | - if($session_id instanceof WSError) { |
|
297 | + if ($session_id instanceof WSError) { |
|
298 | 298 | return $session_id; |
299 | 299 | } else { |
300 | 300 | $user_id = $this->getUserId($user_id_field_name, $user_id_value); |
301 | - if($user_id instanceof WSError) { |
|
301 | + if ($user_id instanceof WSError) { |
|
302 | 302 | return $user_id; |
303 | 303 | } else { |
304 | - if($state == 1) { |
|
304 | + if ($state == 1) { |
|
305 | 305 | SessionManager::suscribe_users_to_session($session_id, array($user_id)); |
306 | 306 | } else { |
307 | 307 | $result = SessionManager::unsubscribe_user_from_session($session_id, $user_id); |
@@ -325,11 +325,11 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public function SubscribeUserToSession($secret_key, $user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value) { |
327 | 327 | $verifKey = $this->verifyKey($secret_key); |
328 | - if($verifKey instanceof WSError) { |
|
328 | + if ($verifKey instanceof WSError) { |
|
329 | 329 | $this->handleError($verifKey); |
330 | 330 | } else { |
331 | 331 | $result = $this->changeUserSubscription($user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value, 1); |
332 | - if($result instanceof WSError) { |
|
332 | + if ($result instanceof WSError) { |
|
333 | 333 | $this->handleError($result); |
334 | 334 | } |
335 | 335 | } |
@@ -346,11 +346,11 @@ discard block |
||
346 | 346 | */ |
347 | 347 | public function UnsubscribeUserFromSession($secret_key, $user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value) { |
348 | 348 | $verifKey = $this->verifyKey($secret_key); |
349 | - if($verifKey instanceof WSError) { |
|
349 | + if ($verifKey instanceof WSError) { |
|
350 | 350 | $this->handleError($verifKey); |
351 | 351 | } else { |
352 | 352 | $result = $this->changeUserSubscription($user_id_field_name, $user_id_value, $session_id_field_name, $session_id_value, 0); |
353 | - if($result instanceof WSError) { |
|
353 | + if ($result instanceof WSError) { |
|
354 | 354 | $this->handleError($result); |
355 | 355 | } |
356 | 356 | } |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | if ($state == 1) { |
386 | 386 | SessionManager::set_coach_to_course_session($user_id, $session_id, $course_id); |
387 | 387 | } else { |
388 | - $user_id = array (0 => $user_id); |
|
388 | + $user_id = array(0 => $user_id); |
|
389 | 389 | $result = SessionManager::removeUsersFromCourseSession($user_id, $session_id, $course_id); |
390 | 390 | if (!$result) { |
391 | 391 | return new WSError(303, 'There was an error unsubscribing this Teacher from the session'); |
@@ -457,14 +457,14 @@ discard block |
||
457 | 457 | */ |
458 | 458 | protected function changeCourseSubscription($course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value, $state) { |
459 | 459 | $session_id = $this->getSessionId($session_id_field_name, $session_id_value); |
460 | - if($session_id instanceof WSError) { |
|
460 | + if ($session_id instanceof WSError) { |
|
461 | 461 | return $session_id; |
462 | 462 | } else { |
463 | 463 | $course_id = $this->getCourseId($course_id_field_name, $course_id_value); |
464 | - if($course_id instanceof WSError) { |
|
464 | + if ($course_id instanceof WSError) { |
|
465 | 465 | return $course_id; |
466 | 466 | } else { |
467 | - if($state == 1) { |
|
467 | + if ($state == 1) { |
|
468 | 468 | SessionManager::add_courses_to_session($session_id, array($course_id)); |
469 | 469 | return true; |
470 | 470 | } else { |
@@ -490,11 +490,11 @@ discard block |
||
490 | 490 | */ |
491 | 491 | public function SubscribeCourseToSession($secret_key, $course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value) { |
492 | 492 | $verifKey = $this->verifyKey($secret_key); |
493 | - if($verifKey instanceof WSError) { |
|
493 | + if ($verifKey instanceof WSError) { |
|
494 | 494 | $this->handleError($verifKey); |
495 | 495 | } else { |
496 | 496 | $result = $this->changeCourseSubscription($course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value, 1); |
497 | - if($result instanceof WSError) { |
|
497 | + if ($result instanceof WSError) { |
|
498 | 498 | $this->handleError($result); |
499 | 499 | } |
500 | 500 | } |
@@ -511,11 +511,11 @@ discard block |
||
511 | 511 | */ |
512 | 512 | public function UnsubscribeCourseFromSession($secret_key, $course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value) { |
513 | 513 | $verifKey = $this->verifyKey($secret_key); |
514 | - if($verifKey instanceof WSError) { |
|
514 | + if ($verifKey instanceof WSError) { |
|
515 | 515 | $this->handleError($verifKey); |
516 | 516 | } else { |
517 | 517 | $result = $this->changeCourseSubscription($course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value, 0); |
518 | - if($result instanceof WSError) { |
|
518 | + if ($result instanceof WSError) { |
|
519 | 519 | $this->handleError($result); |
520 | 520 | } |
521 | 521 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * Singleton method |
44 | 44 | */ |
45 | 45 | public static function singleton() { |
46 | - if(!isset(self::$_instance)) { |
|
46 | + if (!isset(self::$_instance)) { |
|
47 | 47 | self::$_instance = new soap_server(); |
48 | 48 | // Set the error handler |
49 | 49 | WSError::setErrorHandler(new WSSoapErrorHandler()); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | '', |
89 | 89 | 'SOAP-ENC:Array', |
90 | 90 | array(), |
91 | - array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType' => 'tns:extras[]')),'tns:extras' |
|
91 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:extras[]')), 'tns:extras' |
|
92 | 92 | ); |
93 | 93 | |
94 | 94 | /* |
@@ -15,13 +15,13 @@ discard block |
||
15 | 15 | $script = isset($_POST['script']) ? $_POST['script'] : false; |
16 | 16 | $function = isset($_POST['function']) ? $_POST['function'] : false; |
17 | 17 | |
18 | -$contact= $server.$script.'?wsdl'; |
|
18 | +$contact = $server.$script.'?wsdl'; |
|
19 | 19 | |
20 | 20 | $client = new nusoap_client($contact); |
21 | 21 | $err = $client->getError(); |
22 | 22 | if ($err) { |
23 | 23 | // Display the error |
24 | - echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; |
|
24 | + echo '<h2>Constructor error</h2><pre>'.$err.'</pre>'; |
|
25 | 25 | // At this point, you know the call that follows will fail |
26 | 26 | } |
27 | 27 | $response = array(); |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | $list = scandir($serversys); |
38 | 38 | $scripts = array(); |
39 | 39 | foreach ($list as $item) { |
40 | - if (substr($item,0,1) == '.') { continue; } |
|
41 | - if (substr($item,-8)=='soap.php') { |
|
40 | + if (substr($item, 0, 1) == '.') { continue; } |
|
41 | + if (substr($item, -8) == 'soap.php') { |
|
42 | 42 | $scripts[] = $item; |
43 | 43 | } |
44 | 44 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | ?> |
56 | 56 | </select><br /> |
57 | 57 | <label for="function">Function</label> |
58 | -<input type="text" name="function" value="<?php echo $function;?>"></input><br /> |
|
58 | +<input type="text" name="function" value="<?php echo $function; ?>"></input><br /> |
|
59 | 59 | <label for="param[0]">Param 0</label> |
60 | 60 | <input type="text" name="param[0]" ></input><br /> |
61 | 61 | <input type="submit" name="submit" value="Send"/> |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | 'all', |
29 | 29 | '', |
30 | 30 | array( |
31 | - 'name'=>'code' , 'type'=>'xsd:string', |
|
32 | - 'name'=>'title' , 'type'=>'xsd:string', |
|
33 | - 'name'=>'url' , 'type'=>'xsd:string', |
|
31 | + 'name'=>'code', 'type'=>'xsd:string', |
|
32 | + 'name'=>'title', 'type'=>'xsd:string', |
|
33 | + 'name'=>'url', 'type'=>'xsd:string', |
|
34 | 34 | 'name'=>'teacher', 'type'=>'xsd:string', |
35 | - 'name'=>'language','type'=>'xsd:string', |
|
35 | + 'name'=>'language', 'type'=>'xsd:string', |
|
36 | 36 | ) |
37 | 37 | ); |
38 | 38 | |
@@ -51,15 +51,15 @@ discard block |
||
51 | 51 | ); |
52 | 52 | |
53 | 53 | // Register the method to expose |
54 | -$server->register('WSCourseList', // method name |
|
54 | +$server->register('WSCourseList', // method name |
|
55 | 55 | array('username' => 'xsd:string', |
56 | 56 | 'signature' => 'xsd:string', |
57 | - 'visibilities' => 'xsd:string'), // input parameters |
|
58 | - array('return' => 'xsd:Array'), // output parameters |
|
59 | - 'urn:WSCourseList', // namespace |
|
60 | - 'urn:WSCourseList#WSCourseList', // soapaction |
|
61 | - 'rpc', // style |
|
62 | - 'encoded', // use |
|
57 | + 'visibilities' => 'xsd:string'), // input parameters |
|
58 | + array('return' => 'xsd:Array'), // output parameters |
|
59 | + 'urn:WSCourseList', // namespace |
|
60 | + 'urn:WSCourseList#WSCourseList', // soapaction |
|
61 | + 'rpc', // style |
|
62 | + 'encoded', // use |
|
63 | 63 | 'This service returns a list of courses' // documentation |
64 | 64 | ); |
65 | 65 |
@@ -59,5 +59,5 @@ |
||
59 | 59 | |
60 | 60 | $server->register('import_users_from_file'); |
61 | 61 | |
62 | -$http_request = (isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:''); |
|
62 | +$http_request = (isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''); |
|
63 | 63 | $server->service($http_request); |
@@ -4,12 +4,12 @@ discard block |
||
4 | 4 | */ |
5 | 5 | function validate_data($users) { |
6 | 6 | global $defined_auth_sources; |
7 | - $errors = array (); |
|
8 | - $usernames = array (); |
|
9 | - if(is_array($users)) { |
|
7 | + $errors = array(); |
|
8 | + $usernames = array(); |
|
9 | + if (is_array($users)) { |
|
10 | 10 | foreach ($users as $index => $user) { |
11 | 11 | // 1. Check whether mandatory fields have been set. |
12 | - $mandatory_fields = array ('LastName', 'FirstName'); |
|
12 | + $mandatory_fields = array('LastName', 'FirstName'); |
|
13 | 13 | if (api_get_setting('registration', 'email') == 'true') { |
14 | 14 | $mandatory_fields[] = 'Email'; |
15 | 15 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | function save_data($users) { |
92 | 92 | $user_table = Database :: get_main_table(TABLE_MAIN_USER); |
93 | - if(is_array($users)) { |
|
93 | + if (is_array($users)) { |
|
94 | 94 | foreach ($users as $index => $user) { |
95 | 95 | $user = complete_missing_data($user); |
96 | 96 | |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | |
99 | 99 | $user_id = UserManager :: create_user($user['FirstName'], $user['LastName'], $user['Status'], $user['Email'], $user['UserName'], $user['Password'], $user['OfficialCode'], api_get_setting('PlatformLanguage'), $user['PhoneNumber'], '', $user['AuthSource']); |
100 | 100 | foreach ($user['Courses'] as $index => $course) { |
101 | - if(CourseManager :: course_exists($course)) |
|
102 | - CourseManager :: subscribe_user($user_id, $course,$user['Status']); |
|
101 | + if (CourseManager :: course_exists($course)) |
|
102 | + CourseManager :: subscribe_user($user_id, $course, $user['Status']); |
|
103 | 103 | } |
104 | 104 | if (strlen($user['ClassName']) > 0) { |
105 | 105 | $class_id = ClassManager :: get_class_id($user['ClassName']); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function get_announcements_id($username, $password, $course_code) |
17 | 17 | { |
18 | - if($this->verifyUserPass($username, $password) == "valid") |
|
18 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
19 | 19 | { |
20 | 20 | |
21 | 21 | $result = self::get_announcements($username, $course_code); |
@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | |
34 | 34 | public function get_announcement_data($username, $password, $course_code, $announcement_id, $field) |
35 | 35 | { |
36 | - if($this->verifyUserPass($username, $password) == "valid") |
|
36 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
37 | 37 | { |
38 | 38 | $htmlcode = false; |
39 | 39 | $user_id = UserManager::get_user_id_from_username($username); |
40 | 40 | |
41 | 41 | $result = self::get_announcements($username, $course_code, $announcement_id); |
42 | - while($announcement = Database::fetch_array($result)) |
|
42 | + while ($announcement = Database::fetch_array($result)) |
|
43 | 43 | { |
44 | 44 | $announcements[] = $announcement; |
45 | 45 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | return (htmlcode) ? html_entity_decode($announcements[0][$field_table]) : $announcements[0][$field_table]; |
71 | 71 | |
72 | - }else |
|
72 | + } else |
|
73 | 73 | return get_lang('InvalidId'); |
74 | 74 | } |
75 | 75 | |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | $announcement_id = ($announcement_id == 0) ? "" : "AND announcement.id=".$announcement_id; |
83 | 83 | $user_id = UserManager::get_user_id_from_username($username); |
84 | 84 | $course_info = CourseManager::get_course_information($course_code); |
85 | - $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY); |
|
86 | - $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT); |
|
87 | - $maximum = '12'; |
|
85 | + $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY); |
|
86 | + $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT); |
|
87 | + $maximum = '12'; |
|
88 | 88 | |
89 | - $group_memberships=GroupManager::get_group_ids($course_info['real_id'], $user_id); |
|
89 | + $group_memberships = GroupManager::get_group_ids($course_info['real_id'], $user_id); |
|
90 | 90 | |
91 | 91 | if (api_get_group_id() == 0) { |
92 | 92 | $cond_user_id = " AND ( |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | |
105 | 105 | // the user is member of several groups => display personal |
106 | 106 | // announcements AND his group announcements AND the general announcements |
107 | - if (is_array($group_memberships) && count($group_memberships)>0) { |
|
108 | - $sql="SELECT |
|
107 | + if (is_array($group_memberships) && count($group_memberships) > 0) { |
|
108 | + $sql = "SELECT |
|
109 | 109 | announcement.*, ip.visibility, ip.to_group_id, ip.insert_user_id |
110 | 110 | FROM $tbl_announcement announcement, $tbl_item_property ip |
111 | 111 | WHERE |
@@ -51,10 +51,10 @@ |
||
51 | 51 | 'WSCourse.DeleteCourse', |
52 | 52 | array('secret_key' => 'xsd:string', 'course_id_field_name' => 'xsd:string', 'course_id_value' => 'xsd:string'), |
53 | 53 | array(), |
54 | - 'urn:WSService', // namespace |
|
55 | - 'urn:WSService#WSCourse.DeleteCourse', // soapaction |
|
56 | - 'rpc', // style |
|
57 | - 'encoded', // use |
|
54 | + 'urn:WSService', // namespace |
|
55 | + 'urn:WSService#WSCourse.DeleteCourse', // soapaction |
|
56 | + 'rpc', // style |
|
57 | + 'encoded', // use |
|
58 | 58 | 'Delete a course in chamilo' // documentation |
59 | 59 | |
60 | 60 | ); |
@@ -60,11 +60,11 @@ |
||
60 | 60 | $courses_list = courses_list($_POST['security-key'], $_POST['visibility']); |
61 | 61 | foreach ($courses_list as $code => $cd) { |
62 | 62 | echo '<course>'; |
63 | - echo '<code>' , $code , '</code>'; |
|
64 | - echo '<title>' , $cd['title'] , '</title>'; |
|
65 | - echo '<url>' , $cd['url'] , '</url>'; |
|
66 | - echo '<teacher>' , $cd['teacher'] , '</teacher>'; |
|
67 | - echo '<language>' , $cd['language'] , '</language>'; |
|
63 | + echo '<code>', $code, '</code>'; |
|
64 | + echo '<title>', $cd['title'], '</title>'; |
|
65 | + echo '<url>', $cd['url'], '</url>'; |
|
66 | + echo '<teacher>', $cd['teacher'], '</teacher>'; |
|
67 | + echo '<language>', $cd['language'], '</language>'; |
|
68 | 68 | echo '</course>'; |
69 | 69 | } |
70 | 70 | } |