diff --git a/cms/djangoapps/auth/authz.py b/cms/djangoapps/auth/authz.py index c4d1a9ddffb3..429a11d9d912 100644 --- a/cms/djangoapps/auth/authz.py +++ b/cms/djangoapps/auth/authz.py @@ -217,11 +217,11 @@ def is_user_in_creator_group(user): return True # On edx, we only allow edX staff to create courses. This may be relaxed in the future. - if settings.MITX_FEATURES.get('DISABLE_COURSE_CREATION', False): + if settings.FEATURES.get('DISABLE_COURSE_CREATION', False): return False # Feature flag for using the creator group setting. Will be removed once the feature is complete. - if settings.MITX_FEATURES.get('ENABLE_CREATOR_GROUP', False): + if settings.FEATURES.get('ENABLE_CREATOR_GROUP', False): return user.groups.filter(name=COURSE_CREATOR_GROUP_NAME).count() > 0 return True diff --git a/cms/djangoapps/auth/tests/test_authz.py b/cms/djangoapps/auth/tests/test_authz.py index 69050539cf58..543c8ba446ec 100644 --- a/cms/djangoapps/auth/tests/test_authz.py +++ b/cms/djangoapps/auth/tests/test_authz.py @@ -33,7 +33,7 @@ def test_creator_group_not_enabled(self): def test_creator_group_enabled_but_empty(self): """ Tests creator group feature on, but group empty. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.assertFalse(is_user_in_creator_group(self.user)) # Make user staff. This will cause is_user_in_creator_group to return True. @@ -42,7 +42,7 @@ def test_creator_group_enabled_but_empty(self): def test_creator_group_enabled_nonempty(self): """ Tests creator group feature on, user added. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.assertTrue(add_user_to_creator_group(self.admin, self.user)) self.assertTrue(is_user_in_creator_group(self.user)) @@ -70,7 +70,7 @@ def test_add_user_not_active(self): def test_course_creation_disabled(self): """ Tests that the COURSE_CREATION_DISABLED flag overrides course creator group settings. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', + with mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True, "ENABLE_CREATOR_GROUP": True}): # Add user to creator group. self.assertTrue(add_user_to_creator_group(self.admin, self.user)) @@ -129,7 +129,7 @@ def setUp(self): """ Test case setup """ self.creator = User.objects.create_user('testcreator', 'testcreator+courses@edx.org', 'foo') self.staff = User.objects.create_user('teststaff', 'teststaff+courses@edx.org', 'foo') - self.location = 'i4x', 'mitX', '101', 'course', 'test' + self.location = 'i4x', 'edX', '101', 'course', 'test' def test_add_user_to_course_group(self): """ @@ -181,7 +181,7 @@ def test_get_staff(self): create_all_course_groups(self.creator, self.location) add_user_to_course_group(self.creator, self.staff, self.location, STAFF_ROLE_NAME) - location2 = 'i4x', 'mitX', '103', 'course', 'test2' + location2 = 'i4x', 'edX', '103', 'course', 'test2' staff2 = User.objects.create_user('teststaff2', 'teststaff2+courses@edx.org', 'foo') create_all_course_groups(self.creator, location2) add_user_to_course_group(self.creator, staff2, location2, STAFF_ROLE_NAME) @@ -193,7 +193,7 @@ def test_get_instructor(self): create_all_course_groups(self.creator, self.location) add_user_to_course_group(self.creator, self.staff, self.location, STAFF_ROLE_NAME) - location2 = 'i4x', 'mitX', '103', 'course', 'test2' + location2 = 'i4x', 'edX', '103', 'course', 'test2' creator2 = User.objects.create_user('testcreator2', 'testcreator2+courses@edx.org', 'foo') staff2 = User.objects.create_user('teststaff2', 'teststaff2+courses@edx.org', 'foo') create_all_course_groups(creator2, location2) diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 4a500c9e1680..583c871521d1 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -132,7 +132,7 @@ def create_studio_user( def fill_in_course_info( name='Robot Super Course', - org='MITx', + org='edX', num='101', run='2013_Spring'): world.css_fill('.new-course-name', name) @@ -166,7 +166,7 @@ def add_course_author(user, course): def create_a_course(): - course = world.CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + course = world.CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') world.scenario_dict['COURSE'] = course user = world.scenario_dict.get("USER") diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index 5864539ddd40..49f3a69b33a1 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -150,7 +150,7 @@ def i_see_new_course_image(_step): images = world.css_find(img_css) assert len(images) == 1 img = images[0] - expected_src = '/c4x/MITx/999/asset/image.jpg' + expected_src = '/c4x/edX/999/asset/image.jpg' # Don't worry about the domain in the URL success_func = lambda _: img['src'].endswith(expected_src) @@ -160,7 +160,7 @@ def i_see_new_course_image(_step): @step('the image URL should be present in the field') def image_url_present(_step): field_css = '#course-image-url' - expected_value = '/c4x/MITx/999/asset/image.jpg' + expected_value = '/c4x/edX/999/asset/image.jpg' assert world.css_value(field_css) == expected_value diff --git a/cms/djangoapps/contentstore/features/course-updates.feature b/cms/djangoapps/contentstore/features/course-updates.feature index 152da9c3499f..e538dba4e143 100644 --- a/cms/djangoapps/contentstore/features/course-updates.feature +++ b/cms/djangoapps/contentstore/features/course-updates.feature @@ -60,22 +60,22 @@ Feature: CMS.Course updates And I go to the course updates page When I add a new update with the text "" # Can only do partial text matches because of the quotes with in quotes (and regexp step matching). - Then I should see the update "/c4x/MITx/999/asset/my_img.jpg" + Then I should see the update "/c4x/edX/999/asset/my_img.jpg" And I change the update from "/static/my_img.jpg" to "" - Then I should see the update "/c4x/MITx/999/asset/modified.jpg" + Then I should see the update "/c4x/edX/999/asset/modified.jpg" And when I reload the page - Then I should see the update "/c4x/MITx/999/asset/modified.jpg" + Then I should see the update "/c4x/edX/999/asset/modified.jpg" Scenario: Static links are rewritten when previewing handouts Given I have opened a new course in Studio And I go to the course updates page When I modify the handout to "
" # Can only do partial text matches because of the quotes with in quotes (and regexp step matching). - Then I see the handout "/c4x/MITx/999/asset/my_img.jpg" + Then I see the handout "/c4x/edX/999/asset/my_img.jpg" And I change the handout from "/static/my_img.jpg" to "" - Then I see the handout "/c4x/MITx/999/asset/modified.jpg" + Then I see the handout "/c4x/edX/999/asset/modified.jpg" And when I reload the page - Then I see the handout "/c4x/MITx/999/asset/modified.jpg" + Then I see the handout "/c4x/edX/999/asset/modified.jpg" Scenario: Users cannot save handouts with bad html until edit or update it properly Given I have opened a new course in Studio diff --git a/cms/djangoapps/contentstore/features/signup.feature b/cms/djangoapps/contentstore/features/signup.feature index d8912c3f6101..a5d787e78ff9 100644 --- a/cms/djangoapps/contentstore/features/signup.feature +++ b/cms/djangoapps/contentstore/features/signup.feature @@ -14,11 +14,11 @@ Feature: CMS.Sign in Scenario: Login with a valid redirect Given I have opened a new course in Studio And I am not logged in - And I visit the url "/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" - And I should see that the path is "/signin?next=/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" + And I visit the url "/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" + And I should see that the path is "/signin?next=/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" When I fill in and submit the signin form And I wait for "2" seconds - Then I should see that the path is "/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" + Then I should see that the path is "/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" Scenario: Login with an invalid redirect Given I have opened a new course in Studio diff --git a/cms/djangoapps/contentstore/features/textbooks.feature b/cms/djangoapps/contentstore/features/textbooks.feature index 010e4902569c..23c9209aba33 100644 --- a/cms/djangoapps/contentstore/features/textbooks.feature +++ b/cms/djangoapps/contentstore/features/textbooks.feature @@ -19,9 +19,9 @@ Feature: CMS.Textbooks And I upload the textbook "textbook.pdf" And I wait for "2" seconds And I save the textbook - Then I should see a textbook named "Economics" with a chapter path containing "/c4x/MITx/999/asset/textbook.pdf" + Then I should see a textbook named "Economics" with a chapter path containing "/c4x/edX/999/asset/textbook.pdf" And I reload the page - Then I should see a textbook named "Economics" with a chapter path containing "/c4x/MITx/999/asset/textbook.pdf" + Then I should see a textbook named "Economics" with a chapter path containing "/c4x/edX/999/asset/textbook.pdf" Scenario: Create a textbook with multiple chapters Given I have opened a new course in Studio diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index c68636b58302..703a0f9ade87 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -178,7 +178,7 @@ def open_course_with_locked(step, lock_state): @step(u'Then the asset is (viewable|protected)$') def view_asset(_step, status): - url = django_url('/c4x/MITx/999/asset/asset.html') + url = django_url('/c4x/edX/999/asset/asset.html') if status == 'viewable': expected_text = 'test file' else: diff --git a/cms/djangoapps/contentstore/management/commands/clone_course.py b/cms/djangoapps/contentstore/management/commands/clone_course.py index 5ad0da09d8f4..04f0c890879d 100644 --- a/cms/djangoapps/contentstore/management/commands/clone_course.py +++ b/cms/djangoapps/contentstore/management/commands/clone_course.py @@ -11,7 +11,7 @@ # -# To run from command line: rake cms:clone SOURCE_LOC=MITx/111/Foo1 DEST_LOC=MITx/135/Foo3 +# To run from command line: rake cms:clone SOURCE_LOC=edX/111/Foo1 DEST_LOC=edX/135/Foo3 # class Command(BaseCommand): """Clone a MongoDB-backed course to another location""" diff --git a/cms/djangoapps/contentstore/management/commands/delete_course.py b/cms/djangoapps/contentstore/management/commands/delete_course.py index 085fce5fe5d8..2f2aba12e5b3 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/delete_course.py @@ -7,7 +7,7 @@ # -# To run from command line: rake cms:delete_course LOC=MITx/111/Foo1 +# To run from command line: rake cms:delete_course LOC=edX/111/Foo1 # class Command(BaseCommand): help = '''Delete a MongoDB backed course''' @@ -23,7 +23,7 @@ def handle(self, *args, **options): commit = args[1] == 'commit' if commit: - print 'Actually going to delete the course from DB....' + print('Actually going to delete the course from DB....') if query_yes_no("Deleting course {0}. Confirm?".format(course_id), default="no"): if query_yes_no("Are you sure. This action cannot be undone!", default="no"): diff --git a/cms/djangoapps/contentstore/tests/test_checklists.py b/cms/djangoapps/contentstore/tests/test_checklists.py index 864fe23c8333..8eb8adb016e5 100644 --- a/cms/djangoapps/contentstore/tests/test_checklists.py +++ b/cms/djangoapps/contentstore/tests/test_checklists.py @@ -14,7 +14,7 @@ class ChecklistTestCase(CourseTestCase): def setUp(self): """ Creates the test course. """ super(ChecklistTestCase, self).setUp() - self.course = CourseFactory.create(org='mitX', number='333', display_name='Checklists Course') + self.course = CourseFactory.create(org='edX', number='333', display_name='Checklists Course') self.location = loc_mapper().translate_location(self.course.location.course_id, self.course.location, False, True) self.checklists_url = self.location.url_reverse('checklists/', '') @@ -42,7 +42,7 @@ def test_get_checklists(self): response = self.client.get(self.checklists_url) self.assertContains(response, "Getting Started With Studio") # Verify expansion of action URL happened. - self.assertContains(response, 'course_team/mitX.333.Checklists_Course') + self.assertContains(response, 'course_team/edX.333.Checklists_Course') # Verify persisted checklist does NOT have expanded URL. checklist_0 = self.get_persisted_checklists()[0] self.assertEqual('ManageUsers', get_action_url(checklist_0, 0)) @@ -137,8 +137,8 @@ def test_expansion(checklist, index, stored, expanded): # Verify no side effect in the original list. self.assertEqual(get_action_url(checklist, index), stored) - test_expansion(self.course.checklists[0], 0, 'ManageUsers', '/course_team/mitX.333.Checklists_Course/branch/draft/block/Checklists_Course') - test_expansion(self.course.checklists[1], 1, 'CourseOutline', '/course/mitX.333.Checklists_Course/branch/draft/block/Checklists_Course') + test_expansion(self.course.checklists[0], 0, 'ManageUsers', '/course_team/edX.333.Checklists_Course/branch/draft/block/Checklists_Course') + test_expansion(self.course.checklists[1], 1, 'CourseOutline', '/course/edX.333.Checklists_Course/branch/draft/block/Checklists_Course') test_expansion(self.course.checklists[2], 0, 'http://help.edge.edx.org/', 'http://help.edge.edx.org/') diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 0aaf2dfb2992..38c8effcbdbb 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -447,7 +447,7 @@ def tab_matches(tab): def _get_tab_locator(self, course, tab): """ Returns the locator for a given tab. """ - tab_location = 'i4x://MITx/999/static_tab/{0}'.format(tab['url_slug']) + tab_location = 'i4x://edX/999/static_tab/{0}'.format(tab['url_slug']) return loc_mapper().translate_location( course.location.course_id, Location(tab_location), False, True ) @@ -724,7 +724,7 @@ def test_empty_trashcan(self): def test_clone_course(self): course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', 'run': '2013_Spring' @@ -735,7 +735,7 @@ def test_clone_course(self): import_from_xml(module_store, 'common/test/data/', ['toy']) source_course_id = 'edX/toy/2012_Fall' - dest_course_id = 'MITx/999/2013_Spring' + dest_course_id = 'edX/999/2013_Spring' source_location = CourseDescriptor.id_to_location(source_course_id) dest_location = CourseDescriptor.id_to_location(dest_course_id) @@ -807,7 +807,7 @@ def test_clone_course(self): def test_portable_link_rewrites_during_clone_course(self): course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', 'run': '2013_Spring' @@ -819,7 +819,7 @@ def test_portable_link_rewrites_during_clone_course(self): import_from_xml(module_store, 'common/test/data/', ['toy']) source_course_id = 'edX/toy/2012_Fall' - dest_course_id = 'MITx/999/2013_Spring' + dest_course_id = 'edX/999/2013_Spring' source_location = CourseDescriptor.id_to_location(source_course_id) dest_location = CourseDescriptor.id_to_location(dest_course_id) @@ -854,9 +854,9 @@ def test_illegal_draft_crud_ops(self): draft_store = modulestore('draft') direct_store = modulestore('direct') - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') - location = Location('i4x://MITx/999/chapter/neuvo') + location = Location('i4x://edX/999/chapter/neuvo') # Ensure draft mongo store does not allow us to create chapters either directly or via convert to draft self.assertRaises(InvalidVersionError, draft_store.create_and_save_xmodule, location) direct_store.create_and_save_xmodule(location) @@ -866,7 +866,7 @@ def test_illegal_draft_crud_ops(self): # taking advantage of update_children and other functions never checking that the ids are valid self.assertRaises(InvalidVersionError, draft_store.update_children, location, - ['i4x://MITx/999/problem/doesntexist']) + ['i4x://edX/999/problem/doesntexist']) self.assertRaises(InvalidVersionError, draft_store.update_metadata, location, {'due': datetime.datetime.now(UTC)}) @@ -906,7 +906,7 @@ def test_delete_course(self): import_from_xml(module_store, 'common/test/data/', ['toy'], static_content_store=content_store) - location = CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course').location + location = CourseFactory.create(org='edX', course='999', display_name='Robot Super Course').location # get a vertical (and components in it) to put into 'draft' vertical = module_store.get_item(Location(['i4x', 'edX', 'toy', @@ -1389,7 +1389,7 @@ def setUp(self): self.client.login(username=uname, password=password) self.course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', 'run': '2013_Spring' @@ -1506,31 +1506,31 @@ def test_create_course_with_bad_organization(self): def test_create_course_with_course_creation_disabled_staff(self): """Test new course creation -- course creation disabled, but staff access.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'DISABLE_COURSE_CREATION': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True}): self.assert_created_course() def test_create_course_with_course_creation_disabled_not_staff(self): """Test new course creation -- error path for course creation disabled, not staff access.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'DISABLE_COURSE_CREATION': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True}): self.user.is_staff = False self.user.save() self.assert_course_permission_denied() def test_create_course_no_course_creators_staff(self): """Test new course creation -- course creation group enabled, staff, group is empty.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_CREATOR_GROUP': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_CREATOR_GROUP': True}): self.assert_created_course() def test_create_course_no_course_creators_not_staff(self): """Test new course creation -- error path for course creator group enabled, not staff, group is empty.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.user.is_staff = False self.user.save() self.assert_course_permission_denied() def test_create_course_with_course_creator(self): """Test new course creation -- use course creator group""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): add_user_to_creator_group(self.user, self.user) self.assert_created_course() @@ -1578,13 +1578,13 @@ def test_course_index_view_with_course(self): def test_course_overview_view_with_course(self): """Test viewing the course overview page with an existing course""" - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') - loc = Location(['i4x', 'MITx', '999', 'course', Location.clean('Robot Super Course'), None]) + loc = Location(['i4x', 'edX', '999', 'course', Location.clean('Robot Super Course'), None]) resp = self._show_course_overview(loc) self.assertContains( resp, - '
', + '
', status_code=200, html=True ) @@ -1606,7 +1606,7 @@ def test_create_item(self): data = parse_json(resp) self.assertRegexpMatches( data['locator'], - r"^MITx.999.Robot_Super_Course/branch/draft/block/chapter([0-9]|[a-f]){3}$" + r"^edX.999.Robot_Super_Course/branch/draft/block/chapter([0-9]|[a-f]){3}$" ) def test_capa_module(self): @@ -1707,7 +1707,7 @@ def delete_item(category, name): def test_import_into_new_course_id(self): module_store = modulestore('direct') - target_location = Location(['i4x', 'MITx', '999', 'course', '2013_Spring']) + target_location = Location(['i4x', 'edX', '999', 'course', '2013_Spring']) course_data = { 'org': target_location.org, @@ -1738,8 +1738,8 @@ def test_import_into_new_course_id(self): self.assertEquals(len(course_module.pdf_textbooks), 1) self.assertEquals(len(course_module.pdf_textbooks[0]["chapters"]), 2) - self.assertEquals(course_module.pdf_textbooks[0]["chapters"][0]["url"], '/c4x/MITx/999/asset/Chapter1.pdf') - self.assertEquals(course_module.pdf_textbooks[0]["chapters"][1]["url"], '/c4x/MITx/999/asset/Chapter2.pdf') + self.assertEquals(course_module.pdf_textbooks[0]["chapters"][0]["url"], '/c4x/edX/999/asset/Chapter1.pdf') + self.assertEquals(course_module.pdf_textbooks[0]["chapters"][1]["url"], '/c4x/edX/999/asset/Chapter2.pdf') # check that URL slug got updated to new course slug self.assertEquals(course_module.wiki_slug, '999') @@ -2004,7 +2004,7 @@ def _course_factory_create_course(): """ Creates a course via the CourseFactory and returns the locator for it. """ - course = CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + course = CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') return loc_mapper().translate_location(course.location.course_id, course.location, False, True) diff --git a/cms/djangoapps/contentstore/tests/test_core_caching.py b/cms/djangoapps/contentstore/tests/test_core_caching.py index 34ed24699d04..abe7c69e1657 100644 --- a/cms/djangoapps/contentstore/tests/test_core_caching.py +++ b/cms/djangoapps/contentstore/tests/test_core_caching.py @@ -15,9 +15,9 @@ def get_id(self): class CachingTestCase(TestCase): # Tests for https://edx.lighthouseapp.com/projects/102637/tickets/112-updating-asset-does-not-refresh-the-cached-copy - unicodeLocation = Location(u'c4x', u'mitX', u'800', u'thumbnail', u'monsters.jpg') + unicodeLocation = Location(u'c4x', u'edX', u'800', u'thumbnail', u'monsters.jpg') # Note that some of the parts are strings instead of unicode strings - nonUnicodeLocation = Location('c4x', u'mitX', u'800', 'thumbnail', 'monsters.jpg') + nonUnicodeLocation = Location('c4x', u'edX', u'800', 'thumbnail', 'monsters.jpg') mockAsset = Content(unicodeLocation, 'my content') def test_put_and_get(self): diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index 792b28fe4da6..1801e7c8dc90 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -106,7 +106,7 @@ def test_update_and_fetch(self): def test_marketing_site_fetch(self): settings_details_url = self.course_locator.url_reverse('settings/details/') - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): response = self.client.get_html(settings_details_url) self.assertNotContains(response, "Course Summary Page") self.assertNotContains(response, "Send a note to students via email") @@ -127,7 +127,7 @@ def test_marketing_site_fetch(self): def test_regular_site_fetch(self): settings_details_url = self.course_locator.url_reverse('settings/details/') - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': False}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}): response = self.client.get_html(settings_details_url) self.assertContains(response, "Course Summary Page") self.assertContains(response, "Send a note to students via email") diff --git a/cms/djangoapps/contentstore/tests/test_i18n.py b/cms/djangoapps/contentstore/tests/test_i18n.py index c7e32a868945..099fc004c0ba 100644 --- a/cms/djangoapps/contentstore/tests/test_i18n.py +++ b/cms/djangoapps/contentstore/tests/test_i18n.py @@ -37,7 +37,7 @@ def setUp(self): self.user.save() self.course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', } diff --git a/cms/djangoapps/contentstore/tests/test_import_export.py b/cms/djangoapps/contentstore/tests/test_import_export.py index 85df894cd414..95da85e07484 100644 --- a/cms/djangoapps/contentstore/tests/test_import_export.py +++ b/cms/djangoapps/contentstore/tests/test_import_export.py @@ -252,7 +252,7 @@ def test_export_failure_top_level(self): Export failure. """ ItemFactory.create(parent_location=self.course.location, category='aawefawef') - self._verify_export_failure('/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course') + self._verify_export_failure('/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course') def test_export_failure_subsection_level(self): """ @@ -263,7 +263,7 @@ def test_export_failure_subsection_level(self): parent_location=vertical.location, category='aawefawef' ) - self._verify_export_failure(u'/unit/MITx.999.Robot_Super_Course/branch/draft/block/foo') + self._verify_export_failure(u'/unit/edX.999.Robot_Super_Course/branch/draft/block/foo') def _verify_export_failure(self, expectedText): """ Export failure helper method. """ diff --git a/cms/djangoapps/contentstore/tests/test_request_event.py b/cms/djangoapps/contentstore/tests/test_request_event.py index 0126de66c619..166187ee587e 100644 --- a/cms/djangoapps/contentstore/tests/test_request_event.py +++ b/cms/djangoapps/contentstore/tests/test_request_event.py @@ -20,7 +20,7 @@ def test_post_answers_to_log(self): {"event": "my_event", "event_type": "my_event_type", "page": "my_page"}, {"event": "{'json': 'object'}", "event_type": unichr(512), "page": "my_page"} ] - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): for request_params in requests: response = self.client.post(reverse(cms_user_track), request_params) self.assertEqual(response.status_code, 204) @@ -34,7 +34,7 @@ def test_get_answers_to_log(self): {"event": "my_event", "event_type": "my_event_type", "page": "my_page"}, {"event": "{'json': 'object'}", "event_type": unichr(512), "page": "my_page"} ] - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): for request_params in requests: response = self.client.get(reverse(cms_user_track), request_params) self.assertEqual(response.status_code, 204) diff --git a/cms/djangoapps/contentstore/tests/test_transcripts.py b/cms/djangoapps/contentstore/tests/test_transcripts.py index 4c481383ab5f..2d263c9fe447 100644 --- a/cms/djangoapps/contentstore/tests/test_transcripts.py +++ b/cms/djangoapps/contentstore/tests/test_transcripts.py @@ -31,7 +31,7 @@ class Basetranscripts(CourseTestCase): """Base test class for transcripts tests.""" - org = 'MITx' + org = 'edX' number = '999' def clear_subs_content(self): diff --git a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py index 515fccd675b7..d2cba6d54fb3 100644 --- a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py +++ b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py @@ -77,7 +77,7 @@ def test_generate_subs_decrease_speed_2(self): class TestSaveSubsToStore(ModuleStoreTestCase): """Tests for `save_subs_to_store` function.""" - org = 'MITx' + org = 'edX' number = '999' display_name = 'Test course' @@ -161,7 +161,7 @@ def tearDown(self): class TestDownloadYoutubeSubs(ModuleStoreTestCase): """Tests for `download_youtube_subs` function.""" - org = 'MITx' + org = 'edX' number = '999' display_name = 'Test course' diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index 5311396f2fb0..4f47a06bc87a 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -23,38 +23,38 @@ class LMSLinksTestCase(TestCase): def about_page_test(self): """ Get URL for about page, no marketing site """ # default for ENABLE_MKTG_SITE is False. - self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/mitX/101/test/about") + self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'dummy-root'}) def about_page_marketing_site_test(self): """ Get URL for about page, marketing root present. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//dummy-root/courses/mitX/101/test/about") - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': False}): - self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//dummy-root/courses/edX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}): + self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'http://www.dummy'}) def about_page_marketing_site_remove_http_test(self): """ Get URL for about page, marketing root present, remove http://. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'https://www.dummy'}) def about_page_marketing_site_remove_https_test(self): """ Get URL for about page, marketing root present, remove https://. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'www.dummyhttps://x'}) def about_page_marketing_site_https__edge_test(self): """ Get URL for about page, only remove https:// at the beginning of the string. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//www.dummyhttps://x/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//www.dummyhttps://x/courses/edX/101/test/about") @override_settings(MKTG_URLS={}) def about_page_marketing_urls_not_set_test(self): """ Error case. ENABLE_MKTG_SITE is True, but there is either no MKTG_URLS, or no MKTG_URLS Root property. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): self.assertEquals(self.get_about_page_link(), None) @override_settings(LMS_BASE=None) @@ -64,27 +64,27 @@ def about_page_no_lms_base_test(self): def get_about_page_link(self): """ create mock course and return the about page link """ - location = 'i4x', 'mitX', '101', 'course', 'test' + location = 'i4x', 'edX', '101', 'course', 'test' return utils.get_lms_link_for_about_page(location) def lms_link_test(self): """ Tests get_lms_link_for_item. """ - location = 'i4x', 'mitX', '101', 'vertical', 'contacting_us' - link = utils.get_lms_link_for_item(location, False, "mitX/101/test") - self.assertEquals(link, "//localhost:8000/courses/mitX/101/test/jump_to/i4x://mitX/101/vertical/contacting_us") - link = utils.get_lms_link_for_item(location, True, "mitX/101/test") + location = 'i4x', 'edX', '101', 'vertical', 'contacting_us' + link = utils.get_lms_link_for_item(location, False, "edX/101/test") + self.assertEquals(link, "//localhost:8000/courses/edX/101/test/jump_to/i4x://edX/101/vertical/contacting_us") + link = utils.get_lms_link_for_item(location, True, "edX/101/test") self.assertEquals( link, - "//preview/courses/mitX/101/test/jump_to/i4x://mitX/101/vertical/contacting_us" + "//preview/courses/edX/101/test/jump_to/i4x://edX/101/vertical/contacting_us" ) # If no course_id is passed in, it is obtained from the location. This is the case for # Studio dashboard. - location = 'i4x', 'mitX', '101', 'course', 'test' + location = 'i4x', 'edX', '101', 'course', 'test' link = utils.get_lms_link_for_item(location) self.assertEquals( link, - "//localhost:8000/courses/mitX/101/test/jump_to/i4x://mitX/101/course/test" + "//localhost:8000/courses/edX/101/test/jump_to/i4x://edX/101/course/test" ) diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 0e716cc878bb..7d19fa109e4d 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -85,7 +85,7 @@ def setUp(self): self.client.login(username=uname, password=password) self.course = CourseFactory.create( - org='MITx', + org='edX', number='999', display_name='Robot Super Course', ) @@ -111,7 +111,7 @@ def createNonStaffAuthedUserClient(self): client = Client() client.login(username=uname, password=password) return client, nonstaff - + def populateCourse(self): """ Add 2 chapters, 4 sections, 8 verticals, 16 problems to self.course (branching 2) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 0a2ecbd37be0..cf4bffc503b3 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -136,7 +136,7 @@ def get_lms_link_for_item(location, preview=False, course_id=None): if settings.LMS_BASE is not None: if preview: - lms_base = settings.MITX_FEATURES.get('PREVIEW_LMS_BASE') + lms_base = settings.FEATURES.get('PREVIEW_LMS_BASE') else: lms_base = settings.LMS_BASE @@ -155,7 +155,7 @@ def get_lms_link_for_about_page(location): """ Returns the url to the course about page from the location tuple. """ - if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE', False): + if settings.FEATURES.get('ENABLE_MKTG_SITE', False): if not hasattr(settings, 'MKTG_URLS'): log.exception("ENABLE_MKTG_SITE is True, but MKTG_URLS is not defined.") about_base = None diff --git a/cms/djangoapps/contentstore/views/assets.py b/cms/djangoapps/contentstore/views/assets.py index 7f2fab96f3ea..ed3588d8958e 100644 --- a/cms/djangoapps/contentstore/views/assets.py +++ b/cms/djangoapps/contentstore/views/assets.py @@ -7,7 +7,7 @@ from django_future.csrf import ensure_csrf_cookie from django.views.decorators.http import require_POST -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from cache_toolbox.core import del_cached_content from xmodule.contentstore.django import contentstore diff --git a/cms/djangoapps/contentstore/views/checklist.py b/cms/djangoapps/contentstore/views/checklist.py index 61c6c672a73f..7326c3d16b53 100644 --- a/cms/djangoapps/contentstore/views/checklist.py +++ b/cms/djangoapps/contentstore/views/checklist.py @@ -6,7 +6,7 @@ from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_http_methods from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from django.http import HttpResponseNotFound from django.core.exceptions import PermissionDenied from xmodule.modulestore.django import loc_mapper diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 3742c7af203e..0a3404568723 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -9,7 +9,7 @@ from django_future.csrf import ensure_csrf_cookie from django.conf import settings from xmodule.modulestore.exceptions import ItemNotFoundError -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.modulestore.django import modulestore from xmodule.util.date_utils import get_default_time_display @@ -256,7 +256,7 @@ def unit_handler(request, tag=None, course_id=None, branch=None, version_guid=No break index = index + 1 - preview_lms_base = settings.MITX_FEATURES.get('PREVIEW_LMS_BASE') + preview_lms_base = settings.FEATURES.get('PREVIEW_LMS_BASE') preview_lms_link = ( '//{preview_lms_base}/courses/{org}/{course}/' diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 044ef79473bf..a5fd0e4ced2a 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -16,7 +16,7 @@ from django.core.urlresolvers import reverse from django.http import HttpResponseBadRequest, HttpResponseNotFound from util.json_request import JsonResponse -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.error_module import ErrorDescriptor from xmodule.modulestore.django import modulestore, loc_mapper @@ -423,7 +423,7 @@ def settings_handler(request, tag=None, course_id=None, branch=None, version_gui 'lms_link_for_about_page': utils.get_lms_link_for_about_page(course_old_location), 'course_image_url': utils.course_image_url(course_module), 'details_url': locator.url_reverse('/settings/details/'), - 'about_page_editable': not settings.MITX_FEATURES.get( + 'about_page_editable': not settings.FEATURES.get( 'ENABLE_MKTG_SITE', False ), 'upload_asset_url': upload_asset_url @@ -822,9 +822,9 @@ def _get_course_creator_status(user): """ if user.is_staff: course_creator_status = 'granted' - elif settings.MITX_FEATURES.get('DISABLE_COURSE_CREATION', False): + elif settings.FEATURES.get('DISABLE_COURSE_CREATION', False): course_creator_status = 'disallowed_for_this_site' - elif settings.MITX_FEATURES.get('ENABLE_CREATOR_GROUP', False): + elif settings.FEATURES.get('ENABLE_CREATOR_GROUP', False): course_creator_status = get_course_creator_status(user) if course_creator_status is None: # User not grandfathered in as an existing user, has not previously visited the dashboard page. diff --git a/cms/djangoapps/contentstore/views/dev.py b/cms/djangoapps/contentstore/views/dev.py index 0fcc355c117b..6bda59abddff 100644 --- a/cms/djangoapps/contentstore/views/dev.py +++ b/cms/djangoapps/contentstore/views/dev.py @@ -4,7 +4,7 @@ in a 404 error. """ # pylint: disable=W0613 -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response def dev_mode(request): diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index 56499a69acb9..9983987d29ef 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -2,7 +2,7 @@ from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound) -from mitxmako.shortcuts import render_to_string, render_to_response +from edxmako.shortcuts import render_to_string, render_to_response import functools import json diff --git a/cms/djangoapps/contentstore/views/helpers.py b/cms/djangoapps/contentstore/views/helpers.py index abbf84755ef3..a10a489c9aa3 100644 --- a/cms/djangoapps/contentstore/views/helpers.py +++ b/cms/djangoapps/contentstore/views/helpers.py @@ -1,6 +1,6 @@ from django.http import HttpResponse from django.shortcuts import redirect -from mitxmako.shortcuts import render_to_string, render_to_response +from edxmako.shortcuts import render_to_string, render_to_response __all__ = ['edge', 'event', 'landing'] diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index f740d10707e5..c36d30a34d87 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -21,7 +21,7 @@ from django.views.decorators.http import require_http_methods, require_GET from django.utils.translation import ugettext as _ -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from auth.authz import create_all_course_groups from xmodule.modulestore.xml_importer import import_from_xml diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 220da038a781..ff0596d1d077 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -30,7 +30,7 @@ from django.http import HttpResponseBadRequest from xblock.fields import Scope from preview import handler_prefix, get_preview_html -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from models.settings.course_grading import CourseGradingModel __all__ = ['orphan_handler', 'xblock_handler'] @@ -67,7 +67,7 @@ def xblock_handler(request, tag=None, course_id=None, branch=None, version_guid= to None! Absent ones will be left alone. :nullout: which metadata fields to set to None :graderType: change how this unit is graded - :publish: can be one of three values, 'make_public, 'make_private', or 'create_draft' + :publish: can be one of three values, 'make_public, 'make_private', or 'create_draft' The JSON representation on the updated xblock (minus children) is returned. if xblock locator is not specified, create a new xblock instance. The json playload can contain diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 123d7fbadbdd..3f5bfbfa6079 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -5,7 +5,7 @@ from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseBadRequest from django.contrib.auth.decorators import login_required -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from xmodule_modifiers import replace_static_urls, wrap_xblock from xmodule.error_module import ErrorDescriptor diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index 9ab03a409331..c7857af0c0a9 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -6,7 +6,7 @@ from django.shortcuts import redirect from django.conf import settings -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from external_auth.views import ssl_login_shortcut diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index 46791ddc26f3..0cbfb0ac96b6 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -9,7 +9,7 @@ from django.core.exceptions import PermissionDenied from django_future.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.modulestore import Location from xmodule.modulestore.inheritance import own_metadata from xmodule.modulestore.django import modulestore @@ -40,7 +40,7 @@ def initialize_course_tabs(course): {"type": "discussion", "name": _("Discussion")}, {"type": "wiki", "name": _("Wiki")}, {"type": "progress", "name": _("Progress")}, - ] + ] modulestore('direct').update_metadata(course.location.url(), own_metadata(course)) diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index 6f2a2fbdec9f..50120bad3861 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -7,7 +7,7 @@ from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.modulestore.django import modulestore, loc_mapper from util.json_request import JsonResponse diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index df2baa1aa26b..5eaa8c4ac36d 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -8,7 +8,7 @@ from ratelimitbackend import admin from django.conf import settings from django.dispatch import receiver -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from django.core.mail import send_mail from smtplib import SMTPException @@ -91,7 +91,7 @@ def send_user_notification_callback(sender, **kwargs): user = kwargs['user'] updated_state = kwargs['state'] - studio_request_email = settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL', '') + studio_request_email = settings.FEATURES.get('STUDIO_REQUEST_EMAIL', '') context = {'studio_request_email': studio_request_email} subject = render_to_string('emails/course_creator_subject.txt', context) @@ -118,7 +118,7 @@ def send_admin_notification_callback(sender, **kwargs): """ user = kwargs['user'] - studio_request_email = settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL', '') + studio_request_email = settings.FEATURES.get('STUDIO_REQUEST_EMAIL', '') context = {'user_name': user.username, 'user_email': user.email} subject = render_to_string('emails/course_creator_admin_subject.txt', context) diff --git a/cms/djangoapps/course_creators/tests/test_admin.py b/cms/djangoapps/course_creators/tests/test_admin.py index aa293e008eee..4d28f263997e 100644 --- a/cms/djangoapps/course_creators/tests/test_admin.py +++ b/cms/djangoapps/course_creators/tests/test_admin.py @@ -69,7 +69,7 @@ def change_state_and_verify_email(state, is_creator): self.studio_request_email ) - with mock.patch.dict('django.conf.settings.MITX_FEATURES', self.enable_creator_group_patch): + with mock.patch.dict('django.conf.settings.FEATURES', self.enable_creator_group_patch): # User is initially unrequested. self.assertFalse(is_user_in_creator_group(self.user)) @@ -119,7 +119,7 @@ def check_admin_message_state(state, expect_sent_to_admin, expect_sent_to_user): else: self.assertEquals(base_num_emails, len(mail.outbox)) - with mock.patch.dict('django.conf.settings.MITX_FEATURES', self.enable_creator_group_patch): + with mock.patch.dict('django.conf.settings.FEATURES', self.enable_creator_group_patch): # E-mail message should be sent to admin only when new state is PENDING, regardless of what # previous state was (unless previous state was already PENDING). # E-mail message sent to user only on transition into and out of GRANTED state. @@ -159,7 +159,7 @@ def test_change_permission(self): self.assertFalse(self.creator_admin.has_change_permission(self.request)) def test_rate_limit_login(self): - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_CREATOR_GROUP': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_CREATOR_GROUP': True}): post_params = {'username': self.user.username, 'password': 'wrong_password'} # try logging in 30 times, the default limit in the number of failed # login attempts in one 5 minute period before the rate gets limited diff --git a/cms/djangoapps/course_creators/tests/test_views.py b/cms/djangoapps/course_creators/tests/test_views.py index 95c50ffb76d4..dbd92365b7de 100644 --- a/cms/djangoapps/course_creators/tests/test_views.py +++ b/cms/djangoapps/course_creators/tests/test_views.py @@ -46,7 +46,7 @@ def test_add_unrequested(self): self.assertEqual('unrequested', get_course_creator_status(self.user)) def test_add_granted(self): - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): # Calling add_user_with_status_granted impacts is_user_in_course_group_role. self.assertFalse(is_user_in_creator_group(self.user)) @@ -60,7 +60,7 @@ def test_add_granted(self): self.assertTrue(is_user_in_creator_group(self.user)) def test_update_creator_group(self): - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.assertFalse(is_user_in_creator_group(self.user)) update_course_creator_group(self.admin, self.user, True) self.assertTrue(is_user_in_creator_group(self.user)) diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 1a9621a221f4..67ecfa5689a9 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -34,7 +34,7 @@ def seed(): MODULESTORE_OPTIONS = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { @@ -87,7 +87,7 @@ def seed(): STATICFILES_FINDERS += ('pipeline.finders.PipelineFinder', ) # Use the auto_auth workflow for creating users and logging them in -MITX_FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True +FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True # HACK # Setting this flag to false causes imports to not load correctly in the lettuce python files diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 1b0c0ef6482f..8853ccf431f6 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -106,7 +106,7 @@ EMAIL_BACKEND = ENV_TOKENS.get('EMAIL_BACKEND', EMAIL_BACKEND) EMAIL_FILE_PATH = ENV_TOKENS.get('EMAIL_FILE_PATH', None) LMS_BASE = ENV_TOKENS.get('LMS_BASE') -# Note that MITX_FEATURES['PREVIEW_LMS_BASE'] gets read in from the environment file. +# Note that FEATURES['PREVIEW_LMS_BASE'] gets read in from the environment file. SITE_NAME = ENV_TOKENS['SITE_NAME'] @@ -138,8 +138,8 @@ TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE) -for feature, value in ENV_TOKENS.get('MITX_FEATURES', {}).items(): - MITX_FEATURES[feature] = value +for feature, value in ENV_TOKENS.get('FEATURES', {}).items(): + FEATURES[feature] = value LOGGING = get_logger_config(LOG_DIR, logging_env=ENV_TOKENS['LOGGING_ENV'], @@ -164,7 +164,7 @@ # Note that this is the Studio key. There is a separate key for the LMS. SEGMENT_IO_KEY = AUTH_TOKENS.get('SEGMENT_IO_KEY') if SEGMENT_IO_KEY: - MITX_FEATURES['SEGMENT_IO'] = ENV_TOKENS.get('SEGMENT_IO', False) + FEATURES['SEGMENT_IO'] = ENV_TOKENS.get('SEGMENT_IO', False) AWS_ACCESS_KEY_ID = AUTH_TOKENS["AWS_ACCESS_KEY_ID"] if AWS_ACCESS_KEY_ID == "": diff --git a/cms/envs/common.py b/cms/envs/common.py index 8e2788a86a0e..41ef87b3addd 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -2,7 +2,7 @@ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of -MITX_FEATURES[...]. Modules that extend this one can change the feature +FEATURES[...]. Modules that extend this one can change the feature configuration in an environment specific config file and re-calculate those values. @@ -14,7 +14,7 @@ 1. Right now our treatment of static content in general and in particular course-specific static content is haphazard. 2. We should have a more disciplined approach to feature flagging, even if it - just means that we stick them in a dict called MITX_FEATURES. + just means that we stick them in a dict called FEATURES. 3. We need to handle configuration for multiple courses. This could be as multiple sites, but we do need a way to map their data assets. """ @@ -36,7 +36,7 @@ ############################ FEATURE CONFIGURATION ############################# -MITX_FEATURES = { +FEATURES = { 'USE_DJANGO_PIPELINE': True, 'GITHUB_PUSH': False, @@ -67,11 +67,11 @@ ############################# SET PATH INFORMATION ############################# -PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /mitx/cms +PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx/cms REPO_ROOT = PROJECT_ROOT.dirname() COMMON_ROOT = REPO_ROOT / "common" LMS_ROOT = REPO_ROOT / "lms" -ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in +ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /edX is in GITHUB_REPO_ROOT = ENV_ROOT / "data" @@ -99,10 +99,10 @@ TEMPLATE_DIRS = MAKO_TEMPLATES['main'] -MITX_ROOT_URL = '' +EDX_ROOT_URL = '' -LOGIN_REDIRECT_URL = MITX_ROOT_URL + '/signin' -LOGIN_URL = MITX_ROOT_URL + '/signin' +LOGIN_REDIRECT_URL = EDX_ROOT_URL + '/signin' +LOGIN_URL = EDX_ROOT_URL + '/signin' TEMPLATE_CONTEXT_PROCESSORS = ( @@ -161,7 +161,7 @@ 'django.contrib.messages.middleware.MessageMiddleware', 'track.middleware.TrackMiddleware', - 'mitxmako.middleware.MakoMiddleware', + 'edxmako.middleware.MakoMiddleware', # Detects user-requested locale from 'accept-language' header in http request 'django.middleware.locale.LocaleMiddleware', @@ -230,7 +230,7 @@ USE_L10N = True # Localization strings (e.g. django.po) are under this directory -LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # mitx/conf/locale/ +LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # edx/conf/locale/ # Messages MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' @@ -393,7 +393,7 @@ 'datadog', # For asset pipelining - 'mitxmako', + 'edxmako', 'pipeline', 'staticfiles', 'static_replace', diff --git a/cms/envs/dev.py b/cms/envs/dev.py index ea66688a8a01..0ec471629523 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -30,7 +30,7 @@ modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': GITHUB_REPO_ROOT, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { @@ -71,12 +71,12 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ENV_ROOT / "db" / "mitx.db", + 'NAME': ENV_ROOT / "db" / "edX.db", } } LMS_BASE = "localhost:8000" -MITX_FEATURES['PREVIEW_LMS_BASE'] = "localhost:8000" +FEATURES['PREVIEW_LMS_BASE'] = "localhost:8000" REPOS = { 'edx4edx': { @@ -108,7 +108,7 @@ # In staging/prod envs, the sessions also live here. 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': 'mitx_loc_mem_cache', + 'LOCATION': 'edx_loc_mem_cache', 'KEY_FUNCTION': 'util.memcache.safe_key', }, @@ -178,10 +178,10 @@ DEBUG_TOOLBAR_MONGO_STACKTRACES = False # disable NPS survey in dev mode -MITX_FEATURES['STUDIO_NPS_SURVEY'] = False +FEATURES['STUDIO_NPS_SURVEY'] = False # Enable URL that shows information about the status of variuous services -MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True +FEATURES['ENABLE_SERVICE_STATUS'] = True ############################# SEGMENT-IO ################################## @@ -190,7 +190,7 @@ import os SEGMENT_IO_KEY = os.environ.get('SEGMENT_IO_KEY') if SEGMENT_IO_KEY: - MITX_FEATURES['SEGMENT_IO'] = True + FEATURES['SEGMENT_IO'] = True ##################################################################### diff --git a/cms/envs/dev_ike.py b/cms/envs/dev_ike.py index 6e67f78f3666..95ae33e32897 100644 --- a/cms/envs/dev_ike.py +++ b/cms/envs/dev_ike.py @@ -9,8 +9,8 @@ from .common import * from .dev import * -MITX_FEATURES['AUTH_USE_MIT_CERTIFICATES'] = True +FEATURES['AUTH_USE_MIT_CERTIFICATES'] = True -MITX_FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss +FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 for nginx ssl proxy diff --git a/cms/envs/dev_shared_preview.py b/cms/envs/dev_shared_preview.py index 119558ba0559..ec488a68bafc 100644 --- a/cms/envs/dev_shared_preview.py +++ b/cms/envs/dev_shared_preview.py @@ -9,4 +9,4 @@ from .dev import * -MITX_FEATURES['PREVIEW_LMS_BASE'] = "preview.localhost:8000" +FEATURES['PREVIEW_LMS_BASE'] = "preview.localhost:8000" diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index e25f092c9a84..fa41d5cef84a 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -24,7 +24,7 @@ ################################# LMS INTEGRATION ############################# LMS_BASE = "localhost:8000" -MITX_FEATURES['PREVIEW_LMS_BASE'] = "preview." + LMS_BASE +FEATURES['PREVIEW_LMS_BASE'] = "preview." + LMS_BASE ################################# CELERY ###################################### diff --git a/cms/envs/test.py b/cms/envs/test.py index c64e0ef1e893..6485f7233dfa 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -4,7 +4,7 @@ /envroot/ /db # This is where it'll write the database file - /mitx # The location of this repo + /edx # The location of this repo /log # Where we're going to write log files """ @@ -60,7 +60,7 @@ MODULESTORE_OPTIONS = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { @@ -109,7 +109,7 @@ } LMS_BASE = "localhost:8000" -MITX_FEATURES['PREVIEW_LMS_BASE'] = "preview" +FEATURES['PREVIEW_LMS_BASE'] = "preview" CACHES = { # This is the cache used for most things. Askbot will not work without a @@ -117,7 +117,7 @@ # In staging/prod envs, the sessions also live here. 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': 'mitx_loc_mem_cache', + 'LOCATION': 'edx_loc_mem_cache', 'KEY_FUNCTION': 'util.memcache.safe_key', }, @@ -161,9 +161,9 @@ SEGMENT_IO_KEY = '***REMOVED***' # disable NPS survey in test mode -MITX_FEATURES['STUDIO_NPS_SURVEY'] = False +FEATURES['STUDIO_NPS_SURVEY'] = False -MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True +FEATURES['ENABLE_SERVICE_STATUS'] = True # This is to disable a test under the common directory that will not pass when run under CMS -MITX_FEATURES['DISABLE_PASSWORD_RESET_EMAIL_TEST'] = True +FEATURES['DISABLE_PASSWORD_RESET_EMAIL_TEST'] = True diff --git a/cms/templates/base.html b/cms/templates/base.html index 37b25b191913..129a80890a59 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -20,7 +20,7 @@ - + <%static:css group='style-vendor'/> <%static:css group='style-app'/> diff --git a/cms/templates/index.html b/cms/templates/index.html index 572f40a865b6..6d3627e254c5 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -45,8 +45,8 @@

${_("Page Actions")}

% if course_creator_status=='granted': ${_("New Course")} - % elif course_creator_status=='disallowed_for_this_site' and settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL',''): - ${_("Email staff to create course")} + % elif course_creator_status=='disallowed_for_this_site' and settings.FEATURES.get('STUDIO_REQUEST_EMAIL',''): + ${_("Email staff to create course")} % endif @@ -290,10 +290,10 @@

${_('Need help?')}

- % if course_creator_status=='disallowed_for_this_site' and settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL',''): + % if course_creator_status=='disallowed_for_this_site' and settings.FEATURES.get('STUDIO_REQUEST_EMAIL',''):

${_('Can I create courses in Studio?')}

-

${_('In order to create courses in Studio, you must')} ${_("contact edX staff to help you create a course")}

+

${_('In order to create courses in Studio, you must')} ${_("contact edX staff to help you create a course")}

% endif diff --git a/cms/templates/widgets/qualaroo.html b/cms/templates/widgets/qualaroo.html index 04d10e08d166..1081c22c08dd 100644 --- a/cms/templates/widgets/qualaroo.html +++ b/cms/templates/widgets/qualaroo.html @@ -1,4 +1,4 @@ -% if settings.MITX_FEATURES.get('STUDIO_NPS_SURVEY'): +% if settings.FEATURES.get('STUDIO_NPS_SURVEY'): diff --git a/lms/templates/feed.rss b/lms/templates/feed.rss index ca24d584c57e..9ae1a8793f0d 100644 --- a/lms/templates/feed.rss +++ b/lms/templates/feed.rss @@ -38,7 +38,7 @@ tag:www.edx.org,2013:Post/15 2013-03-14T10:00:00-07:00 2013-03-14T10:00:00-07:00 - + New mechanical engineering course open for enrollment <img src="${static.url('images/press/releases/201x_240x180.jpg')}" /> <p></p> diff --git a/lms/templates/footer.html b/lms/templates/footer.html index 394c679b6f85..caff83bace60 100644 --- a/lms/templates/footer.html +++ b/lms/templates/footer.html @@ -48,27 +48,27 @@ diff --git a/lms/templates/help_modal.html b/lms/templates/help_modal.html index dea4b7e8b9d4..7568af9c755b 100644 --- a/lms/templates/help_modal.html +++ b/lms/templates/help_modal.html @@ -6,7 +6,7 @@ <%! from django.conf import settings %> <%! from courseware.tabs import get_discussion_link %> -% if settings.MITX_FEATURES.get('ENABLE_FEEDBACK_SUBMISSION', False): +% if settings.FEATURES.get('ENABLE_FEEDBACK_SUBMISSION', False):
${_("Help")} diff --git a/lms/templates/index.html b/lms/templates/index.html index 83024e01aa7b..56d08ce1108f 100644 --- a/lms/templates/index.html +++ b/lms/templates/index.html @@ -165,7 +165,7 @@

${_('Explore free courses from {span_start}{platform_name}{span_end} univers % endif - % if settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'): + % if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
    %for course in courses: diff --git a/lms/templates/instructor/instructor_dashboard_2/course_info.html b/lms/templates/instructor/instructor_dashboard_2/course_info.html index 7362014b0998..3569251e790e 100644 --- a/lms/templates/instructor/instructor_dashboard_2/course_info.html +++ b/lms/templates/instructor/instructor_dashboard_2/course_info.html @@ -58,7 +58,7 @@

    ${_("Basic Course Information")}

-%if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): +%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):

${_("Pending Instructor Tasks")}

diff --git a/lms/templates/instructor/instructor_dashboard_2/data_download.html b/lms/templates/instructor/instructor_dashboard_2/data_download.html index cbbc2a871bba..4ed0ba8ede1d 100644 --- a/lms/templates/instructor/instructor_dashboard_2/data_download.html +++ b/lms/templates/instructor/instructor_dashboard_2/data_download.html @@ -23,12 +23,12 @@

${_("Data Download")}

-%if settings.MITX_FEATURES.get('ENABLE_S3_GRADE_DOWNLOADS'): +%if settings.FEATURES.get('ENABLE_S3_GRADE_DOWNLOADS'):

${_("Grade Reports")}

- %if settings.MITX_FEATURES.get('ALLOW_COURSE_STAFF_GRADE_DOWNLOADS') or section_data['access']['admin']: + %if settings.FEATURES.get('ALLOW_COURSE_STAFF_GRADE_DOWNLOADS') or section_data['access']['admin']:

${_("The following button will generate a CSV grade report for all currently enrolled students. For large courses, generating this report may take a few hours.")}

${_("The report is generated in the background, meaning it is OK to navigate away from this page while your report is generating. Generated reports appear in a table below and can be downloaded.")}

@@ -46,7 +46,7 @@

${_("Grade Reports")}

%endif -%if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): +%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):

${_("Pending Instructor Tasks")}

diff --git a/lms/templates/instructor/instructor_dashboard_2/send_email.html b/lms/templates/instructor/instructor_dashboard_2/send_email.html index 4d49530b5c68..cb8afb88a130 100644 --- a/lms/templates/instructor/instructor_dashboard_2/send_email.html +++ b/lms/templates/instructor/instructor_dashboard_2/send_email.html @@ -33,8 +33,8 @@

${_("Send Email")}

  • -
  • @@ -55,7 +55,7 @@

    ${_("Send Email")}

    -%if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): +%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):

    ${_("Pending Instructor Tasks")}

    diff --git a/lms/templates/instructor/instructor_dashboard_2/student_admin.html b/lms/templates/instructor/instructor_dashboard_2/student_admin.html index 2762ba489903..1ff3e2727c75 100644 --- a/lms/templates/instructor/instructor_dashboard_2/student_admin.html +++ b/lms/templates/instructor/instructor_dashboard_2/student_admin.html @@ -30,7 +30,7 @@

    ${_("Student-specific grade adjustment")}


    -

    ${_('Specify a particular problem in the course here by its url:')} +

    ${_('Specify a particular problem in the course here by its url:')}

    @@ -50,7 +50,7 @@

    ${_("Student-specific grade adjustment")}

    - %if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']: + %if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']: %endif

    @@ -63,7 +63,7 @@

    ${_("Student-specific grade adjustment")}

    - %if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']: + %if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']:

    ${_("Rescoring runs in the background, and status for active tasks will appear in the 'Pending Instructor Tasks' table. " "To see status for all tasks submitted for this problem and student, click on this button:")} @@ -75,7 +75,7 @@

    ${_("Student-specific grade adjustment")}


    -%if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']: +%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']:

    ${_('Course-specific grade adjustment')}

    @@ -108,7 +108,7 @@

    ${_('Course-specific grade adjustment')}

    %endif -%if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): +%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):

    ${_("Pending Instructor Tasks")}

    diff --git a/lms/templates/login.html b/lms/templates/login.html index 56a04d628397..72d903eed2ce 100644 --- a/lms/templates/login.html +++ b/lms/templates/login.html @@ -170,7 +170,7 @@

    ${_('Account Preferences')}

    ${_("Helpful Information")}

    - % if settings.MITX_FEATURES.get('AUTH_USE_OPENID'): + % if settings.FEATURES.get('AUTH_USE_OPENID'): - + % if not course: diff --git a/lms/templates/main_django.html b/lms/templates/main_django.html index a20d489d8bbd..9190ddab928f 100644 --- a/lms/templates/main_django.html +++ b/lms/templates/main_django.html @@ -25,7 +25,7 @@ - + diff --git a/lms/templates/mktg_iframe.html b/lms/templates/mktg_iframe.html index 338f49240cbe..ea1b00f1ad61 100644 --- a/lms/templates/mktg_iframe.html +++ b/lms/templates/mktg_iframe.html @@ -8,7 +8,7 @@ <%block name="title"> - + <%static:css group='style-vendor'/> diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 2dc571c24700..bb847ed09a36 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -57,11 +57,11 @@

    ${course.display_org_with_default | h}: ${cour
      @@ -93,7 +93,7 @@

      ${course.display_org_with_default | h}: ${cour % else:

    ${_("What will the scope of the online courses be? How many? Which faculty?")}

    @@ -91,7 +91,7 @@

    ${_("What will the scope of the online courses be? How many? Which faculty?"

    ${_("Who is the learner? Domestic or international? Age range?")}

    -

    ${_("Improving teaching and learning for students on our campuses is one of our primary goals. Beyond that, we don't have a target group of potential learners, as the goal is to make these courses available to anyone in the world - from any demographic - who has interest in advancing their own knowledge. The only requirement is to have a computer with an internet connection. More than 150,000 students from over 160 countries registered for {MITx}'s first course, 6.002x: Circuits and Electronics. The age range of students certified in this course was from 14 to 74 years-old.").format(MITx="MITx")}

    +

    ${_("Improving teaching and learning for students on our campuses is one of our primary goals. Beyond that, we don't have a target group of potential learners, as the goal is to make these courses available to anyone in the world - from any demographic - who has interest in advancing their own knowledge. The only requirement is to have a computer with an internet connection. More than 150,000 students from over 160 countries registered for {edX}'s first course, 6.002x: Circuits and Electronics. The age range of students certified in this course was from 14 to 74 years-old.").format(edX="edX")}

    ${_("Will participating universities' standards apply to all courses offered on the edX platform?")}

    @@ -116,7 +116,7 @@

    ${_("Technology Platform")}

    ${_("What technology will {edX} use?").format(edX="edX")}

    ${_("The {edX} open-source online learning platform will feature interactive learning designed specifically for the web. Features will include: self-paced learning, online discussion groups, wiki-based collaborative learning, assessment of learning as a student progresses through a course, and online laboratories and other interactive learning tools. The platform will also serve as a laboratory from which data will be gathered to better understand how students learn. Because it is open source, the platform will be continuously improved by a worldwide community of collaborators, with new features added as needs arise.").format(edX="edX")}

    -

    ${_("The first version of the technology was used in the first {MITx} course, 6.002x Circuits and Electronics, which launched in Spring, 2012.").format(MITx="MITx")}

    +

    ${_("The first version of the technology was used in the first {edX} course, 6.002x Circuits and Electronics, which launched in Spring, 2012.").format(edX="edX")}

    ${_("How is this different from what other universities are doing online?")}

    diff --git a/lms/templates/static_templates/help.html b/lms/templates/static_templates/help.html index f4f65be053a2..186d3e2f2cfb 100644 --- a/lms/templates/static_templates/help.html +++ b/lms/templates/static_templates/help.html @@ -182,7 +182,7 @@

    ${_("Certificates & Credits")}

    ${_("Will I get a certificate for taking an {edX} course?").format(edX="edX")}

    -

    ${_("Online learners who receive a passing grade for a course will receive a certificate of mastery at the discretion of {edX} and the underlying {X} University that offered the course. For example, a certificate of mastery for {MITx}\'s 6.002x Circuits & Electronics will come from {edX} and {MITx}.").format(edX="edX", X="X", MITx="MITx")}

    +

    ${_("Online learners who receive a passing grade for a course will receive a certificate of mastery at the discretion of {edX} and the underlying {X} University that offered the course. For example, a certificate of mastery for {edX}\'s 6.002x Circuits & Electronics will come from {edX} and {edX}.").format(edX="edX", X="X", edX="edX")}

    ${_("If you passed the course, your certificate of mastery will be delivered online through edx.org. So be sure to check your email in the weeks following the final grading - you will be able to download and print your certificate. Note: At this time, {edX} is holding certificates for learners connected with Cuba, Iran, Syria and Sudan pending confirmation that the issuance is in compliance with U.S. embargoes.").format(edX="edX")}

    diff --git a/lms/templates/static_templates/tos.html b/lms/templates/static_templates/tos.html index 414754d82b27..9964dc229a28 100644 --- a/lms/templates/static_templates/tos.html +++ b/lms/templates/static_templates/tos.html @@ -61,7 +61,7 @@

    User Postings

    Certificates, etc.

    -

    EdX and/or the colleges and universities providing courses on the Site may offer a certificate of mastery or other acknowledgment (a "Certificate") for students who, in their judgment, have satisfactorily demonstrated mastery of the course material. Certificates will be issued by edX under the name of the underlying "X University" from where the course originated, i.e. HarvardX, MITx. etc. The decision whether a Certificate will be awarded to a given student will be solely within the discretion of the awarding entity, as will the name and form of any such Certificate. EdX and/or the institutions providing courses on the Site may choose not to offer a Certificate for some courses.

    +

    EdX and/or the colleges and universities providing courses on the Site may offer a certificate of mastery or other acknowledgment (a "Certificate") for students who, in their judgment, have satisfactorily demonstrated mastery of the course material. Certificates will be issued by edX under the name of the underlying "X University" from where the course originated, i.e. HarvardX, edX. etc. The decision whether a Certificate will be awarded to a given student will be solely within the discretion of the awarding entity, as will the name and form of any such Certificate. EdX and/or the institutions providing courses on the Site may choose not to offer a Certificate for some courses.

    When you take a course through edX, you will not be an applicant for admission to, or enrolled in, any degree program of the institution as a result of registering for or completing a course through edX. You will not be entitled to use any of the resources of the institution beyond the online courses provided on the Site, nor will you be eligible to receive student privileges or benefits provided to students enrolled in degree programs of the institution.

    diff --git a/lms/templates/stripped-main.html b/lms/templates/stripped-main.html index 28166dbd972f..f2e8545e968f 100644 --- a/lms/templates/stripped-main.html +++ b/lms/templates/stripped-main.html @@ -24,7 +24,7 @@ - + diff --git a/lms/templates/widgets/segment-io.html b/lms/templates/widgets/segment-io.html index 87dc0eebe074..3c6728bb16b6 100644 --- a/lms/templates/widgets/segment-io.html +++ b/lms/templates/widgets/segment-io.html @@ -1,4 +1,4 @@ -% if settings.MITX_FEATURES.get('SEGMENT_IO_LMS'): +% if settings.FEATURES.get('SEGMENT_IO_LMS'): <%! from django.core.urlresolvers import reverse %> <%! import waffle %> @@ -29,4 +29,4 @@ }; -% endif \ No newline at end of file +% endif diff --git a/lms/urls.py b/lms/urls.py index 913c686f1bea..18351f37a646 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -6,7 +6,7 @@ import django.contrib.auth.views # Uncomment the next two lines to enable the admin: -if settings.DEBUG or settings.MITX_FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): +if settings.DEBUG or settings.FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): admin.autodiscover() urlpatterns = ('', # nopep8 @@ -63,7 +63,7 @@ url(r'^', include('waffle.urls')), ) -# if settings.MITX_FEATURES.get("MULTIPLE_ENROLLMENT_ROLES"): +# if settings.FEATURES.get("MULTIPLE_ENROLLMENT_ROLES"): urlpatterns += ( url(r'^verify_student/', include('verify_student.urls')), url(r'^course_modes/', include('course_modes.urls')), @@ -87,7 +87,7 @@ ) # Semi-static views only used by edX, not by themes -if not settings.MITX_FEATURES["USE_CUSTOM_THEME"]: +if not settings.FEATURES["USE_CUSTOM_THEME"]: urlpatterns += ( url(r'^jobs$', 'static_template_view.views.render', {'template': 'jobs.html'}, name="jobs"), @@ -130,7 +130,7 @@ # To allow theme templates to inherit from default templates, # prepend a standard prefix - if settings.MITX_FEATURES["USE_CUSTOM_THEME"]: + if settings.FEATURES["USE_CUSTOM_THEME"]: template = "theme-" + template # Make the assumption that the URL we want is the lowercased @@ -318,13 +318,13 @@ ) # allow course staff to change to student view of courseware - if settings.MITX_FEATURES.get('ENABLE_MASQUERADE'): + if settings.FEATURES.get('ENABLE_MASQUERADE'): urlpatterns += ( url(r'^masquerade/(?P.*)$', 'courseware.masquerade.handle_ajax', name="masquerade-switch"), ) # discussion forums live within courseware, so courseware must be enabled first - if settings.MITX_FEATURES.get('ENABLE_DISCUSSION_SERVICE'): + if settings.FEATURES.get('ENABLE_DISCUSSION_SERVICE'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/discussion/', include('django_comment_client.urls')), @@ -339,7 +339,7 @@ 'courseware.views.static_tab', name="static_tab"), ) - if settings.MITX_FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW'): + if settings.FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/submission_history/(?P[^/]*)/(?P.*?)$', 'courseware.views.submission_history', @@ -347,7 +347,7 @@ ) -if settings.COURSEWARE_ENABLED and settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'): +if settings.COURSEWARE_ENABLED and settings.FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/instructor_dashboard$', 'instructor.views.instructor_dashboard.instructor_dashboard_2', name="instructor_dashboard_2"), @@ -356,29 +356,29 @@ include('instructor.views.api_urls')) ) -if settings.DEBUG or settings.MITX_FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): +if settings.DEBUG or settings.FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): ## Jasmine and admin urlpatterns += (url(r'^admin/', include(admin.site.urls)),) -if settings.MITX_FEATURES.get('AUTH_USE_OPENID'): +if settings.FEATURES.get('AUTH_USE_OPENID'): urlpatterns += ( url(r'^openid/login/$', 'django_openid_auth.views.login_begin', name='openid-login'), url(r'^openid/complete/$', 'external_auth.views.openid_login_complete', name='openid-complete'), url(r'^openid/logo.gif$', 'django_openid_auth.views.logo', name='openid-logo'), ) -if settings.MITX_FEATURES.get('AUTH_USE_SHIB'): +if settings.FEATURES.get('AUTH_USE_SHIB'): urlpatterns += ( url(r'^shib-login/$', 'external_auth.views.shib_login', name='shib-login'), ) -if settings.MITX_FEATURES.get('AUTH_USE_CAS'): +if settings.FEATURES.get('AUTH_USE_CAS'): urlpatterns += ( url(r'^cas-auth/login/$', 'external_auth.views.cas_login', name="cas-login"), url(r'^cas-auth/logout/$', 'django_cas.views.logout', {'next_page': '/'}, name="cas-logout"), ) -if settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD'): +if settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD'): urlpatterns += ( url(r'^course_specific_login/(?P[^/]+/[^/]+/[^/]+)/$', 'external_auth.views.course_specific_login', name='course-specific-login'), @@ -393,7 +393,7 @@ ) -if settings.MITX_FEATURES.get('AUTH_USE_OPENID_PROVIDER'): +if settings.FEATURES.get('AUTH_USE_OPENID_PROVIDER'): urlpatterns += ( url(r'^openid/provider/login/$', 'external_auth.views.provider_login', name='openid-provider-login'), url(r'^openid/provider/login/(?:.+)$', 'external_auth.views.provider_identity', name='openid-provider-login-identity'), @@ -401,7 +401,7 @@ url(r'^openid/provider/xrds/$', 'external_auth.views.provider_xrds', name='openid-provider-xrds') ) -if settings.MITX_FEATURES.get('ENABLE_LMS_MIGRATION'): +if settings.FEATURES.get('ENABLE_LMS_MIGRATION'): urlpatterns += ( url(r'^migrate/modules$', 'lms_migration.migrate.manage_modulestores'), url(r'^migrate/reload/(?P[^/]+)$', 'lms_migration.migrate.manage_modulestores'), @@ -410,23 +410,23 @@ url(r'^gitreload/(?P[^/]+)$', 'lms_migration.migrate.gitreload'), ) -if settings.MITX_FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): +if settings.FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): urlpatterns += ( url(r'^event_logs$', 'track.views.view_tracking_log'), url(r'^event_logs/(?P.+)$', 'track.views.view_tracking_log'), ) -if settings.MITX_FEATURES.get('ENABLE_SERVICE_STATUS'): +if settings.FEATURES.get('ENABLE_SERVICE_STATUS'): urlpatterns += ( url(r'^status/', include('service_status.urls')), ) -if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): +if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): urlpatterns += ( url(r'^instructor_task_status/$', 'instructor_task.views.instructor_task_status', name='instructor_task_status'), ) -if settings.MITX_FEATURES.get('RUN_AS_ANALYTICS_SERVER_ENABLED'): +if settings.FEATURES.get('RUN_AS_ANALYTICS_SERVER_ENABLED'): urlpatterns += ( url(r'^edinsights_service/', include('edinsights.core.urls')), ) @@ -438,20 +438,20 @@ url(r'^comm/foldit_ops', 'foldit.views.foldit_ops', name="foldit_ops"), ) -if settings.MITX_FEATURES.get('ENABLE_DEBUG_RUN_PYTHON'): +if settings.FEATURES.get('ENABLE_DEBUG_RUN_PYTHON'): urlpatterns += ( url(r'^debug/run_python', 'debug.views.run_python'), ) # Crowdsourced hinting instructor manager. -if settings.MITX_FEATURES.get('ENABLE_HINTER_INSTRUCTOR_VIEW'): +if settings.FEATURES.get('ENABLE_HINTER_INSTRUCTOR_VIEW'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/hint_manager$', 'instructor.hint_manager.hint_manager', name="hint_manager"), ) # enable automatic login -if settings.MITX_FEATURES.get('AUTOMATIC_AUTH_FOR_TESTING'): +if settings.FEATURES.get('AUTOMATIC_AUTH_FOR_TESTING'): urlpatterns += ( url(r'^auto_auth$', 'student.views.auto_auth'), ) diff --git a/package.json b/package.json index 2213d41f8d3f..31876d5a321a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "mitx", + "name": "edx", "version": "0.1.0", "dependencies": { "coffee-script": "1.6.X" diff --git a/proxy/nginx.conf b/proxy/nginx.conf index 2b48e17d0377..d53afc5f61f5 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -1,6 +1,6 @@ -# Mapping of +# Mapping of # -# From the /mitx directory: +# From the /edx directory: # /usr/local/Cellar/nginx/1.2.2/sbin/nginx -p `pwd`/ -c nginx.conf worker_processes 1; @@ -49,7 +49,7 @@ http { rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last; - # Our catchall + # Our catchall location / { proxy_pass http://portal; } diff --git a/rakelib/deploy.rake b/rakelib/deploy.rake index 1d0a1b2c4f71..53b457417127 100644 --- a/rakelib/deploy.rake +++ b/rakelib/deploy.rake @@ -1,7 +1,7 @@ # Packaging constants COMMIT = (ENV["GIT_COMMIT"] || `git rev-parse HEAD`).chomp()[0, 10] -PACKAGE_NAME = "mitx" +PACKAGE_NAME = "edx" BRANCH = (ENV["GIT_BRANCH"] || `git symbolic-ref -q HEAD`).chomp().gsub('refs/heads/', '').gsub('origin/', '') desc "Build a properties file used to trigger autodeploy builds" @@ -12,4 +12,4 @@ task :autodeploy_properties do file.puts("UPSTREAM_JOB=#{PACKAGE_NAME}") file.puts("UPSTREAM_REVISION=#{COMMIT}") end -end \ No newline at end of file +end diff --git a/requirements/edx/local.txt b/requirements/edx/local.txt index 7941f9fa5e03..b3743240cb65 100644 --- a/requirements/edx/local.txt +++ b/requirements/edx/local.txt @@ -1,4 +1,4 @@ -# Python libraries to install that are local to the mitx repo +# Python libraries to install that are local to the edx repo -e common/lib/calc -e common/lib/capa -e common/lib/chem diff --git a/scripts/runone.py b/scripts/runone.py index 19b5f7195b68..9ca38602245a 100755 --- a/scripts/runone.py +++ b/scripts/runone.py @@ -5,7 +5,7 @@ import sys # I want this: -# ERROR: test_update_and_fetch (mitx.cms.djangoapps.contentstore.tests.test_course_settings.CourseDetailsViewTest) +# ERROR: test_update_and_fetch (edX.cms.djangoapps.contentstore.tests.test_course_settings.CourseDetailsViewTest) # to become: # test --settings=cms.envs.test --pythonpath=. -s cms/djangoapps/contentstore/tests/test_course_settings.py:CourseDetailsViewTest.test_update_and_fetch @@ -34,7 +34,7 @@ def main(argv): test_method = words[0] test_path = words[1].split('.') - if test_path[0] == 'mitx': + if test_path[0] == 'edX': del test_path[0] test_class = test_path[-1] del test_path[-1] diff --git a/scripts/setup-test-dirs.sh b/scripts/setup-test-dirs.sh index c4db61ec161d..cba5ec40632f 100755 --- a/scripts/setup-test-dirs.sh +++ b/scripts/setup-test-dirs.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Create symlinks from ~/mitx_all/data or $ROOT/data, with root passed as first arg -# to all the test courses in mitx/common/test/data/ +# Create symlinks from ~/edx/data or $ROOT/data, with root passed as first arg +# to all the test courses in edx/common/test/data/ # posix compliant sanity check if [ -z $BASH ] || [ $BASH = "/bin/sh" ]; then @@ -9,20 +9,20 @@ echo "Please use the bash interpreter to run this script" exit 1 fi -ROOT="${1:-$HOME/mitx_all}" +ROOT="${1:-$HOME/edx}" if [[ ! -d "$ROOT" ]]; then echo "'$ROOT' is not a directory" exit 1 fi -if [[ ! -d "$ROOT/mitx" ]]; then - echo "'$ROOT' is not the root mitx_all directory" +if [[ ! -d "$ROOT/edx" ]]; then + echo "'$ROOT' is not the root edx directory" exit 1 fi if [[ ! -d "$ROOT/data" ]]; then - echo "'$ROOT' is not the root mitx_all directory" + echo "'$ROOT' is not the root edx directory" exit 1 fi @@ -30,7 +30,7 @@ echo "ROOT is $ROOT" cd $ROOT/data -for course in $(/bin/ls ../mitx/common/test/data/) +for course in $(/bin/ls ../edx/common/test/data/) do # Get rid of the symlink if it already exists if [[ -L "$course" ]]; then @@ -39,7 +39,7 @@ do fi echo "Make link to '$course'" # Create it - ln -s "../mitx/common/test/data/$course" + ln -s "../edx/common/test/data/$course" done # go back to where we came from