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

Return additional information in core_get_site_info

XMLWordPrintable

    • MOODLE_28_STABLE
    • MOODLE_29_STABLE
    • MDL-49333-master
    • Hide
      1. Enable "Mobile services": Plugins ► Web Services ► External services
      2. Create a Token for the user (student) your are going to test with:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
        • Click add, select user and service (Mobile Service)
      3. Next, you can do a CURL REST call simulating a WS client:
        • 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' -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=1b9cc9f44630b554bb2c9428b8744338' --compressed
          

      4. Confirm that:
      Show
      Enable "Mobile services": Plugins ► Web Services ► External services Create a Token for the user (student) your are going to test with: Click on Site administration ► Plugins ► Web services ► Manage tokens Click add, select user and service (Mobile Service) Next, you can do a CURL REST call simulating a WS client: 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' -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=1b9cc9f44630b554bb2c9428b8744338' --compressed Confirm that: You receive a new element in the json response "advancedfeatures", confirm that the settings values are the same than in the Moodle interface. http://localhost/m/stable_master/admin/settings.php?section=optionalsubsystems Do some changes in the Moodle interface, run again the client and check again that the values match. Tip: You can use this online tool: http://jsonlint.com/ for formatting the JSON response

      For the mobile app we need additional information about features enabled in the site (messaging, notes, usercomments, etc...)

      For example, if messaging is disabled we are not going to display that option in the app (same for comments, notes, etc...)

            jleyva Juan Leyva
            jleyva Juan Leyva
            Mark Nelson Mark Nelson
            David Monllaó David Monllaó
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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