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

Trigger events for CRUD operations on report models

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 4.0
    • 4.0
    • Report builder
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-72757-master
    • Hide

      Setup

      1) Log in as Admin user
      2) Create two users: 'User1' and 'User2'

      Report events

      1) Go to Site administration > Reports > Report Builder > Custom reports
      2) Press on 'New report'
      3) Set the name to "My report", set Report source to 'Users' and press 'Save'
      4) Press on 'Edit details'
      5) Change the name to 'My new report' and press 'Save'
      6) Press 'Close'
      7) Click on 'Delete report' icon on the 'My new report' row
      8) Press 'Delete' on the confirmation modal
      9) Go to Site administration > Reports > Logs
      10) Press 'Get these logs'
      11) Confirm that there are 3 events on top of the list from component 'core_reportbuilder' (Report created, Report updated and Report deleted)

      Audience events

      12) Go to Site administration > Reports > Report Builder > Custom reports
      13) Press on 'New report'
      14) Set the name to "My report", set Report source to 'Users' and press 'Save'
      15) Click on 'Audience' tab
      16) Click on 'Manually added users'
      17) Select User1 and press 'Save changes'
      18) Click on the "Edit audience 'Manually added users'"
      19) Select User2 and press 'Save changes'
      20) CLick on "Delete audience 'Manually added users'"
      21) Press 'Delete' on the confirmation modal
      22) Press 'Close'
      23) Go to Site administration > Reports > Logs
      24) Press 'Get these logs'
      25) Confirm that there are 3 events on top of the list from component 'core_reportbuilder' (Audience created, Audience updated and Audience deleted)

      Schedule events

      26) Go to Site administration > Reports > Report Builder > Custom reports
      27) Click on 'My report'
      28) Click on 'Audience' tab
      29) Click on 'All users' and then on 'Save changes'
      30) Click on 'Schedules' tab
      31) Press on 'New schedule'
      32) Set the name to 'My schedule', click on the 'All users: All site users' checkbox, set Subject to 'My subject' and Body to 'Hello world'
      33) Press 'Save'
      34) Click on 'Edit schedule details' icon
      35) Change Name to 'Schedule' and press 'Save'
      36) Click on 'Delete schedule' icon and then press 'Delete' on the confirmation modal
      37) Press 'Close'
      38) Go to Site administration > Reports > Logs
      39) Press 'Get these logs'
      40) Confirm that there are 3 events on top of the list from component 'core_reportbuilder' (Schedule created, Schedule updated and Schedule deleted)

      View report event

      1. Create a new role
        • No archetype
        • Shortname: reportviewer
        • Full name: Report viewer
        • Contexts where role can be assigned: System
        • Allowed capabilities:
          • moodle/site:configview
          • moodle/reportbuilder:view
      2. Assign this system role to "User1"
      3. Logout

      View report event

      1. Login as User1
      2. Navigate to Reports > Report builder > Custom reports in site administration
      3. Click on the report name
      4. Confirm you see the report as configured by admin
      5. Logout and Log in as Admin
      6. Go to Site administration > Reports > Logs
      7. Press 'Get these logs'
      8. Confirm that there is one event from component 'core_reportbuilder' called 'Report viewed'
      Show
      Setup 1) Log in as Admin user 2) Create two users: 'User1' and 'User2' Report events 1) Go to Site administration > Reports > Report Builder > Custom reports 2) Press on 'New report' 3) Set the name to "My report", set Report source to 'Users' and press 'Save' 4) Press on 'Edit details' 5) Change the name to 'My new report' and press 'Save' 6) Press 'Close' 7) Click on 'Delete report' icon on the 'My new report' row 8) Press 'Delete' on the confirmation modal 9) Go to Site administration > Reports > Logs 10) Press 'Get these logs' 11) Confirm that there are 3 events on top of the list from component 'core_reportbuilder' (Report created, Report updated and Report deleted) Audience events 12) Go to Site administration > Reports > Report Builder > Custom reports 13) Press on 'New report' 14) Set the name to "My report", set Report source to 'Users' and press 'Save' 15) Click on 'Audience' tab 16) Click on 'Manually added users' 17) Select User1 and press 'Save changes' 18) Click on the "Edit audience 'Manually added users'" 19) Select User2 and press 'Save changes' 20) CLick on "Delete audience 'Manually added users'" 21) Press 'Delete' on the confirmation modal 22) Press 'Close' 23) Go to Site administration > Reports > Logs 24) Press 'Get these logs' 25) Confirm that there are 3 events on top of the list from component 'core_reportbuilder' (Audience created, Audience updated and Audience deleted) Schedule events 26) Go to Site administration > Reports > Report Builder > Custom reports 27) Click on 'My report' 28) Click on 'Audience' tab 29) Click on 'All users' and then on 'Save changes' 30) Click on 'Schedules' tab 31) Press on 'New schedule' 32) Set the name to 'My schedule', click on the 'All users: All site users' checkbox, set Subject to 'My subject' and Body to 'Hello world' 33) Press 'Save' 34) Click on 'Edit schedule details' icon 35) Change Name to 'Schedule' and press 'Save' 36) Click on 'Delete schedule' icon and then press 'Delete' on the confirmation modal 37) Press 'Close' 38) Go to Site administration > Reports > Logs 39) Press 'Get these logs' 40) Confirm that there are 3 events on top of the list from component 'core_reportbuilder' (Schedule created, Schedule updated and Schedule deleted) View report event Create a new role No archetype Shortname: reportviewer Full name: Report viewer Contexts where role can be assigned: System Allowed capabilities: moodle/site:configview moodle/reportbuilder:view Assign this system role to "User1" Logout View report event Login as User1 Navigate to Reports > Report builder > Custom reports in site administration Click on the report name Confirm you see the report as configured by admin Logout and Log in as Admin Go to Site administration > Reports > Logs Press 'Get these logs' Confirm that there is one event from component 'core_reportbuilder' called 'Report viewed'

    Description

      Events should be triggered when user is creating custom reports, as a means to record log activity of custom report activity

      1. Reports (MDL-70795)
        • Create
        • Read (view the custom report, not system reports)
        • Update
        • Delete
      2. Report audiences (MDL-72588)
        • Create
        • Update
        • Delete
      3. Report schedules (MDL-72598)
        • Create
        • Update
        • Delete

      The listed tasks block this one

      Attachments

        Issue Links

          Activity

            People

              davidcarrillo David Carrillo
              pholden Paul Holden
              Paul Holden Paul Holden
              Shamim Rezaie Shamim Rezaie
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 6 hours, 50 minutes
                  6h 50m

                  Clockify

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