Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64999 block_myoverview: Replace / accompany the time-based course filter with a semantic course filter based on custom course fields
  3. MDL-66016

block_myoverview: Replace / accompany the time-based course filter with a semantic course filter based on custom course fields - Configure the filter options of the course filter

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Prerequisites
        1. Login as admin
        2. Create three courses A, B, C
        3. Configure the three courses in a way that they appear as Past, In Progress and Future courses by setting the course start date appropriately
        4. Create a user S
        5. Enrol this user S into courses A, B, C as student
      2. Test "All" course filter
        1. Login as admin
        2. Go to /admin/settings.php?section=blocksettingmyoverview
        3. Enable the "All" setting and save the settings page
        4. Login as student
        5. Mark course B as hidden
        6. Open the course filter dropdown and select the "All" filter
        7. Verify that the "All" filter works as expected: Course A and B and C should be shown
      3. Prevent regressions with the existing course filters
        1. Login as student
        2. Open the course filter dropdown and select the "Past" filter
        3. Verify that the Past filter still work as expected: Course A should be shown
        4. Open the course filter dropdown and select the "In progress" filter
        5. Verify that the In progress filter still works as expected: Course B should be shown
        6. Open the course filter dropdown and select the "Future" filter
        7. Verify that the Future filter still works as expected: Course C should be shown
        8. Mark course A as starred
        9. Open the course filter dropdown and select the "Starred" filter
        10. Verify that the Starred filter still works as expected: Course A should be shown
        11. Mark course B as hidden
        12. Open the course filter dropdown and select the "Hidden" filter
        13. Verify that the Hidden filter still works as expected: Course B should be shown
        14. Open the course filter dropdown and select the "All (except hidden)" filter
        15. Verify that the "All (except hidden)" filter still works as expected: Course A and C should be shown
      4. Test course filter settings (0 course filter active)
        1. Login as admin
        2. Go to /admin/settings.php?section=blocksettingmyoverview
        3. Disable all settings in the "Available filters" section and save the settings page
        4. Login as student
        5. Verify that you don't see the course filter dropdown
        6. Verify that you are seeing course A and B and C
      5. Test course filter settings (1 course filter active)
        1. Login as admin
        2. Go to /admin/settings.php?section=blocksettingmyoverview
        3. Enable the "In progress" setting and disable all other settings in the "Available filters" section and save the settings page
        4. Login as student
        5. Verify that you don't see the course filter dropdown
        6. Verify that you are seeing only course B
      6. Test course filter settings (n + 2 course filters active)
        1. Login as admin
        2. Go to /admin/settings.php?section=blocksettingmyoverview
        3. Enable one permutation of the settings which at least 2 settings enabled in the "Available filters" section and save the settings page
        4. Login as student
        5. Open the course filter dropdown
        6. Verify to you are seeing exactly the course filter options which have been enabled by the admin on the settings page
        7. Verify that you are not seeing any odd / surplus dividers in the course filter dropdown
        8. Repeat this test from the start and choose another permutation until you have covered all or at least a decent part of permutations
      Show
      Prerequisites Login as admin Create three courses A, B, C Configure the three courses in a way that they appear as Past, In Progress and Future courses by setting the course start date appropriately Create a user S Enrol this user S into courses A, B, C as student Test "All" course filter Login as admin Go to /admin/settings.php?section=blocksettingmyoverview Enable the "All" setting and save the settings page Login as student Mark course B as hidden Open the course filter dropdown and select the "All" filter Verify that the "All" filter works as expected: Course A and B and C should be shown Prevent regressions with the existing course filters Login as student Open the course filter dropdown and select the "Past" filter Verify that the Past filter still work as expected: Course A should be shown Open the course filter dropdown and select the "In progress" filter Verify that the In progress filter still works as expected: Course B should be shown Open the course filter dropdown and select the "Future" filter Verify that the Future filter still works as expected: Course C should be shown Mark course A as starred Open the course filter dropdown and select the "Starred" filter Verify that the Starred filter still works as expected: Course A should be shown Mark course B as hidden Open the course filter dropdown and select the "Hidden" filter Verify that the Hidden filter still works as expected: Course B should be shown Open the course filter dropdown and select the "All (except hidden)" filter Verify that the "All (except hidden)" filter still works as expected: Course A and C should be shown Test course filter settings (0 course filter active) Login as admin Go to /admin/settings.php?section=blocksettingmyoverview Disable all settings in the "Available filters" section and save the settings page Login as student Verify that you don't see the course filter dropdown Verify that you are seeing course A and B and C Test course filter settings (1 course filter active) Login as admin Go to /admin/settings.php?section=blocksettingmyoverview Enable the "In progress" setting and disable all other settings in the "Available filters" section and save the settings page Login as student Verify that you don't see the course filter dropdown Verify that you are seeing only course B Test course filter settings (n + 2 course filters active) Login as admin Go to /admin/settings.php?section=blocksettingmyoverview Enable one permutation of the settings which at least 2 settings enabled in the "Available filters" section and save the settings page Login as student Open the course filter dropdown Verify to you are seeing exactly the course filter options which have been enabled by the admin on the settings page Verify that you are not seeing any odd / surplus dividers in the course filter dropdown Repeat this test from the start and choose another permutation until you have covered all or at least a decent part of permutations
    • Affected Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-66016-master

      Description

      As a subtask of MDL-64999, this issue is about implementing the following improvement:

      • Add "All" course filter option which lets user show really all courses including hidden courses.
        • This filter option is added for the sake of completeness.
        • It amends the list of classification parameters of the webservice "get_enrolled_courses_by_timeline_classification"
        • To align the language strings of the new filter option with the webservice implementation and to prevent having to change the existing webservice interface, string identifiers will be moved around in the language pack and in AMOS.
        • As soon as the filter options are configurable (see next bullet item), this new filter option is disabled by default and can be enabled by the admin if needed.
        • This change could have been capsuled into a dedicated tracker issue, but it makes more sense to implement it on-the-fly here.
      • Add settings to /admin/settings.php?section=blocksettingmyoverview:
        • One admin setting per course filter option is introduced which lets the admin enable / disable the course filter options individually. This is built as individual checkbox settings and not as a multiselect setting because a multiselect setting takes more time to separate and process when building the course filter in the block view. Additionally, individual checkbox settings can then be used together with the admin setting hide_if functionality later in MDL-66017.
        • The set of course filter options which is enabled by default is chosen to keep the current status quo:
          • All - disabled by default
          • All (except hidden) - enabled by default
          • In progress - enabled by default
          • Future - enabled by default
          • Past - enabled by default
          • Starred - enabled by default
          • Hidden - enabled by default
        • If the admin disables one up to n-1 of these filter options, the filter option is applied transparently but the course filter dropdown is not shown in the course filter anymore.
        • If the admin disables all of these filter options (for whatever reason), the course filter dropdown isn't shown anymore and the list is always shown in "All (including hidden)" mode.
      • Add a heading to the pre-existing settings on /admin/settings.php?section=blocksettingmyoverview to cluster the settings.
      • All functional additions are covered with Behat tests

        Attachments

          Activity

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

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