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

Create a new Web Service to retrieve system reports (core_reportbuilder_retrieve_system_report)

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_403_STABLE
    • Hide
      1. Covered by automated tests (PHPUnit)

      Manual test

      1. Log in as admin
      2. Navigate to Reports in user menu
      3. Create report from _Users source
      4. Enable web services
      5. Enable rest protocol
      6. Enable Moodle mobile web service external service
      7. Create token for admin
      8. Execute the following:

        $ curl --silent "<WWWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=core_reportbuilder_retrieve_system_report&source=core_reportbuilder\local\systemreports\reports_list&context[contextid]=1" | python -m "json.tool"
        

      9. Confirm the following output:

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

      10. Confirm that the "Report data" contains the data within your report:
        • "headers" should contain Name, Report source, Time created, Time modified, Modified by
        • "rows" should contain an array of items, each containing a "columns" property with the actual row data
        • "totalrowcount" should contain total row count
      Show
      Covered by automated tests (PHPUnit) Manual test Log in as admin Navigate to Reports in user menu Create report from _Users source Enable web services Enable rest protocol Enable Moodle mobile web service external service Create token for admin Execute the following: $ curl --silent "<WWWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=core_reportbuilder_retrieve_system_report&source=core_reportbuilder\local\systemreports\reports_list&context[contextid]=1" | python -m "json.tool" Confirm the following output: { "data": [ { // Report data. }, "warnings": [] } Confirm that the "Report data" contains the data within your report: "headers" should contain Name, Report source, Time created, Time modified, Modified by "rows" should contain an array of items, each containing a "columns" property with the actual row data "totalrowcount" should contain total row count
    • WP Sprint 2023-I2.3 (Clones), WP Sprint 2023-I3.0 (Clones)

      • Create a new Web Service to retrieve system reports.
      • This new WS will require the same parameters as the system_report_factory::create method
      • The new WebService/s will be integrated into Moodle LMS 4.3
      • The previous will allow us to retrieve any system report (intended for users) in the future
      • It is important to mention that some system reports return HTML such as labels with bootstrap classes or pre-rendered html
      • System reports support further actions via a settings cog icon (available mostly in Workplace), this won't be initially supported

            pholden Paul Holden
            jleyva Juan Leyva
            Carlos Castillo Carlos Castillo
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            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 - 3 hours, 50 minutes
                3h 50m

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