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

Return the site policy in tool_mobile_get_config

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.4
    • Component/s: Other
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin add a sitepolicy global setting on your site pointing to any URL (it may not exists)
      2. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      3. Create a Token for one normal user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a CURL REST call simulating a WS client with the user.
        • 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=tool_mobile_get_config&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool"

      5. Check that among all the fields in the curl response (settings field), you receive a field with name sitepolicy and value the URL you used.
      Show
      As admin add a sitepolicy global setting on your site pointing to any URL (it may not exists) As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token for one normal user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the user. 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=tool_mobile_get_config&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Check that among all the fields in the curl response (settings field), you receive a field with name sitepolicy and value the URL you used.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60005-master

      Description

      In order to support the use case described by MOBILE-2209, we need to return the site policy via tool_mobile_get_config

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Nov/17