WikiEduDashboard
WikiEduDashboard copied to clipboard
Create an alert when an edited article is moved out of mainspace
Current Behavior:
During the course update process, ArticleStatusManager is responsible for updating the status of Article records associated with the course, handling cases where the article got deleted, moved to a different namespace, or was modified such that it has a new MediaWiki ID.
Desired Behavior:
When the namespace of an article has changed from mainspace to a different namespace (typically, User or Draft), ArticleStatusManager should trigger creation of an alert (an Alert record of a new type) that notifies the Wiki Expert for the the course associated with that article.
This way, we can more quickly look into cases where student work got moved out of mainspace, as this may indicate problems that Wiki Education staff need to help with.
Additional context:
This probably requires some refactoring of ArticleStatusManager so that the course record can easily be passed on along as needed, along with a new alert type (see app/models/alert.rb and app/models/alert_types) and an alert manager responsible for generating the alert.
Hi, I'll be attempting on this issue.
@sharon-odhiambo you're welcome to give it a shot, but note that this isn't marked as a newcomer issue. I'd like to ship this within the next week or two, so let me know how progress on it goes; if you get stuck, I'll likely implement it myself for the sake of getting it shipped.
Hi @ragesoss , sure let me attempt and let you know by end of this week. Thank you.
Hi @ragesoss , I had promised to share my progress on this by end of this week but am just starting to understand this issue now. Kindly allow me to do an update beginning next week and you can guide on whether to proceed or pick another issue. Thank you.
Hi @ragesoss , I tried to work on this issue. However, I've been stuck on testing how the alerts work. I tried to see how the articles-for-deletion work to help understand this. This is my PR-draft Kindly let me know whether this is leading somewhere or not. I'm able to create the articles and edit them but the editing record doesn't show on my local environment dashboard.
In order to pull in data from Wikipedia (for example, about a page that got moved), you need to run the UpdateCourseStats process for the course you're using. If you haven't already, check out docs/user_roles.md. It has some details on how to pull in different sorts of data, including commands for using UpdateCourseStats via console.
Thank you for this. Could you kindly let me know if what I've done is on the right track?
You've started in the right place in the data flow, and it looks like you've thought through the use case of creating a (new type of) alert. I haven't looked in more detail than that, but it seems like you have a clear understanding of what you're trying to do.
Okay, thank you. Let me see if I'll be able to get the stats and find out how to proceed.
@ragesoss , can I work on this issue ?
@himadeepthi1 This is not a good first issue, as it's fairly complex.