@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | $errorMsg = ''; |
24 | 24 | |
25 | 25 | // Crop picture plugin for session images |
26 | -$htmlHeadXtra[] = '<link href="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">'; |
|
27 | -$htmlHeadXtra[] = '<script src="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.js"></script>'; |
|
26 | +$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">'; |
|
27 | +$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.js"></script>'; |
|
28 | 28 | $htmlHeadXtra[] = '<script> |
29 | 29 | $(document).ready(function() { |
30 | 30 | var $image = $("#previewImage"); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | ' LIMIT 10'; |
100 | 100 | |
101 | 101 | if (api_is_multiple_url_enabled()) { |
102 | - $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
102 | + $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
103 | 103 | $access_url_id = api_get_current_access_url_id(); |
104 | 104 | if ($access_url_id != -1) { |
105 | 105 | $sql = 'SELECT username, lastname, firstname |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $return .= '<a href="javascript: void(0);" onclick="javascript: fill_coach_field(\''.$user['username'].'\')">'.api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')</a><br />'; |
125 | 125 | } |
126 | 126 | } |
127 | - $xajax_response -> addAssign('ajax_list_coachs','innerHTML', api_utf8_encode($return)); |
|
127 | + $xajax_response -> addAssign('ajax_list_coachs', 'innerHTML', api_utf8_encode($return)); |
|
128 | 128 | return $xajax_response; |
129 | 129 | } |
130 | 130 | $xajax -> processRequests(); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $form->addElement('header', $tool_name); |
186 | 186 | $result = SessionManager::setForm($form); |
187 | 187 | |
188 | -$htmlHeadXtra[] =' |
|
188 | +$htmlHeadXtra[] = ' |
|
189 | 189 | <script> |
190 | 190 | $(function() { |
191 | 191 | '.$result['js'].' |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $form->addButtonNext(get_lang('NextStep')); |
211 | 211 | |
212 | 212 | if (!$formSent) { |
213 | - $formDefaults['access_start_date'] = $formDefaults['display_start_date'] = api_get_local_time(); |
|
213 | + $formDefaults['access_start_date'] = $formDefaults['display_start_date'] = api_get_local_time(); |
|
214 | 214 | $formDefaults['coach_username'] = api_get_user_id(); |
215 | 215 | } else { |
216 | 216 | $formDefaults['name'] = api_htmlentities($name, ENT_QUOTES, $charset); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $id_visibility = $params['session_visibility']; |
236 | 236 | $duration = isset($params['duration']) ? $params['duration'] : null; |
237 | 237 | $description = $params['description']; |
238 | - $showDescription = isset($params['show_description']) ? 1: 0; |
|
238 | + $showDescription = isset($params['show_description']) ? 1 : 0; |
|
239 | 239 | $sendSubscriptionNotification = isset($params['send_subscription_notification']); |
240 | 240 | $isThisImageCropped = isset($params['cropResult']); |
241 | 241 | |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | |
273 | 273 | if ($return == strval(intval($return))) { |
274 | 274 | // integer => no error on session creation |
275 | - header('Location: add_courses_to_session.php?id_session=' . $return . '&add=true&msg='); |
|
275 | + header('Location: add_courses_to_session.php?id_session='.$return.'&add=true&msg='); |
|
276 | 276 | exit(); |
277 | 277 | } |
278 | 278 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | |
286 | 286 | echo '<div class="actions">'; |
287 | 287 | echo '<a href="../session/session_list.php">'. |
288 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
288 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
289 | 289 | echo '</div>'; |
290 | 290 | |
291 | 291 | $form->display(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $message = ''; |
29 | 29 | $content = ''; |
30 | 30 | |
31 | -$currentUrl = api_get_self() . "?name=$pluginName"; |
|
31 | +$currentUrl = api_get_self()."?name=$pluginName"; |
|
32 | 32 | |
33 | 33 | if (isset($pluginInfo['settings_form'])) { |
34 | 34 | /** @var FormValidator $form */ |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | foreach ($values as $key => $value) { |
70 | 70 | api_add_setting( |
71 | 71 | $value, |
72 | - Database::escape_string($pluginName . '_' . $key), |
|
72 | + Database::escape_string($pluginName.'_'.$key), |
|
73 | 73 | $pluginName, |
74 | 74 | 'setting', |
75 | 75 | 'Plugins', |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | $interbreadcrumb[] = array( |
102 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php', |
|
102 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/index.php', |
|
103 | 103 | 'name' => get_lang('PlatformAdmin') |
104 | 104 | ); |
105 | 105 | $interbreadcrumb[] = array( |
106 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/settings.php?category=Plugins', |
|
106 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins', |
|
107 | 107 | 'name' => get_lang('Plugins') |
108 | 108 | ); |
109 | 109 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $this->fields = $settings; |
61 | 61 | |
62 | 62 | global $language_files; |
63 | - $language_files[] = 'plugin_' . $this->get_name(); |
|
63 | + $language_files[] = 'plugin_'.$this->get_name(); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | { |
269 | 269 | $settings = $this->get_settings(); |
270 | 270 | foreach ($settings as $setting) { |
271 | - if ($setting['variable'] == $this->get_name() . '_' . $name) { |
|
271 | + if ($setting['variable'] == $this->get_name().'_'.$name) { |
|
272 | 272 | |
273 | 273 | return $setting['selected_value']; |
274 | 274 | } |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | if (!empty($this->course_settings)) { |
405 | 405 | foreach ($this->course_settings as $setting) { |
406 | 406 | $variable = $setting['name']; |
407 | - $value =''; |
|
407 | + $value = ''; |
|
408 | 408 | if (isset($setting['init_value'])) { |
409 | 409 | $value = $setting['init_value']; |
410 | 410 | } |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | |
619 | 619 | // Avoid Tab Name Spaces |
620 | 620 | $tabNameNoSpaces = preg_replace('/\s+/', '', $tabName); |
621 | - $subkeytext = "Tabs" . $tabNameNoSpaces; |
|
621 | + $subkeytext = "Tabs".$tabNameNoSpaces; |
|
622 | 622 | |
623 | 623 | // Check if it is already added |
624 | 624 | $checkCondition = array( |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | } |
638 | 638 | |
639 | 639 | // End Check |
640 | - $subkey = 'custom_tab_' . $tabNum; |
|
640 | + $subkey = 'custom_tab_'.$tabNum; |
|
641 | 641 | $attributes = array( |
642 | 642 | 'variable' => 'show_tabs', |
643 | 643 | 'subkey' => $subkey, |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | |
656 | 656 | // Save the id |
657 | 657 | $settings = $this->get_settings(); |
658 | - $setData = array ( |
|
658 | + $setData = array( |
|
659 | 659 | 'comment' => $subkey |
660 | 660 | ); |
661 | 661 | $whereCondition = array( |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | $i = 1; |
697 | 697 | foreach ($tabs as $row) { |
698 | 698 | $attributes = array( |
699 | - 'subkey' => 'custom_tab_' . $i |
|
699 | + 'subkey' => 'custom_tab_'.$i |
|
700 | 700 | ); |
701 | 701 | $this->updateTab($row['subkey'], $attributes); |
702 | 702 | $i++; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | if ($debug) { |
84 | - error_log("checkip " . intval($check_ip)); |
|
84 | + error_log("checkip ".intval($check_ip)); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | if ($check_ip) { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | '', |
141 | 141 | 'SOAP-ENC:Array', |
142 | 142 | array(), |
143 | - array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType' => 'tns:extras[]')), |
|
143 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:extras[]')), |
|
144 | 144 | 'tns:extras' |
145 | 145 | ); |
146 | 146 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | '', |
174 | 174 | 'SOAP-ENC:Array', |
175 | 175 | array(), |
176 | - array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType' => 'tns:usersParams[]')), |
|
176 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:usersParams[]')), |
|
177 | 177 | 'tns:usersParams' |
178 | 178 | ); |
179 | 179 | |
@@ -219,13 +219,13 @@ discard block |
||
219 | 219 | ); |
220 | 220 | |
221 | 221 | // Register the method to expose |
222 | -$server->register('WSCreateUsers', // method name |
|
223 | - array('createUsers' => 'tns:createUsers'), // input parameters |
|
224 | - array('return' => 'tns:results_createUsers'), // output parameters |
|
225 | - 'urn:WSRegistration', // namespace |
|
226 | - 'urn:WSRegistration#WSCreateUsers', // soapaction |
|
227 | - 'rpc', // style |
|
228 | - 'encoded', // use |
|
222 | +$server->register('WSCreateUsers', // method name |
|
223 | + array('createUsers' => 'tns:createUsers'), // input parameters |
|
224 | + array('return' => 'tns:results_createUsers'), // output parameters |
|
225 | + 'urn:WSRegistration', // namespace |
|
226 | + 'urn:WSRegistration#WSCreateUsers', // soapaction |
|
227 | + 'rpc', // style |
|
228 | + 'encoded', // use |
|
229 | 229 | 'This service adds a user' // documentation |
230 | 230 | ); |
231 | 231 | |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | continue; |
407 | 407 | } |
408 | 408 | |
409 | - $results[] = $userId; |
|
409 | + $results[] = $userId; |
|
410 | 410 | |
411 | 411 | } // end principal foreach |
412 | 412 | |
@@ -452,13 +452,13 @@ discard block |
||
452 | 452 | |
453 | 453 | |
454 | 454 | // Register the method to expose |
455 | -$server->register('WSCreateUser', // method name |
|
456 | - array('createUser' => 'tns:createUser'), // input parameters |
|
457 | - array('return' => 'xsd:string'), // output parameters |
|
458 | - 'urn:WSRegistration', // namespace |
|
459 | - 'urn:WSRegistration#WSCreateUser', // soapaction |
|
460 | - 'rpc', // style |
|
461 | - 'encoded', // use |
|
455 | +$server->register('WSCreateUser', // method name |
|
456 | + array('createUser' => 'tns:createUser'), // input parameters |
|
457 | + array('return' => 'xsd:string'), // output parameters |
|
458 | + 'urn:WSRegistration', // namespace |
|
459 | + 'urn:WSRegistration#WSCreateUser', // soapaction |
|
460 | + 'rpc', // style |
|
461 | + 'encoded', // use |
|
462 | 462 | 'This service adds a user' // documentation |
463 | 463 | ); |
464 | 464 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | } |
562 | 562 | |
563 | 563 | if (isset($original_user_id_name) && isset($original_user_id_value)) { |
564 | - $_SESSION['ws_' . $original_user_id_name] = $original_user_id_value; |
|
564 | + $_SESSION['ws_'.$original_user_id_name] = $original_user_id_value; |
|
565 | 565 | } |
566 | 566 | |
567 | 567 | /** @var User $user */ |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | ); |
610 | 610 | |
611 | 611 | if (isset($original_user_id_name) && isset($original_user_id_value)) { |
612 | - unset($_SESSION['ws_' . $original_user_id_name]); |
|
612 | + unset($_SESSION['ws_'.$original_user_id_name]); |
|
613 | 613 | } |
614 | 614 | |
615 | 615 | if (is_array($extra_list) && count($extra_list) > 0) { |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | 'language' => array('name' => 'language', 'type' => 'xsd:string'), |
662 | 662 | 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), |
663 | 663 | 'expiration_date' => array('name' => 'expiration_date', 'type' => 'xsd:string'), |
664 | - 'official_code' => array('name' => 'official_code', 'type' => 'xsd:string'), |
|
664 | + 'official_code' => array('name' => 'official_code', 'type' => 'xsd:string'), |
|
665 | 665 | 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
666 | 666 | 'original_user_id_value'=> array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
667 | 667 | 'extra' => array('name' => 'extra', 'type' => 'tns:extrasList') |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | 'all', |
690 | 690 | '', |
691 | 691 | array( |
692 | - 'users' => array('name' => 'users', 'type' => 'tns:createUsersPassEncryptParamsList'), |
|
692 | + 'users' => array('name' => 'users', 'type' => 'tns:createUsersPassEncryptParamsList'), |
|
693 | 693 | 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
694 | 694 | ) |
695 | 695 | ); |
@@ -719,13 +719,13 @@ discard block |
||
719 | 719 | ); |
720 | 720 | |
721 | 721 | // Register the method to expose |
722 | -$server->register('WSCreateUsersPasswordCrypted', // method name |
|
722 | +$server->register('WSCreateUsersPasswordCrypted', // method name |
|
723 | 723 | array('createUsersPasswordCrypted' => 'tns:createUsersPasswordCrypted'), // input parameters |
724 | - array('return' => 'tns:results_createUsersPassEncrypt'), // output parameters |
|
725 | - 'urn:WSRegistration', // namespace |
|
726 | - 'urn:WSRegistration#WSCreateUsersPasswordCrypted', // soapaction |
|
727 | - 'rpc', // style |
|
728 | - 'encoded', // use |
|
724 | + array('return' => 'tns:results_createUsersPassEncrypt'), // output parameters |
|
725 | + 'urn:WSRegistration', // namespace |
|
726 | + 'urn:WSRegistration#WSCreateUsersPasswordCrypted', // soapaction |
|
727 | + 'rpc', // style |
|
728 | + 'encoded', // use |
|
729 | 729 | 'This service adds users to the system' // documentation |
730 | 730 | ); |
731 | 731 | |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | |
796 | 796 | if (is_array($extra_list) && count($extra_list) > 0) { |
797 | 797 | foreach ($extra_list as $extra) { |
798 | - if($extra['field_name'] == 'salt') { |
|
798 | + if ($extra['field_name'] == 'salt') { |
|
799 | 799 | $salt = $extra['field_value']; |
800 | 800 | break; |
801 | 801 | } |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | active='1', |
851 | 851 | hr_dept_id=".intval($hr_dept_id); |
852 | 852 | |
853 | - $sql .= " WHERE user_id='".$r_check_user[0]."'"; |
|
853 | + $sql .= " WHERE user_id='".$r_check_user[0]."'"; |
|
854 | 854 | Database::query($sql); |
855 | 855 | |
856 | 856 | if (is_array($extra_list) && count($extra_list) > 0) { |
@@ -989,9 +989,9 @@ discard block |
||
989 | 989 | 'all', |
990 | 990 | '', |
991 | 991 | array( |
992 | - 'user_id' => array('name' => 'course', 'type' => 'xsd:string'), // Chamilo user Id |
|
993 | - 'session_id' => array('name' => 'user_id', 'type' => 'xsd:string'), // Current Session course ID |
|
994 | - 'course_id' =>array('name' => 'courseId', 'type' => 'xsd:string'), // Course Real Id |
|
992 | + 'user_id' => array('name' => 'course', 'type' => 'xsd:string'), // Chamilo user Id |
|
993 | + 'session_id' => array('name' => 'user_id', 'type' => 'xsd:string'), // Current Session course ID |
|
994 | + 'course_id' =>array('name' => 'courseId', 'type' => 'xsd:string'), // Course Real Id |
|
995 | 995 | 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string'), |
996 | 996 | |
997 | 997 | // optional |
@@ -1049,9 +1049,9 @@ discard block |
||
1049 | 1049 | ); |
1050 | 1050 | } |
1051 | 1051 | |
1052 | - if ($debug) error_log('$userId found: '. $userId); |
|
1053 | - if ($debug) error_log('$courseId found: '. $courseId); |
|
1054 | - if ($debug) error_log('$sessionId found: '. $sessionId); |
|
1052 | + if ($debug) error_log('$userId found: '.$userId); |
|
1053 | + if ($debug) error_log('$courseId found: '.$courseId); |
|
1054 | + if ($debug) error_log('$sessionId found: '.$sessionId); |
|
1055 | 1055 | |
1056 | 1056 | return [ |
1057 | 1057 | 'user_id' => $userId, |
@@ -1087,7 +1087,7 @@ discard block |
||
1087 | 1087 | return returnError(WS_ERROR_SECRET_KEY); |
1088 | 1088 | } |
1089 | 1089 | |
1090 | - if ($debug) error_log('Params '. print_r($params, 1)); |
|
1090 | + if ($debug) error_log('Params '.print_r($params, 1)); |
|
1091 | 1091 | |
1092 | 1092 | $params = parseCourseSessionUserParams($params); |
1093 | 1093 | |
@@ -1100,13 +1100,13 @@ discard block |
||
1100 | 1100 | $result = 0; |
1101 | 1101 | |
1102 | 1102 | if (!empty($coaches)) { |
1103 | - if ($debug) error_log('Coaches: '. print_r($coaches, 1)); |
|
1103 | + if ($debug) error_log('Coaches: '.print_r($coaches, 1)); |
|
1104 | 1104 | if (in_array($userId, $coaches)) { |
1105 | 1105 | $result = 1; |
1106 | 1106 | } |
1107 | 1107 | } |
1108 | 1108 | |
1109 | - if ($debug) error_log('Result: '. $result); |
|
1109 | + if ($debug) error_log('Result: '.$result); |
|
1110 | 1110 | |
1111 | 1111 | return $result; |
1112 | 1112 | } |
@@ -1138,7 +1138,7 @@ discard block |
||
1138 | 1138 | return returnError(WS_ERROR_SECRET_KEY); |
1139 | 1139 | } |
1140 | 1140 | |
1141 | - if ($debug) error_log('Params '. print_r($params, 1)); |
|
1141 | + if ($debug) error_log('Params '.print_r($params, 1)); |
|
1142 | 1142 | |
1143 | 1143 | $params = parseCourseSessionUserParams($params); |
1144 | 1144 | |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | $result = 0; |
1153 | 1153 | |
1154 | 1154 | if (!empty($coaches)) { |
1155 | - if ($debug) error_log('Coaches: ' . print_r($coaches, 1)); |
|
1155 | + if ($debug) error_log('Coaches: '.print_r($coaches, 1)); |
|
1156 | 1156 | if (!in_array($userId, $coaches)) { |
1157 | 1157 | $result = 1; |
1158 | 1158 | } |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | $result = 1; |
1161 | 1161 | } |
1162 | 1162 | |
1163 | - if ($debug) error_log('Final Result: '. $result); |
|
1163 | + if ($debug) error_log('Final Result: '.$result); |
|
1164 | 1164 | |
1165 | 1165 | return $result; |
1166 | 1166 | } |
@@ -1178,32 +1178,32 @@ discard block |
||
1178 | 1178 | 'all', |
1179 | 1179 | '', |
1180 | 1180 | array( |
1181 | - 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
1182 | - 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
1183 | - 'status' => array('name' => 'status', 'type' => 'xsd:string'), |
|
1184 | - 'email' => array('name' => 'email', 'type' => 'xsd:string'), |
|
1185 | - 'loginname' => array('name' => 'loginname', 'type' => 'xsd:string'), |
|
1186 | - 'password' => array('name' => 'password', 'type' => 'xsd:string'), //encripted password using the encrypt_method |
|
1187 | - 'encrypt_method' => array('name' => 'encrypt_method', 'type' => 'xsd:string'), |
|
1188 | - 'language' => array('name' => 'language', 'type' => 'xsd:string'), |
|
1189 | - 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), |
|
1190 | - 'expiration_date' => array('name' => 'expiration_date', 'type' => 'xsd:string'), |
|
1191 | - 'official_code' => array('name' => 'official_code', 'type' => 'xsd:string'), |
|
1192 | - 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
1193 | - 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
1194 | - 'extra' => array('name' => 'extra', 'type' => 'tns:extrasList'), |
|
1195 | - 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
1181 | + 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
1182 | + 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
1183 | + 'status' => array('name' => 'status', 'type' => 'xsd:string'), |
|
1184 | + 'email' => array('name' => 'email', 'type' => 'xsd:string'), |
|
1185 | + 'loginname' => array('name' => 'loginname', 'type' => 'xsd:string'), |
|
1186 | + 'password' => array('name' => 'password', 'type' => 'xsd:string'), //encripted password using the encrypt_method |
|
1187 | + 'encrypt_method' => array('name' => 'encrypt_method', 'type' => 'xsd:string'), |
|
1188 | + 'language' => array('name' => 'language', 'type' => 'xsd:string'), |
|
1189 | + 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), |
|
1190 | + 'expiration_date' => array('name' => 'expiration_date', 'type' => 'xsd:string'), |
|
1191 | + 'official_code' => array('name' => 'official_code', 'type' => 'xsd:string'), |
|
1192 | + 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
1193 | + 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
1194 | + 'extra' => array('name' => 'extra', 'type' => 'tns:extrasList'), |
|
1195 | + 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
1196 | 1196 | ) |
1197 | 1197 | ); |
1198 | 1198 | |
1199 | 1199 | // Register the method to expose |
1200 | -$server->register('WSCreateUserPasswordCrypted', // method name |
|
1201 | - array('createUserPasswordCrypted' => 'tns:createUserPasswordCrypted'), // input parameters |
|
1202 | - array('return' => 'xsd:string'), // output parameters |
|
1203 | - 'urn:WSRegistration', // namespace |
|
1204 | - 'urn:WSRegistration#WSCreateUserPasswordCrypted', // soapaction |
|
1205 | - 'rpc', // style |
|
1206 | - 'encoded', // use |
|
1200 | +$server->register('WSCreateUserPasswordCrypted', // method name |
|
1201 | + array('createUserPasswordCrypted' => 'tns:createUserPasswordCrypted'), // input parameters |
|
1202 | + array('return' => 'xsd:string'), // output parameters |
|
1203 | + 'urn:WSRegistration', // namespace |
|
1204 | + 'urn:WSRegistration#WSCreateUserPasswordCrypted', // soapaction |
|
1205 | + 'rpc', // style |
|
1206 | + 'encoded', // use |
|
1207 | 1207 | 'This service adds users' // documentation |
1208 | 1208 | ); |
1209 | 1209 | |
@@ -1213,7 +1213,7 @@ discard block |
||
1213 | 1213 | global $_user, $_configuration, $debug; |
1214 | 1214 | $debug = 1; |
1215 | 1215 | if ($debug) error_log('WSCreateUserPasswordCrypted'); |
1216 | - if ($debug) error_log(print_r($params,1)); |
|
1216 | + if ($debug) error_log(print_r($params, 1)); |
|
1217 | 1217 | |
1218 | 1218 | if (!WSHelperVerifyKey($params)) { |
1219 | 1219 | return returnError(WS_ERROR_SECRET_KEY); |
@@ -1242,7 +1242,7 @@ discard block |
||
1242 | 1242 | $extra_list = isset($params['extra']) ? $params['extra'] : ''; |
1243 | 1243 | |
1244 | 1244 | if (!empty($_configuration['password_encryption'])) { |
1245 | - if ($_configuration['password_encryption'] === $encrypt_method ) { |
|
1245 | + if ($_configuration['password_encryption'] === $encrypt_method) { |
|
1246 | 1246 | if ($encrypt_method == 'md5' && !preg_match('/^[A-Fa-f0-9]{32}$/', $password)) { |
1247 | 1247 | $msg = "Encryption $encrypt_method is invalid"; |
1248 | 1248 | if ($debug) error_log($msg); |
@@ -1304,7 +1304,7 @@ discard block |
||
1304 | 1304 | if (!is_null($auth_source)) { |
1305 | 1305 | $sql .= " auth_source='".Database::escape_string($auth_source)."',"; |
1306 | 1306 | } |
1307 | - $sql .= " |
|
1307 | + $sql .= " |
|
1308 | 1308 | password='".Database::escape_string($password)."', |
1309 | 1309 | email='".Database::escape_string($email)."', |
1310 | 1310 | status='".Database::escape_string($status)."', |
@@ -1495,13 +1495,13 @@ discard block |
||
1495 | 1495 | ); |
1496 | 1496 | |
1497 | 1497 | // Register the method to expose |
1498 | -$server->register('WSEditUserCredentials', // method name |
|
1499 | - array('editUserCredentials' => 'tns:editUserCredentials'), // input parameters |
|
1500 | - array('return' => 'xsd:string'), // output parameters |
|
1501 | - 'urn:WSRegistration', // namespace |
|
1502 | - 'urn:WSRegistration#WSEditUserCredentials', // soapaction |
|
1503 | - 'rpc', // style |
|
1504 | - 'encoded', // use |
|
1498 | +$server->register('WSEditUserCredentials', // method name |
|
1499 | + array('editUserCredentials' => 'tns:editUserCredentials'), // input parameters |
|
1500 | + array('return' => 'xsd:string'), // output parameters |
|
1501 | + 'urn:WSRegistration', // namespace |
|
1502 | + 'urn:WSRegistration#WSEditUserCredentials', // soapaction |
|
1503 | + 'rpc', // style |
|
1504 | + 'encoded', // use |
|
1505 | 1505 | 'This service edits the username and password of a user' // documentation |
1506 | 1506 | ); |
1507 | 1507 | |
@@ -1600,13 +1600,13 @@ discard block |
||
1600 | 1600 | ); |
1601 | 1601 | |
1602 | 1602 | // Register the method to expose |
1603 | -$server->register('WSEditUsers', // method name |
|
1604 | - array('editUsers' => 'tns:editUsers'), // input parameters |
|
1603 | +$server->register('WSEditUsers', // method name |
|
1604 | + array('editUsers' => 'tns:editUsers'), // input parameters |
|
1605 | 1605 | array('return' => 'tns:results_editUsers'), // output parameters |
1606 | - 'urn:WSRegistration', // namespace |
|
1607 | - 'urn:WSRegistration#WSEditUsers', // soapaction |
|
1608 | - 'rpc', // style |
|
1609 | - 'encoded', // use |
|
1606 | + 'urn:WSRegistration', // namespace |
|
1607 | + 'urn:WSRegistration#WSEditUsers', // soapaction |
|
1608 | + 'rpc', // style |
|
1609 | + 'encoded', // use |
|
1610 | 1610 | 'This service edits a user from wiener' // documentation |
1611 | 1611 | ); |
1612 | 1612 | |
@@ -1791,13 +1791,13 @@ discard block |
||
1791 | 1791 | ); |
1792 | 1792 | |
1793 | 1793 | // Register the method to expose |
1794 | -$server->register('WSEditUser', // method name |
|
1795 | - array('editUser' => 'tns:editUser'), // input parameters |
|
1796 | - array('return' => 'xsd:string'), // output parameters |
|
1797 | - 'urn:WSRegistration', // namespace |
|
1798 | - 'urn:WSRegistration#WSEditUser', // soapaction |
|
1799 | - 'rpc', // style |
|
1800 | - 'encoded', // use |
|
1794 | +$server->register('WSEditUser', // method name |
|
1795 | + array('editUser' => 'tns:editUser'), // input parameters |
|
1796 | + array('return' => 'xsd:string'), // output parameters |
|
1797 | + 'urn:WSRegistration', // namespace |
|
1798 | + 'urn:WSRegistration#WSEditUser', // soapaction |
|
1799 | + 'rpc', // style |
|
1800 | + 'encoded', // use |
|
1801 | 1801 | 'This service edits a user from wiener' // documentation |
1802 | 1802 | ); |
1803 | 1803 | |
@@ -1964,13 +1964,13 @@ discard block |
||
1964 | 1964 | ); |
1965 | 1965 | |
1966 | 1966 | // Register the method to expose |
1967 | -$server->register('WSEditUserWithPicture', // method name |
|
1968 | - array('editUserWithPicture' => 'tns:editUserWithPicture'), // input parameters |
|
1969 | - array('return' => 'xsd:string'), // output parameters |
|
1970 | - 'urn:WSRegistration', // namespace |
|
1971 | - 'urn:WSRegistration#WSEditUserWithPicture', // soapaction |
|
1972 | - 'rpc', // style |
|
1973 | - 'encoded', // use |
|
1967 | +$server->register('WSEditUserWithPicture', // method name |
|
1968 | + array('editUserWithPicture' => 'tns:editUserWithPicture'), // input parameters |
|
1969 | + array('return' => 'xsd:string'), // output parameters |
|
1970 | + 'urn:WSRegistration', // namespace |
|
1971 | + 'urn:WSRegistration#WSEditUserWithPicture', // soapaction |
|
1972 | + 'rpc', // style |
|
1973 | + 'encoded', // use |
|
1974 | 1974 | 'This service edits a user from wiener' // documentation |
1975 | 1975 | ); |
1976 | 1976 | |
@@ -2024,8 +2024,8 @@ discard block |
||
2024 | 2024 | $tempDir = api_get_path(SYS_ARCHIVE_PATH); |
2025 | 2025 | // Make sure the file download was OK by checking the HTTP headers for OK |
2026 | 2026 | if (strpos(get_headers($picture_url)[0], "OK")) { |
2027 | - file_put_contents($tempDir . $filename, file_get_contents($picture_url)); |
|
2028 | - $pictureUri = UserManager::update_user_picture($user_id, $filename, $tempDir . $filename); |
|
2027 | + file_put_contents($tempDir.$filename, file_get_contents($picture_url)); |
|
2028 | + $pictureUri = UserManager::update_user_picture($user_id, $filename, $tempDir.$filename); |
|
2029 | 2029 | } |
2030 | 2030 | |
2031 | 2031 | if ($user_id == 0) { |
@@ -2187,13 +2187,13 @@ discard block |
||
2187 | 2187 | ); |
2188 | 2188 | |
2189 | 2189 | // Register the method to expose |
2190 | -$server->register('WSEditUsersPasswordCrypted', // method name |
|
2191 | - array('editUsersPasswordCrypted' => 'tns:editUsersPasswordCrypted'), // input parameters |
|
2192 | - array('return' => 'tns:results_editUsersPasswordCrypted'), // output parameters |
|
2193 | - 'urn:WSRegistration', // namespace |
|
2194 | - 'urn:WSRegistration#WSEditUsersPasswordCrypted', // soapaction |
|
2195 | - 'rpc', // style |
|
2196 | - 'encoded', // use |
|
2190 | +$server->register('WSEditUsersPasswordCrypted', // method name |
|
2191 | + array('editUsersPasswordCrypted' => 'tns:editUsersPasswordCrypted'), // input parameters |
|
2192 | + array('return' => 'tns:results_editUsersPasswordCrypted'), // output parameters |
|
2193 | + 'urn:WSRegistration', // namespace |
|
2194 | + 'urn:WSRegistration#WSEditUsersPasswordCrypted', // soapaction |
|
2195 | + 'rpc', // style |
|
2196 | + 'encoded', // use |
|
2197 | 2197 | 'This service edits a user' // documentation |
2198 | 2198 | ); |
2199 | 2199 | |
@@ -2237,7 +2237,7 @@ discard block |
||
2237 | 2237 | |
2238 | 2238 | $password = $user_param['password']; |
2239 | 2239 | $encrypt_method = $user_param['encrypt_method']; |
2240 | - if ($_configuration['password_encryption'] === $encrypt_method ) { |
|
2240 | + if ($_configuration['password_encryption'] === $encrypt_method) { |
|
2241 | 2241 | if ($encrypt_method == 'md5' && !preg_match('/^[A-Fa-f0-9]{32}$/', $password)) { |
2242 | 2242 | $msg = "Encryption $encrypt_method is invalid"; |
2243 | 2243 | $results[] = $msg; |
@@ -2252,11 +2252,11 @@ discard block |
||
2252 | 2252 | $results[] = $msg; |
2253 | 2253 | continue; |
2254 | 2254 | } |
2255 | - } elseif (!empty($user_param['password']) && empty($user_param['encrypt_method'])){ |
|
2255 | + } elseif (!empty($user_param['password']) && empty($user_param['encrypt_method'])) { |
|
2256 | 2256 | $msg = "If password is not empty the encrypt_method param is required "; |
2257 | 2257 | $results[] = $msg; |
2258 | 2258 | continue; |
2259 | - } elseif (empty($user_param['password']) && !empty($user_param['encrypt_method'])){ |
|
2259 | + } elseif (empty($user_param['password']) && !empty($user_param['encrypt_method'])) { |
|
2260 | 2260 | $msg = "If encrypt_method is not empty the password param is required "; |
2261 | 2261 | $results[] = $msg; |
2262 | 2262 | continue; |
@@ -2392,13 +2392,13 @@ discard block |
||
2392 | 2392 | ); |
2393 | 2393 | |
2394 | 2394 | // Register the method to expose |
2395 | -$server->register('WSEditUserPasswordCrypted', // method name |
|
2395 | +$server->register('WSEditUserPasswordCrypted', // method name |
|
2396 | 2396 | array('editUserPasswordCrypted' => 'tns:editUserPasswordCrypted'), // input parameters |
2397 | - array('return' => 'xsd:string'), // output parameters |
|
2398 | - 'urn:WSRegistration', // namespace |
|
2399 | - 'urn:WSRegistration#WSEditUserPasswordCrypted', // soapaction |
|
2400 | - 'rpc', // style |
|
2401 | - 'encoded', // use |
|
2397 | + array('return' => 'xsd:string'), // output parameters |
|
2398 | + 'urn:WSRegistration', // namespace |
|
2399 | + 'urn:WSRegistration#WSEditUserPasswordCrypted', // soapaction |
|
2400 | + 'rpc', // style |
|
2401 | + 'encoded', // use |
|
2402 | 2402 | 'This service edits a user' // documentation |
2403 | 2403 | ); |
2404 | 2404 | |
@@ -2442,7 +2442,7 @@ discard block |
||
2442 | 2442 | if (!empty($params['password']) && !empty($params['encrypt_method'])) { |
2443 | 2443 | $password = $params['password']; |
2444 | 2444 | $encrypt_method = $params['encrypt_method']; |
2445 | - if ($_configuration['password_encryption'] === $encrypt_method ) { |
|
2445 | + if ($_configuration['password_encryption'] === $encrypt_method) { |
|
2446 | 2446 | if ($encrypt_method == 'md5' && !preg_match('/^[A-Fa-f0-9]{32}$/', $password)) { |
2447 | 2447 | $msg = "Encryption $encrypt_method is invalid"; |
2448 | 2448 | return $msg; |
@@ -2612,7 +2612,7 @@ discard block |
||
2612 | 2612 | '', |
2613 | 2613 | 'SOAP-ENC:Array', |
2614 | 2614 | array(), |
2615 | - array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType' => 'tns:user_id[]')),'tns:user_id' |
|
2615 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:user_id[]')), 'tns:user_id' |
|
2616 | 2616 | ); |
2617 | 2617 | |
2618 | 2618 | $server->wsdl->addComplexType( |
@@ -2636,7 +2636,7 @@ discard block |
||
2636 | 2636 | $orig_user_id_value = array(); |
2637 | 2637 | |
2638 | 2638 | $original_user_ids = $params['ids']; |
2639 | - foreach($original_user_ids as $original_user_id) { |
|
2639 | + foreach ($original_user_ids as $original_user_id) { |
|
2640 | 2640 | $result = false; |
2641 | 2641 | $orig_user_id_value[] = $original_user_id['original_user_id_value']; |
2642 | 2642 | $user_id = UserManager::get_user_id_from_original_id( |
@@ -2646,13 +2646,13 @@ discard block |
||
2646 | 2646 | if ($user_id > 0) { |
2647 | 2647 | if ($type == "delete") { |
2648 | 2648 | $result = UserManager::delete_user($user_id); |
2649 | - } else if($type == "disable") { |
|
2649 | + } else if ($type == "disable") { |
|
2650 | 2650 | $result = UserManager::disable($user_id); |
2651 | - } else if($type == "enable") { |
|
2651 | + } else if ($type == "enable") { |
|
2652 | 2652 | $result = UserManager::enable($user_id); |
2653 | 2653 | } |
2654 | 2654 | } |
2655 | - $results[] = $result?1:0; |
|
2655 | + $results[] = $result ? 1 : 0; |
|
2656 | 2656 | } |
2657 | 2657 | |
2658 | 2658 | |
@@ -2668,13 +2668,13 @@ discard block |
||
2668 | 2668 | return $output; |
2669 | 2669 | } |
2670 | 2670 | |
2671 | -$server->register('WSDeleteUsers', // method name |
|
2672 | - array('user_ids' => 'tns:user_ids'), // input parameters |
|
2673 | - array('return' => 'tns:results_actionUsers'), // output parameters |
|
2674 | - 'urn:WSRegistration', // namespace |
|
2675 | - 'urn:WSRegistration#WSDeleteUsers', // soapaction |
|
2676 | - 'rpc', // style |
|
2677 | - 'encoded', // use |
|
2671 | +$server->register('WSDeleteUsers', // method name |
|
2672 | + array('user_ids' => 'tns:user_ids'), // input parameters |
|
2673 | + array('return' => 'tns:results_actionUsers'), // output parameters |
|
2674 | + 'urn:WSRegistration', // namespace |
|
2675 | + 'urn:WSRegistration#WSDeleteUsers', // soapaction |
|
2676 | + 'rpc', // style |
|
2677 | + 'encoded', // use |
|
2678 | 2678 | 'Deletes users provided as parameters from the system' // documentation |
2679 | 2679 | ); |
2680 | 2680 | |
@@ -2683,13 +2683,13 @@ discard block |
||
2683 | 2683 | } |
2684 | 2684 | |
2685 | 2685 | /** WSDisableUsers **/ |
2686 | -$server->register('WSDisableUsers', // method name |
|
2687 | - array('user_ids' => 'tns:user_ids'), // input parameters |
|
2688 | - array('return' => 'tns:results_actionUsers'), // output parameters |
|
2689 | - 'urn:WSRegistration', // namespace |
|
2690 | - 'urn:WSRegistration#WSDisableUsers', // soapaction |
|
2691 | - 'rpc', // style |
|
2692 | - 'encoded', // use |
|
2686 | +$server->register('WSDisableUsers', // method name |
|
2687 | + array('user_ids' => 'tns:user_ids'), // input parameters |
|
2688 | + array('return' => 'tns:results_actionUsers'), // output parameters |
|
2689 | + 'urn:WSRegistration', // namespace |
|
2690 | + 'urn:WSRegistration#WSDisableUsers', // soapaction |
|
2691 | + 'rpc', // style |
|
2692 | + 'encoded', // use |
|
2693 | 2693 | 'Disables users provided as parameters from the system' // documentation |
2694 | 2694 | ); |
2695 | 2695 | |
@@ -2698,13 +2698,13 @@ discard block |
||
2698 | 2698 | } |
2699 | 2699 | |
2700 | 2700 | /** WSEnableUsers **/ |
2701 | -$server->register('WSEnableUsers', // method name |
|
2702 | - array('user_ids' => 'tns:user_ids'), // input parameters |
|
2703 | - array('return' => 'tns:results_actionUsers'), // output parameters |
|
2704 | - 'urn:WSRegistration', // namespace |
|
2705 | - 'urn:WSRegistration#WSEnableUsers', // soapaction |
|
2706 | - 'rpc', // style |
|
2707 | - 'encoded', // use |
|
2701 | +$server->register('WSEnableUsers', // method name |
|
2702 | + array('user_ids' => 'tns:user_ids'), // input parameters |
|
2703 | + array('return' => 'tns:results_actionUsers'), // output parameters |
|
2704 | + 'urn:WSRegistration', // namespace |
|
2705 | + 'urn:WSRegistration#WSEnableUsers', // soapaction |
|
2706 | + 'rpc', // style |
|
2707 | + 'encoded', // use |
|
2708 | 2708 | 'Enables users provided as parameters' // documentation |
2709 | 2709 | ); |
2710 | 2710 | |
@@ -2757,7 +2757,7 @@ discard block |
||
2757 | 2757 | '', |
2758 | 2758 | 'SOAP-ENC:Array', |
2759 | 2759 | array(), |
2760 | - array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType' => 'tns:createCourseParams[]')),'tns:createCourseParams' |
|
2760 | + array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:createCourseParams[]')), 'tns:createCourseParams' |
|
2761 | 2761 | ); |
2762 | 2762 | |
2763 | 2763 | // Register the data structures used by the service |
@@ -2798,13 +2798,13 @@ discard block |
||
2798 | 2798 | ); |
2799 | 2799 | |
2800 | 2800 | // Register the method to expose |
2801 | -$server->register('WSCreateCourse', // method name |
|
2802 | - array('createCourse' => 'tns:createCourse'), // input parameters |
|
2801 | +$server->register('WSCreateCourse', // method name |
|
2802 | + array('createCourse' => 'tns:createCourse'), // input parameters |
|
2803 | 2803 | array('return' => 'tns:results_createCourse'), // output parameters |
2804 | - 'urn:WSRegistration', // namespace |
|
2805 | - 'urn:WSRegistration#WSCreateCourse', // soapaction |
|
2806 | - 'rpc', // style |
|
2807 | - 'encoded', // use |
|
2804 | + 'urn:WSRegistration', // namespace |
|
2805 | + 'urn:WSRegistration#WSCreateCourse', // soapaction |
|
2806 | + 'rpc', // style |
|
2807 | + 'encoded', // use |
|
2808 | 2808 | 'This service adds a course' // documentation |
2809 | 2809 | ); |
2810 | 2810 | |
@@ -2862,7 +2862,7 @@ discard block |
||
2862 | 2862 | category_code='".Database::escape_string($category_code)."', |
2863 | 2863 | tutor_name='".Database::escape_string($tutor_name)."', |
2864 | 2864 | visual_code='".Database::escape_string($wanted_code)."'"; |
2865 | - if($visibility !== null) { |
|
2865 | + if ($visibility !== null) { |
|
2866 | 2866 | $sql .= ", visibility = '$visibility' "; |
2867 | 2867 | } |
2868 | 2868 | $sql .= " WHERE id='".$courseInfo['real_id']."'"; |
@@ -2895,7 +2895,7 @@ discard block |
||
2895 | 2895 | $params['title'] = $title; |
2896 | 2896 | $params['wanted_code'] = $wanted_code; |
2897 | 2897 | $params['category_code'] = $category_code; |
2898 | - $params['course_category'] = $category_code; |
|
2898 | + $params['course_category'] = $category_code; |
|
2899 | 2899 | $params['tutor_name'] = $tutor_name; |
2900 | 2900 | $params['course_language'] = $course_language; |
2901 | 2901 | $params['user_id'] = api_get_user_id(); |
@@ -3033,13 +3033,13 @@ discard block |
||
3033 | 3033 | |
3034 | 3034 | |
3035 | 3035 | // Register the method to expose |
3036 | -$server->register('WSCreateCourseByTitle', // method name |
|
3036 | +$server->register('WSCreateCourseByTitle', // method name |
|
3037 | 3037 | array('createCourseByTitle' => 'tns:createCourseByTitle'), // input parameters |
3038 | - array('return' => 'tns:results_createCourseByTitle'), // output parameters |
|
3039 | - 'urn:WSRegistration', // namespace |
|
3040 | - 'urn:WSRegistration#WSCreateCourseByTitle', // soapaction |
|
3041 | - 'rpc', // style |
|
3042 | - 'encoded', // use |
|
3038 | + array('return' => 'tns:results_createCourseByTitle'), // output parameters |
|
3039 | + 'urn:WSRegistration', // namespace |
|
3040 | + 'urn:WSRegistration#WSCreateCourseByTitle', // soapaction |
|
3041 | + 'rpc', // style |
|
3042 | + 'encoded', // use |
|
3043 | 3043 | 'This service adds a course by title' // documentation |
3044 | 3044 | ); |
3045 | 3045 | |
@@ -3270,18 +3270,18 @@ discard block |
||
3270 | 3270 | ); |
3271 | 3271 | |
3272 | 3272 | // Register the method to expose |
3273 | -$server->register('WSEditCourse', // method name |
|
3274 | - array('editCourse' => 'tns:editCourse'), // input parameters |
|
3273 | +$server->register('WSEditCourse', // method name |
|
3274 | + array('editCourse' => 'tns:editCourse'), // input parameters |
|
3275 | 3275 | array('return' => 'tns:results_editCourse'), // output parameters |
3276 | - 'urn:WSRegistration', // namespace |
|
3277 | - 'urn:WSRegistration#WSEditCourse', // soapaction |
|
3278 | - 'rpc', // style |
|
3279 | - 'encoded', // use |
|
3276 | + 'urn:WSRegistration', // namespace |
|
3277 | + 'urn:WSRegistration#WSEditCourse', // soapaction |
|
3278 | + 'rpc', // style |
|
3279 | + 'encoded', // use |
|
3280 | 3280 | 'This service edits a course' // documentation |
3281 | 3281 | ); |
3282 | 3282 | |
3283 | 3283 | // Define the method WSEditCourse |
3284 | -function WSEditCourse($params){ |
|
3284 | +function WSEditCourse($params) { |
|
3285 | 3285 | |
3286 | 3286 | global $_configuration; |
3287 | 3287 | if (!WSHelperVerifyKey($params)) { |
@@ -3436,13 +3436,13 @@ discard block |
||
3436 | 3436 | |
3437 | 3437 | |
3438 | 3438 | // Register the method to expose |
3439 | -$server->register('WSCourseDescription', // method name |
|
3440 | - array('courseDescription' => 'tns:courseDescription'), // input parameters |
|
3441 | - array('return' => 'tns:fields_course_desc_list'), // output parameters |
|
3442 | - 'urn:WSRegistration', // namespace |
|
3443 | - 'urn:WSRegistration#WSCourseDescription', // soapaction |
|
3444 | - 'rpc', // style |
|
3445 | - 'encoded', // use |
|
3439 | +$server->register('WSCourseDescription', // method name |
|
3440 | + array('courseDescription' => 'tns:courseDescription'), // input parameters |
|
3441 | + array('return' => 'tns:fields_course_desc_list'), // output parameters |
|
3442 | + 'urn:WSRegistration', // namespace |
|
3443 | + 'urn:WSRegistration#WSCourseDescription', // soapaction |
|
3444 | + 'rpc', // style |
|
3445 | + 'encoded', // use |
|
3446 | 3446 | 'This service edits a course description' // documentation |
3447 | 3447 | ); |
3448 | 3448 | |
@@ -3492,7 +3492,7 @@ discard block |
||
3492 | 3492 | } |
3493 | 3493 | |
3494 | 3494 | while ($row = Database::fetch_array($result)) { |
3495 | - $ind = (int)$row['id']; |
|
3495 | + $ind = (int) $row['id']; |
|
3496 | 3496 | $array_course_desc_title[$ind] = $row['title']; |
3497 | 3497 | $array_course_desc_content[$ind] = $row['content']; |
3498 | 3498 | } |
@@ -3579,13 +3579,13 @@ discard block |
||
3579 | 3579 | |
3580 | 3580 | |
3581 | 3581 | // Register the method to expose |
3582 | -$server->register('WSEditCourseDescription', // method name |
|
3582 | +$server->register('WSEditCourseDescription', // method name |
|
3583 | 3583 | array('editCourseDescription' => 'tns:editCourseDescription'), // input parameters |
3584 | - array('return' => 'tns:results_editCourseDescription'), // output parameters |
|
3585 | - 'urn:WSRegistration', // namespace |
|
3586 | - 'urn:WSRegistration#WSEditCourseDescription', // soapaction |
|
3587 | - 'rpc', // style |
|
3588 | - 'encoded', // use |
|
3584 | + array('return' => 'tns:results_editCourseDescription'), // output parameters |
|
3585 | + 'urn:WSRegistration', // namespace |
|
3586 | + 'urn:WSRegistration#WSEditCourseDescription', // soapaction |
|
3587 | + 'rpc', // style |
|
3588 | + 'encoded', // use |
|
3589 | 3589 | 'This service edits a course description' // documentation |
3590 | 3590 | ); |
3591 | 3591 | |
@@ -3627,7 +3627,7 @@ discard block |
||
3627 | 3627 | $course_desc_title = Database::escape_string($course_desc_title); |
3628 | 3628 | $course_desc_content = Database::escape_string($course_desc_content); |
3629 | 3629 | |
3630 | - $course_desc_id = (int)$course_desc_id; |
|
3630 | + $course_desc_id = (int) $course_desc_id; |
|
3631 | 3631 | if ($course_desc_id > 8 && $course_desc_id < 1) { |
3632 | 3632 | $results[] = 0; // course_desc_id invalid. |
3633 | 3633 | continue; |
@@ -3656,7 +3656,7 @@ discard block |
||
3656 | 3656 | $result = $courseDescription->insert(); |
3657 | 3657 | } |
3658 | 3658 | |
3659 | - $results[] = $result?1:0; |
|
3659 | + $results[] = $result ? 1 : 0; |
|
3660 | 3660 | } // end principal foreach |
3661 | 3661 | |
3662 | 3662 | $count_results = count($results); |
@@ -3734,13 +3734,13 @@ discard block |
||
3734 | 3734 | 'tns:result_deleteCourse' |
3735 | 3735 | ); |
3736 | 3736 | |
3737 | -$server->register('WSDeleteCourse', // method name |
|
3738 | - array('deleteCourse' => 'tns:deleteCourse'), // input parameters |
|
3737 | +$server->register('WSDeleteCourse', // method name |
|
3738 | + array('deleteCourse' => 'tns:deleteCourse'), // input parameters |
|
3739 | 3739 | array('return' => 'tns:results_deleteCourse'), // output parameters |
3740 | - 'urn:WSRegistration', // namespace |
|
3741 | - 'urn:WSRegistration#WSDeleteCourse', // soapaction |
|
3742 | - 'rpc', // style |
|
3743 | - 'encoded', // use |
|
3740 | + 'urn:WSRegistration', // namespace |
|
3741 | + 'urn:WSRegistration#WSDeleteCourse', // soapaction |
|
3742 | + 'rpc', // style |
|
3743 | + 'encoded', // use |
|
3744 | 3744 | 'This service deletes a course ' // documentation |
3745 | 3745 | ); |
3746 | 3746 | |
@@ -3867,13 +3867,13 @@ discard block |
||
3867 | 3867 | ); |
3868 | 3868 | |
3869 | 3869 | // Register the method to expose |
3870 | -$server->register('WSCreateSession', // method name |
|
3871 | - array('createSession' => 'tns:createSession'), // input parameters |
|
3870 | +$server->register('WSCreateSession', // method name |
|
3871 | + array('createSession' => 'tns:createSession'), // input parameters |
|
3872 | 3872 | array('return' => 'tns:results_createSession'), // output parameters |
3873 | - 'urn:WSRegistration', // namespace |
|
3874 | - 'urn:WSRegistration#WSCreateSession', // soapaction |
|
3875 | - 'rpc', // style |
|
3876 | - 'encoded', // use |
|
3873 | + 'urn:WSRegistration', // namespace |
|
3874 | + 'urn:WSRegistration#WSCreateSession', // soapaction |
|
3875 | + 'rpc', // style |
|
3876 | + 'encoded', // use |
|
3877 | 3877 | 'This service edits a session' // documentation |
3878 | 3878 | ); |
3879 | 3879 | |
@@ -3927,8 +3927,8 @@ discard block |
||
3927 | 3927 | } |
3928 | 3928 | |
3929 | 3929 | if (empty($nolimit)) { |
3930 | - $date_start = "$year_start-".(($month_start < 10)?"0$month_start":$month_start)."-".(($day_start < 10)?"0$day_start":$day_start) . ' 00:00:00'; |
|
3931 | - $date_end = "$year_end-".(($month_end < 10)?"0$month_end":$month_end)."-".(($day_end < 10)?"0$day_end":$day_end) . ' 23:59:59'; |
|
3930 | + $date_start = "$year_start-".(($month_start < 10) ? "0$month_start" : $month_start)."-".(($day_start < 10) ? "0$day_start" : $day_start).' 00:00:00'; |
|
3931 | + $date_end = "$year_end-".(($month_end < 10) ? "0$month_end" : $month_end)."-".(($day_end < 10) ? "0$day_end" : $day_end).' 23:59:59'; |
|
3932 | 3932 | } else { |
3933 | 3933 | $date_start = ""; |
3934 | 3934 | $date_end = ""; |
@@ -3952,7 +3952,7 @@ discard block |
||
3952 | 3952 | } |
3953 | 3953 | $results[] = 0; |
3954 | 3954 | continue; |
3955 | - } elseif (empty($nolimit) && (!$month_end || !$day_end || !$year_end || !checkdate($month_end, $day_end, $year_end))) { |
|
3955 | + } elseif (empty($nolimit) && (!$month_end || !$day_end || !$year_end || !checkdate($month_end, $day_end, $year_end))) { |
|
3956 | 3956 | $results[] = 0; |
3957 | 3957 | if ($debug) { |
3958 | 3958 | error_log("There's an error with the end date: $month_end - $day_end - $year_end"); |
@@ -4141,13 +4141,13 @@ discard block |
||
4141 | 4141 | |
4142 | 4142 | |
4143 | 4143 | // Register the method to expose |
4144 | -$server->register('WSEditSession', // method name |
|
4145 | - array('editSession' => 'tns:editSession'), // input parameters |
|
4144 | +$server->register('WSEditSession', // method name |
|
4145 | + array('editSession' => 'tns:editSession'), // input parameters |
|
4146 | 4146 | array('return' => 'tns:results_editSession'), // output parameters |
4147 | - 'urn:WSRegistration', // namespace |
|
4148 | - 'urn:WSRegistration#WSEditSession', // soapaction |
|
4149 | - 'rpc', // style |
|
4150 | - 'encoded', // use |
|
4147 | + 'urn:WSRegistration', // namespace |
|
4148 | + 'urn:WSRegistration#WSEditSession', // soapaction |
|
4149 | + 'rpc', // style |
|
4150 | + 'encoded', // use |
|
4151 | 4151 | 'This service edits a session' // documentation |
4152 | 4152 | ); |
4153 | 4153 | |
@@ -4267,7 +4267,7 @@ discard block |
||
4267 | 4267 | } |
4268 | 4268 | } |
4269 | 4269 | |
4270 | - $results[] = $editResult?1:0; |
|
4270 | + $results[] = $editResult ? 1 : 0; |
|
4271 | 4271 | continue; |
4272 | 4272 | } |
4273 | 4273 | |
@@ -4346,13 +4346,13 @@ discard block |
||
4346 | 4346 | 'tns:result_deleteSession' |
4347 | 4347 | ); |
4348 | 4348 | |
4349 | -$server->register('WSDeleteSession', // method name |
|
4350 | - array('deleteSession' => 'tns:deleteSession'), // input parameters |
|
4349 | +$server->register('WSDeleteSession', // method name |
|
4350 | + array('deleteSession' => 'tns:deleteSession'), // input parameters |
|
4351 | 4351 | array('return' => 'tns:results_deleteSession'), // output parameters |
4352 | - 'urn:WSRegistration', // namespace |
|
4353 | - 'urn:WSRegistration#WSDeleteSession', // soapaction |
|
4354 | - 'rpc', // style |
|
4355 | - 'encoded', // use |
|
4352 | + 'urn:WSRegistration', // namespace |
|
4353 | + 'urn:WSRegistration#WSDeleteSession', // soapaction |
|
4354 | + 'rpc', // style |
|
4355 | + 'encoded', // use |
|
4356 | 4356 | 'This service deletes a session ' // documentation |
4357 | 4357 | ); |
4358 | 4358 | |
@@ -4433,10 +4433,10 @@ discard block |
||
4433 | 4433 | 'struct', |
4434 | 4434 | 'all', |
4435 | 4435 | '', |
4436 | - array ( |
|
4436 | + array( |
|
4437 | 4437 | 'course_id' => array('name' => 'course_id', 'type' => 'tns:course_id'), |
4438 | - 'user_id' => array('name' => 'user_id', 'type' => 'tns:user_id'), |
|
4439 | - 'status' => array('name' => 'status', 'type' => 'xsd:int') |
|
4438 | + 'user_id' => array('name' => 'user_id', 'type' => 'tns:user_id'), |
|
4439 | + 'status' => array('name' => 'status', 'type' => 'xsd:int') |
|
4440 | 4440 | ) |
4441 | 4441 | ); |
4442 | 4442 | |
@@ -4446,9 +4446,9 @@ discard block |
||
4446 | 4446 | 'struct', |
4447 | 4447 | 'all', |
4448 | 4448 | '', |
4449 | - array ( |
|
4450 | - 'userscourses' => array('name' => 'userscourses', 'type' => 'tns:user_course_status_array'), //removed [] |
|
4451 | - 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
4449 | + array( |
|
4450 | + 'userscourses' => array('name' => 'userscourses', 'type' => 'tns:user_course_status_array'), //removed [] |
|
4451 | + 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
4452 | 4452 | ) |
4453 | 4453 | ); |
4454 | 4454 | |
@@ -4473,9 +4473,9 @@ discard block |
||
4473 | 4473 | 'all', |
4474 | 4474 | '', |
4475 | 4475 | array( |
4476 | - 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
4477 | - 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
4478 | - 'result' => array('name' => 'result', 'type' => 'xsd:int') |
|
4476 | + 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
4477 | + 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
4478 | + 'result' => array('name' => 'result', 'type' => 'xsd:int') |
|
4479 | 4479 | ) |
4480 | 4480 | ); |
4481 | 4481 | |
@@ -4491,13 +4491,13 @@ discard block |
||
4491 | 4491 | ); |
4492 | 4492 | |
4493 | 4493 | // Register the method to expose |
4494 | -$server->register('WSSubscribeUserToCourse', // method name |
|
4495 | - array('subscribeUserToCourse' => 'tns:subscribeUserToCourse_arg'), // input parameters |
|
4494 | +$server->register('WSSubscribeUserToCourse', // method name |
|
4495 | + array('subscribeUserToCourse' => 'tns:subscribeUserToCourse_arg'), // input parameters |
|
4496 | 4496 | array('return' => 'tns:subscribeUserToCourse_return_global'), |
4497 | - 'urn:WSRegistration', // namespace |
|
4498 | - 'urn:WSRegistration#WSSubscribeUserToCourse', // soapaction |
|
4499 | - 'rpc', // style |
|
4500 | - 'encoded', // use |
|
4497 | + 'urn:WSRegistration', // namespace |
|
4498 | + 'urn:WSRegistration#WSSubscribeUserToCourse', // soapaction |
|
4499 | + 'rpc', // style |
|
4500 | + 'encoded', // use |
|
4501 | 4501 | 'This service subscribes a user to a course' // documentation |
4502 | 4502 | ); |
4503 | 4503 | |
@@ -4507,7 +4507,7 @@ discard block |
||
4507 | 4507 | if (!WSHelperVerifyKey($params)) { |
4508 | 4508 | return returnError(WS_ERROR_SECRET_KEY); |
4509 | 4509 | } |
4510 | - if ($debug) error_log('WSSubscribeUserToCourse params: '.print_r($params,1)); |
|
4510 | + if ($debug) error_log('WSSubscribeUserToCourse params: '.print_r($params, 1)); |
|
4511 | 4511 | |
4512 | 4512 | $results = array(); |
4513 | 4513 | $userscourses = $params['userscourses']; |
@@ -4575,9 +4575,9 @@ discard block |
||
4575 | 4575 | 'all', |
4576 | 4576 | '', |
4577 | 4577 | array( |
4578 | - 'course' => array('name' => 'course', 'type' => 'xsd:string'), //Course string code |
|
4579 | - 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), //Chamilo user_id |
|
4580 | - 'status' => array('name' => 'status', 'type' => 'xsd:int'), |
|
4578 | + 'course' => array('name' => 'course', 'type' => 'xsd:string'), //Course string code |
|
4579 | + 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), //Chamilo user_id |
|
4580 | + 'status' => array('name' => 'status', 'type' => 'xsd:int'), |
|
4581 | 4581 | 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
4582 | 4582 | ) |
4583 | 4583 | ); |
@@ -4590,18 +4590,18 @@ discard block |
||
4590 | 4590 | 'struct', |
4591 | 4591 | 'all', |
4592 | 4592 | '', |
4593 | - array('message' => array('name' => 'message', 'type' => 'xsd:string')) |
|
4593 | + array('message' => array('name' => 'message', 'type' => 'xsd:string')) |
|
4594 | 4594 | ); |
4595 | 4595 | |
4596 | 4596 | |
4597 | 4597 | // Register the method to expose |
4598 | -$server->register('WSSubscribeUserToCourseSimple', // method name |
|
4598 | +$server->register('WSSubscribeUserToCourseSimple', // method name |
|
4599 | 4599 | array('subscribeUserToCourseSimple' => 'tns:subscribeUserToCourseSimple_arg'), // input parameters |
4600 | - array('return' => 'xsd:string'), // output parameters |
|
4601 | - 'urn:WSRegistration', // namespace |
|
4602 | - 'urn:WSRegistration#WSSubscribeUserToCourseSimple', // soapaction |
|
4603 | - 'rpc', // style |
|
4604 | - 'encoded', // use |
|
4600 | + array('return' => 'xsd:string'), // output parameters |
|
4601 | + 'urn:WSRegistration', // namespace |
|
4602 | + 'urn:WSRegistration#WSSubscribeUserToCourseSimple', // soapaction |
|
4603 | + 'rpc', // style |
|
4604 | + 'encoded', // use |
|
4605 | 4605 | 'This service subscribes a user to a course in a simple way' // documentation |
4606 | 4606 | ); |
4607 | 4607 | |
@@ -4610,7 +4610,7 @@ discard block |
||
4610 | 4610 | global $debug; |
4611 | 4611 | |
4612 | 4612 | if ($debug) error_log('WSSubscribeUserToCourseSimple'); |
4613 | - if ($debug) error_log('Params '. print_r($params, 1)); |
|
4613 | + if ($debug) error_log('Params '.print_r($params, 1)); |
|
4614 | 4614 | if (!WSHelperVerifyKey($params)) { |
4615 | 4615 | return returnError(WS_ERROR_SECRET_KEY); |
4616 | 4616 | } |
@@ -4661,9 +4661,9 @@ discard block |
||
4661 | 4661 | 'all', |
4662 | 4662 | '', |
4663 | 4663 | array( |
4664 | - 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
4665 | - 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
4666 | - 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
4664 | + 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
4665 | + 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
4666 | + 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
4667 | 4667 | ) |
4668 | 4668 | ); |
4669 | 4669 | |
@@ -4674,21 +4674,21 @@ discard block |
||
4674 | 4674 | 'struct', |
4675 | 4675 | 'all', |
4676 | 4676 | '', |
4677 | - array ( |
|
4678 | - 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), |
|
4679 | - 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
4680 | - 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
4677 | + array( |
|
4678 | + 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), |
|
4679 | + 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), |
|
4680 | + 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), |
|
4681 | 4681 | ) |
4682 | 4682 | ); |
4683 | 4683 | |
4684 | 4684 | // Register the method to expose |
4685 | -$server->register('WSGetUser', // method name |
|
4686 | - array('GetUser' => 'tns:GetUserArg'), // input parameters |
|
4687 | - array('return' => 'tns:User'), // output parameters |
|
4688 | - 'urn:WSRegistration', // namespace |
|
4689 | - 'urn:WSRegistration#WSGetUser', // soapaction |
|
4690 | - 'rpc', // style |
|
4691 | - 'encoded', // use |
|
4685 | +$server->register('WSGetUser', // method name |
|
4686 | + array('GetUser' => 'tns:GetUserArg'), // input parameters |
|
4687 | + array('return' => 'tns:User'), // output parameters |
|
4688 | + 'urn:WSRegistration', // namespace |
|
4689 | + 'urn:WSRegistration#WSGetUser', // soapaction |
|
4690 | + 'rpc', // style |
|
4691 | + 'encoded', // use |
|
4692 | 4692 | 'This service get user information by id' // documentation |
4693 | 4693 | ); |
4694 | 4694 | |
@@ -4733,17 +4733,17 @@ discard block |
||
4733 | 4733 | '', |
4734 | 4734 | array( |
4735 | 4735 | 'username' => array('name' => 'username', 'type' => 'xsd:string'), |
4736 | - 'secret_key' => array('name' => 'secret_key','type' => 'xsd:string') |
|
4736 | + 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
4737 | 4737 | ) |
4738 | 4738 | ); |
4739 | 4739 | // Register the method to expose |
4740 | -$server->register('WSGetUserFromUsername', // method name |
|
4741 | - array('GetUserFromUsername' => 'tns:GetUserArgUsername'), // input params |
|
4742 | - array('return' => 'tns:User'), // output parameters |
|
4743 | - 'urn:WSRegistration', // namespace |
|
4744 | - 'urn:WSRegistration#WSGetUserFromUsername', // soapaction |
|
4745 | - 'rpc', // style |
|
4746 | - 'encoded', // use |
|
4740 | +$server->register('WSGetUserFromUsername', // method name |
|
4741 | + array('GetUserFromUsername' => 'tns:GetUserArgUsername'), // input params |
|
4742 | + array('return' => 'tns:User'), // output parameters |
|
4743 | + 'urn:WSRegistration', // namespace |
|
4744 | + 'urn:WSRegistration#WSGetUserFromUsername', // soapaction |
|
4745 | + 'rpc', // style |
|
4746 | + 'encoded', // use |
|
4747 | 4747 | 'This service get user information by username' // documentation |
4748 | 4748 | ); |
4749 | 4749 | |
@@ -4785,10 +4785,10 @@ discard block |
||
4785 | 4785 | 'all', |
4786 | 4786 | '', |
4787 | 4787 | array( |
4788 | - 'original_user_id_values' => array('name' => 'original_user_id_values', 'type' => 'tns:originalUsersList'), |
|
4789 | - 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
4790 | - 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
4791 | - 'original_course_id_name' => array('name' => 'original_course_id_name', 'type' => 'xsd:string'), |
|
4788 | + 'original_user_id_values' => array('name' => 'original_user_id_values', 'type' => 'tns:originalUsersList'), |
|
4789 | + 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
4790 | + 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
4791 | + 'original_course_id_name' => array('name' => 'original_course_id_name', 'type' => 'xsd:string'), |
|
4792 | 4792 | ) |
4793 | 4793 | ); |
4794 | 4794 | |
@@ -4841,13 +4841,13 @@ discard block |
||
4841 | 4841 | ); |
4842 | 4842 | |
4843 | 4843 | // Register the method to expose |
4844 | -$server->register('WSUnsubscribeUserFromCourse', // method name |
|
4844 | +$server->register('WSUnsubscribeUserFromCourse', // method name |
|
4845 | 4845 | array('unsuscribeUserFromCourse' => 'tns:unsuscribeUserFromCourse'), // input parameters |
4846 | - array('return' => 'tns:results_unsuscribeUserFromCourse'), // output parameters |
|
4847 | - 'urn:WSRegistration', // namespace |
|
4848 | - 'urn:WSRegistration#WSUnsubscribeUserFromCourse', // soapaction |
|
4849 | - 'rpc', // style |
|
4850 | - 'encoded', // use |
|
4846 | + array('return' => 'tns:results_unsuscribeUserFromCourse'), // output parameters |
|
4847 | + 'urn:WSRegistration', // namespace |
|
4848 | + 'urn:WSRegistration#WSUnsubscribeUserFromCourse', // soapaction |
|
4849 | + 'rpc', // style |
|
4850 | + 'encoded', // use |
|
4851 | 4851 | 'This service unsubscribes a user from a course' // documentation |
4852 | 4852 | ); |
4853 | 4853 | |
@@ -4893,7 +4893,7 @@ discard block |
||
4893 | 4893 | $usersList[] = $user_id; |
4894 | 4894 | } |
4895 | 4895 | |
4896 | - $orig_user_id_value[] = implode(',',$usersList); |
|
4896 | + $orig_user_id_value[] = implode(',', $usersList); |
|
4897 | 4897 | |
4898 | 4898 | $courseInfo = CourseManager::getCourseInfoFromOriginalId( |
4899 | 4899 | $original_course_id_value, |
@@ -4960,20 +4960,20 @@ discard block |
||
4960 | 4960 | 'all', |
4961 | 4961 | '', |
4962 | 4962 | array( |
4963 | - 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
4964 | - 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
4965 | - 'result' => array('name' => 'result', 'type' => 'xsd:int') |
|
4963 | + 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
4964 | + 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
4965 | + 'result' => array('name' => 'result', 'type' => 'xsd:int') |
|
4966 | 4966 | ) |
4967 | 4967 | ); |
4968 | 4968 | |
4969 | 4969 | // Register the method to expose |
4970 | -$server->register('WSUnSubscribeUserFromCourseSimple', // method name |
|
4970 | +$server->register('WSUnSubscribeUserFromCourseSimple', // method name |
|
4971 | 4971 | array('unSubscribeUserFromCourseSimple' => 'tns:unSubscribeUserFromCourseSimple'), // input parameters |
4972 | - array('return' => 'tns:unSubscribeUserToCourseSimple_return'), // output parameters |
|
4973 | - 'urn:WSRegistration', // namespace |
|
4974 | - 'urn:WSRegistration#WSUnSubscribeUserFromCourseSimple', // soapaction |
|
4975 | - 'rpc', // style |
|
4976 | - 'encoded', // use |
|
4972 | + array('return' => 'tns:unSubscribeUserToCourseSimple_return'), // output parameters |
|
4973 | + 'urn:WSRegistration', // namespace |
|
4974 | + 'urn:WSRegistration#WSUnSubscribeUserFromCourseSimple', // soapaction |
|
4975 | + 'rpc', // style |
|
4976 | + 'encoded', // use |
|
4977 | 4977 | 'This service unsubscribe a user from a course' // documentation |
4978 | 4978 | ); |
4979 | 4979 | /** |
@@ -5044,10 +5044,10 @@ discard block |
||
5044 | 5044 | 'all', |
5045 | 5045 | '', |
5046 | 5046 | array( |
5047 | - 'original_user_id_values' => array('name' => 'original_user_id_values', 'type' => 'tns:originalUsersList'), |
|
5048 | - 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
5049 | - 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
5050 | - 'original_course_id_name' => array('name' => 'original_course_id_value', 'type' => 'xsd:string') |
|
5047 | + 'original_user_id_values' => array('name' => 'original_user_id_values', 'type' => 'tns:originalUsersList'), |
|
5048 | + 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
5049 | + 'original_course_id_value' => array('name' => 'original_course_id_value', 'type' => 'xsd:string'), |
|
5050 | + 'original_course_id_name' => array('name' => 'original_course_id_value', 'type' => 'xsd:string') |
|
5051 | 5051 | ) |
5052 | 5052 | ); |
5053 | 5053 | |
@@ -5140,13 +5140,13 @@ discard block |
||
5140 | 5140 | ); |
5141 | 5141 | |
5142 | 5142 | // Register the method to expose |
5143 | -$server->register('WSSuscribeUsersToSession', // method name |
|
5143 | +$server->register('WSSuscribeUsersToSession', // method name |
|
5144 | 5144 | array('subscribeUsersToSession' => 'tns:subscribeUsersToSession'), // input parameters |
5145 | - array('return' => 'tns:results_subscribeUsersToSession'), // output parameters |
|
5146 | - 'urn:WSRegistration', // namespace |
|
5147 | - 'urn:WSRegistration#WSSuscribeUsersToSession', // soapaction |
|
5148 | - 'rpc', // style |
|
5149 | - 'encoded', // use |
|
5145 | + array('return' => 'tns:results_subscribeUsersToSession'), // output parameters |
|
5146 | + 'urn:WSRegistration', // namespace |
|
5147 | + 'urn:WSRegistration#WSSuscribeUsersToSession', // soapaction |
|
5148 | + 'rpc', // style |
|
5149 | + 'encoded', // use |
|
5150 | 5150 | 'This service subscribes a user to a session' // documentation |
5151 | 5151 | ); |
5152 | 5152 | |
@@ -5246,25 +5246,25 @@ discard block |
||
5246 | 5246 | 'all', |
5247 | 5247 | '', |
5248 | 5248 | array( |
5249 | - 'session' => array('name' => 'session', 'type' => 'xsd:string'), // Session ID |
|
5250 | - 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), // Chamilo user_id |
|
5249 | + 'session' => array('name' => 'session', 'type' => 'xsd:string'), // Session ID |
|
5250 | + 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), // Chamilo user_id |
|
5251 | 5251 | 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
5252 | 5252 | ) |
5253 | 5253 | ); |
5254 | -$server->register('WSSubscribeUserToSessionSimple', // method name |
|
5255 | - array('subscribeUserToSessionSimple' => 'tns:subscribeUserToSessionSimple_arg'), // input parameters |
|
5256 | - array('return' => 'xsd:string'), // output parameters |
|
5257 | - 'urn:WSRegistration', // namespace |
|
5258 | - 'urn:WSRegistration#WSSubscribeUserToSessionSimple', // soapaction |
|
5259 | - 'rpc', // style |
|
5260 | - 'encoded', // use |
|
5254 | +$server->register('WSSubscribeUserToSessionSimple', // method name |
|
5255 | + array('subscribeUserToSessionSimple' => 'tns:subscribeUserToSessionSimple_arg'), // input parameters |
|
5256 | + array('return' => 'xsd:string'), // output parameters |
|
5257 | + 'urn:WSRegistration', // namespace |
|
5258 | + 'urn:WSRegistration#WSSubscribeUserToSessionSimple', // soapaction |
|
5259 | + 'rpc', // style |
|
5260 | + 'encoded', // use |
|
5261 | 5261 | 'This service subscribes a user to a session in a simple way' // documentation |
5262 | 5262 | ); |
5263 | 5263 | function WSSubscribeUserToSessionSimple($params) { |
5264 | 5264 | global $debug; |
5265 | 5265 | |
5266 | 5266 | if ($debug) { |
5267 | - error_log('WSSubscribeUserToSessionSimple with params=[' . serialize($params). ']'); |
|
5267 | + error_log('WSSubscribeUserToSessionSimple with params=['.serialize($params).']'); |
|
5268 | 5268 | } |
5269 | 5269 | |
5270 | 5270 | // Check security key |
@@ -5273,8 +5273,8 @@ discard block |
||
5273 | 5273 | } |
5274 | 5274 | |
5275 | 5275 | // Get input parameters |
5276 | - $session_id = intval($params['session']); // Session ID |
|
5277 | - $user_id = intval($params['user_id']); // Chamilo user id |
|
5276 | + $session_id = intval($params['session']); // Session ID |
|
5277 | + $user_id = intval($params['user_id']); // Chamilo user id |
|
5278 | 5278 | |
5279 | 5279 | // Get user id |
5280 | 5280 | $user_data = api_get_user_info($user_id); |
@@ -5375,13 +5375,13 @@ discard block |
||
5375 | 5375 | ); |
5376 | 5376 | |
5377 | 5377 | // Register the method to expose |
5378 | -$server->register('WSUnsuscribeUsersFromSession', // method name |
|
5378 | +$server->register('WSUnsuscribeUsersFromSession', // method name |
|
5379 | 5379 | array('unsubscribeUsersFromSession' => 'tns:unsubscribeUsersFromSession'), // input parameters |
5380 | - array('return' => 'tns:results_unsubscribeUsersFromSession'), // output parameters |
|
5381 | - 'urn:WSRegistration', // namespace |
|
5382 | - 'urn:WSRegistration#WSUnsuscribeUsersFromSession', // soapaction |
|
5383 | - 'rpc', // style |
|
5384 | - 'encoded', // use |
|
5380 | + array('return' => 'tns:results_unsubscribeUsersFromSession'), // output parameters |
|
5381 | + 'urn:WSRegistration', // namespace |
|
5382 | + 'urn:WSRegistration#WSUnsuscribeUsersFromSession', // soapaction |
|
5383 | + 'rpc', // style |
|
5384 | + 'encoded', // use |
|
5385 | 5385 | 'This service unsubscribes a user to a session' // documentation |
5386 | 5386 | ); |
5387 | 5387 | |
@@ -5395,7 +5395,7 @@ discard block |
||
5395 | 5395 | global $debug; |
5396 | 5396 | |
5397 | 5397 | if ($debug) { |
5398 | - error_log('WSUnsuscribeUsersFromSession with params=[' . serialize($params). ']'); |
|
5398 | + error_log('WSUnsuscribeUsersFromSession with params=['.serialize($params).']'); |
|
5399 | 5399 | } |
5400 | 5400 | |
5401 | 5401 | $user_table = Database::get_main_table(TABLE_MAIN_USER); |
@@ -5489,7 +5489,7 @@ discard block |
||
5489 | 5489 | 'all', |
5490 | 5490 | '', |
5491 | 5491 | array( |
5492 | - 'course_code' => array('name' => 'course_code', 'type' => 'xsd:string'), |
|
5492 | + 'course_code' => array('name' => 'course_code', 'type' => 'xsd:string'), |
|
5493 | 5493 | ) |
5494 | 5494 | ); |
5495 | 5495 | |
@@ -5524,9 +5524,9 @@ discard block |
||
5524 | 5524 | '', |
5525 | 5525 | array( |
5526 | 5526 | 'original_course_id_values' => array('name' => 'original_course_id_values', 'type' => 'tns:originalCoursesList'), |
5527 | - 'original_course_id_name' => array('name' => 'original_course_id_name', 'type' => 'xsd:string'), |
|
5527 | + 'original_course_id_name' => array('name' => 'original_course_id_name', 'type' => 'xsd:string'), |
|
5528 | 5528 | 'original_session_id_value' => array('name' => 'original_session_id_value', 'type' => 'xsd:string'), |
5529 | - 'original_session_id_name' => array('name' => 'original_session_id_name', 'type' => 'xsd:string') |
|
5529 | + 'original_session_id_name' => array('name' => 'original_session_id_name', 'type' => 'xsd:string') |
|
5530 | 5530 | ) |
5531 | 5531 | ); |
5532 | 5532 | |
@@ -5579,13 +5579,13 @@ discard block |
||
5579 | 5579 | ); |
5580 | 5580 | |
5581 | 5581 | // Register the method to expose |
5582 | -$server->register('WSSuscribeCoursesToSession', // method name |
|
5582 | +$server->register('WSSuscribeCoursesToSession', // method name |
|
5583 | 5583 | array('subscribeCoursesToSession' => 'tns:subscribeCoursesToSession'), // input parameters |
5584 | - array('return' => 'tns:results_subscribeCoursesToSession'), // output parameters |
|
5585 | - 'urn:WSRegistration', // namespace |
|
5586 | - 'urn:WSRegistration#WSSuscribeCoursesToSession', // soapaction |
|
5587 | - 'rpc', // style |
|
5588 | - 'encoded', // use |
|
5584 | + array('return' => 'tns:results_subscribeCoursesToSession'), // output parameters |
|
5585 | + 'urn:WSRegistration', // namespace |
|
5586 | + 'urn:WSRegistration#WSSuscribeCoursesToSession', // soapaction |
|
5587 | + 'rpc', // style |
|
5588 | + 'encoded', // use |
|
5589 | 5589 | 'This service subscribes a course to a session' // documentation |
5590 | 5590 | ); |
5591 | 5591 | |
@@ -5730,13 +5730,13 @@ discard block |
||
5730 | 5730 | |
5731 | 5731 | |
5732 | 5732 | // Register the method to expose |
5733 | -$server->register('WSUnsuscribeCoursesFromSession', // method name |
|
5733 | +$server->register('WSUnsuscribeCoursesFromSession', // method name |
|
5734 | 5734 | array('unsubscribeCoursesFromSession' => 'tns:unsubscribeCoursesFromSession'), // input parameters |
5735 | - array('return' => 'tns:results_unsubscribeCoursesFromSession'), // output parameters |
|
5736 | - 'urn:WSRegistration', // namespace |
|
5737 | - 'urn:WSRegistration#WSUnsuscribeCoursesFromSession', // soapaction |
|
5738 | - 'rpc', // style |
|
5739 | - 'encoded', // use |
|
5735 | + array('return' => 'tns:results_unsubscribeCoursesFromSession'), // output parameters |
|
5736 | + 'urn:WSRegistration', // namespace |
|
5737 | + 'urn:WSRegistration#WSUnsuscribeCoursesFromSession', // soapaction |
|
5738 | + 'rpc', // style |
|
5739 | + 'encoded', // use |
|
5740 | 5740 | 'This service subscribes a course to a session' // documentation |
5741 | 5741 | ); |
5742 | 5742 | |
@@ -5900,13 +5900,13 @@ discard block |
||
5900 | 5900 | |
5901 | 5901 | |
5902 | 5902 | // Register the method to expose |
5903 | -$server->register('WSListCourses', // method name |
|
5903 | +$server->register('WSListCourses', // method name |
|
5904 | 5904 | array('listCourseInput' => 'tns:listCourseInput'), // input parameters |
5905 | - array('return' => 'tns:courses'), // output parameters |
|
5906 | - 'urn:WSRegistration', // namespace |
|
5907 | - 'urn:WSRegistration#WSListCourses', // soapaction |
|
5908 | - 'rpc', // style |
|
5909 | - 'encoded', // use |
|
5905 | + array('return' => 'tns:courses'), // output parameters |
|
5906 | + 'urn:WSRegistration', // namespace |
|
5907 | + 'urn:WSRegistration#WSListCourses', // soapaction |
|
5908 | + 'rpc', // style |
|
5909 | + 'encoded', // use |
|
5910 | 5910 | 'This service list courses available on the system' // documentation |
5911 | 5911 | ); |
5912 | 5912 | |
@@ -5986,21 +5986,21 @@ discard block |
||
5986 | 5986 | 'all', |
5987 | 5987 | '', |
5988 | 5988 | array( |
5989 | - 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
5990 | - 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
5991 | - 'chamilo_username' => array('name' => 'chamilo_username', 'type' => 'xsd:string'), |
|
5992 | - 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
5989 | + 'original_user_id_name' => array('name' => 'original_user_id_name', 'type' => 'xsd:string'), |
|
5990 | + 'original_user_id_value' => array('name' => 'original_user_id_value', 'type' => 'xsd:string'), |
|
5991 | + 'chamilo_username' => array('name' => 'chamilo_username', 'type' => 'xsd:string'), |
|
5992 | + 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
5993 | 5993 | ) |
5994 | 5994 | ); |
5995 | 5995 | |
5996 | 5996 | // Register the method to expose |
5997 | -$server->register('WSUpdateUserApiKey', // method name |
|
5997 | +$server->register('WSUpdateUserApiKey', // method name |
|
5998 | 5998 | array('userApiKey' => 'tns:userApiKey'), // input parameters |
5999 | - array('return' => 'xsd:string'), // output parameters |
|
6000 | - 'urn:WSRegistration', // namespace |
|
6001 | - 'urn:WSRegistration#WSListCourses', // soapaction |
|
6002 | - 'rpc', // style |
|
6003 | - 'encoded', // use |
|
5999 | + array('return' => 'xsd:string'), // output parameters |
|
6000 | + 'urn:WSRegistration', // namespace |
|
6001 | + 'urn:WSRegistration#WSListCourses', // soapaction |
|
6002 | + 'rpc', // style |
|
6003 | + 'encoded', // use |
|
6004 | 6004 | 'This service return user api key' // documentation |
6005 | 6005 | ); |
6006 | 6006 | |
@@ -6056,11 +6056,11 @@ discard block |
||
6056 | 6056 | 'all', |
6057 | 6057 | '', |
6058 | 6058 | array( |
6059 | - 'from' => array('name' => 'from', 'type' => 'xsd:int'), |
|
6060 | - 'to' => array('name' => 'to', 'type' => 'xsd:int'), |
|
6061 | - 'date_start' => array('name' => 'date_start', 'type' => 'xsd:string'), |
|
6062 | - 'date_end' => array('name' => 'date_end', 'type' => 'xsd:string'), |
|
6063 | - 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
6059 | + 'from' => array('name' => 'from', 'type' => 'xsd:int'), |
|
6060 | + 'to' => array('name' => 'to', 'type' => 'xsd:int'), |
|
6061 | + 'date_start' => array('name' => 'date_start', 'type' => 'xsd:string'), |
|
6062 | + 'date_end' => array('name' => 'date_end', 'type' => 'xsd:string'), |
|
6063 | + 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
|
6064 | 6064 | ) |
6065 | 6065 | ); |
6066 | 6066 | |
@@ -6071,11 +6071,11 @@ discard block |
||
6071 | 6071 | 'all', |
6072 | 6072 | '', |
6073 | 6073 | array( |
6074 | - 'id' => array ('name' => 'id' , 'type' => 'xsd:int'), |
|
6075 | - 'title' => array ('name' => 'title', 'type' => 'xsd:string'), |
|
6076 | - 'url' => array ('name' => 'url', 'type' => 'xsd:string'), |
|
6077 | - 'date_start' => array ('name' => 'date_start', 'type' => 'xsd:string'), |
|
6078 | - 'date_end' => array ('name' => 'date_end', 'type' => 'xsd:string'), |
|
6074 | + 'id' => array('name' => 'id', 'type' => 'xsd:int'), |
|
6075 | + 'title' => array('name' => 'title', 'type' => 'xsd:string'), |
|
6076 | + 'url' => array('name' => 'url', 'type' => 'xsd:string'), |
|
6077 | + 'date_start' => array('name' => 'date_start', 'type' => 'xsd:string'), |
|
6078 | + 'date_end' => array('name' => 'date_end', 'type' => 'xsd:string'), |
|
6079 | 6079 | ) |
6080 | 6080 | ); |
6081 | 6081 | |
@@ -6094,13 +6094,13 @@ discard block |
||
6094 | 6094 | ); |
6095 | 6095 | |
6096 | 6096 | // Register the method to expose |
6097 | -$server->register('WSListSessions', // method name |
|
6098 | - array('input' => 'tns:session_arg'), // input parameters |
|
6099 | - array('return' => 'tns:sessions'), // output parameters |
|
6100 | - 'urn:WSRegistration', // namespace |
|
6101 | - 'urn:WSRegistration#WSListSessions', // soapaction |
|
6102 | - 'rpc', // style |
|
6103 | - 'encoded', // use |
|
6097 | +$server->register('WSListSessions', // method name |
|
6098 | + array('input' => 'tns:session_arg'), // input parameters |
|
6099 | + array('return' => 'tns:sessions'), // output parameters |
|
6100 | + 'urn:WSRegistration', // namespace |
|
6101 | + 'urn:WSRegistration#WSListSessions', // soapaction |
|
6102 | + 'rpc', // style |
|
6103 | + 'encoded', // use |
|
6104 | 6104 | 'This service returns a list of sessions' // documentation |
6105 | 6105 | ); |
6106 | 6106 | |
@@ -6158,20 +6158,20 @@ discard block |
||
6158 | 6158 | 'all', |
6159 | 6159 | '', |
6160 | 6160 | array( |
6161 | - 'course' => array('name' => 'course', 'type' => 'xsd:string'), //Course string code |
|
6162 | - 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), //Chamilo user_id |
|
6161 | + 'course' => array('name' => 'course', 'type' => 'xsd:string'), //Course string code |
|
6162 | + 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), //Chamilo user_id |
|
6163 | 6163 | 'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string') |
6164 | 6164 | ) |
6165 | 6165 | ); |
6166 | 6166 | |
6167 | 6167 | // Register the method to expose |
6168 | -$server->register('WSUserSubscribedInCourse', // method name |
|
6169 | - array('UserSubscribedInCourse' => 'tns:UserSubscribedInCourse'), // input parameters |
|
6170 | - array('return' => 'xsd:string'), // output parameters |
|
6171 | - 'urn:WSRegistration', // namespace |
|
6172 | - 'urn:WSRegistration#WSUserSubscribedInCourse', // soapaction |
|
6173 | - 'rpc', // style |
|
6174 | - 'encoded', // use |
|
6168 | +$server->register('WSUserSubscribedInCourse', // method name |
|
6169 | + array('UserSubscribedInCourse' => 'tns:UserSubscribedInCourse'), // input parameters |
|
6170 | + array('return' => 'xsd:string'), // output parameters |
|
6171 | + 'urn:WSRegistration', // namespace |
|
6172 | + 'urn:WSRegistration#WSUserSubscribedInCourse', // soapaction |
|
6173 | + 'rpc', // style |
|
6174 | + 'encoded', // use |
|
6175 | 6175 | 'This service checks if user assigned to course' // documentation |
6176 | 6176 | ); |
6177 | 6177 | |
@@ -6197,7 +6197,7 @@ discard block |
||
6197 | 6197 | $courseCode = $params['course']; //Course code |
6198 | 6198 | $userId = $params['user_id']; //chamilo user id |
6199 | 6199 | |
6200 | - return CourseManager::is_user_subscribed_in_course($userId,$courseCode); |
|
6200 | + return CourseManager::is_user_subscribed_in_course($userId, $courseCode); |
|
6201 | 6201 | } |
6202 | 6202 | |
6203 | 6203 | |
@@ -6225,8 +6225,8 @@ discard block |
||
6225 | 6225 | 'all', |
6226 | 6226 | '', |
6227 | 6227 | array( |
6228 | - 'variable' => array('name'=>'variable','type'=>'xsd:string'), |
|
6229 | - 'value' => array('name'=>'value','type'=>'xsd:string') |
|
6228 | + 'variable' => array('name'=>'variable', 'type'=>'xsd:string'), |
|
6229 | + 'value' => array('name'=>'value', 'type'=>'xsd:string') |
|
6230 | 6230 | ) |
6231 | 6231 | ); |
6232 | 6232 | |
@@ -6288,12 +6288,12 @@ discard block |
||
6288 | 6288 | //Reister WSSearchSession |
6289 | 6289 | $server->register( |
6290 | 6290 | 'WSSearchSession', |
6291 | - array('SearchSession' => 'tns:SearchSession'), // input parameters |
|
6292 | - array('return' => 'tns:searchedSessionList'), // output parameters |
|
6293 | - 'urn:WSRegistration', // namespace |
|
6294 | - 'urn:WSRegistration#WSSearchSession', // soapaction |
|
6295 | - 'rpc', // style |
|
6296 | - 'encoded', // use |
|
6291 | + array('SearchSession' => 'tns:SearchSession'), // input parameters |
|
6292 | + array('return' => 'tns:searchedSessionList'), // output parameters |
|
6293 | + 'urn:WSRegistration', // namespace |
|
6294 | + 'urn:WSRegistration#WSSearchSession', // soapaction |
|
6295 | + 'rpc', // style |
|
6296 | + 'encoded', // use |
|
6297 | 6297 | 'This service to get a session list filtered by name, description or short description extra field' // documentation |
6298 | 6298 | ); |
6299 | 6299 | |
@@ -6348,12 +6348,12 @@ discard block |
||
6348 | 6348 | //Reister WSFetchSession |
6349 | 6349 | $server->register( |
6350 | 6350 | 'WSFetchSession', |
6351 | - array('SearchSession' => 'tns:FetchSession'), // input parameters |
|
6352 | - array('return' => 'tns:searchedSessionList'), // output parameters |
|
6353 | - 'urn:WSRegistration', // namespace |
|
6354 | - 'urn:WSRegistration#WSFetchSession', // soapaction |
|
6355 | - 'rpc', // style |
|
6356 | - 'encoded', // use |
|
6351 | + array('SearchSession' => 'tns:FetchSession'), // input parameters |
|
6352 | + array('return' => 'tns:searchedSessionList'), // output parameters |
|
6353 | + 'urn:WSRegistration', // namespace |
|
6354 | + 'urn:WSRegistration#WSFetchSession', // soapaction |
|
6355 | + 'rpc', // style |
|
6356 | + 'encoded', // use |
|
6357 | 6357 | 'This service get a session by its id. Optionally can get its extra fields values' // documentation |
6358 | 6358 | ); |
6359 | 6359 | |
@@ -6430,16 +6430,16 @@ discard block |
||
6430 | 6430 | ); |
6431 | 6431 | // Register the method to expose |
6432 | 6432 | $server->register( |
6433 | - 'WSCertificatesList', // method name |
|
6433 | + 'WSCertificatesList', // method name |
|
6434 | 6434 | array( |
6435 | - 'startingDate' => 'xsd:string', // input parameters |
|
6435 | + 'startingDate' => 'xsd:string', // input parameters |
|
6436 | 6436 | 'endingDate' => 'xsd:string' |
6437 | 6437 | ), |
6438 | - array('return' => 'tns:certificatesList'), // output parameters |
|
6439 | - 'urn:WSRegistration', // namespace |
|
6440 | - 'urn:WSRegistration#WSCertificatesList', // soapaction |
|
6441 | - 'rpc', // style |
|
6442 | - 'encoded', // use |
|
6438 | + array('return' => 'tns:certificatesList'), // output parameters |
|
6439 | + 'urn:WSRegistration', // namespace |
|
6440 | + 'urn:WSRegistration#WSCertificatesList', // soapaction |
|
6441 | + 'rpc', // style |
|
6442 | + 'encoded', // use |
|
6443 | 6443 | 'This service returns a list of certificates' // documentation |
6444 | 6444 | ); |
6445 | 6445 | |
@@ -6505,13 +6505,13 @@ discard block |
||
6505 | 6505 | ); |
6506 | 6506 | |
6507 | 6507 | // Register the method to expose |
6508 | -$server->register('WSCreateGroup', // method name |
|
6509 | - array('createGroup' => 'tns:createGroup'), // input parameters |
|
6510 | - array('return' => 'xsd:string'), // output parameters |
|
6511 | - 'urn:WSRegistration', // namespace |
|
6512 | - 'urn:WSRegistration#WSCreateGroup', // soapaction |
|
6513 | - 'rpc', // style |
|
6514 | - 'encoded', // use |
|
6508 | +$server->register('WSCreateGroup', // method name |
|
6509 | + array('createGroup' => 'tns:createGroup'), // input parameters |
|
6510 | + array('return' => 'xsd:string'), // output parameters |
|
6511 | + 'urn:WSRegistration', // namespace |
|
6512 | + 'urn:WSRegistration#WSCreateGroup', // soapaction |
|
6513 | + 'rpc', // style |
|
6514 | + 'encoded', // use |
|
6515 | 6515 | 'This service adds a group' // documentation |
6516 | 6516 | ); |
6517 | 6517 | |
@@ -6553,13 +6553,13 @@ discard block |
||
6553 | 6553 | ); |
6554 | 6554 | |
6555 | 6555 | // Register the method to expose |
6556 | -$server->register('WSUpdateGroup', // method name |
|
6557 | - array('updateGroup' => 'tns:updateGroup'), // input parameters |
|
6558 | - array('return' => 'xsd:string'), // output parameters |
|
6559 | - 'urn:WSRegistration', // namespace |
|
6560 | - 'urn:WSRegistration#WSUpdateGroup', // soapaction |
|
6561 | - 'rpc', // style |
|
6562 | - 'encoded', // use |
|
6556 | +$server->register('WSUpdateGroup', // method name |
|
6557 | + array('updateGroup' => 'tns:updateGroup'), // input parameters |
|
6558 | + array('return' => 'xsd:string'), // output parameters |
|
6559 | + 'urn:WSRegistration', // namespace |
|
6560 | + 'urn:WSRegistration#WSUpdateGroup', // soapaction |
|
6561 | + 'rpc', // style |
|
6562 | + 'encoded', // use |
|
6563 | 6563 | 'This service updates a group' // documentation |
6564 | 6564 | ); |
6565 | 6565 | |
@@ -6594,13 +6594,13 @@ discard block |
||
6594 | 6594 | ); |
6595 | 6595 | |
6596 | 6596 | // Register the method to expose |
6597 | -$server->register('WSDeleteGroup', // method name |
|
6598 | - array('deleteGroup' => 'tns:deleteGroup'), // input parameters |
|
6599 | - array('return' => 'xsd:string'), // output parameters |
|
6600 | - 'urn:WSRegistration', // namespace |
|
6601 | - 'urn:WSRegistration#WSDeleteGroup', // soapaction |
|
6602 | - 'rpc', // style |
|
6603 | - 'encoded', // use |
|
6597 | +$server->register('WSDeleteGroup', // method name |
|
6598 | + array('deleteGroup' => 'tns:deleteGroup'), // input parameters |
|
6599 | + array('return' => 'xsd:string'), // output parameters |
|
6600 | + 'urn:WSRegistration', // namespace |
|
6601 | + 'urn:WSRegistration#WSDeleteGroup', // soapaction |
|
6602 | + 'rpc', // style |
|
6603 | + 'encoded', // use |
|
6604 | 6604 | 'This service deletes a group' // documentation |
6605 | 6605 | ); |
6606 | 6606 | |
@@ -6635,13 +6635,13 @@ discard block |
||
6635 | 6635 | ); |
6636 | 6636 | |
6637 | 6637 | // Register the method to expose |
6638 | -$server->register('GroupBindToParent', // method name |
|
6639 | - array('groupBindToParent' => 'tns:groupBindToParent'), // input parameters |
|
6640 | - array('return' => 'xsd:string'), // output parameters |
|
6641 | - 'urn:WSRegistration', // namespace |
|
6642 | - 'urn:WSRegistration#GroupBindToParent', // soapaction |
|
6643 | - 'rpc', // style |
|
6644 | - 'encoded', // use |
|
6638 | +$server->register('GroupBindToParent', // method name |
|
6639 | + array('groupBindToParent' => 'tns:groupBindToParent'), // input parameters |
|
6640 | + array('return' => 'xsd:string'), // output parameters |
|
6641 | + 'urn:WSRegistration', // namespace |
|
6642 | + 'urn:WSRegistration#GroupBindToParent', // soapaction |
|
6643 | + 'rpc', // style |
|
6644 | + 'encoded', // use |
|
6645 | 6645 | 'This service binds a group to a parent' // documentation |
6646 | 6646 | ); |
6647 | 6647 | |
@@ -6675,13 +6675,13 @@ discard block |
||
6675 | 6675 | ); |
6676 | 6676 | |
6677 | 6677 | // Register the method to expose |
6678 | -$server->register('GroupUnbindFromParent', // method name |
|
6679 | - array('groupUnbindFromParent' => 'tns:groupUnbindFromParent'), // input parameters |
|
6680 | - array('return' => 'xsd:string'), // output parameters |
|
6681 | - 'urn:WSRegistration', // namespace |
|
6682 | - 'urn:WSRegistration#GroupUnbindFromParent', // soapaction |
|
6683 | - 'rpc', // style |
|
6684 | - 'encoded', // use |
|
6678 | +$server->register('GroupUnbindFromParent', // method name |
|
6679 | + array('groupUnbindFromParent' => 'tns:groupUnbindFromParent'), // input parameters |
|
6680 | + array('return' => 'xsd:string'), // output parameters |
|
6681 | + 'urn:WSRegistration', // namespace |
|
6682 | + 'urn:WSRegistration#GroupUnbindFromParent', // soapaction |
|
6683 | + 'rpc', // style |
|
6684 | + 'encoded', // use |
|
6685 | 6685 | 'This service unbinds a group from its parent' // documentation |
6686 | 6686 | ); |
6687 | 6687 | |
@@ -6715,13 +6715,13 @@ discard block |
||
6715 | 6715 | ); |
6716 | 6716 | |
6717 | 6717 | // Register the method to expose |
6718 | -$server->register('WSAddUserToGroup', // method name |
|
6719 | - array('addUserToGroup' => 'tns:addUserToGroup'), // input parameters |
|
6720 | - array('return' => 'xsd:string'), // output parameters |
|
6721 | - 'urn:WSRegistration', // namespace |
|
6722 | - 'urn:WSRegistration#WSAddUserToGroup', // soapaction |
|
6723 | - 'rpc', // style |
|
6724 | - 'encoded', // use |
|
6718 | +$server->register('WSAddUserToGroup', // method name |
|
6719 | + array('addUserToGroup' => 'tns:addUserToGroup'), // input parameters |
|
6720 | + array('return' => 'xsd:string'), // output parameters |
|
6721 | + 'urn:WSRegistration', // namespace |
|
6722 | + 'urn:WSRegistration#WSAddUserToGroup', // soapaction |
|
6723 | + 'rpc', // style |
|
6724 | + 'encoded', // use |
|
6725 | 6725 | 'This service adds a user to a group' // documentation |
6726 | 6726 | ); |
6727 | 6727 | |
@@ -6758,13 +6758,13 @@ discard block |
||
6758 | 6758 | ); |
6759 | 6759 | |
6760 | 6760 | // Register the method to expose |
6761 | -$server->register('WSUpdateUserRoleInGroup', // method name |
|
6762 | - array('updateUserRoleInGroup' => 'tns:updateUserRoleInGroup'), // input parameters |
|
6763 | - array('return' => 'xsd:string'), // output parameters |
|
6764 | - 'urn:WSRegistration', // namespace |
|
6765 | - 'urn:WSRegistration#WSUpdateUserRoleInGroup', // soapaction |
|
6766 | - 'rpc', // style |
|
6767 | - 'encoded', // use |
|
6761 | +$server->register('WSUpdateUserRoleInGroup', // method name |
|
6762 | + array('updateUserRoleInGroup' => 'tns:updateUserRoleInGroup'), // input parameters |
|
6763 | + array('return' => 'xsd:string'), // output parameters |
|
6764 | + 'urn:WSRegistration', // namespace |
|
6765 | + 'urn:WSRegistration#WSUpdateUserRoleInGroup', // soapaction |
|
6766 | + 'rpc', // style |
|
6767 | + 'encoded', // use |
|
6768 | 6768 | 'This service updates a user role in group' // documentation |
6769 | 6769 | ); |
6770 | 6770 | |
@@ -6803,13 +6803,13 @@ discard block |
||
6803 | 6803 | ); |
6804 | 6804 | |
6805 | 6805 | // Register the method to expose |
6806 | -$server->register('WSDeleteUserFromGroup', // method name |
|
6807 | - array('deleteUserFromGroup' => 'tns:deleteUserFromGroup'), // input parameters |
|
6808 | - array('return' => 'xsd:string'), // output parameters |
|
6809 | - 'urn:WSRegistration', // namespace |
|
6810 | - 'urn:WSRegistration#WSDeleteUserFromGroup', // soapaction |
|
6811 | - 'rpc', // style |
|
6812 | - 'encoded', // use |
|
6806 | +$server->register('WSDeleteUserFromGroup', // method name |
|
6807 | + array('deleteUserFromGroup' => 'tns:deleteUserFromGroup'), // input parameters |
|
6808 | + array('return' => 'xsd:string'), // output parameters |
|
6809 | + 'urn:WSRegistration', // namespace |
|
6810 | + 'urn:WSRegistration#WSDeleteUserFromGroup', // soapaction |
|
6811 | + 'rpc', // style |
|
6812 | + 'encoded', // use |
|
6813 | 6813 | 'This service deletes a user from a group' // documentation |
6814 | 6814 | ); |
6815 | 6815 |
@@ -47,20 +47,20 @@ discard block |
||
47 | 47 | $res = Database::query($sql); |
48 | 48 | $refs = array(); |
49 | 49 | $list = array(); |
50 | - $plain_array=array(); |
|
50 | + $plain_array = array(); |
|
51 | 51 | |
52 | 52 | while ($survey = Database::fetch_array($res, 'ASSOC')) { |
53 | - $plain_array[$survey['survey_id']]=$survey; |
|
54 | - $surveys_parents[]=$survey['survey_version']; |
|
55 | - $thisref = &$refs[ $survey['survey_id'] ]; |
|
53 | + $plain_array[$survey['survey_id']] = $survey; |
|
54 | + $surveys_parents[] = $survey['survey_version']; |
|
55 | + $thisref = &$refs[$survey['survey_id']]; |
|
56 | 56 | $thisref['parent_id'] = $survey['parent_id']; |
57 | 57 | $thisref['name'] = $survey['name']; |
58 | 58 | $thisref['id'] = $survey['survey_id']; |
59 | 59 | $thisref['survey_version'] = $survey['survey_version']; |
60 | 60 | if ($survey['parent_id'] == 0) { |
61 | - $list[ $survey['survey_id'] ] = &$thisref; |
|
61 | + $list[$survey['survey_id']] = &$thisref; |
|
62 | 62 | } else { |
63 | - $refs[ $survey['parent_id'] ]['children'][ $survey['survey_id'] ] = &$thisref; |
|
63 | + $refs[$survey['parent_id']]['children'][$survey['survey_id']] = &$thisref; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | $this->surveylist = $list; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public function getParentId($id) |
80 | 80 | { |
81 | 81 | $node = $this->plainsurveylist[$id]; |
82 | - if (is_array($node)&& !empty($node['parent_id'])) { |
|
82 | + if (is_array($node) && !empty($node['parent_id'])) { |
|
83 | 83 | return $node['parent_id']; |
84 | 84 | } else { |
85 | 85 | return -1; |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | if (is_array($list)) { |
100 | 100 | foreach ($list as $key => $node) { |
101 | 101 | if (isset($node['children']) && is_array($node['children'])) { |
102 | - $result[$key]= $node['name']; |
|
102 | + $result[$key] = $node['name']; |
|
103 | 103 | $re = self::createList($node['children']); |
104 | 104 | if (!empty($re)) { |
105 | 105 | if (is_array($re)) { |
106 | 106 | foreach ($re as $key => $r) { |
107 | - $result[$key] = '' . $r; |
|
107 | + $result[$key] = ''.$r; |
|
108 | 108 | } |
109 | 109 | } else { |
110 | 110 | $result[] = $re; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | survey_question_option.c_id = $course_id |
155 | 155 | WHERE |
156 | 156 | survey_question.survey_id = '".intval($survey_id)."' AND |
157 | - survey_question.question_id IN (".Database::escape_string(implode(',',$paged_questions[$_GET['show']]), null, false).") AND |
|
157 | + survey_question.question_id IN (".Database::escape_string(implode(',', $paged_questions[$_GET['show']]), null, false).") AND |
|
158 | 158 | survey_question.c_id = $course_id |
159 | 159 | ORDER BY survey_question.sort, survey_question_option.sort ASC"; |
160 | 160 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | // Displaying the form with the questions |
193 | 193 | if (isset($_GET['show'])) { |
194 | - $show = (int)$_GET['show'] + 1; |
|
194 | + $show = (int) $_GET['show'] + 1; |
|
195 | 195 | } else { |
196 | 196 | $show = 0; |
197 | 197 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | $origin = ''; |
31 | 31 | if (isset($_GET['origin'])) { |
32 | - $origin = Security::remove_XSS($_GET['origin']); |
|
32 | + $origin = Security::remove_XSS($_GET['origin']); |
|
33 | 33 | $origin_string = '&origin='.$origin; |
34 | 34 | } |
35 | 35 | |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | require_once 'forumconfig.inc.php'; |
38 | 38 | require_once 'forumfunction.inc.php'; |
39 | 39 | |
40 | -$forumId = isset($_GET['forum']) ? (int)$_GET['forum'] : 0; |
|
41 | -$threadId = isset($_GET['thread']) ? (int)$_GET['thread'] : 0; |
|
40 | +$forumId = isset($_GET['forum']) ? (int) $_GET['forum'] : 0; |
|
41 | +$threadId = isset($_GET['thread']) ? (int) $_GET['thread'] : 0; |
|
42 | 42 | |
43 | 43 | /* MAIN DISPLAY SECTION */ |
44 | 44 | |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | // We are getting all the information about the current forum and forum category. |
47 | 47 | // Note pcool: I tried to use only one sql statement (and function) for this, |
48 | 48 | // but the problem is that the visibility of the forum AND forum cateogory are stored in the item_property table. |
49 | -$current_thread = get_thread_information($threadId); // Note: This has to be validated that it is an existing thread. |
|
50 | -$current_forum = get_forum_information($current_thread['forum_id']); // Note: This has to be validated that it is an existing forum. |
|
49 | +$current_thread = get_thread_information($threadId); // Note: This has to be validated that it is an existing thread. |
|
50 | +$current_forum = get_forum_information($current_thread['forum_id']); // Note: This has to be validated that it is an existing forum. |
|
51 | 51 | $current_forum_category = get_forumcategory_information(Security::remove_XSS($current_forum['forum_category'])); |
52 | 52 | |
53 | 53 | /* Is the user allowed here? */ |
@@ -85,12 +85,12 @@ discard block |
||
85 | 85 | /* Breadcrumbs */ |
86 | 86 | |
87 | 87 | $gradebook = null; |
88 | -if (isset($_SESSION['gradebook'])){ |
|
88 | +if (isset($_SESSION['gradebook'])) { |
|
89 | 89 | $gradebook = Security::remove_XSS($_SESSION['gradebook']); |
90 | 90 | } |
91 | 91 | |
92 | 92 | if (!empty($gradebook) && $gradebook == 'view') { |
93 | - $interbreadcrumb[] = array ( |
|
93 | + $interbreadcrumb[] = array( |
|
94 | 94 | 'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']), |
95 | 95 | 'name' => get_lang('ToolGradebook') |
96 | 96 | ); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | api_protect_admin_script(); |
15 | 15 | |
16 | 16 | $tool_name = get_lang('ExportCourses'); |
17 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
17 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
18 | 18 | |
19 | 19 | set_time_limit(0); |
20 | 20 | |
@@ -64,17 +64,17 @@ discard block |
||
64 | 64 | $dataToExport = []; |
65 | 65 | |
66 | 66 | foreach ($courses as $course) { |
67 | - $dataToExport['code'] = str_replace(';',',',$course['code']); |
|
68 | - $dataToExport['title'] = str_replace(';',',',$course['title']); |
|
69 | - $dataToExport['category_code'] = str_replace(';',',',$course['category_code']); |
|
67 | + $dataToExport['code'] = str_replace(';', ',', $course['code']); |
|
68 | + $dataToExport['title'] = str_replace(';', ',', $course['title']); |
|
69 | + $dataToExport['category_code'] = str_replace(';', ',', $course['category_code']); |
|
70 | 70 | $categoryInfo = CourseCategory::getCategory($course['category_code']); |
71 | 71 | if ($categoryInfo) { |
72 | - $dataToExport['category_name'] = str_replace(';',',',$categoryInfo['name']); |
|
72 | + $dataToExport['category_name'] = str_replace(';', ',', $categoryInfo['name']); |
|
73 | 73 | } else { |
74 | 74 | $dataToExport['category_name'] = ''; |
75 | 75 | } |
76 | - $dataToExport['tutor_name'] = str_replace(';',',',$course['tutor_name']); |
|
77 | - $dataToExport['course_language'] = str_replace(';',',',$course['course_language']); |
|
76 | + $dataToExport['tutor_name'] = str_replace(';', ',', $course['tutor_name']); |
|
77 | + $dataToExport['course_language'] = str_replace(';', ',', $course['course_language']); |
|
78 | 78 | |
79 | 79 | $dataToExport['students'] = ''; |
80 | 80 | $dataToExport['teachers'] = ''; |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | $form->addHtml('</div>'); |
157 | 157 | } |
158 | 158 | |
159 | -$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null); |
|
160 | -$form->addElement('radio', 'file_type', '' , 'XLS' , 'xls', null); |
|
159 | +$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV', 'csv', null); |
|
160 | +$form->addElement('radio', 'file_type', '', 'XLS', 'xls', null); |
|
161 | 161 | $form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml')); |
162 | 162 | |
163 | 163 | $form->setDefaults(['select_type' => '1', 'file_type' => 'csv']); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $table_post = Database::get_course_table(TABLE_FORUM_POST); |
22 | 22 | $table_work = Database::get_course_table(TABLE_STUDENT_PUBLICATION); |
23 | 23 | $course_code = Database::escape_string($course_code); |
24 | - $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '" . $course_code . "'"); |
|
24 | + $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '".$course_code."'"); |
|
25 | 25 | $sqlWeeks = "SELECT semanas FROM $table_semanas_curso WHERE course_code = '$course_code'"; |
26 | 26 | $resWeeks = Database::query($sqlWeeks); |
27 | 27 | $weeks = Database::fetch_object($resWeeks); |
@@ -105,52 +105,52 @@ discard block |
||
105 | 105 | $lineHeaderExport = array(null, null); |
106 | 106 | $lineHeaderExport2 = array(null, ull); |
107 | 107 | while ($rowe = Database::fetch_assoc($resultHeader)) { |
108 | - $lineHeaderExport[] = utf8_decode('Work' . $rowe['week_id']); |
|
109 | - $lineHeaderExport[] = utf8_decode('Forum' . $rowe['week_id']); |
|
108 | + $lineHeaderExport[] = utf8_decode('Work'.$rowe['week_id']); |
|
109 | + $lineHeaderExport[] = utf8_decode('Forum'.$rowe['week_id']); |
|
110 | 110 | //$fila_export_encabezado[] = utf8_decode('Eval'.$rowe['week_id']); |
111 | 111 | //$fila_export_encabezado[] = utf8_decode('PC'.$rowe['week_id']); |
112 | 112 | $lineHeaderExport2[] = utf8_decode($rowe['work_title']); |
113 | 113 | $lineHeaderExport2[] = utf8_decode($rowe['thread_title']); |
114 | 114 | //$fila_export_encabezado2[] = utf8_decode($rowe['eval_title']); |
115 | 115 | //$fila_export_encabezado2[] = utf8_decode($rowe['pc_title']); |
116 | - $fila_export = array('Work' . $rowe['week_id'], 'Forum' . $rowe['week_id'], 'Eval' . $rowe['week_id'], 'PC' . $rowe['week_id']); |
|
116 | + $fila_export = array('Work'.$rowe['week_id'], 'Forum'.$rowe['week_id'], 'Eval'.$rowe['week_id'], 'PC'.$rowe['week_id']); |
|
117 | 117 | if ($rowe['week_id'] > (($page - 1) * 7) && $rowe['week_id'] <= (7 * $page)) { |
118 | 118 | $ids[$rowe['week_id']] = $rowe['id']; |
119 | - $line.='<th> |
|
120 | - <a href="#" onClick="showContent(' . "'tarea" . $rowe['week_id'] . "'" . ');">Work' . $rowe['week_id'] . ' |
|
121 | - <div class="blackboard_hide" id="tarea' . $rowe['week_id'] . '">' . $rowe['work_title'] . '</div> |
|
119 | + $line .= '<th> |
|
120 | + <a href="#" onClick="showContent(' . "'tarea".$rowe['week_id']."'".');">Work'.$rowe['week_id'].' |
|
121 | + <div class="blackboard_hide" id="tarea' . $rowe['week_id'].'">'.$rowe['work_title'].'</div> |
|
122 | 122 | </a></th>'; |
123 | - $line.= '<th> |
|
124 | - <a href="#" onClick="showContent(' . "'foro" . $rowe['week_id'] . "'" . ');">Forum' . $rowe['week_id'] . ' |
|
125 | - <div class="blackboard_hide" id="foro' . $rowe['week_id'] . '">' . $rowe['thread_title'] . '</div> |
|
123 | + $line .= '<th> |
|
124 | + <a href="#" onClick="showContent(' . "'foro".$rowe['week_id']."'".');">Forum'.$rowe['week_id'].' |
|
125 | + <div class="blackboard_hide" id="foro' . $rowe['week_id'].'">'.$rowe['thread_title'].'</div> |
|
126 | 126 | </a> |
127 | 127 | </th>'; |
128 | 128 | } |
129 | 129 | } |
130 | 130 | $tableExport[] = $lineHeaderExport; |
131 | 131 | $tableExport[] = $lineHeaderExport2; |
132 | - $line.= '</tr>'; |
|
132 | + $line .= '</tr>'; |
|
133 | 133 | |
134 | 134 | $html = '<form action="tutor.php" name="semanas" id="semanas" method="POST"> |
135 | 135 | <div class="row"> |
136 | - ' . get_lang('SelectWeeksSpan') . ' |
|
136 | + ' . get_lang('SelectWeeksSpan').' |
|
137 | 137 | <select name="weeksNumber" id="weeksNumber" onChange="submit();"> |
138 | - <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "") . '>7 weeks</option> |
|
139 | - <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "") . '>14 weeks</option> |
|
138 | + <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "").'>7 weeks</option> |
|
139 | + <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "").'>14 weeks</option> |
|
140 | 140 | </select>'; |
141 | 141 | |
142 | 142 | |
143 | 143 | if ($weeksCount == 14) { |
144 | - $html .= '<span style="float:right;"><a href="tutor.php?page=' . (($page == 1) ? 2 : 1) . '">' . (($page == 1) ? "Siguiente" : "Anterior") . '</a></span>'; |
|
144 | + $html .= '<span style="float:right;"><a href="tutor.php?page='.(($page == 1) ? 2 : 1).'">'.(($page == 1) ? "Siguiente" : "Anterior").'</a></span>'; |
|
145 | 145 | } |
146 | - $html .= '<span style="float:right;"><a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' . Display::return_icon('export_excel.png', get_lang('Export'), '', '32') . '</a></span>'; |
|
146 | + $html .= '<span style="float:right;"><a href="'.api_get_self().'?action=export'.$get_parameter.$get_parameter2.'">'.Display::return_icon('export_excel.png', get_lang('Export'), '', '32').'</a></span>'; |
|
147 | 147 | |
148 | 148 | $html .= '</form>'; |
149 | 149 | $html .= '<table class="reports">'; |
150 | 150 | $html .= '<tr> |
151 | 151 | <th ></th>'; |
152 | 152 | for ($i = (7 * $page - 6); $i <= $page * 7; $i++) { |
153 | - $html .= '<th colspan="2">Week ' . $i . '<a href="assign_tickets.php?id=' . $ids[$i] . '" class="ajax">' . Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22) . '</a></th>'; |
|
153 | + $html .= '<th colspan="2">Week '.$i.'<a href="assign_tickets.php?id='.$ids[$i].'" class="ajax">'.Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22).'</a></th>'; |
|
154 | 154 | } |
155 | 155 | $html .= '</tr>'; |
156 | 156 | $html .= $line; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | if ($row['week_id'] > (($page - 1) * 7) && $row['week_id'] <= (7 * $page)) { |
168 | 168 | $results[$row['username']][$row['week_id']] = $row; |
169 | 169 | if (count($results[$row['username']]) == 7) { |
170 | - $html.= showStudentResult($results[$row['username']], $page); |
|
170 | + $html .= showStudentResult($results[$row['username']], $page); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | if (count($resultadose[$row['username']]) == $weeksCount) { |
@@ -190,12 +190,12 @@ discard block |
||
190 | 190 | $inicio = (7 * $pagina - 6); |
191 | 191 | $fila = '<tr>'; |
192 | 192 | |
193 | - $fila.= '<td><a href="' . api_get_path(WEB_CODE_PATH) . 'user/userInfo.php?' . api_get_cidreq() . '&uInfo=' . $datos[$inicio]['user_id'] . '">' . $datos[$inicio]['username'] . '</a></td>'; |
|
193 | + $fila .= '<td><a href="'.api_get_path(WEB_CODE_PATH).'user/userInfo.php?'.api_get_cidreq().'&uInfo='.$datos[$inicio]['user_id'].'">'.$datos[$inicio]['username'].'</a></td>'; |
|
194 | 194 | foreach ($datos as $dato) { |
195 | - $fila.= '<td align="center">' . (($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>'; |
|
196 | - $fila.= '<td align="center">' . (($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>'; |
|
195 | + $fila .= '<td align="center">'.(($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>'; |
|
196 | + $fila .= '<td align="center">'.(($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>'; |
|
197 | 197 | } |
198 | - $fila.= '</tr>'; |
|
198 | + $fila .= '</tr>'; |
|
199 | 199 | return $fila; |
200 | 200 | } |
201 | 201 |