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

If the user preference "calendar_persistflt" is set, the calendar-events are not shown.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.10.3
    • Calendar
    • None
    • MOODLE_310_STABLE

      To reproduce:

      Create a record in the user_preferences table with:

      "name": calendar_persistflt

      "value": 0

       

      If this value exists, the function get_user_preferences('calendar_persistflt', 0, $user) returns "0" (a String).

      In calendar/lib.php, function "calendar_show_event_type(...)" there is a comparison like this:

      if (get_user_preferences('calendar_persistflt', 0, $user) === 0) {

       

      The "===" has as result false, because it is not true, that "0" === 0.

       

      I changed it to "==" on our site and it seems to work so far.

       

       

            Unassigned Unassigned
            skaldrom Michael Schneider (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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