Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43535

Prevent admins to add deprecated WS functions to web services

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9
    • 2.7
    • Web Services
    • MOODLE_27_STABLE
    • MOODLE_29_STABLE
    • MDL-43535_master
    • Hide

      BEFORE PULLING LATEST INTEGRATION

      1. Set web services
        1. Create a service adding all functions to it
        2. Generate a token to admin (he/she should be able to run all functions)

      List of deprecated ws functions

      • moodle_course_create_courses
      • moodle_course_get_courses
      • moodle_enrol_get_enrolled_users
      • moodle_enrol_get_users_courses
      • moodle_enrol_manual_enrol_users
      • moodle_file_get_files
      • moodle_file_upload
      • moodle_group_add_groupmembers
      • moodle_group_create_groups
      • moodle_group_delete_groupmembers
      • moodle_group_delete_groups
      • moodle_group_get_course_groups
      • moodle_group_get_groupmembers
      • moodle_group_get_groups
      • moodle_message_send_instantmessages
      • moodle_notes_create_notes
      • moodle_role_assign
      • moodle_role_unassign
      • moodle_user_create_users
      • moodle_user_delete_users
      • moodle_user_get_course_participants_by_id
      • moodle_user_get_users_by_courseid
      • moodle_user_get_users_by_id
      • moodle_user_update_users
      • core_grade_get_definitions
      • core_user_get_users_by_id
      • moodle_webservice_get_siteinfo

      PULL LATEST INTEGRATION HERE AND UPGRADE

      • Go to Site admin -> Plugins -> WS -> External Services -> Click on the service you created before -> functions
      • You SHOULD see a debugging message stating that you are using deprecated web services
      • Click to add functions to it
      • In the functions list you SHOULD NOT see any deprecated function
      • Add a new service
      • In the functions list you SHOULD NOT see any deprecated function
      • For each of the deprecated web services of the list (sorry but we have to check that what we changed in lib/db/services.php is working as expected)
        • Call it
        • The function SHOULD work as expected
      Show
      BEFORE PULLING LATEST INTEGRATION Set web services Create a service adding all functions to it Generate a token to admin (he/she should be able to run all functions) List of deprecated ws functions moodle_course_create_courses moodle_course_get_courses moodle_enrol_get_enrolled_users moodle_enrol_get_users_courses moodle_enrol_manual_enrol_users moodle_file_get_files moodle_file_upload moodle_group_add_groupmembers moodle_group_create_groups moodle_group_delete_groupmembers moodle_group_delete_groups moodle_group_get_course_groups moodle_group_get_groupmembers moodle_group_get_groups moodle_message_send_instantmessages moodle_notes_create_notes moodle_role_assign moodle_role_unassign moodle_user_create_users moodle_user_delete_users moodle_user_get_course_participants_by_id moodle_user_get_users_by_courseid moodle_user_get_users_by_id moodle_user_update_users core_grade_get_definitions core_user_get_users_by_id moodle_webservice_get_siteinfo PULL LATEST INTEGRATION HERE AND UPGRADE Go to Site admin -> Plugins -> WS -> External Services -> Click on the service you created before -> functions You SHOULD see a debugging message stating that you are using deprecated web services Click to add functions to it In the functions list you SHOULD NOT see any deprecated function Add a new service In the functions list you SHOULD NOT see any deprecated function For each of the deprecated web services of the list (sorry but we have to check that what we changed in lib/db/services.php is working as expected) Call it The function SHOULD work as expected
    • BACKEND Sprint 19, Team B Sprint 1, Team Beards Sprint 2
    • Medium

      I noticed that we have a lot of deprecated web services functions which were deprecated in 2.2, but not removed. I feel that web services should be deprecated in the same way as other functions but can someone confirm.

      See `git grep deprecated | grep externallib` for the list

            dmonllao David Monllaó
            dobedobedoh Andrew Lyons
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.