[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 4 // Moodle is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Moodle is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 17 18 /** 19 * Core external functions and service definitions. 20 * 21 * The functions and services defined on this file are 22 * processed and registered into the Moodle DB after any 23 * install or upgrade operation. All plugins support this. 24 * 25 * For more information, take a look to the documentation available: 26 * - Webservices API: {@link http://docs.moodle.org/dev/Web_services_API} 27 * - External API: {@link http://docs.moodle.org/dev/External_functions_API} 28 * - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API} 29 * 30 * @package core_webservice 31 * @category webservice 32 * @copyright 2009 Petr Skodak 33 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 34 */ 35 36 $functions = array( 37 38 // Cohort related functions. 39 40 'core_cohort_create_cohorts' => array( 41 'classname' => 'core_cohort_external', 42 'methodname' => 'create_cohorts', 43 'classpath' => 'cohort/externallib.php', 44 'description' => 'Creates new cohorts.', 45 'type' => 'write', 46 'capabilities'=> 'moodle/cohort:manage', 47 ), 48 49 'core_cohort_delete_cohorts' => array( 50 'classname' => 'core_cohort_external', 51 'methodname' => 'delete_cohorts', 52 'classpath' => 'cohort/externallib.php', 53 'description' => 'Deletes all specified cohorts.', 54 'type' => 'delete', 55 'capabilities'=> 'moodle/cohort:manage', 56 ), 57 58 'core_cohort_get_cohorts' => array( 59 'classname' => 'core_cohort_external', 60 'methodname' => 'get_cohorts', 61 'classpath' => 'cohort/externallib.php', 62 'description' => 'Returns cohort details.', 63 'type' => 'read', 64 'capabilities'=> 'moodle/cohort:view', 65 ), 66 67 'core_cohort_update_cohorts' => array( 68 'classname' => 'core_cohort_external', 69 'methodname' => 'update_cohorts', 70 'classpath' => 'cohort/externallib.php', 71 'description' => 'Updates existing cohorts.', 72 'type' => 'write', 73 'capabilities'=> 'moodle/cohort:manage', 74 ), 75 76 'core_cohort_add_cohort_members' => array( 77 'classname' => 'core_cohort_external', 78 'methodname' => 'add_cohort_members', 79 'classpath' => 'cohort/externallib.php', 80 'description' => 'Adds cohort members.', 81 'type' => 'write', 82 'capabilities'=> 'moodle/cohort:assign', 83 ), 84 85 'core_cohort_delete_cohort_members' => array( 86 'classname' => 'core_cohort_external', 87 'methodname' => 'delete_cohort_members', 88 'classpath' => 'cohort/externallib.php', 89 'description' => 'Deletes cohort members.', 90 'type' => 'delete', 91 'capabilities'=> 'moodle/cohort:assign', 92 ), 93 94 'core_cohort_get_cohort_members' => array( 95 'classname' => 'core_cohort_external', 96 'methodname' => 'get_cohort_members', 97 'classpath' => 'cohort/externallib.php', 98 'description' => 'Returns cohort members.', 99 'type' => 'read', 100 'capabilities'=> 'moodle/cohort:view', 101 ), 102 // Grade related functions. 103 104 'core_grades_get_grades' => array( 105 'classname' => 'core_grades_external', 106 'methodname' => 'get_grades', 107 'description' => 'Returns student course total grade and grades for activities. 108 This function does not return category or manual items. 109 This function is suitable for managers or teachers not students.', 110 'type' => 'read', 111 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden', 112 ), 113 114 'core_grades_update_grades' => array( 115 'classname' => 'core_grades_external', 116 'methodname' => 'update_grades', 117 'description' => 'Update a grade item and associated student grades.', 118 'type' => 'write', 119 'capabilities' => '', 120 ), 121 122 // === group related functions === 123 124 'moodle_group_create_groups' => array( 125 'classname' => 'core_group_external', 126 'methodname' => 'create_groups', 127 'classpath' => 'group/externallib.php', 128 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_create_groups(). ', 129 'type' => 'write', 130 'capabilities'=> 'moodle/course:managegroups', 131 ), 132 133 'core_group_create_groups' => array( 134 'classname' => 'core_group_external', 135 'methodname' => 'create_groups', 136 'classpath' => 'group/externallib.php', 137 'description' => 'Creates new groups.', 138 'type' => 'write', 139 'capabilities'=> 'moodle/course:managegroups', 140 ), 141 142 'moodle_group_get_groups' => array( 143 'classname' => 'core_group_external', 144 'methodname' => 'get_groups', 145 'classpath' => 'group/externallib.php', 146 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_groups()', 147 'type' => 'read', 148 'capabilities'=> 'moodle/course:managegroups', 149 ), 150 151 'core_group_get_groups' => array( 152 'classname' => 'core_group_external', 153 'methodname' => 'get_groups', 154 'classpath' => 'group/externallib.php', 155 'description' => 'Returns group details.', 156 'type' => 'read', 157 'capabilities'=> 'moodle/course:managegroups', 158 ), 159 160 'moodle_group_get_course_groups' => array( 161 'classname' => 'core_group_external', 162 'methodname' => 'get_course_groups', 163 'classpath' => 'group/externallib.php', 164 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_course_groups()', 165 'type' => 'read', 166 'capabilities'=> 'moodle/course:managegroups', 167 ), 168 169 'core_group_get_course_groups' => array( 170 'classname' => 'core_group_external', 171 'methodname' => 'get_course_groups', 172 'classpath' => 'group/externallib.php', 173 'description' => 'Returns all groups in specified course.', 174 'type' => 'read', 175 'capabilities'=> 'moodle/course:managegroups', 176 ), 177 178 'moodle_group_delete_groups' => array( 179 'classname' => 'core_group_external', 180 'methodname' => 'delete_groups', 181 'classpath' => 'group/externallib.php', 182 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_delete_groups()', 183 'type' => 'delete', 184 'capabilities'=> 'moodle/course:managegroups', 185 ), 186 187 'core_group_delete_groups' => array( 188 'classname' => 'core_group_external', 189 'methodname' => 'delete_groups', 190 'classpath' => 'group/externallib.php', 191 'description' => 'Deletes all specified groups.', 192 'type' => 'delete', 193 'capabilities'=> 'moodle/course:managegroups', 194 ), 195 196 'moodle_group_get_groupmembers' => array( 197 'classname' => 'core_group_external', 198 'methodname' => 'get_group_members', 199 'classpath' => 'group/externallib.php', 200 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_group_members()', 201 'type' => 'read', 202 'capabilities'=> 'moodle/course:managegroups', 203 ), 204 205 'core_group_get_group_members' => array( 206 'classname' => 'core_group_external', 207 'methodname' => 'get_group_members', 208 'classpath' => 'group/externallib.php', 209 'description' => 'Returns group members.', 210 'type' => 'read', 211 'capabilities'=> 'moodle/course:managegroups', 212 ), 213 214 'moodle_group_add_groupmembers' => array( 215 'classname' => 'core_group_external', 216 'methodname' => 'add_group_members', 217 'classpath' => 'group/externallib.php', 218 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_add_group_members()', 219 'type' => 'write', 220 'capabilities'=> 'moodle/course:managegroups', 221 ), 222 223 'core_group_add_group_members' => array( 224 'classname' => 'core_group_external', 225 'methodname' => 'add_group_members', 226 'classpath' => 'group/externallib.php', 227 'description' => 'Adds group members.', 228 'type' => 'write', 229 'capabilities'=> 'moodle/course:managegroups', 230 ), 231 232 'moodle_group_delete_groupmembers' => array( 233 'classname' => 'core_group_external', 234 'methodname' => 'delete_group_members', 235 'classpath' => 'group/externallib.php', 236 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_delete_group_members()', 237 'type' => 'delete', 238 'capabilities'=> 'moodle/course:managegroups', 239 ), 240 241 'core_group_delete_group_members' => array( 242 'classname' => 'core_group_external', 243 'methodname' => 'delete_group_members', 244 'classpath' => 'group/externallib.php', 245 'description' => 'Deletes group members.', 246 'type' => 'delete', 247 'capabilities'=> 'moodle/course:managegroups', 248 ), 249 250 'core_group_create_groupings' => array( 251 'classname' => 'core_group_external', 252 'methodname' => 'create_groupings', 253 'classpath' => 'group/externallib.php', 254 'description' => 'Creates new groupings', 255 'type' => 'write', 256 ), 257 258 'core_group_update_groupings' => array( 259 'classname' => 'core_group_external', 260 'methodname' => 'update_groupings', 261 'classpath' => 'group/externallib.php', 262 'description' => 'Updates existing groupings', 263 'type' => 'write', 264 ), 265 266 'core_group_get_groupings' => array( 267 'classname' => 'core_group_external', 268 'methodname' => 'get_groupings', 269 'classpath' => 'group/externallib.php', 270 'description' => 'Returns groupings details.', 271 'type' => 'read', 272 ), 273 274 'core_group_get_course_groupings' => array( 275 'classname' => 'core_group_external', 276 'methodname' => 'get_course_groupings', 277 'classpath' => 'group/externallib.php', 278 'description' => 'Returns all groupings in specified course.', 279 'type' => 'read', 280 ), 281 282 'core_group_delete_groupings' => array( 283 'classname' => 'core_group_external', 284 'methodname' => 'delete_groupings', 285 'classpath' => 'group/externallib.php', 286 'description' => 'Deletes all specified groupings.', 287 'type' => 'write', 288 ), 289 290 'core_group_assign_grouping' => array( 291 'classname' => 'core_group_external', 292 'methodname' => 'assign_grouping', 293 'classpath' => 'group/externallib.php', 294 'description' => 'Assing groups from groupings', 295 'type' => 'write', 296 ), 297 298 'core_group_unassign_grouping' => array( 299 'classname' => 'core_group_external', 300 'methodname' => 'unassign_grouping', 301 'classpath' => 'group/externallib.php', 302 'description' => 'Unassing groups from groupings', 303 'type' => 'write', 304 ), 305 306 // === file related functions === 307 308 'moodle_file_get_files' => array( 309 'classname' => 'core_files_external', 310 'methodname' => 'get_files', 311 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_get_files()', 312 'type' => 'read', 313 'classpath' => 'files/externallib.php', 314 ), 315 316 'core_files_get_files' => array( 317 'classname' => 'core_files_external', 318 'methodname' => 'get_files', 319 'description' => 'browse moodle files', 320 'type' => 'read', 321 'classpath' => 'files/externallib.php', 322 ), 323 324 'moodle_file_upload' => array( 325 'classname' => 'core_files_external', 326 'methodname' => 'upload', 327 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_upload()', 328 'type' => 'write', 329 'classpath' => 'files/externallib.php', 330 ), 331 332 'core_files_upload' => array( 333 'classname' => 'core_files_external', 334 'methodname' => 'upload', 335 'description' => 'upload a file to moodle', 336 'type' => 'write', 337 'classpath' => 'files/externallib.php', 338 ), 339 340 // === user related functions === 341 342 'moodle_user_create_users' => array( 343 'classname' => 'core_user_external', 344 'methodname' => 'create_users', 345 'classpath' => 'user/externallib.php', 346 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_create_users()', 347 'type' => 'write', 348 'capabilities'=> 'moodle/user:create', 349 ), 350 351 'core_user_create_users' => array( 352 'classname' => 'core_user_external', 353 'methodname' => 'create_users', 354 'classpath' => 'user/externallib.php', 355 'description' => 'Create users.', 356 'type' => 'write', 357 'capabilities'=> 'moodle/user:create', 358 ), 359 360 'core_user_get_users' => array( 361 'classname' => 'core_user_external', 362 'methodname' => 'get_users', 363 'classpath' => 'user/externallib.php', 364 'description' => 'search for users matching the parameters', 365 'type' => 'read', 366 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', 367 ), 368 369 'moodle_user_get_users_by_id' => array( 370 'classname' => 'core_user_external', 371 'methodname' => 'get_users_by_id', 372 'classpath' => 'user/externallib.php', 373 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_users_by_id()', 374 'type' => 'read', 375 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', 376 ), 377 378 'core_user_get_users_by_field' => array( 379 'classname' => 'core_user_external', 380 'methodname' => 'get_users_by_field', 381 'classpath' => 'user/externallib.php', 382 'description' => 'Retrieve users information for a specified unique field - If you want to do a user search, use core_user_get_users()', 383 'type' => 'read', 384 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', 385 ), 386 387 'core_user_get_users_by_id' => array( 388 'classname' => 'core_user_external', 389 'methodname' => 'get_users_by_id', 390 'classpath' => 'user/externallib.php', 391 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been replaced by core_user_get_users_by_field()', 392 'type' => 'read', 393 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', 394 ), 395 396 'moodle_user_get_users_by_courseid' => array( 397 'classname' => 'core_enrol_external', 398 'methodname' => 'get_enrolled_users', 399 'classpath' => 'enrol/externallib.php', 400 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_enrol_get_enrolled_users()', 401 'type' => 'read', 402 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', 403 ), 404 405 'moodle_user_get_course_participants_by_id' => array( 406 'classname' => 'core_user_external', 407 'methodname' => 'get_course_user_profiles', 408 'classpath' => 'user/externallib.php', 409 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_course_user_profiles()', 410 'type' => 'read', 411 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', 412 ), 413 414 'core_user_get_course_user_profiles' => array( 415 'classname' => 'core_user_external', 416 'methodname' => 'get_course_user_profiles', 417 'classpath' => 'user/externallib.php', 418 'description' => 'Get course user profiles (each of the profils matching a course id and a user id).', 419 'type' => 'read', 420 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', 421 ), 422 423 'moodle_user_delete_users' => array( 424 'classname' => 'core_user_external', 425 'methodname' => 'delete_users', 426 'classpath' => 'user/externallib.php', 427 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_delete_users()', 428 'type' => 'write', 429 'capabilities'=> 'moodle/user:delete', 430 ), 431 432 'core_user_delete_users' => array( 433 'classname' => 'core_user_external', 434 'methodname' => 'delete_users', 435 'classpath' => 'user/externallib.php', 436 'description' => 'Delete users.', 437 'type' => 'write', 438 'capabilities'=> 'moodle/user:delete', 439 ), 440 441 'moodle_user_update_users' => array( 442 'classname' => 'core_user_external', 443 'methodname' => 'update_users', 444 'classpath' => 'user/externallib.php', 445 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_update_users()', 446 'type' => 'write', 447 'capabilities'=> 'moodle/user:update', 448 ), 449 450 'core_user_update_users' => array( 451 'classname' => 'core_user_external', 452 'methodname' => 'update_users', 453 'classpath' => 'user/externallib.php', 454 'description' => 'Update users.', 455 'type' => 'write', 456 'capabilities'=> 'moodle/user:update', 457 ), 458 459 'core_user_add_user_device' => array( 460 'classname' => 'core_user_external', 461 'methodname' => 'add_user_device', 462 'classpath' => 'user/externallib.php', 463 'description' => 'Store mobile user devices information for PUSH Notifications.', 464 'type' => 'write', 465 'capabilities'=> '', 466 ), 467 468 // === enrol related functions === 469 470 'core_enrol_get_enrolled_users_with_capability' => array( 471 'classname' => 'core_enrol_external', 472 'methodname' => 'get_enrolled_users_with_capability', 473 'classpath' => 'enrol/externallib.php', 474 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course 475 and have that capability', 476 'type' => 'read', 477 ), 478 479 'moodle_enrol_get_enrolled_users' => array( 480 'classname' => 'moodle_enrol_external', 481 'methodname' => 'get_enrolled_users', 482 'classpath' => 'enrol/externallib.php', 483 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. Please use core_enrol_get_enrolled_users() (previously known as moodle_user_get_users_by_courseid).', 484 'type' => 'read', 485 'capabilities'=> 'moodle/site:viewparticipants, moodle/course:viewparticipants, 486 moodle/role:review, moodle/site:accessallgroups, moodle/course:enrolreview', 487 ), 488 489 'core_enrol_get_enrolled_users' => array( 490 'classname' => 'core_enrol_external', 491 'methodname' => 'get_enrolled_users', 492 'classpath' => 'enrol/externallib.php', 493 'description' => 'Get enrolled users by course id.', 494 'type' => 'read', 495 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', 496 ), 497 498 'moodle_enrol_get_users_courses' => array( 499 'classname' => 'core_enrol_external', 500 'methodname' => 'get_users_courses', 501 'classpath' => 'enrol/externallib.php', 502 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_enrol_get_users_courses()', 503 'type' => 'read', 504 'capabilities'=> 'moodle/course:viewparticipants', 505 ), 506 507 'core_enrol_get_users_courses' => array( 508 'classname' => 'core_enrol_external', 509 'methodname' => 'get_users_courses', 510 'classpath' => 'enrol/externallib.php', 511 'description' => 'Get the list of courses where a user is enrolled in', 512 'type' => 'read', 513 'capabilities'=> 'moodle/course:viewparticipants', 514 ), 515 516 'core_enrol_get_course_enrolment_methods' => array( 517 'classname' => 'core_enrol_external', 518 'methodname' => 'get_course_enrolment_methods', 519 'classpath' => 'enrol/externallib.php', 520 'description' => 'Get the list of course enrolment methods', 521 'type' => 'read', 522 ), 523 524 // === Role related functions === 525 526 'moodle_role_assign' => array( 527 'classname' => 'core_role_external', 528 'methodname' => 'assign_roles', 529 'classpath' => 'enrol/externallib.php', 530 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_assign_role()', 531 'type' => 'write', 532 'capabilities'=> 'moodle/role:assign', 533 ), 534 535 'core_role_assign_roles' => array( 536 'classname' => 'core_role_external', 537 'methodname' => 'assign_roles', 538 'classpath' => 'enrol/externallib.php', 539 'description' => 'Manual role assignments.', 540 'type' => 'write', 541 'capabilities'=> 'moodle/role:assign', 542 ), 543 544 'moodle_role_unassign' => array( 545 'classname' => 'core_role_external', 546 'methodname' => 'unassign_roles', 547 'classpath' => 'enrol/externallib.php', 548 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_unassign_role()', 549 'type' => 'write', 550 'capabilities'=> 'moodle/role:assign', 551 ), 552 553 'core_role_unassign_roles' => array( 554 'classname' => 'core_role_external', 555 'methodname' => 'unassign_roles', 556 'classpath' => 'enrol/externallib.php', 557 'description' => 'Manual role unassignments.', 558 'type' => 'write', 559 'capabilities'=> 'moodle/role:assign', 560 ), 561 562 // === course related functions === 563 564 'core_course_get_contents' => array( 565 'classname' => 'core_course_external', 566 'methodname' => 'get_course_contents', 567 'classpath' => 'course/externallib.php', 568 'description' => 'Get course contents', 569 'type' => 'read', 570 'capabilities'=> 'moodle/course:update,moodle/course:viewhiddencourses', 571 ), 572 573 'moodle_course_get_courses' => array( 574 'classname' => 'core_course_external', 575 'methodname' => 'get_courses', 576 'classpath' => 'course/externallib.php', 577 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_get_courses()', 578 'type' => 'read', 579 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses', 580 ), 581 582 'core_course_get_courses' => array( 583 'classname' => 'core_course_external', 584 'methodname' => 'get_courses', 585 'classpath' => 'course/externallib.php', 586 'description' => 'Return course details', 587 'type' => 'read', 588 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses', 589 ), 590 591 'moodle_course_create_courses' => array( 592 'classname' => 'core_course_external', 593 'methodname' => 'create_courses', 594 'classpath' => 'course/externallib.php', 595 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_create_courses()', 596 'type' => 'write', 597 'capabilities'=> 'moodle/course:create,moodle/course:visibility', 598 ), 599 600 'core_course_create_courses' => array( 601 'classname' => 'core_course_external', 602 'methodname' => 'create_courses', 603 'classpath' => 'course/externallib.php', 604 'description' => 'Create new courses', 605 'type' => 'write', 606 'capabilities'=> 'moodle/course:create,moodle/course:visibility', 607 ), 608 609 'core_course_delete_courses' => array( 610 'classname' => 'core_course_external', 611 'methodname' => 'delete_courses', 612 'classpath' => 'course/externallib.php', 613 'description' => 'Deletes all specified courses', 614 'type' => 'write', 615 'capabilities'=> 'moodle/course:delete', 616 ), 617 618 'core_course_delete_modules' => array( 619 'classname' => 'core_course_external', 620 'methodname' => 'delete_modules', 621 'classpath' => 'course/externallib.php', 622 'description' => 'Deletes all specified module instances', 623 'type' => 'write', 624 'capabilities' => 'moodle/course:manageactivities' 625 ), 626 627 'core_course_duplicate_course' => array( 628 'classname' => 'core_course_external', 629 'methodname' => 'duplicate_course', 630 'classpath' => 'course/externallib.php', 631 'description' => 'Duplicate an existing course (creating a new one) without user data', 632 'type' => 'write', 633 'capabilities'=> 'moodle/backup:backupcourse,moodle/restore:restorecourse,moodle/course:create', 634 ), 635 636 'core_course_update_courses' => array( 637 'classname' => 'core_course_external', 638 'methodname' => 'update_courses', 639 'classpath' => 'course/externallib.php', 640 'description' => 'Update courses', 641 'type' => 'write', 642 'capabilities'=> 'moodle/course:update,moodle/course:changecategory,moodle/course:changefullname,moodle/course:changeshortname,moodle/course:changeidnumber,moodle/course:changesummary,moodle/course:visibility', 643 ), 644 645 // === course category related functions === 646 647 'core_course_get_categories' => array( 648 'classname' => 'core_course_external', 649 'methodname' => 'get_categories', 650 'classpath' => 'course/externallib.php', 651 'description' => 'Return category details', 652 'type' => 'read', 653 'capabilities'=> 'moodle/category:viewhiddencategories', 654 ), 655 656 'core_course_create_categories' => array( 657 'classname' => 'core_course_external', 658 'methodname' => 'create_categories', 659 'classpath' => 'course/externallib.php', 660 'description' => 'Create course categories', 661 'type' => 'write', 662 'capabilities'=> 'moodle/category:manage', 663 ), 664 665 'core_course_update_categories' => array( 666 'classname' => 'core_course_external', 667 'methodname' => 'update_categories', 668 'classpath' => 'course/externallib.php', 669 'description' => 'Update categories', 670 'type' => 'write', 671 'capabilities'=> 'moodle/category:manage', 672 ), 673 674 'core_course_delete_categories' => array( 675 'classname' => 'core_course_external', 676 'methodname' => 'delete_categories', 677 'classpath' => 'course/externallib.php', 678 'description' => 'Delete course categories', 679 'type' => 'write', 680 'capabilities'=> 'moodle/category:manage', 681 ), 682 683 'core_course_import_course' => array( 684 'classname' => 'core_course_external', 685 'methodname' => 'import_course', 686 'classpath' => 'course/externallib.php', 687 'description' => 'Import course data from a course into another course. Does not include any user data.', 688 'type' => 'write', 689 'capabilities'=> 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport', 690 ), 691 692 // === message related functions === 693 694 'moodle_message_send_instantmessages' => array( 695 'classname' => 'core_message_external', 696 'methodname' => 'send_instant_messages', 697 'classpath' => 'message/externallib.php', 698 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_message_send_instant_messages()', 699 'type' => 'write', 700 'capabilities'=> 'moodle/site:sendmessage', 701 ), 702 703 'core_message_send_instant_messages' => array( 704 'classname' => 'core_message_external', 705 'methodname' => 'send_instant_messages', 706 'classpath' => 'message/externallib.php', 707 'description' => 'Send instant messages', 708 'type' => 'write', 709 'capabilities'=> 'moodle/site:sendmessage', 710 ), 711 712 'core_message_create_contacts' => array( 713 'classname' => 'core_message_external', 714 'methodname' => 'create_contacts', 715 'classpath' => 'message/externallib.php', 716 'description' => 'Add contacts to the contact list', 717 'type' => 'write', 718 'capabilities'=> '', 719 ), 720 721 'core_message_delete_contacts' => array( 722 'classname' => 'core_message_external', 723 'methodname' => 'delete_contacts', 724 'classpath' => 'message/externallib.php', 725 'description' => 'Remove contacts from the contact list', 726 'type' => 'write', 727 'capabilities'=> '', 728 ), 729 730 'core_message_block_contacts' => array( 731 'classname' => 'core_message_external', 732 'methodname' => 'block_contacts', 733 'classpath' => 'message/externallib.php', 734 'description' => 'Block contacts', 735 'type' => 'write', 736 'capabilities'=> '', 737 ), 738 739 'core_message_unblock_contacts' => array( 740 'classname' => 'core_message_external', 741 'methodname' => 'unblock_contacts', 742 'classpath' => 'message/externallib.php', 743 'description' => 'Unblock contacts', 744 'type' => 'write', 745 'capabilities'=> '', 746 ), 747 748 'core_message_get_contacts' => array( 749 'classname' => 'core_message_external', 750 'methodname' => 'get_contacts', 751 'classpath' => 'message/externallib.php', 752 'description' => 'Retrieve the contact list', 753 'type' => 'read', 754 'capabilities'=> '', 755 ), 756 757 'core_message_search_contacts' => array( 758 'classname' => 'core_message_external', 759 'methodname' => 'search_contacts', 760 'classpath' => 'message/externallib.php', 761 'description' => 'Search for contacts', 762 'type' => 'read', 763 'capabilities'=> '', 764 ), 765 766 'core_message_get_messages' => array( 767 'classname' => 'core_message_external', 768 'methodname' => 'get_messages', 769 'classpath' => 'message/externallib.php', 770 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)', 771 'type' => 'read', 772 'capabilities' => '', 773 ), 774 775 // === notes related functions === 776 777 'moodle_notes_create_notes' => array( 778 'classname' => 'core_notes_external', 779 'methodname' => 'create_notes', 780 'classpath' => 'notes/externallib.php', 781 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_notes_create_notes()', 782 'type' => 'write', 783 'capabilities'=> 'moodle/notes:manage', 784 ), 785 786 'core_notes_create_notes' => array( 787 'classname' => 'core_notes_external', 788 'methodname' => 'create_notes', 789 'classpath' => 'notes/externallib.php', 790 'description' => 'Create notes', 791 'type' => 'write', 792 'capabilities'=> 'moodle/notes:manage', 793 ), 794 795 'core_notes_delete_notes' => array( 796 'classname' => 'core_notes_external', 797 'methodname' => 'delete_notes', 798 'classpath' => 'notes/externallib.php', 799 'description' => 'Delete notes', 800 'type' => 'write', 801 'capabilities'=> 'moodle/notes:manage', 802 ), 803 804 'core_notes_get_notes' => array( 805 'classname' => 'core_notes_external', 806 'methodname' => 'get_notes', 807 'classpath' => 'notes/externallib.php', 808 'description' => 'Get notes', 809 'type' => 'read', 810 'capabilities'=> 'moodle/notes:view', 811 ), 812 813 'core_notes_update_notes' => array( 814 'classname' => 'core_notes_external', 815 'methodname' => 'update_notes', 816 'classpath' => 'notes/externallib.php', 817 'description' => 'Update notes', 818 'type' => 'write', 819 'capabilities'=> 'moodle/notes:manage', 820 ), 821 822 // === grading related functions === 823 824 'core_grading_get_definitions' => array( 825 'classname' => 'core_grading_external', 826 'methodname' => 'get_definitions', 827 'description' => 'Get grading definitions', 828 'type' => 'read' 829 ), 830 831 'core_grade_get_definitions' => array( 832 'classname' => 'core_grade_external', 833 'methodname' => 'get_definitions', 834 'classpath' => 'grade/externallib.php', 835 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_grading_get_definitions()', 836 'type' => 'read' 837 ), 838 839 'core_grading_save_definitions' => array( 840 'classname' => 'core_grading_external', 841 'methodname' => 'save_definitions', 842 'description' => 'Save grading definitions', 843 'type' => 'write' 844 ), 845 846 'core_grading_get_gradingform_instances' => array( 847 'classname' => 'core_grading_external', 848 'methodname' => 'get_gradingform_instances', 849 'description' => 'Get grading form instances', 850 'type' => 'read' 851 ), 852 853 // === webservice related functions === 854 855 'moodle_webservice_get_siteinfo' => array( 856 'classname' => 'core_webservice_external', 857 'methodname' => 'get_site_info', 858 'classpath' => 'webservice/externallib.php', 859 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_webservice_get_site_info()', 860 'type' => 'read', 861 ), 862 863 'core_webservice_get_site_info' => array( 864 'classname' => 'core_webservice_external', 865 'methodname' => 'get_site_info', 866 'classpath' => 'webservice/externallib.php', 867 'description' => 'Return some site info / user info / list web service functions', 868 'type' => 'read', 869 ), 870 871 'core_get_string' => array( 872 'classname' => 'core_external', 873 'methodname' => 'get_string', 874 'classpath' => 'lib/external/externallib.php', 875 'description' => 'Return a translated string - similar to core get_string() call', 876 'type' => 'read', 877 ), 878 879 'core_get_strings' => array( 880 'classname' => 'core_external', 881 'methodname' => 'get_strings', 882 'classpath' => 'lib/external/externallib.php', 883 'description' => 'Return some translated strings - like several core get_string() calls', 884 'type' => 'read', 885 ), 886 887 'core_get_component_strings' => array( 888 'classname' => 'core_external', 889 'methodname' => 'get_component_strings', 890 'classpath' => 'lib/external/externallib.php', 891 'description' => 'Return all raw strings (with {$a->xxx}) for a specific component 892 - similar to core get_component_strings() call', 893 'type' => 'read', 894 ), 895 896 897 // === Calendar related functions === 898 899 'core_calendar_delete_calendar_events' => array( 900 'classname' => 'core_calendar_external', 901 'methodname' => 'delete_calendar_events', 902 'description' => 'Delete calendar events', 903 'classpath' => 'calendar/externallib.php', 904 'type' => 'write', 905 'capabilities'=> 'moodle/calendar:manageentries', 'moodle/calendar:manageownentries', 'moodle/calendar:managegroupentries' 906 ), 907 908 909 'core_calendar_get_calendar_events' => array( 910 'classname' => 'core_calendar_external', 911 'methodname' => 'get_calendar_events', 912 'description' => 'Get calendar events', 913 'classpath' => 'calendar/externallib.php', 914 'type' => 'read', 915 'capabilities'=> 'moodle/calendar:manageentries', 'moodle/calendar:manageownentries', 'moodle/calendar:managegroupentries' 916 ), 917 918 'core_calendar_create_calendar_events' => array( 919 'classname' => 'core_calendar_external', 920 'methodname' => 'create_calendar_events', 921 'description' => 'Create calendar events', 922 'classpath' => 'calendar/externallib.php', 923 'type' => 'write', 924 'capabilities'=> 'moodle/calendar:manageentries', 'moodle/calendar:manageownentries', 'moodle/calendar:managegroupentries' 925 ), 926 ); 927 928 $services = array( 929 'Moodle mobile web service' => array( 930 'functions' => array ( 931 'moodle_enrol_get_users_courses', 932 'moodle_enrol_get_enrolled_users', 933 'moodle_user_get_users_by_id', 934 'moodle_webservice_get_siteinfo', 935 'moodle_notes_create_notes', 936 'moodle_user_get_course_participants_by_id', 937 'moodle_user_get_users_by_courseid', 938 'moodle_message_send_instantmessages', 939 'core_course_get_contents', 940 'core_get_component_strings', 941 'core_user_add_user_device', 942 'core_calendar_get_calendar_events', 943 'core_enrol_get_users_courses', 944 'core_enrol_get_enrolled_users', 945 'core_user_get_users_by_id', 946 'core_webservice_get_site_info', 947 'core_notes_create_notes', 948 'core_user_get_course_user_profiles', 949 'core_enrol_get_enrolled_users', 950 'core_message_send_instant_messages', 951 'mod_assign_get_grades', 952 'mod_assign_get_assignments', 953 'mod_assign_get_submissions', 954 'mod_assign_get_user_flags', 955 'mod_assign_set_user_flags', 956 'mod_assign_get_user_mappings', 957 'mod_assign_revert_submissions_to_draft', 958 'mod_assign_lock_submissions', 959 'mod_assign_unlock_submissions', 960 'mod_assign_save_submission', 961 'mod_assign_submit_for_grading', 962 'mod_assign_save_grade', 963 'mod_assign_save_user_extensions', 964 'mod_assign_reveal_identities', 965 'message_airnotifier_is_system_configured', 966 'message_airnotifier_are_notification_preferences_configured', 967 'core_grades_update_grades', 968 'mod_forum_get_forums_by_courses', 969 'mod_forum_get_forum_discussions_paginated', 970 'mod_forum_get_forum_discussion_posts', 971 'core_files_get_files', 972 'core_message_get_messages', 973 'core_message_create_contacts', 974 'core_message_delete_contacts', 975 'core_message_block_contacts', 976 'core_message_unblock_contacts', 977 'core_message_get_contacts', 978 'core_message_search_contacts'), 979 'enabled' => 0, 980 'restrictedusers' => 0, 981 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE, 982 'downloadfiles' => 1, 983 'uploadfiles' => 1 984 ), 985 );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |