feat: enable unit-level control over discussions by default (#30903)
This PR changes the default behaviour of the discussions experience by making the previous "unit-level visibility" the default mechanism for configuring discussions. Prior to this PR, under the new discussions configuration experience, all units would automatically get assigned a discussion topic and have discussions enabled for them (other than units in graded or exam subsections). However, if authors wanted they could enabled a custom visibility mode which would allow toggling discussions on or off on a per-unit level. This PR makes this custom visibility mode the standard behaviour (and eventually, only behaviour) and enables discussion for all units by default. This replicates the behaviour that already existed, however, now gives authors control over disabling discussions for individual units by default. It also removes the ability to disable discussions for all units (while still keeping course-wide discussions) enabled.
This commit is contained in:
@@ -91,20 +91,20 @@ class TestDiscussionEnabled(CourseTestCase):
|
||||
)
|
||||
return resp
|
||||
|
||||
def test_discussion_enabled_false_initially(self):
|
||||
def test_discussion_enabled_true_initially(self):
|
||||
"""
|
||||
Tests discussion_enabled flag is False initially for vertical
|
||||
Tests discussion_enabled flag is True initially for vertical
|
||||
"""
|
||||
self.assertFalse(self.get_discussion_enabled_status(self.vertical))
|
||||
self.assertFalse(self.get_discussion_enabled_status(self.vertical_1))
|
||||
self.assertTrue(self.get_discussion_enabled_status(self.vertical))
|
||||
self.assertTrue(self.get_discussion_enabled_status(self.vertical_1))
|
||||
|
||||
def test_discussion_enabled_toggle(self):
|
||||
"""
|
||||
Tests discussion_enabled can be toggled.
|
||||
"""
|
||||
self.set_discussion_enabled_status(self.vertical, True)
|
||||
self.assertTrue(self.get_discussion_enabled_status(self.vertical))
|
||||
self.assertFalse(self.get_discussion_enabled_status(self.vertical_1))
|
||||
self.set_discussion_enabled_status(self.vertical, False)
|
||||
self.assertFalse(self.get_discussion_enabled_status(self.vertical))
|
||||
self.assertTrue(self.get_discussion_enabled_status(self.vertical_1))
|
||||
|
||||
def test_non_course_author_cannot_get_or_set_discussion_enabled_flag(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user