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

Notifications not being marked as read when click in popover

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test Setup

      1. Enrol a student and a teacher to a course.
      2. Add an assignment ("notifytest") to the course.
      3. Log in as the student.
      4. Go to your 'Notification preferences' page (<site>/message/notificationpreferences.php or by clicking on 'Toggle notifications menu' (the bell icon on the top right area of the page) and click on 'Notification preferences' (the gear icon))
      5. Ensure online/offline web notifications are enabled for Assignments. If you don't have outgoing email set up, you may want to turn off the Online and Offline Email notifications for the Assignment notifications.

      Generating user notifications for the student

      1. While logged in as the student, add a submision to the notifytest assignment. Your unread notification counter will increment by 1, but do not click it yet.
      2. Log in as the teacher.
      3. Open the notifytest assignment, and click "view all submissions".
      4. Click "Grade" for the student who has submitted the assignment.
      5. Assign the student a grade, and type "notify test" into the "Feedback comments" text area.
      6. At the bottom of the page ensure "Notify students" is ticked, and click "Save changes".
      7. Run the CLI cron on your site. This will generate a second notification to your test student.

      Testing

      NOTE: In all of the below steps, clicking on notifications refers to the main notification text, and NOT the "View full notification" link under it.

      1. Log in as the test student, who should now have an unread notification count of 2.
      2. Click the notifications icon, then ctrl+click the first unread notification (ie "blah has given feedback for assignment"). Click away from the notifications popover so it closes, and CONFIRM the unread notification count has decremented to 1.
      3. Open the new browser tab you opened in the previous step, and CONFIRM it has redirected to the submissions status page for the notifytest assignment, and the unread notification count has remained decremented (ie is still showing 1 unread notification).
      4. Return to the original tab (which will be at the students site homepage). Click the notifications icon, then click (do not use ctrl this time) the remaining unread notification (ie "You have submitted your assignment submission for blah").
      5. CONFIRM you are redirected to the submissions status page for the notifytest assignment opens, and the unread notification count now shows no number.
      6. Click on Site home to return to the homepage.
      7. Click the notifications icon, then click any of the read notifications.
      8. CONFIRM the expected page loads.
      9. Click the notifications icon, then ctrl+click any of the read notifications.
      10. CONFIRM the expected page opens.

      The above should confirm that unread notification links can be opened in both the same and new tabs, and will decrement the unread counter in the appropriate places, and also confirm that read notification links are working for same and new tabs.

      Show
      Test Setup Enrol a student and a teacher to a course. Add an assignment ("notifytest") to the course. Log in as the student. Go to your ' Notification preferences ' page (<site>/message/notificationpreferences.php or by clicking on ' Toggle notifications menu ' (the bell icon on the top right area of the page) and click on ' Notification preferences ' (the gear icon)) Ensure online/offline web notifications are enabled for Assignments. If you don't have outgoing email set up, you may want to turn off the Online and Offline Email notifications for the Assignment notifications. Generating user notifications for the student While logged in as the student, add a submision to the notifytest assignment. Your unread notification counter will increment by 1, but do not click it yet. Log in as the teacher. Open the notifytest assignment, and click "view all submissions". Click "Grade" for the student who has submitted the assignment. Assign the student a grade, and type "notify test" into the "Feedback comments" text area. At the bottom of the page ensure "Notify students" is ticked, and click "Save changes". Run the CLI cron on your site. This will generate a second notification to your test student. Testing NOTE: In all of the below steps, clicking on notifications refers to the main notification text, and NOT the "View full notification" link under it. Log in as the test student, who should now have an unread notification count of 2. Click the notifications icon, then ctrl+click the first unread notification (ie "blah has given feedback for assignment"). Click away from the notifications popover so it closes, and CONFIRM the unread notification count has decremented to 1. Open the new browser tab you opened in the previous step, and CONFIRM it has redirected to the submissions status page for the notifytest assignment, and the unread notification count has remained decremented (ie is still showing 1 unread notification). Return to the original tab (which will be at the students site homepage). Click the notifications icon, then click (do not use ctrl this time) the remaining unread notification (ie "You have submitted your assignment submission for blah"). CONFIRM you are redirected to the submissions status page for the notifytest assignment opens, and the unread notification count now shows no number. Click on Site home to return to the homepage. Click the notifications icon, then click any of the read notifications. CONFIRM the expected page loads. Click the notifications icon, then ctrl+click any of the read notifications. CONFIRM the expected page opens. The above should confirm that unread notification links can be opened in both the same and new tabs, and will decrement the unread counter in the appropriate places, and also confirm that read notification links are working for same and new tabs.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull Master Branch:
      MDL-56498-master

      Description

      While the tests for MDL-56337 were running they noticed that on phantomjs the notifications weren't being marked as read when they were being clicked on in the popover (should be marked as read before the page is redirected to the notification resource).

      I was able to re-create this only one time using Safari. Every other time has worked as expected. All other browsers work as expected.

      Step that should recreate:

      1. Log in as a user that has an unread notification
      2. Open the popover and click on the notification (not the "view more" link)
      3. You should be taken to the resource the notification is about (the assignment or what ever)
      4. The notification should be marked as read (though it doesn't in the erroneous case)

      This isn't super important since it can't be reliably recreated.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/18

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h