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

Viewing images in email should not update last access

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • mdl-75010
    • Hide
      1. ENsure that you have mailhog/mailcatcher or similar configured
      2. Create a new user but do not log into the account
      3. Enrol them into a course
      4. Make sure the course has the default announcement forum set up.
      5. Make sure the new user you created above is subscribed to the announcement forum
      6. Post a message in the annoucement forum - (use the advanced form that has the "Send forum post notifications with no editing-time delay" option to speed up the testing process.
      7. Open up the email notification for the user in the email account - make sure the email client displays the images within the client.
      8. while logged in as admin, go to admin > Browse list of users and find the user account you created, and ensure that the "last access" column still shows "never"
      Show
      ENsure that you have mailhog/mailcatcher or similar configured Create a new user but do not log into the account Enrol them into a course Make sure the course has the default announcement forum set up. Make sure the new user you created above is subscribed to the announcement forum Post a message in the annoucement forum - (use the advanced form that has the "Send forum post notifications with no editing-time delay" option to speed up the testing process. Open up the email notification for the user in the email account - make sure the email client displays the images within the client. while logged in as admin, go to admin > Browse list of users and find the user account you created, and ensure that the "last access" column still shows "never"

      In https://tracker.moodle.org/browse/MDL-36754, tokenpluginfile.php was added as a way to allow images embedded in email notifications to be seen by authorized users.  However, when those images are loaded by an email client, it triggers an update to the lastaccess for a user.  This can cause a situation where a user has not logged into Moodle (ever, or for a very long time) to end up with a recent lastaccess.  In the user filter, this will make it look like users have been active, while no activity will show up for them in the Moodle logs as they have not actually logged in.

      Steps to replicate:

      1. Create a new user with a valid email address
      2. Enroll them to a course
      3. Make sure they are subscribed to the announcement forum
      4. Send an announcement to the user
      5. Open the email notification
      6. Check that the user has 0 for lastlogin, 0 for currentlogin, 0 for firstlogin, but a timestamp for lastaccess

       

      Expected behavior:

      1. lastaccess should not be updated when a user only interacts with an email.

       

      (note that the versions affected probably includes 4.x as well, I just do not have a 4.x site up to confirm, yet)

        1. MDL-75010-311-last-access.png
          77 kB
          Kevin Percy
        2. MDL-75010-311-received-email.png
          129 kB
          Kevin Percy
        3. MDL-75010-400-received-email.png
          54 kB
          Kevin Percy
        4. MDL-75010-master-received-email.png
          55 kB
          Kevin Percy
        5. MDL-75010-400-last-access.png
          74 kB
          Kevin Percy
        6. MDL-75010-master-last-access.png
          96 kB
          Kevin Percy

            danmarsden Dan Marsden
            jesse.safran Jesse Safran
            Brendan Heywood Brendan Heywood
            Andrew Lyons Andrew Lyons
            Kevin Percy Kevin Percy
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 20 minutes
                2h 20m

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