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

User course last access time is updated every time an external function validates the course context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.5.2
    • Fix Version/s: 3.6
    • Component/s: Events API
    • Labels:

      Description

      This was discovered by Pau Ferrer while testing the new recent courses functionality.

      It seems that calls to user_accesstime_log() (to update user access time to a course) are located in require_login and require_course_login functions.

      This is not the correct place because it means that every time a WebService function evaluates a course context via validate_context (even if the user is not accessing the course, just for checking if he can effectively access) the access time is updated.

      Right now, for example, the last access time for all the user courses are updated every time a user access the Course overview page in the Mobile app (again, without accessing to any of those courses).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/18