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

Update the core_webservice_get_site_info WebService to return the value of the advanced feature: enablecustomreports

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_401_STABLE
    • MDL-74827-master
    • Hide
      1. As an admin, in Site administration ► General ► Advanced features check:
        • "Enable custom reports"
        • "Enable web services"
        • "Enable web services for mobile devices"
      2. Create a Token in the mobile app service for any user on the site (not an admin account)
        • Click on Site administration ► Server ► Web services ► Manage tokens
      3. Next, you can do a CURL REST call simulating a WS client with the user token. You need to replace the $wstoken and the MOODLE_URL of your moodle instance:

        curl 'MOODLE_URL/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_webservice_get_site_info&wstoken=$wstoken' --compressed

      4. Confirm that in the curl request response, you see the field "advancedfeatures: name = enablecustomreports" and the value set to 1
      5. Now, as admin, disable the global admin setting "enablecustomreports"
      6. Execute the same curl request as before
      7. Confirm that in the curl request response, you see the field "advancedfeatures: name = enablecustomreports" and the value set to 0
      Show
      As an admin, in Site administration ► General ► Advanced features check: "Enable custom reports" "Enable web services" "Enable web services for mobile devices" Create a Token in the mobile app service for any user on the site (not an admin account) Click on Site administration ► Server ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the user token. You need to replace the $wstoken and the MOODLE_URL of your moodle instance: curl 'MOODLE_URL/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_webservice_get_site_info&wstoken=$wstoken' --compressed Confirm that in the curl request response, you see the field "advancedfeatures: name = enablecustomreports" and the value set to 1 Now, as admin, disable the global admin setting "enablecustomreports" Execute the same curl request as before Confirm that in the curl request response, you see the field "advancedfeatures: name = enablecustomreports" and the value set to 0

      That advanced feature (Report builder) was added in Moodle 4.0, in order to know if we should display it on the app we need that value.

            rodrigo.mady@moodle.com Rodrigo Mady
            jleyva Juan Leyva
            Juan Leyva Juan Leyva
            Victor Déniz Falcón Victor Déniz Falcón
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 40 minutes
                5h 40m

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