diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 28668ef088..6c8c20014c 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -232,6 +232,15 @@ class CourseDescriptor(SequenceDescriptor): def info_sidebar_name(self): return self.metadata.get('info_sidebar_name', 'Course Handouts') + @property + def discussion_link(self): + """TODO: This is a quick kludge to allow CS50 (and other courses) to + specify their own discussion forums as external links by specifying a + "discussion_link" in their policy JSON file. This should later get + folded in with Syllabus, Course Info, and additional Custom tabs in a + more sensible framework later.""" + return self.metadata.get('discussion_link', None) + @property def title(self): return self.display_name diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html index 5df09207b1..f7dac9012e 100644 --- a/lms/templates/courseware/course_navigation.html +++ b/lms/templates/courseware/course_navigation.html @@ -19,34 +19,41 @@ def url_class(url):
  1. Courseware
  2. Course Info
  3. -% if hasattr(course,'syllabus_present') and course.syllabus_present: + % if hasattr(course,'syllabus_present') and course.syllabus_present:
  4. Syllabus
  5. -% endif -% if user.is_authenticated(): - % if settings.MITX_FEATURES.get('ENABLE_TEXTBOOK'): + % endif + % if user.is_authenticated(): + % if settings.MITX_FEATURES.get('ENABLE_TEXTBOOK'): % for index, textbook in enumerate(course.textbooks):
  6. ${textbook.title}
  7. % endfor - % endif - % if settings.MITX_FEATURES.get('ENABLE_DISCUSSION_SERVICE'): + % endif + + ## If they have a discussion link specified, use that even if we feature + ## flag discussions off. Disabling that is mostly a server safety feature + ## at this point, and we don't need to worry about external sites. + % if course.discussion_link: +
  8. Discussion
  9. + % elif settings.MITX_FEATURES.get('ENABLE_DISCUSSION_SERVICE'):
  10. Discussion
  11. ##
  12. News
  13. - % endif - - % if settings.MITX_FEATURES.get('ENABLE_DISCUSSION'): -
  14. Discussion
  15. - % endif -% endif -% if settings.WIKI_ENABLED: -
  16. Wiki
  17. -% endif -% if user.is_authenticated(): -
  18. Progress
  19. -% endif -% if staff_access: -
  20. Instructor
  21. -% endif + % endif + ## This is Askbot, which we should be retiring soon... + % if settings.MITX_FEATURES.get('ENABLE_DISCUSSION'): +
  22. Discussion
  23. + % endif + % endif + + % if settings.WIKI_ENABLED: +
  24. Wiki
  25. + % endif + % if user.is_authenticated(): +
  26. Progress
  27. + % endif + % if staff_access: +
  28. Instructor
  29. + % endif