From 9a21c5d4a8dadc9af882f579df5fde52b22bcb51 Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Wed, 22 Aug 2012 05:00:11 -0700 Subject: [PATCH] Adding reasoning for adding a new metadata field --- common/lib/xmodule/xmodule/course_module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 5eeb5ee11c..4e799a6f0d 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -197,6 +197,10 @@ class CourseDescriptor(SequenceDescriptor): def start_date_text(self): return time.strftime("%b %d, %Y", self.start) + # An extra property is used rather than the wiki_slug/number because + # there are courses that change the number for different runs. This allows + # courses to share the same css_class across runs even if they have + # different numbers. @property def css_class(self): return self.metadata.get('css_class', '')