open-lms-open-source / moodle-theme_snap

GNU General Public License v3.0
79 stars 75 forks source link

Activity deadlines cached per course(s) do not account for extensions #243

Open alexmorrisnz opened 2 years ago

alexmorrisnz commented 2 years ago

In INT-17065 the activity deadlines was changed to cache per course(s), this doesn't account for users with extensions.

To test:

  1. Create a test course with at least two students.
  2. Create an assignment with activity due date 1st August 2022
  3. Log in as student 1, observe due date is correct
  4. Log in as student 2, observe due date is correct
  5. Grant an extension to student 1 for 1st September 2022
  6. Login in as student 1, observe due date is correct (1st September)
  7. Login in as student 2, observe due date is incorrect (should be 1st August)

The cache key should contain the user id, perhaps only if get_user_group_cache_key is empty.

Tested on latest Moodle 3.9 with the theme_snap MOODLE_39_STABLE branch, looks like this could affect master as well though.

alexmorrisnz commented 2 years ago

@xKoetsuji this is similar to #234 which you said is in a backlog (cc @jgg9026 you look to be the most active recently on snap)