Change config keys to use underscores for consistency with other policy keys

This commit is contained in:
Victor Shnayder
2013-01-24 11:14:57 -05:00
parent de02721158
commit 3bfe9decf4
2 changed files with 6 additions and 5 deletions

View File

@@ -365,7 +365,7 @@ class CourseDescriptor(SequenceDescriptor):
"""
Return whether the course is cohorted.
"""
config = self.metadata.get("cohort-config")
config = self.metadata.get("cohort_config")
if config is None:
return False
@@ -376,11 +376,11 @@ class CourseDescriptor(SequenceDescriptor):
Return the set of discussions that is cohorted. It may be the empty
set.
"""
config = self.metadata.get("cohort-config")
config = self.metadata.get("cohort_config")
if config is None:
return set()
return set(config.get("cohorted-discussions", []))
return set(config.get("cohorted_discussions", []))

View File

@@ -258,9 +258,10 @@ Supported fields at the course level:
* "discussion_blackouts" -- An array of time intervals during which you want to disable a student's ability to create or edit posts in the forum. Moderators, Community TAs, and Admins are unaffected. You might use this during exam periods, but please be aware that the forum is often a very good place to catch mistakes and clarify points to students. The better long term solution would be to have better flagging/moderation mechanisms, but this is the hammer we have today. Format by example: [["2012-10-29T04:00", "2012-11-03T04:00"], ["2012-12-30T04:00", "2013-01-02T04:00"]]
* "show_calculator" (value "Yes" if desired)
* "days_early_for_beta" -- number of days (floating point ok) early that students in the beta-testers group get to see course content. Can also be specified for any other course element, and overrides values set at higher levels.
* "cohort-config" : dictionary with keys
* "cohort_config" : dictionary with keys
- "cohorted" : boolean. Set to true if this course uses student cohorts. If so, all inline discussions are automatically cohorted, and top-level discussion topics are configurable with an optional 'cohorted': bool parameter (with default value false).
- ... more to come. ('auto-cohort', how to auto cohort, etc)
- "cohorted_discussion": list of discussions that should be cohorted.
- ... more to come. ('auto_cohort', how to auto cohort, etc)
* TODO: there are others