WikiEducationFoundation / WikiEduDashboard

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

Dashboard should not post more than one 'welcome' message to use talk page #1363

Open ragesoss opened 7 years ago

ragesoss commented 7 years ago

Basically, before making the talk page welcome post, it should check to see whether that template is already present, and skip it if it is.

lpassamano commented 7 years ago

Hi, first time contributer here! I would like to help out with this issue if no one else is working on it already.

ragesoss commented 7 years ago

@lpassamano great! This message gets posted from the WikiCourseEdits#enroll_in_course method. It currently doesn't fetch the content of the page before posting, but there are other similar routines that do, including WikiAssignmentOutput.

You may want to start a new class like WikiWelcomeOutput and call it from WikiCourseEdits to isolate this new behavior, instead of just expanding WikiCourseEdits.

sresthas commented 5 years ago

Hey, I am an outreachy applicant, can I take this up?

bwreid commented 5 years ago

@twisted-sres Please feel free to take this up as I review the other PR!

sresthas commented 5 years ago

Hey, how do I reproduce this?

bwreid commented 5 years ago

@twisted-sres I believe some of this you can attempt just from the console itself. For example, running the enroll_in_course function from WikiCourseEdits. @ragesoss, Can you add what the best way to mock out/make a request to the API would be?

ragesoss commented 5 years ago

The general strategy I would recommend here:

HARSHITHASALADI1 commented 11 months ago

Could you please assign me this task?

fillingtothemomo commented 10 months ago

@ragesoss can u explain the issue, I am not able to understand what is meant by user talk page and reproduce the issue.

ragesoss commented 10 months ago

@fillingtothemomo Here's an example of a user talk page (which has had the welcome message posted, by 'User:Brianda (Wiki Ed)' ): https://en.wikipedia.org/wiki/User_talk:Fedfed2

The welcome template gets substituted, so rather than the actual template, what ends up saved on the page is the content of that template. But an HTML comment in the source text remains to indicate that it came from the template, and that can be used to test whether a given page already had a welcome message posted: <!-- Template:Dashboard.wikiedu.org welcome -->