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

New Web Service tool_mobile_get_config

XMLWordPrintable

    • MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-54866-master
    • Hide
      1. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      2. Create a Token for one normal user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      3. 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=ffbe3a3002f235bf9d01fd9369e10b66&section=frontpagesettings' | python -m "json.tool"

      4. Check that the settings values match with the settings in yourmoodle.com/admin/settings.php?section=frontpagesettings (for the advanced fields like the frontpage ones you can check directly the values in the config table), except defaultfrontpageroleid that is only viewable if you execute the curl request using an admin token.
      5. If you execute the curl request removing the section=frontpagesettings you will get apart from the frontpagesettings additional settings like disableuserimages and mygradesurl
      Show
      As admin, enable "Mobile services": Plugins ► Web Services ► Mobile 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=ffbe3a3002f235bf9d01fd9369e10b66&section=frontpagesettings' | python -m "json.tool" Check that the settings values match with the settings in yourmoodle.com/admin/settings.php?section=frontpagesettings (for the advanced fields like the frontpage ones you can check directly the values in the config table), except defaultfrontpageroleid that is only viewable if you execute the curl request using an admin token. If you execute the curl request removing the section=frontpagesettings you will get apart from the frontpagesettings additional settings like disableuserimages and mygradesurl

      we need a new Web Service for retrieving site settings required by the app, for example, the frontpage settings to be able to display a Site Home similar to Moodle one (or for fixing issues like MOBILE-1749 ).

      The idea is to not overload the existing core_get_site_info web service with tons of new settings and use this new WS specific for mobile instead.

      This WS must include some filtering, like filtering for "setting sections" in that way you can retrieve only the settings you need at any moment.

      For Moodle Mobile 3.2 we'll be using this WS for retrieving the frontpage settings, so we can build a front page in the app that is similar to the web version one.

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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