[Data rearchitecture] Implement ContinuedCourseActivityAlert without revisions #6132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR re-implements the
significant_activity_after_course_end?
method inContinuedCourseActivityAlertManager
class in order to make theContinuedCourseActivityAlert
work without revisions.The previous criteria to determine if we should send a
ContinuedCourseActivityAlert
was based on data table revisions in the mainspace after the course end. If those revisions exceed 200 characters, then we send the alert.This new implementation does not use revisions on the table, but hits the API to determine whether to send the alert. By hitting the API directly, we get revisions in the mainspace for the given users after the course end. Now, we use the number of revisions as the metric instead of characters added, as calculating character counts via the API isn't so straightforward.
Open questions and concerns
I set
MINIMUM_REVISIONS_AFTER_COURSE_END
to 20 but we may want to change that number.