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

Remove online-offline options on notifications.

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_38_STABLE, MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-67853-master
    • Hide

      Setup data before upgrade

      Please test this before upgrade

      1. Login as admin
      2. Navigate to Site administration > Messaging > Notification settings.
      3. Ensure Web and Email plugins are enabled and Mobile disabled. Save Changes.
      4. Under "Default notification preferences" Setup all kind of possibilities:
        1. New login notifications:
          1. Enabled = true.
          2. Web: permitted, Online true, Offline true.
          3. Email: permitted, Online true, Offline false.
        2. Course completed:
          1. Enabled = true.
          2. Web: permitted, Online false, Offline true.
          3. Email: permitted, Online false, Offline false.
        3. Course content changes:
          1. Enabled = true.
          2. Web: disallowed
          3. Email: locked
        4. Badge recipient notifications:
          1. Enabled = false.
      5. Save changes.
      6. Enter now as any other user (create it if necessary).
      7. Open the User menu > Preferences > Notification preferences.
      8. Set some different values (Changes are autosaved):
        1. Subscribed forum posts:
          1. Web: Online On, Offline On
          2. Email: Online On, Offline Off.
        2. Subscribed forum digests:
          1. Web: Online Off, Offline On
          2. Email: Online Off, Offline Off.
      9. Check the following SQL queries returns a number greater than 0.

        SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_loggedin'

        SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_loggedoff'

        SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_permitted' 

        SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_loggedin' 

        SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_loggedoff' 

      10. Now, enter again as admin.

      CHECKOUT THE NEW CODE AND PERFORM UPGRADE

      1. Check no errors have been raised.
      2. Check the following SQL queries returns 0.

        SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND (name LIKE '%_provider_%_loggedin' OR name LIKE '%_provider_%_loggedoff' OR name LIKE '%_provider_%_permitted')

        SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_loggedin' OR name LIKE 'message_provider_%_loggedoff'

      3. Check the following SQL queries returns a number greater than 0.

        SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_enabled'

        SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_locked'

        SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_enabled' 

      4. As admin navigate again to Site administration > Messaging > Notification settings.
      5. Check the following settings have been set (warning, the order is not the same as before upgrading):
        1. New login notifications:
          1. Enabled = true.
          2. Web: Enabled true. Locked false.
          3. Email: Enabled true. Locked false..
        2. Course completed:
          1. Enabled = true.
          2. Web: Enabled true, Locked false.
          3. Email: Enabled false, Locked false.
        3. Course content changes:
          1. Enabled = true.
          2. Web: Enabled false, Locked true.
          3. Email: Enabled true, Locked true.
        4. Badge recipient notifications:
          1. Enabled = false.
      6. Enter again as the user you've used before.
      7. Navigate again to User menu > Preferences > Notification preferences.
      8. Check the following settings have been set:
        1. Subscribed forum posts:
          1. Web: Enabled
          2. Email: Enabled
        2. Subscribed forum digests:
          1. Web: Enabled
          2. Email: Disabled (Enabled false).
        3. New login notifications:
          1. Web: Enabled.
          2. Email: Enabled.
        4. Course completed:
          1. Web: Enabled.
          2. Email: Disabled (Enabled false).
        5. Course content changes:
          1. Web: Show "Disallowed" text.
          2. Email: Show "Locked" text.
        6. Check "Badge recipient notifications" does not appear in the page.

      Testing restore course

      1. As an admin restore the course attached on this issue.
      2. Enter the course.
      3. Navigate to Participants and click on the "Student" name.
      4. Click on Preferences on the Administration section/box.
      5. Click on Notification preferences.
      6. Check Web and Email columns are ENABLED for the following params:
        1. Assignment notifications.
        2. BigBlueButton recording ready to view
        3. BigBlueButton meeting updated
        4. Feedback notifications
      7. Check Web and Email columns are DISABLED for "Feedback reminder"
      Show
      Setup data before upgrade Please test this before upgrade Login as admin Navigate to Site administration > Messaging > Notification settings. Ensure Web and Email plugins are enabled and Mobile disabled. Save Changes. Under "Default notification preferences" Setup all kind of possibilities: New login notifications: Enabled = true. Web: permitted, Online true, Offline true. Email: permitted, Online true, Offline false. Course completed: Enabled = true. Web: permitted, Online false, Offline true. Email: permitted, Online false, Offline false. Course content changes: Enabled = true. Web: disallowed Email: locked Badge recipient notifications: Enabled = false. Save changes. Enter now as any other user (create it if necessary). Open the User menu > Preferences > Notification preferences. Set some different values (Changes are autosaved): Subscribed forum posts: Web: Online On, Offline On Email: Online On, Offline Off. Subscribed forum digests: Web: Online Off, Offline On Email: Online Off, Offline Off. Check the following SQL queries returns a number greater than 0. SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_loggedin' SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_loggedoff' SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_permitted' SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_loggedin' SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_loggedoff' Now, enter again as admin. CHECKOUT THE NEW CODE AND PERFORM UPGRADE Check no errors have been raised. Check the following SQL queries returns 0. SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND (name LIKE '%_provider_%_loggedin' OR name LIKE '%_provider_%_loggedoff' OR name LIKE '%_provider_%_permitted' ) SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_loggedin' OR name LIKE 'message_provider_%_loggedoff' Check the following SQL queries returns a number greater than 0. SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_enabled' SELECT COUNT(*) FROM mdl_config_plugins WHERE PLUGIN = 'message' AND name LIKE '%_provider_%_locked' SELECT COUNT(*) FROM mdl_user_preferences WHERE name LIKE 'message_provider_%_enabled' As admin navigate again to Site administration > Messaging > Notification settings. Check the following settings have been set (warning, the order is not the same as before upgrading): New login notifications: Enabled = true. Web: Enabled true. Locked false. Email: Enabled true. Locked false.. Course completed: Enabled = true. Web: Enabled true, Locked false. Email: Enabled false, Locked false. Course content changes: Enabled = true. Web: Enabled false, Locked true. Email: Enabled true, Locked true. Badge recipient notifications: Enabled = false. Enter again as the user you've used before. Navigate again to User menu > Preferences > Notification preferences. Check the following settings have been set: Subscribed forum posts: Web: Enabled Email: Enabled Subscribed forum digests: Web: Enabled Email: Disabled (Enabled false). New login notifications: Web: Enabled. Email: Enabled. Course completed: Web: Enabled. Email: Disabled (Enabled false). Course content changes: Web: Show "Disallowed" text. Email: Show "Locked" text. Check "Badge recipient notifications" does not appear in the page. Testing restore course As an admin restore the course attached on this issue. Enter the course. Navigate to Participants and click on the "Student" name. Click on Preferences on the Administration section/box. Click on Notification preferences. Check Web and Email columns are ENABLED for the following params: Assignment notifications. BigBlueButton recording ready to view BigBlueButton meeting updated Feedback notifications Check Web and Email columns are DISABLED for "Feedback reminder"

    Description

      Simplify Online/Offline setting to "On"/"Off" without Online/Offline distinction. It would imply losing some freedom but it increases the usability a lot by reducing the number of switches to set and solve the following big problem:

      The LMS uses 5 minutes time check to know if someone is online or offline. If the user goes away (without closing session) and a notification is send on the next 5 minutes it cannot be received if only offline is selected.

      Also Change ON/OFF on notifications preferences by modern switches.

       

      The migration of the data has some taken decisions:

      1. To avoid loose of data on notifications: If Online or Offline has been set to On then it will be kept as On. If both are Off, then it will be kept as Off.
      2. On default notification preferences: Permitted / Disallowed / Forced have been removed and now we have two switches: Locked and Enabled, with the combination of both we can have the same behaviour as before, with reduced number of clicks.
      3. On db/messages.php file now, We've deprecated constants  MESSAGE_DEFAULT_LOGGEDIN and MESSAGE_DEFAULT_LOGGEDOFF in favour of MESSAGE_DEFAULT_ENABLED. However they will maintain same functionality as in point 1 (if any is provided, then it's enabled.
      4. Also regarding to db/messages configuration file: MESSAGE_PERMITTED / MESSAGE_DISALLOWED and MESSAGE_FORCED have been maintained to allow backwards compatibility.

       

      Attachments

        Issue Links

          Activity

            People

              pferre22 Pau Ferrer
              pferre22 Pau Ferrer
              Juan Leyva Juan Leyva
              Ilya Tregubov Ilya Tregubov
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              4 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 weeks, 2 days, 6 hours, 28 minutes
                  3w 2d 6h 28m

                  Clockify

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