From 75a0fdf0eb612bf7bb9ebfeb67500cd18ac07fa6 Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Tue, 2 May 2017 17:34:58 -0400 Subject: [PATCH] Enable course sidebar for new course home page LEARNER-764 --- lms/templates/courseware/info.html | 8 ++ .../course-home-fragment.html | 75 ++++++++----------- .../tests/views/test_course_home.py | 2 +- 3 files changed, 41 insertions(+), 44 deletions(-) diff --git a/lms/templates/courseware/info.html b/lms/templates/courseware/info.html index 2f438e297b..3ed50fb706 100644 --- a/lms/templates/courseware/info.html +++ b/lms/templates/courseware/info.html @@ -6,6 +6,7 @@ from datetime import datetime from pytz import timezone, utc +from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from courseware.courses import get_course_info_section, get_course_date_blocks @@ -113,6 +114,13 @@ from openedx.core.djangolib.markup import HTML, Text
+

${_("Course Tools")}

+
+ + + ${_("Bookmarks")} + +
% if SelfPacedConfiguration.current().enable_course_home_improvements: ${HTML(dates_fragment.body_html())} 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 82972b9168..3d695260f0 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 @@ -23,13 +23,9 @@ from openedx.features.course_experience import UNIFIED_COURSE_EXPERIENCE_FLAG
- % if waffle.flag_is_active(request, UNIFIED_COURSE_EXPERIENCE_FLAG): -
-
- ${HTML(outline_fragment.body_html())} -
-
-
- % else: - ${HTML(outline_fragment.body_html())} - % endif + % endif + +
diff --git a/openedx/features/course_experience/tests/views/test_course_home.py b/openedx/features/course_experience/tests/views/test_course_home.py index 82364e795b..859c3fef58 100644 --- a/openedx/features/course_experience/tests/views/test_course_home.py +++ b/openedx/features/course_experience/tests/views/test_course_home.py @@ -65,7 +65,7 @@ class TestCourseHomePage(SharedModuleStoreTestCase): get_course_in_cache(self.course.id) # Fetch the view and verify the query counts - with self.assertNumQueries(37): + with self.assertNumQueries(35): with check_mongo_calls(3): url = course_home_url(self.course) self.client.get(url)