Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-9827 Moodle 3.2 QA
  3. MDLQA-10279

CLONE - Test tool_mobile_get_config webservice

XMLWordPrintable

      For testing this issue:

      1. You need to have access to console on your system
      2. Curl and python should be installed on your system.
      3. Have basic understanding of Json

      Prerequisite

      1. Login as admin
      2. Enable web services (Site administration ▶︎ Advanced features)
      3. Enable Rest protocol (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Manage protocols)
      4. Enable mobile web service (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Mobile)
      5. Create a token for student (Sam student) (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Manage tokens)
      6. Save token and use it to replace d49d1fac7125d9fd515c374be8d37c34 in the web service below.

      Test

      1. Run following command from your console

        curl 'https://qa.moodle.net/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_config&wstoken=d49d1fac7125d9fd515c374be8d37c34&section=frontpagesettings' | python -m "json.tool"
        

      2. Check that the settings values match with the settings in https://qa.moodle.net/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.
      3. If you execute the curl request removing the section=frontpagesettings you will get apart from the frontpagesettings additional settings like disableuserimages and mygradesurle.

            jpataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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