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

Remove online-offline options on notifications.

    XMLWordPrintable

    Details

    • Testing Instructions:
      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. (Keep Mobile and Jabber disabled).
      4. Under "Default notification preferences" Setup all kind of possibilities:
        1. Assignment notifications:
          1. Enabled = true.
          2. Web: permitted, Online true, Offline true.
          3. Email: permitted, Online true, Offline false.
        2. Asynchronous backup/restore notifications
          1. Enabled = true.
          2. Web: permitted, Online false, Offline true.
          3. Email: permitted, Online false, Offline false.
        3. Warning when your quiz attempt becomes overdue
          1. Enabled = true.
          2. Web: disallowed
          3. Email: locked
        4. Available update notifications
          1. Enabled = false.
      5. Enter now as any other user.
      6. Open the user menu > Preferences > Notification preferences.
      7. Set some different values:
        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.
      8. Now, enter again as admin, checkout new code and perform UPGRADE.
      9. Check no errors have been raised.
      10. As admin navigate again to Site administration > Messaging > Notification settings.
      11. Check the following settings have been set:
        1. Assignment notifications:
          1. Enabled = true.
          2. Web: Locked false, Enabled true.
          3. Email: Locked false, Enabled true.
        2. Asynchronous backup/restore notifications
          1. Enabled = true.
          2. Web: Locked false, Enabled true.
          3. Email: Locked false, Enabled false.
        3. Warning when your quiz attempt becomes overdue
          1. Enabled = true.
          2. Web: Locked true, Enabled false.
          3. Email: Locked true, Enabled true.
        4. Available update notifications
          1. Enabled = false.
      12. Enter again as student and navigate again to user menu > Preferences > Notification preferences.
      13. 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.

      Testing locked settings

      1. As the student, on the same page as before, check:
        1. Assignment notifications:
          1. Web: Enabled true.
          2. Email: Enabled true.
        2. Asynchronous backup/restore notifications
          1. Web: Enabled true.
          2. Email: Enabled false.
        3. Warning when your quiz attempt becomes overdue
          1. Web: Show "Disallowed" text.
          2. Email: Show "Locked" text.
        1. Check "Available update notifications" does not appear in the page.

      Testing notifications preferences are saved

      1. Make some changes on the page and reload, check the changes are maintained.
      2. Now open the message drawer and click on the cog (settings page).
      3. Under Notification preferences, change Email / Web settings.
      4. Reload the page and go to the same form.
      5. Check changes are saved.

      Testing default notifications settings are saved

      1. Enter again as admin.
      2. Navigate to Site administration > Messaging > Notification settings.
      3. Make some changes on under the Default notification preferences.
      4. Scroll down and save changes.
      5. Check changes are maintained.
      6. Open another browser with the student user logged in.
      7. Navigate there to the user menu > Preferences > Notification preferences.
      8. Check that when on admin, some provider is disabled, the provider does not shown on the student view.
      9. Check that when on admin, something is locked, It shows Locked if it's also enabled or disallowed if it's also disabled on the student view.
      10. Check that when on admin, something is NOT locked, It shows the switch on the student view.

      Testing notifications are sent using default settings

      1. Enter as admin
      2. Navigate to Site administration > Messaging > Notification settings.
      3. Do the following setup.
        1. Subscribed forum posts:
          1. Web: Locked: false, Enabled: true.
          2. Email: Locked: true, Enabled: true.
      4. Create a user.
      5. Create a course.
      6. Enrol the created user as student to that course.
      7. Create forum with forced subscription.
      8. Post on the forum.
      9. Wait 31 minutes. (Run cron if not setup).
      10. Enter as the student.
      11. Check you received the notification on the notifications drawer.
      12. Check you received the email.
      13. As admin, now change the previous settings:
        1. Web: Locked: false, Enabled: false.
        2. Email: Locked: true, Enabled: false.
      14. Post again on the forum and wait 31 minutes more.
      15. Enter as the student gain
      16. Check you HAVEN'T received the notification on the notifications drawer.
      17. Check you HAVEN'T received the email.

      Testing notifications are sent using user settings

      1. Enter as admin
      2. Navigate to Site administration > Messaging > Notification settings.
      3. Do the following setup.
        1. Subscribed forum posts:
          1. Web: Locked: false, Enabled: true.
          2. Email: Locked: false, Enabled: false.
      4. Now enter as the student
      5. Navigate there to the user menu > Preferences > Notification preferences.
      6. Do the following setup.
        1. Subscribed forum posts (the contrary as before):
          1. Web: Enabled: false.
          2. Email: Enabled: true.
      7. As admin, Post again on the forum and wait 31 minutes more.
      8. Enter as the student gain
      9. Check you HAVEN'T received the notification on the notifications drawer.
      10. Check you HAVE received the email.
      11. As admin, now change the previous settings:
        1. Subscribed forum posts:
          1. Web: Locked: true, Enabled: true.
          2. Email: Locked: true, Enabled: false.
      12. Post again on the forum and wait 31 minutes more.
      13. Enter as the student gain
      14. Check you HAVE received the notification on the notifications drawer.
      15. Check you HAVEN'T received the email.

       

      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. (Keep Mobile and Jabber disabled). Under "Default notification preferences" Setup all kind of possibilities: Assignment notifications: Enabled = true. Web: permitted, Online true, Offline true. Email: permitted, Online true, Offline false. Asynchronous backup/restore notifications Enabled = true. Web: permitted, Online false, Offline true. Email: permitted, Online false, Offline false. Warning when your quiz attempt becomes overdue Enabled = true. Web: disallowed Email: locked Available update notifications Enabled = false. Enter now as any other user. Open the user menu > Preferences > Notification preferences. Set some different values: 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. Now, enter again as admin, checkout new code and perform UPGRADE. Check no errors have been raised. As admin navigate again to Site administration > Messaging > Notification settings. Check the following settings have been set: Assignment notifications: Enabled = true. Web: Locked false, Enabled true. Email: Locked false, Enabled true. Asynchronous backup/restore notifications Enabled = true. Web: Locked false, Enabled true. Email: Locked false, Enabled false. Warning when your quiz attempt becomes overdue Enabled = true. Web: Locked true, Enabled false. Email: Locked true, Enabled true. Available update notifications Enabled = false. Enter again as student and 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. Testing locked settings As the student, on the same page as before, check: Assignment notifications: Web: Enabled true. Email: Enabled true. Asynchronous backup/restore notifications Web: Enabled true. Email: Enabled false. Warning when your quiz attempt becomes overdue Web: Show "Disallowed" text. Email: Show "Locked" text. Check "Available update notifications" does not appear in the page. Testing notifications preferences are saved Make some changes on the page and reload, check the changes are maintained. Now open the message drawer and click on the cog (settings page). Under Notification preferences, change Email / Web settings. Reload the page and go to the same form. Check changes are saved. Testing default notifications settings are saved Enter again as admin. Navigate to Site administration > Messaging > Notification settings. Make some changes on under the Default notification preferences. Scroll down and save changes. Check changes are maintained. Open another browser with the student user logged in. Navigate there to the user menu > Preferences > Notification preferences. Check that when on admin, some provider is disabled, the provider does not shown on the student view. Check that when on admin, something is locked, It shows Locked if it's also enabled or disallowed if it's also disabled on the student view. Check that when on admin, something is NOT locked, It shows the switch on the student view. Testing notifications are sent using default settings Enter as admin Navigate to Site administration > Messaging > Notification settings. Do the following setup. Subscribed forum posts: Web: Locked: false, Enabled: true. Email: Locked: true, Enabled: true. Create a user. Create a course. Enrol the created user as student to that course. Create forum with forced subscription. Post on the forum. Wait 31 minutes. (Run cron if not setup). Enter as the student. Check you received the notification on the notifications drawer. Check you received the email. As admin, now change the previous settings: Web: Locked: false, Enabled: false. Email: Locked: true, Enabled: false. Post again on the forum and wait 31 minutes more. Enter as the student gain Check you HAVEN'T received the notification on the notifications drawer. Check you HAVEN'T received the email. Testing notifications are sent using user settings Enter as admin Navigate to Site administration > Messaging > Notification settings. Do the following setup. Subscribed forum posts: Web: Locked: false, Enabled: true. Email: Locked: false, Enabled: false. Now enter as the student Navigate there to the user menu > Preferences > Notification preferences. Do the following setup. Subscribed forum posts (the contrary as before): Web: Enabled: false. Email: Enabled: true. As admin, Post again on the forum and wait 31 minutes more. Enter as the student gain Check you HAVEN'T received the notification on the notifications drawer. Check you HAVE received the email. As admin, now change the previous settings: Subscribed forum posts: Web: Locked: true, Enabled: true. Email: Locked: true, Enabled: false. Post again on the forum and wait 31 minutes more. Enter as the student gain Check you HAVE received the notification on the notifications drawer. Check you HAVEN'T received the email.  
    • Affected Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-67853-master

      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

          Activity

            People

            Assignee:
            pferre22 Pau Ferrer
            Reporter:
            pferre22 Pau Ferrer
            Peer reviewer:
            Juan Leyva
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            5 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 days, 1 hour, 13 minutes
                2d 1h 13m