Open ragesoss opened 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.
@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
.
Hey, I am an outreachy applicant, can I take this up?
@twisted-sres Please feel free to take this up as I review the other PR!
Hey, how do I reproduce this?
@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?
The general strategy I would recommend here:
#enroll_in_course
section of wiki_course_edits_spec.rb
that uses that student as the enrolling user, with an expectation that the welcome message is not posted. This should be failing initially.Could you please assign me this task?
@ragesoss can u explain the issue, I am not able to understand what is meant by user talk page and reproduce the issue.
@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 -->
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.