Notification of the wrong user when answering a question
Summary
The user notified when adding an answer to a question is the owner of the course and not the owner of the question.
Steps to reproduce
Creating a question in a course that doesn't belong to you and add an answer.
What is the current bug behavior?
The user notified when adding a response is the course owner.
What is the expected correct behavior?
The notified user should be the owner of the question.
Possible fixes
In the CourseDetailAgoraQuestionAnswerView
of learning/views/course.py
self.object.author.notify(
dgettext(
self.object.author.preferred_language,
"Someone has just replied to your question “%(question)s” on “%(course)s”.") % {
'question': self.question, 'course': self.object
},
target=self.get_success_url()
)
self.object.author.notify
should be self.question.author.notify
Edited by Arthur Baribeaud