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

Allow cohort themes

XMLWordPrintable

    • MOODLE_34_STABLE
    • MOODLE_35_STABLE
    • MDL-61601-master
    • Hide

      Setup

      1. Login as admin 
      2. Make sure default theme is Boost.
      3. Enable "Allow cohort themes" and disable "Allow categories themes" from "Site administration | Appearance | Themes | Theme settings"
      4. Create 2 course categories (Category1 and Category2)

      IMPORTANT: Changes on category cohorts only take effect on the users when they login (after of this, the cohort theme is cached). Therefore, in all the following cases, it's important to log out before login as userX.

      Testing scenario 1. One cohort theme

      1. Login as admin
      2. Create the cohort "Category1Cohort1" in the category "Category1" and force theme to "Clean"
      3. Create 2 users (user1 and user2)
      4. Add user1 to this cohort ("Category1Cohort1")
      5. Login as user1
      6. Access to different site pages (such as Dashboard, Site home and "Category1")
        • CHECK that these pages are displayed with the "Clean" theme
      7. Login as user2
      8. Access to different site pages (such as Dashboard, Site home and "Category1")
        • CHECK that these pages are displayed with the "Boost" theme

      Testing scenario 2. Two cohorts with the same theme

      1. Login as admin
      2. Create the cohort "Category2Cohort1" in the category "Category2" and force theme to "Clean"
      3. Add the user1 to this cohort ("Category2Cohort1")
      4. Login as user1
      5. Access to different site pages (such as Dashboard, Site home and "Category1")
        • CHECK that these pages are displayed with the "Clean" theme

      Testing scenario 3. Two cohorts with different themes

      1. Login as admin
      2. Edit the cohort "Category1Cohort1" in the category "Category1" and change the theme to "More"
      3. Add a new user (user2) to this cohort ("Category1Cohort1")
      4. Login as user1
      5. Access to different site pages (such as Dashboard, Site home and "Category1")
        • CHECK that these pages are displayed with the "Boost" theme
      6. Login as user2
      7. Access to different site pages (such as Dashboad, Site home and "Category1")
        • CHECK that these pages are displayed with the "More" theme

      Testing scenario 4. Category theme

      1. Login as admin
      2. Enable "Allow category themes" from "Site administration | Appearance | Themes | Theme settings"
      3. Edit the theme for "Category1" to "Clean"
      4. Login as user2
      5. Access to different site pages (such as Dashboad or Site home)
        • CHECK that these pages are displayed with the "More" theme
      6. Visit "Category1" page
        • CHECK that this category is displayed with the "Clean" theme
      7. Login as admin

      Testing scenario 5. Theme order

      1. Edit the config.php file and add the following setting for changing the preference order (cohorts over categories):
        • $CFG->themeorder = array('course', 'cohort', 'category', 'session', 'user', 'site');
      2. Login as user2
      3. Access to different site pages (such as Dashboad, Site home and "Category1")
        • CHECK that these pages are displayed with the "More" theme
      4. Remove the $CFG->themeorder parameter from the config.php file
      5. Disable "Allow categories themes" from "Site administration | Appearance | Themes | Theme settings"

      Testing scenario 6. User theme

      1. Login as admin
      2. Enable "Allow user themes" from "Site administration | Appearance | Themes | Theme settings"
      3. Access to "Site administration | Users | Accounts | Browse list of users", edit user "user2" and set the default theme to "Clean"
      4. Login as user2
      5. Access to different site pages (such as Dashboad or Site home)
        • CHECK that these pages are displayed with the "Clean" theme
      6. Login as admin
      7. Disable "Allow user themes" from "Site administration | Appearance | Themes | Theme settings"
      8. Access to different site pages (such as Dashboad or Site home)
        • CHECK that these pages are displayed with the "More" theme

      Testing scenario 7. Session theme

      1. Login as admin
      2. Enable "Allow theme changes in the URL" from "Site administration | Appearance | Themes | Theme settings"
      3. Login as user2
      4. Access to different site pages (such as Dashboad or Site home)
        • CHECK that these pages are displayed with the "More" theme
      5. Go to dashboard and add "?theme=clean" at the end of the URL
      6. Access to different site pages (such as Dashboad or Site home)
        • CHECK that these pages are displayed with the "Clean" theme

      Testing scenario 8. Disable cohort themes

      1. Login as admin
      2. Disable "Allow cohort themes" and "Allow categories themes" from "Site administration | Appearance | Themes | Theme settings"
      3. Login as user2
      4. Access to different site pages (such as Dashboad, Site home and "Category1")
        • CHECK that these pages are displayed with the "Boost" theme
      Show
      Setup Login as admin  Make sure default theme is Boost. Enable "Allow cohort themes" and disable "Allow categories themes" from "Site administration | Appearance | Themes | Theme settings" Create 2 course categories (Category1 and Category2) IMPORTANT : Changes on category cohorts only take effect on the users when they login (after of this, the cohort theme is cached). Therefore, in all the following cases, it's important to log out before login as userX. Testing scenario 1. One cohort theme Login as admin Create the cohort "Category1Cohort1" in the category "Category1" and force theme to "Clean" Create 2 users (user1 and user2) Add user1 to this cohort ("Category1Cohort1") Login as user1 Access to different site pages (such as Dashboard, Site home and "Category1") CHECK that these pages are displayed with the "Clean" theme Login as  user2 Access to different site pages (such as Dashboard, Site home and "Category1") CHECK that these pages are displayed with the "Boost" theme Testing scenario 2. Two cohorts with the same theme Login as admin Create the cohort "Category2Cohort1" in the category "Category2" and force theme to "Clean" Add the user1 to this cohort ("Category2Cohort1") Login as user1 Access to different site pages (such as Dashboard, Site home and "Category1") CHECK that these pages are displayed with the "Clean" theme Testing scenario 3. Two cohorts with different themes Login as admin Edit the cohort "Category1Cohort1" in the category "Category1" and change the theme to "More" Add a new user (user2) to this cohort ("Category1Cohort1") Login as user1 Access to different site pages (such as Dashboard, Site home and "Category1") CHECK that these pages are displayed with the "Boost" theme Login as user2 Access to different site pages (such as Dashboad, Site home and "Category1") CHECK that these pages are displayed with the "More" theme Testing scenario 4. Category theme Login as admin Enable "Allow category themes" from "Site administration | Appearance | Themes | Theme settings" Edit the theme for "Category1" to "Clean" Login as user2 Access to different site pages (such as Dashboad or Site home) CHECK that these pages are displayed with the "More" theme Visit "Category1" page CHECK that this category is displayed with the "Clean" theme Login as admin Testing scenario 5. Theme order Edit the config.php file and add the following setting for changing the preference order (cohorts over categories): $CFG->themeorder = array('course', 'cohort', 'category', 'session', 'user', 'site'); Login as user2 Access to different site pages (such as Dashboad, Site home and "Category1") CHECK that these pages are displayed with the "More" theme Remove the $CFG->themeorder parameter from the config.php file Disable "Allow categories themes" from "Site administration | Appearance | Themes | Theme settings" Testing scenario 6. User theme Login as admin Enable "Allow user themes" from "Site administration | Appearance | Themes | Theme settings" Access to "Site administration | Users | Accounts | Browse list of users", edit user "user2" and set the default theme to "Clean" Login as  user2 Access to different site pages (such as Dashboad or Site home) CHECK that these pages are displayed with the "Clean" theme Login as admin Disable "Allow user themes" from "Site administration | Appearance | Themes | Theme settings" Access to different site pages (such as Dashboad or Site home) CHECK that these pages are displayed with the "More" theme Testing scenario 7. Session theme Login as admin Enable "Allow theme changes in the URL" from "Site administration | Appearance | Themes | Theme settings" Login as  user2 Access to different site pages (such as Dashboad or Site home) CHECK that these pages are displayed with the "More" theme Go to dashboard and add "?theme=clean" at the end of the URL Access to different site pages (such as Dashboad or Site home) CHECK that these pages are displayed with the "Clean" theme Testing scenario 8. Disable cohort themes Login as admin Disable "Allow cohort themes" and "Allow categories themes" from "Site administration | Appearance | Themes | Theme settings" Login as user2 Access to different site pages (such as Dashboad, Site home and "Category1") CHECK that these pages are displayed with the "Boost" theme

      For making easy progress on MDL-46401, this issue will evolve the support for cohort themes.

      Aspects to consider:

      • Cohort based theme value for each user sitewide would be cached in their session
      • Add the new theme field to upload CSV cohorts
      • WS: add the parameter to create_cohorts and update_cohorts
      • $CFG->themeorder

       

            sarjona Sara Arjona (@sarjona)
            sarjona Sara Arjona (@sarjona)
            Carlos Escobedo Carlos Escobedo
            Andrew Lyons Andrew Lyons
            Shamim Rezaie Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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