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

Calendar event type filters not set persistently

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8.5
    • Fix Version/s: None
    • Component/s: Calendar
    • Testing Instructions:
      Hide
      1. Log in as admin.
      2. Go to your user preferences page and then go to Calendar preferences.
      3. Set Remember filter settings field to Yes and save.
      4. Go to calendar and create events from each type site, course, group...
      5. On the Event key filter, hide category events
      6. Make sure all category events have been hidden.
      7. Reload the page
      8. Make sure all category events are still hidden.
      9. Logout, log in again and go to Calendar.
      10. Make sure all category events are still hidden.
      11. Repeat this test with other event types.
      12. Make sure the behaviour is the same for all event types.
      13. Switch the views (Day, Upcoming) and repeat above test.
      14. Make sure the behaviour is the same for all event types.
      Show
      Log in as admin. Go to your user preferences page and then go to Calendar preferences . Set Remember filter settings field to Yes and save. Go to calendar and create events from each type site, course, group... On the Event key filter, hide category events Make sure all category events have been hidden. Reload the page Make sure all category events are still hidden. Logout, log in again and go to Calendar . Make sure all category events are still hidden. Repeat this test with other event types. Make sure the behaviour is the same for all event types. Switch the views ( Day , Upcoming ) and repeat above test. Make sure the behaviour is the same for all event types.
    • Affected Branches:
      MOODLE_38_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-69795-master
    • Story Points:
      3
    • Sprint:
      Internationals - 3.11 Sprint 1, Internationals - 3.11 Sprint 2, Internationals - 3.11 Sprint 3

      Description

      User settings for event filter in calendar are not persistent. Visibility of different events gets reset on every page load to defaults or, if existing, to the user setting calendar_savedflt.
      The setting calendar_savedflt doesn't get updated or created when changes are made to the visibility of events in the calendar.

      Setting "Hide" and "Show" for different events on calendar/view.php has no effect on the user's calendar_savedflt setting.
      There is no way for the user to make events hidden by calendar_savedflt visible again.

      In practice this has led to e.g. permanently hidden course events for users with calendar_savedflt set to 13. There is no way for the user to know they are hidden which is causing additional confusion.

      As a workaround, we are considering the deletion of all calendar_savedflt entries from mdl_user_preferences and thereby resetting saved filter settings for all users.
      This workaround still leaves users not being able to persistently set event type filters.

      Steps to reproduce:

      • Create a course with course events
      • Log in as a normal user enrolled in the course
      • In User account > Calendar preferences set "Remember filter settings" to "yes" and save changes
      • Go to calendar/view.php?view=month
      • Calendar events are visible
      • In the calendar view, click "Hide course events"
      • The course events disappear
      • Reload calendar/view.php?view=month

      Expected behavior:

      • The filter settings persist.
      • Filter settings menu shows what is hidden and what is not.

      Observed behavior:

      • The filter settings are not persistent.
      • Filter settings menu shows that all events visible.

      Additional testing for users with existing calendar_savedflt setting.

      Steps to reproduce:

      • In the database table mdl_user_preferences, insert row for the userid with name 'calendar_savedflt' and value '13' (meaning course events and category events are hidden)
      • Go to calendar/view.php?view=month

      Expected behavior:

      • Course events are not visible
      • In the filter settings, course events are shown as hidden
      • Clicking "Show course events" and "Hide course events" changes visibility of course events

      Observed behavior:

      • In the filter settings menu, all events including course events are shown as visible
      • Clicking "Hide course events" and "Show course events" has no effect, course events remain hidden
      • There is no way for the user to make course events visible again because calendar_savedflt does not get updated
      • Changing "Remember filter settings" back to "no" does not make any difference.

        Attachments

          Activity

            People

            Assignee:
            lameze Simey Lameze
            Reporter:
            schach Heiko Schach
            Peer reviewer:
            Shamim Rezaie
            Participants:
            Component watchers:
            Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            3 Vote for this issue
            Watchers:
            4 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 - 3 days, 6 hours, 30 minutes
                3d 6h 30m