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

New Web Service core_reportbuilder_reports_list

    XMLWordPrintable

Details

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      The new external classes/exporters are covered by unit tests, to manually test you can do the following:

      1. Log in as admin
      2. Enable web service
      3. Generate, and make note of, token for the admin user
      4. Select Reports from the user menu
      5. Create a new report
      6. Execute the following web service request

        $ curl --silent "<WWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=core_reportbuilder_list_reports" | python -m "json.tool"
        

      7. Confirm the following output:

        {
            "reports": [
              {
                // Report data.
              },
            ],
            "warnings": []
        }
        

      8. Confirm that the "Report data" contains information about the report you created (name, source, modified by, etc)
      Show
      The new external classes/exporters are covered by unit tests, to manually test you can do the following: Log in as admin Enable web service Generate, and make note of, token for the admin user Select Reports from the user menu Create a new report Execute the following web service request $ curl --silent "<WWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=core_reportbuilder_list_reports" | python -m "json.tool" Confirm the following output: { "reports": [ { // Report data. }, ], "warnings": [] } Confirm that the "Report data" contains information about the report you created (name, source, modified by, etc)
    • WP 4.0 - ES2 (Marina), WP 4.0 - ES3 (Marina)

    Description

      Web Service to retrieve all the reports a user can see
      Create a new webservice: core_reportbuilder_reports_list()
      Parameters: page, perpage? (If we expect this page to support pagination)
      Returns: list of reports a user can see, including all the data from the reportbuilder_report table

       

      Please note that the WebService name is consistent with the approach followed by the report builder tool for other Web Services

      Note that as per discussion on MDL-74957, the naming of this issue will not be consistent with the rest of the core_reportbuilder external services, and will instead be named core_reportbuilder_list_reports

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              jleyva Juan Leyva
              Mikel Martín Corrales Mikel Martín Corrales
              Andrew Lyons Andrew Lyons
              John Edward Pedregosa John Edward Pedregosa
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours, 45 minutes
                  1d 3h 45m

                  Clockify

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