WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
385 stars 600 forks source link

Implement `CourseUserWikiTimeslice.update_cache_from_revisions` #5866

Open gabina opened 4 days ago

gabina commented 4 days ago

What this PR does

This PR implements the update_cache_from_revisions instance method for CourseUserWikiTimeslice and specs for it. The behavior for the new method and its specs are based on the update_cache instance method for CoursesUsers.

In addition, this PR implements class method update_all_caches_from_timeslices for CoursesUsers, which involves calculating caches for CoursesUsers records based on the existing timeslices for them.

Finally, it updates the existing UpdateCourseStatsTimeslice class to update caches for CourseUserWikiTimeslice and CoursesUsers. I adds specs for it.

Open questions and concerns