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

Create an API to know the last access of a user into a specific context.

XMLWordPrintable

      In the UX research focused on the course overview page, numerous participants desired visual cues regarding new submissions, messages, commenters, attempts, and activity entries. The only method to determine when a user last accessed a specific context or page is through log access, which can lead to considerable performance issues and should not be accessed in real time outside a report.

      The proposal is to create a new API to register or validate the last time the user accessed a specific context or page. Ideally, theĀ  registry should have some attributes:

      • (int) userid
      • (int) contextid
      • (string|null) pagename: this pagename will be only used when a plugin needs more detail. For example to know the last time a user access an activity attempts report.
      • timeaccess: the timestamp of the last access

      The mdl_user_lastaccess table currently provides information about a user's last access to a course. However, this information is primarily used for certain reports and internal features and does not provide information about specific contexts.

      The objective is to establish a new table or, alternatively, augment the existing one by incorporating additional fields. Furthermore, an intuitive API should be implemented to facilitate the saving and loading of data. Additionally, certain events, such as an activity view or a course view, ought to automatically update these records.

      Currently, this information is needed for the course overview page, but many other pages could also benefit from an easy way for users to identify what is new for them. However, the Recently accessed items block keeps an internal registry of the latest accessed activities. One possible solution could be to move block table mdl_block_recentlyaccesseditems to the core (it could be something like mdl_user_recent_access) and create an API.

            Unassigned Unassigned
            tusefomal Ferran Recio
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

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