Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-9267 Moodle 3.1 QA
  3. MDLQA-9722

CLONE - Test core_get_site_info 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' -H 'Pragma: no-cache' -H 'Origin: file://' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: es,en;q=0.8,de-DE;q=0.6,de;q=0.4,nb;q=0.2' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1798.0 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Cache-Control: no-cache' -H 'Cookie: MoodleSession=6jl8pbg3ndu6j70h4a56k0aea4' -H 'Connection: keep-alive' --data 'wsfunction=core_webservice_get_site_info&wstoken=d49d1fac7125d9fd515c374be8d37c34' --compressed | python -m json.tool
        

      2. Verify you get details about Sam student
      3. Confirm that the settings values are the same than in the Moodle interface
      4. Do some changes on qa.moodle.net for Sam student
      5. Run above command again and ensure changes are visible.

            alrachels AL Rachels
            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.