diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index 35dc76e392..fb9a3dabeb 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -278,7 +278,7 @@ def get_course_info_section(request, user, course, section_key): html = '' if info_module is not None: try: - html = info_module.render(STUDENT_VIEW).content + html = info_module.render(STUDENT_VIEW).content.strip() except Exception: # pylint: disable=broad-except html = render_to_string('courseware/error-message.html', None) log.exception( diff --git a/lms/static/sass/features/_course-outline.scss b/lms/static/sass/features/_course-outline.scss index 468bee42da..7d5c69720a 100644 --- a/lms/static/sass/features/_course-outline.scss +++ b/lms/static/sass/features/_course-outline.scss @@ -11,8 +11,6 @@ padding: 0 ($baseline * 2); &:not(:first-child) { - border-top: 1px solid $lms-border-color; - .section-name { margin-top: $baseline; } diff --git a/lms/static/sass/shared-v2/_components.scss b/lms/static/sass/shared-v2/_components.scss index 549298f9c0..5f36120e42 100644 --- a/lms/static/sass/shared-v2/_components.scss +++ b/lms/static/sass/shared-v2/_components.scss @@ -149,3 +149,7 @@ } } } + +.section:not(:first-child) { + margin-top: $baseline; +} diff --git a/openedx/features/course_experience/__init__.py b/openedx/features/course_experience/__init__.py index b4428c50f8..800a50452d 100644 --- a/openedx/features/course_experience/__init__.py +++ b/openedx/features/course_experience/__init__.py @@ -1,4 +1,8 @@ -# Unified course experience settings +# Unified course experience settings. +# Waffle flag to enable a single unified "Course" tab. UNIFIED_COURSE_EXPERIENCE_FLAG = 'unified_course_experience' + +# Waffle flag to enable the full screen course content view +# along with a unified course home page. UNIFIED_COURSE_VIEW_FLAG = 'unified_course_view' diff --git a/openedx/features/course_experience/templates/course_experience/course-home-fragment.html b/openedx/features/course_experience/templates/course_experience/course-home-fragment.html index 6373b447b2..fdb0967e99 100644 --- a/openedx/features/course_experience/templates/course_experience/course-home-fragment.html +++ b/openedx/features/course_experience/templates/course_experience/course-home-fragment.html @@ -65,15 +65,23 @@ from openedx.features.course_experience import UNIFIED_COURSE_EXPERIENCE_FLAG ${HTML(outline_fragment.body_html())} % else: diff --git a/openedx/features/course_experience/views/course_home.py b/openedx/features/course_experience/views/course_home.py index 752d1fd169..6be37fd451 100644 --- a/openedx/features/course_experience/views/course_home.py +++ b/openedx/features/course_experience/views/course_home.py @@ -9,7 +9,7 @@ from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_control from django.views.decorators.csrf import ensure_csrf_cookie -from courseware.courses import get_course_with_access, get_last_accessed_courseware +from courseware.courses import get_course_info_section, get_course_with_access, get_last_accessed_courseware from lms.djangoapps.courseware.views.views import CourseTabView from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.plugin_api.views import EdxFragmentView @@ -56,11 +56,15 @@ class CourseHomeFragmentView(EdxFragmentView): # Get the last accessed courseware last_accessed_url, __ = get_last_accessed_courseware(course, request, request.user) + # Get the handouts + handouts_html = get_course_info_section(request, request.user, course, 'handouts') + # Render the course home fragment context = { 'csrf': csrf(request)['csrf_token'], 'course': course, 'outline_fragment': outline_fragment, + 'handouts_html': handouts_html, 'has_visited_course': last_accessed_url is not None, 'disable_courseware_js': True, 'uses_pattern_library': True,