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

Details

    • 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

    Description

      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.

      Attachments

        Activity

          People

            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
            Carlos Castillo, David Matamoros, Mikel Martín Corrales, Paul Holden, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Nov/22

              Time Tracking

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