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

Course contacts shown in course listings can lag by up to an hour

XMLWordPrintable

    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • wip-MDL-41042-master
    • Hide

      IMPORTANT: This is an improvement that was implemented in 3.0. However a little part of it was backported to 2.8 and 2.9 - it does not change the existing behavior there but only improves performance in case of memcached

      This issue needs version bump / upgrade before testing

      1. Create several courses with enrolments, make sure there are teachers and non-editing teachers enrolled
      2. on site home page (or in the course listings) make sure the list of teachers is displayed. Note, you may need to purge caches in 2.8 and 2.9 here, but master should be updated immediately
      3. change $CFG->coursecontact to include non-editing teachers
      4. make sure the list of teachers/managers is still displayed and is correct
      5. enrol more users, change roles, assign one of the course contacts role in course category or system context
      6. make sure every time the course contacts are immediately updated

      Last two items are for 3.0 testing only

      Show
      IMPORTANT: This is an improvement that was implemented in 3.0. However a little part of it was backported to 2.8 and 2.9 - it does not change the existing behavior there but only improves performance in case of memcached This issue needs version bump / upgrade before testing Create several courses with enrolments, make sure there are teachers and non-editing teachers enrolled on site home page (or in the course listings) make sure the list of teachers is displayed. Note, you may need to purge caches in 2.8 and 2.9 here, but master should be updated immediately change $CFG->coursecontact to include non-editing teachers make sure the list of teachers/managers is still displayed and is correct enrol more users, change roles, assign one of the course contacts role in course category or system context make sure every time the course contacts are immediately updated Last two items are for 3.0 testing only

      The "course contacts" (aka managers) shown in the course listings operate from a cache called "coursecontacts" that is refreshed every hour.

      This can cause a surprise if you change some teachers and the changes are not reflected on the course immediately.

      The reason for it was that calculating the course contacts can be complicated (not just enrolments but also roles and CFG settings), which is fair enough and what caches are for, but in this case it's a little overzealous.

      I suggest that we add some cache invalidation for the common cases in the enrolment plugins as follows:

      1) Keep the 1 hour lifetime, to handle edge cases.
      2) Anytime enrolments are added or removed in a course (by any enrolment plugin), invalidate the cache for that course id.

            marina Marina Glancy
            dougiamas Martin Dougiamas
            Simey Lameze Simey Lameze
            Andrew Lyons Andrew Lyons
            Mark Nelson Mark Nelson
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

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