Commit de918a00 by Alan Boudreault Committed by Zia Fazal

Add inline_discussions_cohorting_default and cohorted_inline_discussions in course settings

parent a7380541
......@@ -1071,6 +1071,33 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
return set(config.get("cohorted_discussions", []))
@property
def inline_discussions_cohorting_default(self):
"""
This allow to change the default behavior of inline discussions cohorting. By setting this to
False, all inline discussions are non-cohorted.
"""
config = self.cohort_config
if config is None:
return True
return bool(config.get("inline_discussions_cohorting_default", True))
@property
def cohorted_inline_discussions(self):
"""
When inline_discussions_cohorting_default is False, this is used to set a discussion cohorted.
Return the set of inline discussions that are explicitly cohorted. It may be the empty set.
By adding an inline discussion id in this setting, it becomes cohorted.
"""
config = self.cohort_config
if config is None:
return set()
return set(config.get("cohorted_inline_discussions", []))
@property
def always_cohort_inline_discussions(self):
"""
This allow to change the default behavior of inline discussions cohorting. By
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment