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

Add hooks to allow custom filters for user tours

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • MDL-81063-main
    • Hide
      1. Install the test repo into local/mdl81063:

        git clone https://github.com/andrewnicols/mdl81063 local/mdl81063
        

      2. Perform site ugprade
      3. Navigate to Site admin -> Development -> Hooks overview
        1. *Confirm that a callback is listed for tool_usertours\hook\before_clientside_filter_fetch
        2. *Confirm that a callback is listed for tool_usertours\hook\before_serverside_filter_fetch
      4. Navigate to Site admin -> Appearance -> User tours
      5. Edit the "Block drawer" tour
      6. Scroll to the bottom of the form
      7. Confirm there are filters for:
        1. User
        2. Body class
      8. Confirm there are no filters for:
        1. Access date
        2. CSS Selector
      9. Set the User filter to your current user
      10. Set the body class filter to "jsenabled"
      11. Save changes
      12. Click into the "Blocks drawer" tour
      13. Click on "force the tour to be displayed" link
      14. As your current user go to your "Dashboard"
        1. Confirm the tour was shown
      15. Open a second browser and log in as any other user
      16. Navigate to your "Dashboard"
        1. Confirm the tour was NOT shown
      17. Back as the admin user edit the tour again
      18. Change the body class to "foobarbaz"
      19. Click on "force the tour to be displayed" link
      20. As your current user go to your "Dashboard"
        1. Confirm the tour was NOT shown
      21. Open a second browser and log in as any other user
      22. Navigate to your "Dashboard"
        1. Confirm the tour was NOT shown
      Show
      Install the test repo into local/mdl81063: git clone https://github.com/andrewnicols/mdl81063 local/mdl81063 Perform site ugprade Navigate to Site admin -> Development -> Hooks overview *Confirm that a callback is listed for tool_usertours\hook\before_clientside_filter_fetch *Confirm that a callback is listed for tool_usertours\hook\before_serverside_filter_fetch Navigate to Site admin -> Appearance -> User tours Edit the "Block drawer" tour Scroll to the bottom of the form Confirm there are filters for: User Body class Confirm there are no filters for: Access date CSS Selector Set the User filter to your current user Set the body class filter to "jsenabled" Save changes Click into the "Blocks drawer" tour Click on "force the tour to be displayed" link As your current user go to your "Dashboard" Confirm the tour was shown Open a second browser and log in as any other user Navigate to your "Dashboard" Confirm the tour was NOT shown Back as the admin user edit the tour again Change the body class to "foobarbaz" Click on "force the tour to be displayed" link As your current user go to your "Dashboard" Confirm the tour was NOT shown Open a second browser and log in as any other user Navigate to your "Dashboard" Confirm the tour was NOT shown

      As discussed in WP-4623, it would be advantageous to be able to add custom filters for user tours via use of hooks.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Sam Marshall Sam Marshall
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 27 minutes
                4h 27m

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