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

Remove clean theme

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. If your site is currently installed, uninstall it. On MDK:

        mdk uninstall -y
        

      2. Checkout Moodle 3.6

        git checkout v3.6.0

      3. Do a fresh install of your Moodle 3.6 site.
      4. Log in as admin.
      5. Go to "Site administration / Appearance / Themes / Theme settings"
      6. Tick the following settings
        • Allow user themes
        • Allow course themes
        • Allow category themes
        • Allow cohort themes
      7. Save the changes
      8. Go to "Site administration / Appearance / Themes / Theme selector"
      9. Set the Default theme for the site to Clean
      10. Create 2 Course categories (Y, Z)
      11. Set Category Z's theme to More (Edit category settings > Force theme)
      12. Create 5 test users (1, 2, 3, 4, 5).
      13. Set User 5's theme to More (Edit profile > Preferred theme)
      14. Create 3 courses (A, B, C)
      15. Set Course C's theme to Clean (Edit course settings > Appearance > Force theme)
      16. Create a system cohort (Site administration / Users / Accounts / Cohorts / Add new cohort)
      17. Set "Force theme" to Clean
      18. Assign users 3 and 4 to the system cohort
      19. Go to course B's participants page
      20. Click "Enrol users"
      21. Under "Select users", select users 1, 2, and 5.
      22. Under "Select cohorts", select the system cohort.
      23. Click "Enrol selected users and cohorts"
      24. Add courses A,B in Category Z
      25. Manually enroll all users in courses A and C.

      Verify themes before upgrade

      Site theme
      1. Log in as admin
      2. Verify site theme is Clean
      Course category
      1. Log in as User 1
      2. Navigate to Course A
      3. Verify theme is More
      4. Navigate to Course B
      5. Verify theme is More
      Course theme
      1. Log in as User 1
      2. Navigate to Course C
      3. Verify theme is Clean
      Cohort theme
      1. Log in as User 3
      2. Verify site theme is Clean
      3. Navigate to Course B
      4. Verify theme is Clean
      User theme
      1. Log in as User 5
      2. Verify site theme is More
      3. Navigate to Course A
      4. Verify theme is More
      5. Navigate to Course B
      6. Verify theme is More
      7. Navigate to Course C
      8. Verify theme is Clean

      Upgrade

      1. Checkout master (which contains the patch for this issue)

        git checkout master
        

      2. Upgrade your site.
      3. Confirm that the upgrade completes successfully.

      Test themes after upgrade

      Site theme
      1. Site should now use Classic
      2. Check site default themes all should use Classic
      3. Go to 'Site admin > Appearance > Theme selector'
      4. Select 'Change Theme' on the default theme
      5. Clean & More should not be options
      6. Go to 'Site admin > plugins > plugins overview'
      7. Bootstrapbase, Clean & More should not be there
      Course category
      1. Log in as User 1
      2. Navigate to Course A
      3. Verify theme is Classic
      4. Navigate to Course B
      5. Verify theme is Classic
      Course theme
      1. Log in as User 1
      2. Navigate to Course C
      3. Verify theme is Classic
      Cohort theme
      1. Log in as User 3
      2. Site should now use Classic
      3. Navigate to Course B
      4. Verify theme is Classic
      User theme
      1. Log in as User 5
      2. Verify site theme is Classic
      3. Navigate to Course A
      4. Verify theme is Classic
      5. Navigate to Course B
      6. Verify theme is Classic
      7. Navigate to Course C
      8. Verify theme is Classic
      Show
      Setup If your site is currently installed, uninstall it. On MDK: mdk uninstall -y Checkout Moodle 3.6 git checkout v3.6.0 Do a fresh install of your Moodle 3.6 site. Log in as admin. Go to " Site administration / Appearance / Themes / Theme settings " Tick the following settings Allow user themes Allow course themes Allow category themes Allow cohort themes Save the changes Go to " Site administration / Appearance / Themes / Theme selector " Set the Default theme for the site to Clean Create 2 Course categories (Y, Z) Set Category Z's theme to More (Edit category settings > Force theme) Create 5 test users (1, 2, 3, 4, 5). Set User 5's theme to More (Edit profile > Preferred theme) Create 3 courses (A, B, C) Set Course C's theme to Clean (Edit course settings > Appearance > Force theme) Create a system cohort (Site administration / Users / Accounts / Cohorts / Add new cohort) Set " Force theme " to Clean Assign users 3 and 4 to the system cohort Go to course B's participants page Click " Enrol users " Under " Select users ", select users 1, 2, and 5. Under " Select cohorts ", select the system cohort. Click " Enrol selected users and cohorts " Add courses A,B in Category Z Manually enroll all users in courses A and C. Verify themes before upgrade Site theme Log in as admin Verify site theme is Clean Course category Log in as User 1 Navigate to Course A Verify theme is More Navigate to Course B Verify theme is More Course theme Log in as User 1 Navigate to Course C Verify theme is Clean Cohort theme Log in as User 3 Verify site theme is Clean Navigate to Course B Verify theme is Clean User theme Log in as User 5 Verify site theme is More Navigate to Course A Verify theme is More Navigate to Course B Verify theme is More Navigate to Course C Verify theme is Clean Upgrade Checkout master (which contains the patch for this issue) git checkout master Upgrade your site. Confirm that the upgrade completes successfully. Test themes after upgrade Site theme Site should now use Classic Check site default themes all should use Classic Go to 'Site admin > Appearance > Theme selector' Select 'Change Theme' on the default theme Clean & More should not be options Go to 'Site admin > plugins > plugins overview' Bootstrapbase, Clean & More should not be there Course category Log in as User 1 Navigate to Course A Verify theme is Classic Navigate to Course B Verify theme is Classic Course theme Log in as User 1 Navigate to Course C Verify theme is Classic Cohort theme Log in as User 3 Site should now use Classic Navigate to Course B Verify theme is Classic User theme Log in as User 5 Verify site theme is Classic Navigate to Course A Verify theme is Classic Navigate to Course B Verify theme is Classic Navigate to Course C Verify theme is Classic
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull Master Branch:

      Description

      Remove the clean and bootstrapbase themes.
      This changes should also consider:

      1. removing the less compilers from both php and grunt
      2. removing old references to bootstrapbase:
        1. /lib/adminlib.php : bootstrap_renderer
        2. /lib/outputlib.php : find_theme_config('bootstrapbase', /lib/weblib.php : bootstrap_renderer::
        3. /lib/setuplib.php: bootstrap_renderer::
      3. updating any unit tests which make use of the clean theme to make it use classic instead. There are some which test theme availability and fallback.

        Attachments

        1. 64506-script.sh
          2 kB
        2. after_upgrade1.png
          after_upgrade1.png
          217 kB
        3. after_upgrade2.png
          after_upgrade2.png
          199 kB
        4. beforeupgrade1.png
          beforeupgrade1.png
          149 kB
        5. beforeupgrade2.png
          beforeupgrade2.png
          131 kB
        6. Screenshot 2019-03-07 at 12.12.51.png
          Screenshot 2019-03-07 at 12.12.51.png
          487 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 5 hours, 25 minutes
                  2d 5h 25m