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

Message preferences are not render correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.11.5
    • None
    • Messages
    • None

    Description

      After MDL-56292 and specificly in MDL-71403, some moustache templates were re-organised the code to remove duplicated mustache.

      This introduced a bug that only is replicable when there are different message processors enabled and configured correctly when an admin user is viewing/setting another user's message preferences.

      In my particular case, I have the "Email" and "Activity stream" message processors enabled.

      When moodle render this message settings page, there are some sub renders that helps with that.

      The `message/edit.php` file calls `message/renderer.php` that uses `message_preferences.mustache` that render for each component `message_preferences_component.mustache`, that render FOR EACH PROCESSOR `message_preferences_notification_processor.mustache`, that render `notification_preferences_component_notification.mustache` that render FOR EACH PROCESSOR (again) almost the whole template.

      Since `notification_preferences_component_notification` is renderer for each processor by `message_preferences_notification_processor` and within `notification_preferences_component_notification` there is other `#processors` we have to remove one of these repeated `#processors`.
       
      Steps to replicate this bug:

      1. Enable at least two message processors
      2. Log in as admin
      3. Go to other user's perfil
      4. Go to Administration and click on Preferences
      5. Go to User account and click on Message preferences
      6. You'll see somethin like: Wron Message Preferences Table.png

      Current behaviour:
      Message preference table isn't displayed correctly
      Admin users can't save settings correctly since the "ghost" column on the right (and shouldn't be shown) overrides any changes the admin user sets in the column that should be shown.

      Expected behaviour:
      Message preference table is displayed correctly
      Admin users can save settings correctly.

      Additional commets:

      If you enable 3 message processors, you'll see 3 columns (3 rows.png) instead expected one.

      Attachments

        Activity

          People

            Unassigned Unassigned
            daniel.escobar Daniel Alejandro Escobar
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: