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

New theme usage report

XMLWordPrintable

    • MOODLE_404_STABLE
    • MDL-78427-master
    • Hide

      Automated tests

      • The Behat test covers the accessing of the theme usage report for each context.
      • The PHPUnit test covers the underlying methods and cacheing

      Manual test (from report menu)

      1. Log in as Admin
      2. Go to Site admin -> Reports
      3. CONFIRM there is a link called 'Theme usage'
      4. Click on the link.
      5. CONFIRM you are taken to the theme usage report page.

      Manual test (from theme card)

      1. Log in as an Admin
      2. Go to Site admin -> Appearance -> Advanced theme settings
      3. Enable 'Allow user themes'
      4. Log in as a student
      5. Go User -> Edit profile
      6. Set 'Preferred theme' to 'Classic'
      7. Saves changes.
      8. Log back in as Admin
      9. Go Site admin -> Appearance -> Themes
      10. CONFIRM there is a graph/report icon on Classic's theme card.
      11. Click on the report icon.
      12. CONFIRM that 'Classic' is set in the 'Theme name' selection.
      13. CONFIRM the default 'All uses of Classic' report has been displayed with one result 'User (1)'
      14. Choose 'User' from the 'Usage type' selection.
      15. Press 'Get report'
      16. CONFIRM that the more retailed report for user has been displayed (i.e first name, last name, etc.).

      Further manual testing

      This above manual test focusses on the user context where a user sets their preferred theme to 'Classic'. This same test can be performed for other contexts (course, category, cohort) where you set the preferred theme to something other than the default. These are covered in the theme_usage.feature Behat test, but can be tested with similar instructions. Just ensure you enable theme overriding for that context in 'Advanced theme settings' and set it as the preferred theme in that context.

      Show
      Automated tests The Behat test covers the accessing of the theme usage report for each context. The PHPUnit test covers the underlying methods and cacheing Manual test (from report menu) Log in as Admin Go to Site admin -> Reports CONFIRM there is a link called 'Theme usage' Click on the link. CONFIRM you are taken to the theme usage report page. Manual test (from theme card) Log in as an Admin Go to Site admin -> Appearance -> Advanced theme settings Enable 'Allow user themes' Log in as a student Go User -> Edit profile Set 'Preferred theme' to 'Classic' Saves changes. Log back in as Admin Go Site admin -> Appearance -> Themes CONFIRM there is a graph/report icon on Classic's theme card. Click on the report icon. CONFIRM that 'Classic' is set in the 'Theme name' selection. CONFIRM the default 'All uses of Classic' report has been displayed with one result 'User (1)' Choose 'User' from the 'Usage type' selection. Press 'Get report' CONFIRM that the more retailed report for user has been displayed (i.e first name, last name, etc.). Further manual testing This above manual test focusses on the user context where a user sets their preferred theme to 'Classic'. This same test can be performed for other contexts (course, category, cohort) where you set the preferred theme to something other than the default. These are covered in the theme_usage.feature Behat test, but can be tested with similar instructions. Just ensure you enable theme overriding for that context in 'Advanced theme settings' and set it as the preferred theme in that context.
    • 6
    • Team Hedgehog 2023 Review 3, Team Hedgehog 2023 Sprint 4.1, Team Hedgehog 2023 Sprint 4.2, Team Hedgehog 2023 Sprint 4.3, Team Hedgehog 2023 Review 4, Team Hedgehog 2024 Sprint 1.1

      MDL-78425 introduces and improved UI for selecting a theme.

      Currently in Moodle there is no way for an administrators to tell if, or where themes are being used in other contexts. That is admins can enable context, course and category themes but their usage doesn't bubble up in the UI anywhere.

      This tracker will do two things:

      • Add a visual indication in terms of an icon to the theme selector card, when a theme is being used in a particular context. For example the "course" icon should be displayed on the theme's card when that theme is used in a course somewhere in the site (we should absolutely cache this).
        EDIT: It has since been decided that we will just show one report icon when it is used in any context.
      • Add report builder reports to allow admins to see where these themes are being used. For example a report of all courses and the theme they are using where the course is using a theme that differs to the site theme.

      Clicking on a theme usage icon should show the report builder report for where that theme is being used in that context

      Icons to use to indicate a theme is being used in a particular context:

      • fa-user = user theme
      • fa-group = cohort theme
      • fa-layer-group = category theme
      • fa-graduation-cap = course theme

        1. docblock-return-type-explanation.png
          docblock-return-type-explanation.png
          61 kB
        2. MDL-78427.png
          MDL-78427.png
          234 kB
        3. MDL-78427-report menu.png
          MDL-78427-report menu.png
          261 kB
        4. MDL-78427-theme card.png
          MDL-78427-theme card.png
          425 kB
        5. Screen 1 copy.png
          Screen 1 copy.png
          249 kB
        6. theme_category.png
          theme_category.png
          49 kB
        7. theme_cohort.png
          theme_cohort.png
          48 kB
        8. theme_course.png
          theme_course.png
          55 kB
        9. theme_user.png
          theme_user.png
          48 kB
        10. theme-selector.png
          theme-selector.png
          122 kB
        11. theme-usage-report.png
          theme-usage-report.png
          103 kB

            david.woloszyn@moodle.com David Woloszyn
            matt.porritt@moodle.com Matt Porritt
            Meirza Meirza
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 4 days, 7 hours, 29 minutes
                1w 4d 7h 29m

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