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

Return the SITEID in core_webservice_get_site_info

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable "Mobile services": Plugins ► Web Services ► Mobile
      2. Create a Token for the user (student) your are going to test with:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
        • Click add, select user and service (Mobile Service)
      3. Next, you can do a CURL REST call simulating a WS client:
        • You need to replace the wstoken and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_webservice_get_site_info&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed

      4. Confirm that you receive a siteid attribute with the value of your site course ID (usually 1).
      Show
      Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the user (student) your are going to test with: Click on Site administration ► Plugins ► Web services ► Manage tokens Click add, select user and service (Mobile Service) Next, you can do a CURL REST call simulating a WS client: You need to replace the wstoken and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_webservice_get_site_info&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed Confirm that you receive a siteid attribute with the value of your site course ID (usually 1).
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56160-master

      Description

      Right now external services cannot know the value of SITEID, we should return it in get_site_info.

      Right now in the app we assume it's 1, but we found a couple of cases where the value was different and it caused some errors.

        Attachments

          Activity

            People

            Assignee:
            dpalou Dani Palou
            Reporter:
            dpalou Dani Palou
            Peer reviewer:
            Jun Pataleta
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            cameron1729
            Participants:
            Component watchers:
            Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Dec/16