diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 2707f065b6..b9110782c5 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -141,7 +141,7 @@ def toc_for_course(user, request, course, active_chapter, active_section): return chapters -def get_section(course, chapter, section): +def get_section(course_module, chapter, section): """ Returns the xmodule descriptor for the name course > chapter > section, or None if this doesn't specify a valid section @@ -150,11 +150,6 @@ def get_section(course, chapter, section): chapter: Chapter name section: Section name """ - try: - course_module = modulestore().get_item(course) - except: - log.exception("Unable to load course_module") - return None if course_module is None: return diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 2415a92c49..e5c3f6c4a6 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -190,7 +190,8 @@ def index(request, course_id=None, chapter=None, section=None, look_for_module = chapter is not None and section is not None if look_for_module: # TODO (cpennington): Pass the right course in here - section = get_section(course_location, chapter, section) + + section = get_section(course, chapter, section) student_module_cache = StudentModuleCache(request.user, section) module, _, _, _ = get_module(request.user, request, section.location, student_module_cache) context['content'] = module.get_html()