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

New Web Service tool_mobile_get_site_public_settings

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.2
    • Fix Version/s: 3.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Run the following curl call (no need to get a token, is a WS that does not require authorization and is published via ajax):

      curl 'http://localhost/m/stable_master/lib/ajax/service.php' --data-binary '[{"index":0,"methodname":"tool_mobile_get_site_public_settings","args":{}}]' | python -m "json.tool"

      And check that the settings returned match the Moodle settings.
      Now, change in Moodle any of the settings returned by the WS, run the curl command again and check that the new setting values are returned.

      Show
      Run the following curl call (no need to get a token, is a WS that does not require authorization and is published via ajax): curl 'http://localhost/m/stable_master/lib/ajax/service.php' --data-binary ' [{"index":0,"methodname":"tool_mobile_get_site_public_settings","args":{}}] ' | python -m "json.tool" And check that the settings returned match the Moodle settings. Now, change in Moodle any of the settings returned by the WS, run the curl command again and check that the new setting values are returned.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-54857-master

      Description

      New Web Service not requiring a session and published via AJAX that must return this information:

      • siteurl
      • sitename
      • guestloginbutton
      • rememberusername
      • authloginviaemail
      • registerauth
      • wwwroot
      • httpswwwroot
      • forgottenpasswordurl
      • authinstructions
      • isenabledauthnone
      • enablewebservices
      • enablemobilewebservice
      • maintenance_enabled

      This will help us to:

      • Obtain information (like the site name) just knowing the URL
      • Check if the site has self-registration enabled
      • Obtain the valid siteurl and httpswwwroot for authentication (right now we have to guess it testing https and then http, error prone)
      • Check if mobile services are enabled (without having to check it doing a request to login/token.php)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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