WikiEducationFoundation / WikiEduDashboard

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

[Data rearchitecture] Support article scoped program and visiting scholarship courses #5950

Closed gabina closed 2 months ago

gabina commented 2 months ago

What this PR does

This PR adds support for ArticleScopedProgram and VisitingScholarship courses in the timeslice updates.

It adds a filter_revisions method to Course class. The trivial implementation retrieve all the revisions. The implementation for ArticleScopedProgram returns only the revisions for articles belonging to 1) a category course or 2) a course assignment. The filter_revisions implementation for VisitingScholarship returns only the revisions for articles in course assignments.

Open questions and concerns

If an assignment is added in the middle of the course, then revisions previous to the assignment creation date won't be considered, unless a full course update is done. In a similar way, if a category is updated in the middle of the course (meaning that a new article is inside a category, or an article is removed from a category) those updates won't be reflected in the timeslices previous to that update. The assignment dates are present in the assignment record, while the category record would be likely updated to have a field indicating the last point in time at which the category changed (e.g., a new item was added). This way we could just put a message for the course with a disclaimer like "An assignment or category used in this course has changed, so the data may not be accurate. Schedule a full course update to resolve this."