-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update discussions blackout dates logic to use discussions confi… #32896
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nits, the rest looks good!
|
||
Arguments: | ||
course: Course to check discussions for | ||
user: User to check for privileges in course | ||
""" | ||
return course.forum_posts_allowed or has_discussion_privileges(user, course.id) | ||
discussions_config = DiscussionsConfiguration.get(course.id).posting_restrictions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this to something more specific. Like discussions_posting_restrictions
self.course.get_discussion_blackout_datetimes() | ||
) | ||
|
||
def test_posting_disabled(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use ddt
to group these tests together?
…g data fix: resolved conflicts
e1a6c48
to
7415d40
Compare
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
Ticket
https://2u-internal.atlassian.net/browse/INF-994
Description
Use posting_restrictions field from DiscussionsConfiguration mode in the decision for allowing posting in forum, previously only dates were used, which was inconsistent with the use case.