diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py
index 464e76d7f8..bb3e113b64 100644
--- a/cms/djangoapps/contentstore/features/pages.py
+++ b/cms/djangoapps/contentstore/features/pages.py
@@ -98,25 +98,25 @@ def _verify_page_names(first, second):
@step(u'the built-in pages are in the default order$')
def built_in_pages_in_default_order(step):
- expected_pages = ['Courseware', 'Course Info', 'Wiki', 'Progress']
+ expected_pages = ['Home', 'Course', 'Wiki', 'Progress']
see_pages_in_expected_order(expected_pages)
@step(u'the built-in pages are switched$')
def built_in_pages_switched(step):
- expected_pages = ['Courseware', 'Course Info', 'Progress', 'Wiki']
+ expected_pages = ['Home', 'Course', 'Progress', 'Wiki']
see_pages_in_expected_order(expected_pages)
@step(u'the pages are in the default order$')
def pages_in_default_order(step):
- expected_pages = ['Courseware', 'Course Info', 'Wiki', 'Progress', 'First', 'Empty']
+ expected_pages = ['Home', 'Course', 'Wiki', 'Progress', 'First', 'Empty']
see_pages_in_expected_order(expected_pages)
@step(u'the pages are switched$$')
def pages_are_switched(step):
- expected_pages = ['Courseware', 'Course Info', 'Progress', 'First', 'Empty', 'Wiki']
+ expected_pages = ['Home', 'Course', 'Progress', 'First', 'Empty', 'Wiki']
see_pages_in_expected_order(expected_pages)
diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py
index 2b300b74b4..5e732e64ca 100644
--- a/cms/djangoapps/contentstore/tests/test_course_settings.py
+++ b/cms/djangoapps/contentstore/tests/test_course_settings.py
@@ -936,8 +936,8 @@ class CourseMetadataEditingTest(CourseTestCase):
self.assertNotIn("notes", course.advanced_modules)
@ddt.data(
- [{'type': 'courseware'}, {'type': 'course_info'}, {'type': 'wiki', 'is_hidden': True}],
- [{'type': 'courseware', 'name': 'Courses'}, {'type': 'course_info', 'name': 'Info'}],
+ [{'type': 'course_info'}, {'type': 'courseware'}, {'type': 'wiki', 'is_hidden': True}],
+ [{'type': 'course_info', 'name': 'Home'}, {'type': 'courseware', 'name': 'Course'}],
)
def test_course_tab_configurations(self, tab_list):
self.course.tabs = tab_list
diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py
index d2e7b12b42..3061f296a3 100644
--- a/common/lib/xmodule/xmodule/course_module.py
+++ b/common/lib/xmodule/xmodule/course_module.py
@@ -424,9 +424,9 @@ class CourseFields(object):
)
has_children = True
info_sidebar_name = String(
- display_name=_("Course Info Sidebar Name"),
+ display_name=_("Course Home Sidebar Name"),
help=_(
- "Enter the heading that you want students to see above your course handouts on the Course Info page. "
+ "Enter the heading that you want students to see above your course handouts on the Course Home page. "
"Your course handouts appear in the right panel of the page."
),
scope=Scope.settings, default='Course Handouts')
diff --git a/common/lib/xmodule/xmodule/tabs.py b/common/lib/xmodule/xmodule/tabs.py
index 833e63f2a2..480c850d2b 100644
--- a/common/lib/xmodule/xmodule/tabs.py
+++ b/common/lib/xmodule/xmodule/tabs.py
@@ -305,8 +305,8 @@ class CourseTabList(List):
"""
course.tabs.extend([
- CourseTab.load('courseware'),
- CourseTab.load('course_info')
+ CourseTab.load('course_info'),
+ CourseTab.load('courseware')
])
# Presence of syllabus tab is indicated by a course attribute
@@ -389,6 +389,19 @@ class CourseTabList(List):
else:
yield tab
+ @classmethod
+ def upgrade_tabs(cls, tabs):
+ """
+ Reverse and Rename Courseware to Course and Course Info to Home Tabs.
+ """
+ if tabs and len(tabs) > 1:
+ if tabs[0].get('type') == 'courseware' and tabs[1].get('type') == 'course_info':
+ tabs[0], tabs[1] = tabs[1], tabs[0]
+ tabs[0]['name'] = _('Home')
+ tabs[1]['name'] = _('Course')
+
+ return tabs
+
@classmethod
def validate_tabs(cls, tabs):
"""
@@ -406,13 +419,13 @@ class CourseTabList(List):
if len(tabs) < 2:
raise InvalidTabsException("Expected at least two tabs. tabs: '{0}'".format(tabs))
- if tabs[0].get('type') != 'courseware':
+ if tabs[0].get('type') != 'course_info':
raise InvalidTabsException(
- "Expected first tab to have type 'courseware'. tabs: '{0}'".format(tabs))
+ "Expected first tab to have type 'course_info'. tabs: '{0}'".format(tabs))
- if tabs[1].get('type') != 'course_info':
+ if tabs[1].get('type') != 'courseware':
raise InvalidTabsException(
- "Expected second tab to have type 'course_info'. tabs: '{0}'".format(tabs))
+ "Expected second tab to have type 'courseware'. tabs: '{0}'".format(tabs))
# the following tabs should appear only once
# TODO: don't import openedx capabilities from common
@@ -455,6 +468,7 @@ class CourseTabList(List):
"""
Overrides the from_json method to de-serialize the CourseTab objects from a json-like representation.
"""
+ self.upgrade_tabs(values)
self.validate_tabs(values)
tabs = []
for tab_dict in values:
diff --git a/common/test/acceptance/pages/lms/tab_nav.py b/common/test/acceptance/pages/lms/tab_nav.py
index 09949f2d91..74fc6ba4a7 100644
--- a/common/test/acceptance/pages/lms/tab_nav.py
+++ b/common/test/acceptance/pages/lms/tab_nav.py
@@ -21,7 +21,7 @@ class TabNavPage(PageObject):
Navigate to the tab `tab_name`.
"""
- if tab_name not in ['Courseware', 'Course Info', 'Discussion', 'Wiki', 'Progress']:
+ if tab_name not in ['Course', 'Home', 'Discussion', 'Wiki', 'Progress']:
self.warning("'{0}' is not a valid tab name".format(tab_name))
# The only identifier for individual tabs is the link href
diff --git a/common/test/acceptance/tests/lms/test_certificate_web_view.py b/common/test/acceptance/tests/lms/test_certificate_web_view.py
index f6f5acb6e7..b547a9d3a6 100644
--- a/common/test/acceptance/tests/lms/test_certificate_web_view.py
+++ b/common/test/acceptance/tests/lms/test_certificate_web_view.py
@@ -206,7 +206,7 @@ class CertificateProgressPageTest(UniqueCourseTest):
Problems were added in the setUp
"""
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
# Navigate to Test Subsection in Test Section Section
self.course_nav.go_to_section('Test Section', 'Test Subsection')
diff --git a/common/test/acceptance/tests/lms/test_lms.py b/common/test/acceptance/tests/lms/test_lms.py
index 984403a83f..dfff902371 100644
--- a/common/test/acceptance/tests/lms/test_lms.py
+++ b/common/test/acceptance/tests/lms/test_lms.py
@@ -597,7 +597,7 @@ class HighLevelTabTest(UniqueCourseTest):
# Navigate to the course info page from the progress page
self.progress_page.visit()
- self.tab_nav.go_to_tab('Course Info')
+ self.tab_nav.go_to_tab('Home')
# Expect just one update
self.assertEqual(self.course_info_page.num_updates, 1)
@@ -667,13 +667,13 @@ class HighLevelTabTest(UniqueCourseTest):
def test_courseware_nav(self):
"""
- Navigate to a particular unit in the courseware.
+ Navigate to a particular unit in the course.
"""
- # Navigate to the courseware page from the info page
+ # Navigate to the course page from the info page
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
- # Check that the courseware navigation appears correctly
+ # Check that the course navigation appears correctly
EXPECTED_SECTIONS = {
'Test Section': ['Test Subsection'],
'Test Section 2': ['Test Subsection 2', 'Test Subsection 3']
@@ -862,7 +862,7 @@ class TooltipTest(UniqueCourseTest):
Verify that tooltips are displayed when you hover over the sequence nav bar.
"""
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
self.courseware_page.verify_tooltips_displayed()
@@ -1011,7 +1011,7 @@ class ProblemExecutionTest(UniqueCourseTest):
def test_python_execution_in_problem(self):
# Navigate to the problem page
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
self.course_nav.go_to_section('Test Section', 'Test Subsection')
problem_page = ProblemPage(self.browser)
@@ -1061,14 +1061,14 @@ class EntranceExamTest(UniqueCourseTest):
def test_entrance_exam_section(self):
"""
- Scenario: Any course that is enabled for an entrance exam, should have entrance exam chapter at courseware
+ Scenario: Any course that is enabled for an entrance exam, should have entrance exam chapter at course
page.
- Given that I am on the courseware page
- When I view the courseware that has an entrance exam
+ Given that I am on the course page
+ When I view the course that has an entrance exam
Then there should be an "Entrance Exam" chapter.'
"""
entrance_exam_link_selector = '.accordion .course-navigation .chapter .group-heading'
- # visit courseware page and make sure there is not entrance exam chapter.
+ # visit course page and make sure there is not entrance exam chapter.
self.courseware_page.visit()
self.courseware_page.wait_for_page()
self.assertFalse(element_has_text(
diff --git a/common/test/acceptance/tests/lms/test_lms_acid_xblock.py b/common/test/acceptance/tests/lms/test_lms_acid_xblock.py
index 14fd06b496..13ffbb9fa8 100644
--- a/common/test/acceptance/tests/lms/test_lms_acid_xblock.py
+++ b/common/test/acceptance/tests/lms/test_lms_acid_xblock.py
@@ -75,7 +75,7 @@ class XBlockAcidNoChildTest(XBlockAcidBase):
"""
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
acid_block = AcidView(self.browser, '.xblock-student_view[data-block-type=acid]')
self.validate_acid_block_view(acid_block)
@@ -119,7 +119,7 @@ class XBlockAcidChildTest(XBlockAcidBase):
"""
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
acid_parent_block = AcidView(self.browser, '.xblock-student_view[data-block-type=acid_parent]')
self.validate_acid_parent_block_view(acid_parent_block)
@@ -159,7 +159,7 @@ class XBlockAcidAsideTest(XBlockAcidBase):
"""
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
acid_aside = AcidView(self.browser, '.xblock_asides-v1-student_view[data-block-type=acid_aside]')
self.validate_acid_aside_view(acid_aside)
diff --git a/common/test/acceptance/tests/video/test_video_module.py b/common/test/acceptance/tests/video/test_video_module.py
index 6413686223..0ed1493e2c 100644
--- a/common/test/acceptance/tests/video/test_video_module.py
+++ b/common/test/acceptance/tests/video/test_video_module.py
@@ -132,7 +132,7 @@ class VideoBaseTest(UniqueCourseTest):
self.auth_page.visit()
self.user_info = self.auth_page.user_info
self.course_info_page.visit()
- self.tab_nav.go_to_tab('Courseware')
+ self.tab_nav.go_to_tab('Course')
def _navigate_to_courseware_video_and_render(self):
""" Wait for the video player to render """
diff --git a/lms/djangoapps/course_wiki/tests/tests.py b/lms/djangoapps/course_wiki/tests/tests.py
index c7d79bc8aa..2d4285899b 100644
--- a/lms/djangoapps/course_wiki/tests/tests.py
+++ b/lms/djangoapps/course_wiki/tests/tests.py
@@ -103,8 +103,8 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
"""
Ensure that the response has the course navigator.
"""
- self.assertContains(resp, "Course Info")
- self.assertContains(resp, "courseware")
+ self.assertContains(resp, "Home")
+ self.assertContains(resp, "Course")
@patch.dict("django.conf.settings.FEATURES", {'ALLOW_WIKI_ROOT_ACCESS': True})
def test_course_navigator(self):
diff --git a/lms/djangoapps/courseware/features/navigation.feature b/lms/djangoapps/courseware/features/navigation.feature
index 40a71d5615..98105e2a25 100644
--- a/lms/djangoapps/courseware/features/navigation.feature
+++ b/lms/djangoapps/courseware/features/navigation.feature
@@ -24,5 +24,5 @@ Feature: LMS.Navigate Course
Given I am viewing a course with multiple sections
When I navigate to a section
And I see the content of the section
- And I return to the courseware
+ And I return to the course
Then I see that I was most recently in the subsection
diff --git a/lms/djangoapps/courseware/features/navigation.py b/lms/djangoapps/courseware/features/navigation.py
index 4520b410b0..7aa4006d54 100644
--- a/lms/djangoapps/courseware/features/navigation.py
+++ b/lms/djangoapps/courseware/features/navigation.py
@@ -1,5 +1,6 @@
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
+# pylint: disable=unused-argument
from lettuce import world, step
from common import course_location
@@ -127,11 +128,12 @@ def then_i_see_the_content_of_the_sequence_item(step):
wait_for_problem('Problem 6')
-@step(u'I return to the courseware')
-def and_i_return_to_the_courseware(step):
+@step(u'I return to the course')
+def and_i_return_to_the_course(step):
world.visit('/')
world.click_link("View Course")
- world.click_link("Courseware")
+ course = 'a[href*="/courseware"]'
+ world.css_click(course)
@step(u'I see that I was most recently in the subsection')
diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py
index c4ddb6787e..721c967be0 100644
--- a/lms/djangoapps/courseware/tabs.py
+++ b/lms/djangoapps/courseware/tabs.py
@@ -28,7 +28,7 @@ class CoursewareTab(EnrolledTab):
The main courseware view.
"""
type = 'courseware'
- title = ugettext_noop('Courseware')
+ title = ugettext_noop('Course')
priority = 10
view_name = 'courseware'
is_movable = False
@@ -40,7 +40,7 @@ class CourseInfoTab(CourseTab):
The course info view.
"""
type = 'course_info'
- title = ugettext_noop('Course Info')
+ title = ugettext_noop('Home')
priority = 20
view_name = 'info'
tab_id = 'info'
diff --git a/lms/djangoapps/courseware/tests/test_about.py b/lms/djangoapps/courseware/tests/test_about.py
index a26ccd8490..de00034ce3 100644
--- a/lms/djangoapps/courseware/tests/test_about.py
+++ b/lms/djangoapps/courseware/tests/test_about.py
@@ -105,7 +105,7 @@ class AboutTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase, EventTrackingT
resp = self.client.get(url)
self.assertEqual(resp.status_code, 200)
self.assertIn("You are enrolled in this course", resp.content)
- self.assertIn("View Courseware", resp.content)
+ self.assertIn("View Course", resp.content)
@override_settings(COURSE_ABOUT_VISIBILITY_PERMISSION="see_about_page")
def test_visible_about_page_settings(self):
@@ -478,7 +478,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
resp = self.client.get(url)
self.assertEqual(resp.status_code, 200)
self.assertIn("You are enrolled in this course", resp.content)
- self.assertIn("View Courseware", resp.content)
+ self.assertIn("View Course", resp.content)
self.assertNotIn("Add buyme to Cart ($10 USD)", resp.content)
def test_closed_enrollment(self):
diff --git a/lms/djangoapps/courseware/tests/test_tabs.py b/lms/djangoapps/courseware/tests/test_tabs.py
index 149bcbcdae..70c6d49858 100644
--- a/lms/djangoapps/courseware/tests/test_tabs.py
+++ b/lms/djangoapps/courseware/tests/test_tabs.py
@@ -483,9 +483,10 @@ class TabListTestCase(TabTestCase):
[{'type': CoursewareTab.type}],
# missing course_info
[{'type': CoursewareTab.type}, {'type': 'discussion', 'name': 'fake_name'}],
+ [{'type': 'unknown_type'}],
# incorrect order
- [{'type': CourseInfoTab.type, 'name': 'fake_name'}, {'type': CoursewareTab.type}],
- [{'type': 'unknown_type'}]
+ [{'type': 'discussion', 'name': 'fake_name'},
+ {'type': CourseInfoTab.type, 'name': 'fake_name'}, {'type': CoursewareTab.type}],
]
# tab types that should appear only once
diff --git a/lms/djangoapps/lms_xblock/mixin.py b/lms/djangoapps/lms_xblock/mixin.py
index a05fe5a8ec..e4eb865363 100644
--- a/lms/djangoapps/lms_xblock/mixin.py
+++ b/lms/djangoapps/lms_xblock/mixin.py
@@ -42,7 +42,7 @@ class LmsBlockMixin(XBlockMixin):
scope=Scope.settings,
)
chrome = String(
- display_name=_("Courseware Chrome"),
+ display_name=_("Course Chrome"),
# Translators: DO NOT translate the words in quotes here, they are
# specific words for the acceptable values.
help=_("Enter the chrome, or navigation tools, to use for the XBlock in the LMS. Valid values are: \n"
@@ -55,7 +55,7 @@ class LmsBlockMixin(XBlockMixin):
)
default_tab = String(
display_name=_("Default Tab"),
- help=_("Enter the tab that is selected in the XBlock. If not set, the Courseware tab is selected."),
+ help=_("Enter the tab that is selected in the XBlock. If not set, the Course tab is selected."),
scope=Scope.settings,
default=None,
)
diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html
index d376099e85..b6cedfda38 100644
--- a/lms/templates/courseware/course_about.html
+++ b/lms/templates/courseware/course_about.html
@@ -126,7 +126,7 @@ from openedx.core.lib.courses import course_image_url
${_("You are enrolled in this course")}
%if show_courseware_link:
- ${_("View Courseware")}
+ ${_("View Course")}
%endif