diff --git a/cms/devstack.yml b/cms/devstack.yml index 2833419d1a..2167b0c075 100644 --- a/cms/devstack.yml +++ b/cms/devstack.yml @@ -5,10 +5,10 @@ ANALYTICS_DASHBOARD_NAME: Your Platform Name Here Insights ANALYTICS_DASHBOARD_URL: http://localhost:18110/courses AUTH_PASSWORD_VALIDATORS: - NAME: django.contrib.auth.password_validation.UserAttributeSimilarityValidator -- NAME: util.password_policy_validators.MinimumLengthValidator +- NAME: common.djangoapps.util.password_policy_validators.MinimumLengthValidator OPTIONS: min_length: 2 -- NAME: util.password_policy_validators.MaximumLengthValidator +- NAME: common.djangoapps.util.password_policy_validators.MaximumLengthValidator OPTIONS: max_length: 75 AWS_ACCESS_KEY_ID: null @@ -34,47 +34,47 @@ BULK_EMAIL_LOG_SENT_EMAILS: false CACHES: celery: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: celery LOCATION: - edx.devstack.memcached:11211 TIMEOUT: '7200' configuration: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 1001c6274ca4 LOCATION: - edx.devstack.memcached:11211 course_structure_cache: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: course_structure LOCATION: - edx.devstack.memcached:11211 TIMEOUT: '7200' default: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: default LOCATION: - edx.devstack.memcached:11211 VERSION: '1' general: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: general LOCATION: - edx.devstack.memcached:11211 mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: mongo_metadata_inheritance LOCATION: - edx.devstack.memcached:11211 TIMEOUT: 300 staticfiles: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 1001c6274ca4_general LOCATION: - edx.devstack.memcached:11211 diff --git a/cms/djangoapps/api/v1/serializers/course_runs.py b/cms/djangoapps/api/v1/serializers/course_runs.py index 2ff60fc656..2579a6cdee 100644 --- a/cms/djangoapps/api/v1/serializers/course_runs.py +++ b/cms/djangoapps/api/v1/serializers/course_runs.py @@ -15,7 +15,7 @@ from rest_framework.fields import empty from cms.djangoapps.contentstore.views.assets import update_course_run_asset from cms.djangoapps.contentstore.views.course import create_new_course, get_course_and_check_access, rerun_course from openedx.core.lib.courses import course_image_url -from student.models import CourseAccessRole +from common.djangoapps.student.models import CourseAccessRole from xmodule.modulestore.django import modulestore IMAGE_TYPES = { diff --git a/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py b/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py index acadff7df8..b37c067939 100644 --- a/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py +++ b/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py @@ -8,8 +8,8 @@ import pytz from django.test import RequestFactory from openedx.core.lib.courses import course_image_url -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import UserFactory +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py index 1933a75fdf..f62e74d9e4 100644 --- a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py +++ b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py @@ -13,9 +13,9 @@ from opaque_keys.edx.keys import CourseKey from rest_framework.test import APIClient from openedx.core.lib.courses import course_image_url -from student.models import CourseAccessRole -from student.tests.factories import TEST_PASSWORD, AdminFactory, UserFactory -from util.organizations_helpers import add_organization, get_course_organizations +from common.djangoapps.student.models import CourseAccessRole +from common.djangoapps.student.tests.factories import TEST_PASSWORD, AdminFactory, UserFactory +from common.djangoapps.util.organizations_helpers import add_organization, get_course_organizations from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError diff --git a/cms/djangoapps/cms_user_tasks/tasks.py b/cms/djangoapps/cms_user_tasks/tasks.py index 0a8f1db9bf..4f88fa104f 100644 --- a/cms/djangoapps/cms_user_tasks/tasks.py +++ b/cms/djangoapps/cms_user_tasks/tasks.py @@ -10,7 +10,7 @@ from celery.utils.log import get_task_logger from django.conf import settings from django.core import mail -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers LOGGER = get_task_logger(__name__) diff --git a/cms/djangoapps/contentstore/api/tests/base.py b/cms/djangoapps/contentstore/api/tests/base.py index 304a2c5cd0..b125ff704f 100644 --- a/cms/djangoapps/contentstore/api/tests/base.py +++ b/cms/djangoapps/contentstore/api/tests/base.py @@ -7,7 +7,7 @@ from django.urls import reverse from rest_framework.test import APITestCase from lms.djangoapps.courseware.tests.factories import StaffFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/cms/djangoapps/contentstore/api/tests/test_import.py b/cms/djangoapps/contentstore/api/tests/test_import.py index 85511a0a8e..a989993590 100644 --- a/cms/djangoapps/contentstore/api/tests/test_import.py +++ b/cms/djangoapps/contentstore/api/tests/test_import.py @@ -14,7 +14,7 @@ from rest_framework.test import APITestCase from user_tasks.models import UserTaskStatus from lms.djangoapps.courseware.tests.factories import StaffFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/cms/djangoapps/contentstore/api/tests/test_validation.py b/cms/djangoapps/contentstore/api/tests/test_validation.py index 2e891d2ba2..cf570c7fcf 100644 --- a/cms/djangoapps/contentstore/api/tests/test_validation.py +++ b/cms/djangoapps/contentstore/api/tests/test_validation.py @@ -10,7 +10,7 @@ from rest_framework import status from rest_framework.test import APITestCase from lms.djangoapps.courseware.tests.factories import StaffFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/cms/djangoapps/contentstore/api/views/utils.py b/cms/djangoapps/contentstore/api/views/utils.py index e758c71610..92e75ae1a2 100644 --- a/cms/djangoapps/contentstore/api/views/utils.py +++ b/cms/djangoapps/contentstore/api/views/utils.py @@ -12,7 +12,7 @@ from rest_framework.generics import GenericAPIView from openedx.core.djangoapps.util.forms import to_bool from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin, view_auth_classes from openedx.core.lib.cache_utils import request_cached -from student.auth import has_course_author_access +from common.djangoapps.student.auth import has_course_author_access from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/course_group_config.py b/cms/djangoapps/contentstore/course_group_config.py index b1db7761a2..bea95bc619 100644 --- a/cms/djangoapps/contentstore/course_group_config.py +++ b/cms/djangoapps/contentstore/course_group_config.py @@ -12,7 +12,7 @@ from django.utils.translation import ugettext as _ from cms.djangoapps.contentstore.utils import reverse_usage_url from lms.lib.utils import get_parent_unit from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_user_partition -from util.db import MYSQL_MAX_INT, generate_int_id +from common.djangoapps.util.db import MYSQL_MAX_INT, generate_int_id from xmodule.partitions.partitions import MINIMUM_STATIC_PARTITION_ID, ReadOnlyUserPartitionError, UserPartition from xmodule.partitions.partitions_service import get_all_partitions_for_course from xmodule.split_test_module import get_split_user_partitions diff --git a/cms/djangoapps/contentstore/courseware_index.py b/cms/djangoapps/contentstore/courseware_index.py index 1896c60c08..865ad760bc 100644 --- a/cms/djangoapps/contentstore/courseware_index.py +++ b/cms/djangoapps/contentstore/courseware_index.py @@ -14,7 +14,7 @@ from search.search_engine_base import SearchEngine from six import add_metaclass, string_types, text_type from cms.djangoapps.contentstore.course_group_config import GroupConfiguration -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.lib.courses import course_image_url from xmodule.annotator_mixin import html_to_text from xmodule.library_tools import normalize_key_for_search diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py b/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py index 91eb078c9a..e566c8a16c 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py @@ -6,8 +6,8 @@ Delete course tests. import mock from django.core.management import CommandError, call_command -from student.roles import CourseInstructorRole -from student.tests.factories import UserFactory +from common.djangoapps.student.roles import CourseInstructorRole +from common.djangoapps.student.tests.factories import UserFactory from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_sync_courses.py b/cms/djangoapps/contentstore/management/commands/tests/test_sync_courses.py index 53548f5fee..276f858a53 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_sync_courses.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_sync_courses.py @@ -9,7 +9,7 @@ from testfixtures import LogCapture from cms.djangoapps.contentstore.views.course import create_new_course_in_store from openedx.core.djangoapps.catalog.tests.factories import CourseRunFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/djangoapps/contentstore/rest_api/v1/tests/test_views.py b/cms/djangoapps/contentstore/rest_api/v1/tests/test_views.py index dce70be31a..a17a4cf34b 100644 --- a/cms/djangoapps/contentstore/rest_api/v1/tests/test_views.py +++ b/cms/djangoapps/contentstore/rest_api/v1/tests/test_views.py @@ -9,7 +9,7 @@ from rest_framework import status from rest_framework.test import APITestCase from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory, InstructorFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/cms/djangoapps/contentstore/signals/handlers.py b/cms/djangoapps/contentstore/signals/handlers.py index b40d4f1b27..d37a77bc40 100644 --- a/cms/djangoapps/contentstore/signals/handlers.py +++ b/cms/djangoapps/contentstore/signals/handlers.py @@ -15,8 +15,8 @@ from cms.djangoapps.contentstore.proctoring import register_special_exams from lms.djangoapps.grades.api import task_compute_all_grades_for_course from openedx.core.djangoapps.credit.signals import on_course_publish from openedx.core.lib.gating import api as gating_api -from track.event_transaction_utils import get_event_transaction_id, get_event_transaction_type -from util.module_utils import yield_dynamic_descriptor_descendants +from common.djangoapps.track.event_transaction_utils import get_event_transaction_id, get_event_transaction_type +from common.djangoapps.util.module_utils import yield_dynamic_descriptor_descendants from xmodule.modulestore.django import SignalHandler, modulestore from .signals import GRADING_POLICY_CHANGED diff --git a/cms/djangoapps/contentstore/tasks.py b/cms/djangoapps/contentstore/tasks.py index 651412db91..37fae02926 100644 --- a/cms/djangoapps/contentstore/tasks.py +++ b/cms/djangoapps/contentstore/tasks.py @@ -39,11 +39,11 @@ from cms.djangoapps.contentstore.courseware_index import ( from cms.djangoapps.contentstore.storage import course_import_export_storage from cms.djangoapps.contentstore.utils import initialize_permissions, reverse_usage_url, translation_language from cms.djangoapps.models.settings.course_metadata import CourseMetadata -from course_action_state.models import CourseRerunState +from common.djangoapps.course_action_state.models import CourseRerunState from openedx.core.djangoapps.embargo.models import CountryAccessRule, RestrictedCourse from openedx.core.lib.extract_tar import safetar_extractall -from student.auth import has_course_author_access -from util.organizations_helpers import add_organization_course, get_organization_by_short_name +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.util.organizations_helpers import add_organization_course, get_organization_by_short_name from xmodule.contentstore.django import contentstore from xmodule.course_module import CourseFields from xmodule.exceptions import SerializationError diff --git a/cms/djangoapps/contentstore/tests/test_clone_course.py b/cms/djangoapps/contentstore/tests/test_clone_course.py index cc22e9d817..d37ddb6823 100644 --- a/cms/djangoapps/contentstore/tests/test_clone_course.py +++ b/cms/djangoapps/contentstore/tests/test_clone_course.py @@ -12,9 +12,9 @@ from opaque_keys.edx.locator import CourseLocator from cms.djangoapps.contentstore.tasks import rerun_course from cms.djangoapps.contentstore.tests.utils import CourseTestCase -from course_action_state.managers import CourseRerunUIStateManager -from course_action_state.models import CourseRerunState -from student.auth import has_course_author_access +from common.djangoapps.course_action_state.managers import CourseRerunUIStateManager +from common.djangoapps.course_action_state.models import CourseRerunState +from common.djangoapps.student.auth import has_course_author_access from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.modulestore import EdxJSONEncoder, ModuleStoreEnum diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index fc8a91060c..f8fadc33c5 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -34,13 +34,13 @@ from cms.djangoapps.contentstore.config import waffle from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient, CourseTestCase, get_url, parse_json from cms.djangoapps.contentstore.utils import delete_course, reverse_course_url, reverse_url from cms.djangoapps.contentstore.views.component import ADVANCED_COMPONENT_TYPES -from course_action_state.managers import CourseActionStateItemNotFoundError -from course_action_state.models import CourseRerunState, CourseRerunUIStateManager +from common.djangoapps.course_action_state.managers import CourseActionStateItemNotFoundError +from common.djangoapps.course_action_state.models import CourseRerunState, CourseRerunUIStateManager from openedx.core.djangoapps.django_comment_common.utils import are_permissions_roles_seeded from openedx.core.lib.tempdir import mkdtemp_clean -from student import auth -from student.models import CourseEnrollment -from student.roles import CourseCreatorRole, CourseInstructorRole +from common.djangoapps.student import auth +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseCreatorRole, CourseInstructorRole from xmodule.capa_module import ProblemBlock from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore diff --git a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py index c381a3c118..b819d504ff 100644 --- a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py +++ b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py @@ -13,9 +13,9 @@ from mock import patch from opaque_keys.edx.keys import CourseKey from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient, parse_json -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import UserFactory -from util.organizations_helpers import add_organization, get_course_organizations +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.organizations_helpers import add_organization, get_course_organizations from xmodule.course_module import CourseFields from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/tests/test_course_listing.py b/cms/djangoapps/contentstore/tests/test_course_listing.py index a96eb4c02b..e80e506404 100644 --- a/cms/djangoapps/contentstore/tests/test_course_listing.py +++ b/cms/djangoapps/contentstore/tests/test_course_listing.py @@ -23,8 +23,8 @@ from cms.djangoapps.contentstore.views.course import ( _accessible_courses_summary_iter, get_courses_accessible_to_user ) -from course_action_state.models import CourseRerunState -from student.roles import ( +from common.djangoapps.course_action_state.models import CourseRerunState +from common.djangoapps.student.roles import ( CourseInstructorRole, CourseStaffRole, GlobalStaff, @@ -32,7 +32,7 @@ from student.roles import ( OrgStaffRole, UserBasedRole ) -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.course_module import CourseSummary from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index f9f494d24c..deaab43e11 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -30,12 +30,12 @@ from cms.djangoapps.models.settings.course_grading import ( from cms.djangoapps.models.settings.course_metadata import CourseMetadata from cms.djangoapps.models.settings.encoder import CourseSettingsEncoder from cms.djangoapps.models.settings.waffle import MATERIAL_RECOMPUTE_ONLY_FLAG -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.models.course_details import CourseDetails -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import UserFactory -from util import milestones_helpers -from xblock_django.models import XBlockStudioConfigurationFlag +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util import milestones_helpers +from common.djangoapps.xblock_django.models import XBlockStudioConfigurationFlag from xmodule.fields import Date from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore @@ -514,7 +514,7 @@ class CourseGradingTest(CourseTestCase): subgrader = CourseGradingModel.fetch_grader(self.course.id, i) self.assertDictEqual(grader, subgrader, str(i) + "th graders not equal") - @mock.patch('track.event_transaction_utils.uuid4') + @mock.patch('common.djangoapps.track.event_transaction_utils.uuid4') @mock.patch('cms.djangoapps.models.settings.course_grading.tracker') @mock.patch('cms.djangoapps.contentstore.signals.signals.GRADING_POLICY_CHANGED.send') @ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split) @@ -651,7 +651,7 @@ class CourseGradingTest(CourseTestCase): ) self.assertTrue(result) - @mock.patch('track.event_transaction_utils.uuid4') + @mock.patch('common.djangoapps.track.event_transaction_utils.uuid4') @mock.patch('cms.djangoapps.models.settings.course_grading.tracker') @mock.patch('cms.djangoapps.contentstore.signals.signals.GRADING_POLICY_CHANGED.send') def test_update_grader_from_json(self, send_signal, tracker, uuid): @@ -696,7 +696,7 @@ class CourseGradingTest(CourseTestCase): ) for policy_hash in {grading_policy_2, grading_policy_3} ], any_order=True) - @mock.patch('track.event_transaction_utils.uuid4') + @mock.patch('common.djangoapps.track.event_transaction_utils.uuid4') @mock.patch('cms.djangoapps.models.settings.course_grading.tracker') def test_update_cutoffs_from_json(self, tracker, uuid): uuid.return_value = 'mockUUID' @@ -757,7 +757,7 @@ class CourseGradingTest(CourseTestCase): # Once deleted, the grace period should simply be None self.assertEqual(None, altered_grader.grace_period, "Delete grace period") - @mock.patch('track.event_transaction_utils.uuid4') + @mock.patch('common.djangoapps.track.event_transaction_utils.uuid4') @mock.patch('cms.djangoapps.models.settings.course_grading.tracker') @mock.patch('cms.djangoapps.contentstore.signals.signals.GRADING_POLICY_CHANGED.send') def test_update_section_grader_type(self, send_signal, tracker, uuid): diff --git a/cms/djangoapps/contentstore/tests/test_courseware_index.py b/cms/djangoapps/contentstore/tests/test_courseware_index.py index 679ed9e39e..74ed0f6d32 100644 --- a/cms/djangoapps/contentstore/tests/test_courseware_index.py +++ b/cms/djangoapps/contentstore/tests/test_courseware_index.py @@ -30,8 +30,8 @@ from cms.djangoapps.contentstore.signals.handlers import listen_for_course_publi from cms.djangoapps.contentstore.tasks import update_search_index from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url, reverse_usage_url -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.models.course_details import CourseDetails from xmodule.library_tools import normalize_key_for_search from xmodule.modulestore import ModuleStoreEnum diff --git a/cms/djangoapps/contentstore/tests/test_libraries.py b/cms/djangoapps/contentstore/tests/test_libraries.py index 70c261b21b..f387764916 100644 --- a/cms/djangoapps/contentstore/tests/test_libraries.py +++ b/cms/djangoapps/contentstore/tests/test_libraries.py @@ -16,9 +16,9 @@ from cms.djangoapps.contentstore.views.item import _duplicate_item from cms.djangoapps.contentstore.views.preview import _load_preview_module from cms.djangoapps.contentstore.views.tests.test_library import LIBRARY_REST_URL from cms.djangoapps.course_creators.views import add_user_with_status_granted -from student import auth -from student.auth import has_studio_read_access, has_studio_write_access -from student.roles import ( +from common.djangoapps.student import auth +from common.djangoapps.student.auth import has_studio_read_access, has_studio_write_access +from common.djangoapps.student.roles import ( CourseInstructorRole, CourseStaffRole, LibraryUserRole, @@ -26,8 +26,8 @@ from student.roles import ( OrgLibraryUserRole, OrgStaffRole ) -from student.tests.factories import UserFactory -from xblock_django.user_service import DjangoXBlockUserService +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.xblock_django.user_service import DjangoXBlockUserService from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/djangoapps/contentstore/tests/test_orphan.py b/cms/djangoapps/contentstore/tests/test_orphan.py index a28940d435..c6deba4d68 100644 --- a/cms/djangoapps/contentstore/tests/test_orphan.py +++ b/cms/djangoapps/contentstore/tests/test_orphan.py @@ -11,7 +11,7 @@ from opaque_keys.edx.locator import BlockUsageLocator from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.search import path_to_location from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls_range diff --git a/cms/djangoapps/contentstore/tests/test_permissions.py b/cms/djangoapps/contentstore/tests/test_permissions.py index 3520a6592a..210c8f0bcb 100644 --- a/cms/djangoapps/contentstore/tests/test_permissions.py +++ b/cms/djangoapps/contentstore/tests/test_permissions.py @@ -10,8 +10,8 @@ from six.moves import range from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient from cms.djangoapps.contentstore.utils import reverse_course_url, reverse_url -from student import auth -from student.roles import CourseInstructorRole, CourseStaffRole, OrgInstructorRole, OrgStaffRole +from common.djangoapps.student import auth +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole, OrgInstructorRole, OrgStaffRole from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/djangoapps/contentstore/tests/test_signals.py b/cms/djangoapps/contentstore/tests/test_signals.py index 561468e476..c92928808b 100644 --- a/cms/djangoapps/contentstore/tests/test_signals.py +++ b/cms/djangoapps/contentstore/tests/test_signals.py @@ -6,8 +6,8 @@ import six from mock import Mock, patch from cms.djangoapps.contentstore.signals.handlers import GRADING_POLICY_COUNTDOWN_SECONDS, handle_grading_policy_changed -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/cms/djangoapps/contentstore/tests/test_tasks.py b/cms/djangoapps/contentstore/tests/test_tasks.py index 020be9654b..192280682a 100644 --- a/cms/djangoapps/contentstore/tests/test_tasks.py +++ b/cms/djangoapps/contentstore/tests/test_tasks.py @@ -19,7 +19,7 @@ from user_tasks.models import UserTaskArtifact, UserTaskStatus from cms.djangoapps.contentstore.tasks import export_olx, rerun_course from cms.djangoapps.contentstore.tests.test_libraries import LibraryTestCase from cms.djangoapps.contentstore.tests.utils import CourseTestCase -from course_action_state.models import CourseRerunState +from common.djangoapps.course_action_state.models import CourseRerunState from openedx.core.djangoapps.embargo.models import Country, CountryAccessRule, RestrictedCourse from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py index f8bc06d1a2..887a245ea3 100644 --- a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py +++ b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py @@ -18,7 +18,7 @@ from mock import Mock, patch from six import text_type from cms.djangoapps.contentstore.tests.utils import mock_requests_get -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError diff --git a/cms/djangoapps/contentstore/tests/test_users_default_role.py b/cms/djangoapps/contentstore/tests/test_users_default_role.py index 85fbbc0d38..e968fd8cae 100644 --- a/cms/djangoapps/contentstore/tests/test_users_default_role.py +++ b/cms/djangoapps/contentstore/tests/test_users_default_role.py @@ -7,7 +7,7 @@ after deleting it creates same course again from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient from cms.djangoapps.contentstore.utils import delete_course, reverse_url from lms.djangoapps.courseware.tests.factories import UserFactory -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index be9dc5c30c..0c9dc771a7 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -14,7 +14,7 @@ from mock import Mock from opaque_keys.edx.keys import AssetKey, CourseKey from cms.djangoapps.contentstore.utils import reverse_url -from student.models import Registration +from common.djangoapps.student.models import Registration from xmodule.contentstore.django import contentstore from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.inheritance import own_metadata diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 5f46a5f1c4..aed8c315ef 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -23,9 +23,9 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ from openedx.core.djangoapps.site_configuration.models import SiteConfiguration from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.content_type_gating.partitions import CONTENT_TYPE_GATING_SCHEME -from student import auth -from student.models import CourseEnrollment -from student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student import auth +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/cms/djangoapps/contentstore/views/access.py b/cms/djangoapps/contentstore/views/access.py index b49edef6e7..a714cc545d 100644 --- a/cms/djangoapps/contentstore/views/access.py +++ b/cms/djangoapps/contentstore/views/access.py @@ -1,8 +1,8 @@ """ Helper methods for determining user access permissions in Studio """ -from student import auth -from student.roles import CourseInstructorRole +from common.djangoapps.student import auth +from common.djangoapps.student.roles import CourseInstructorRole def get_user_role(user, course_id): diff --git a/cms/djangoapps/contentstore/views/assets.py b/cms/djangoapps/contentstore/views/assets.py index 0bfe3488b5..7974041b56 100644 --- a/cms/djangoapps/contentstore/views/assets.py +++ b/cms/djangoapps/contentstore/views/assets.py @@ -19,11 +19,11 @@ from opaque_keys.edx.keys import AssetKey, CourseKey from pymongo import ASCENDING, DESCENDING from six import text_type -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.contentserver.caching import del_cached_content -from student.auth import has_course_author_access -from util.date_utils import get_default_time_display -from util.json_request import JsonResponse +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.util.date_utils import get_default_time_display +from common.djangoapps.util.json_request import JsonResponse from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError diff --git a/cms/djangoapps/contentstore/views/certificates.py b/cms/djangoapps/contentstore/views/certificates.py index 3c5b18ce15..7b16ba6d36 100644 --- a/cms/djangoapps/contentstore/views/certificates.py +++ b/cms/djangoapps/contentstore/views/certificates.py @@ -39,12 +39,12 @@ from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import AssetKey, CourseKey from six import text_type -from course_modes.models import CourseMode -from edxmako.shortcuts import render_to_response -from student.auth import has_studio_write_access -from student.roles import GlobalStaff -from util.db import MYSQL_MAX_INT, generate_int_id -from util.json_request import JsonResponse +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student.auth import has_studio_write_access +from common.djangoapps.student.roles import GlobalStaff +from common.djangoapps.util.db import MYSQL_MAX_INT, generate_int_id +from common.djangoapps.util.json_request import JsonResponse from xmodule.modulestore import EdxJSONEncoder from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/views/checklists.py b/cms/djangoapps/contentstore/views/checklists.py index 4ea8e3a327..a04cf8ec28 100644 --- a/cms/djangoapps/contentstore/views/checklists.py +++ b/cms/djangoapps/contentstore/views/checklists.py @@ -3,8 +3,8 @@ from django.core.exceptions import PermissionDenied from django.views.decorators.csrf import ensure_csrf_cookie from opaque_keys.edx.keys import CourseKey -from edxmako.shortcuts import render_to_response -from student.auth import has_course_author_access +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student.auth import has_course_author_access from xmodule.modulestore.django import modulestore __all__ = ['checklists_handler'] diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 5ddf06d948..dde19152d7 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -21,11 +21,11 @@ from xblock.exceptions import NoSuchHandlerError from xblock.plugin import PluginMissingError from xblock.runtime import Mixologist -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.lib.xblock_utils import get_aside_from_xblock, is_xblock_aside -from student.auth import has_course_author_access -from xblock_django.api import authorable_xblocks, disabled_xblocks -from xblock_django.models import XBlockStudioConfigurationFlag +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.xblock_django.api import authorable_xblocks, disabled_xblocks +from common.djangoapps.xblock_django.models import XBlockStudioConfigurationFlag from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index ccc04088c1..afb4b7c955 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -35,10 +35,10 @@ from cms.djangoapps.course_creators.views import add_user_with_status_unrequeste from cms.djangoapps.models.settings.course_grading import CourseGradingModel from cms.djangoapps.models.settings.course_metadata import CourseMetadata from cms.djangoapps.models.settings.encoder import CourseSettingsEncoder -from course_action_state.managers import CourseActionStateItemNotFoundError -from course_action_state.models import CourseRerunState, CourseRerunUIStateManager -from course_modes.models import CourseMode -from edxmako.shortcuts import render_to_response +from common.djangoapps.course_action_state.managers import CourseActionStateItemNotFoundError +from common.djangoapps.course_action_state.models import CourseRerunState, CourseRerunUIStateManager +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.credit.api import get_credit_requirements, is_credit_course from openedx.core.djangoapps.credit.tasks import update_credit_course_requirements @@ -51,22 +51,26 @@ from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.content_type_gating.partitions import CONTENT_TYPE_GATING_SCHEME from openedx.features.course_experience.waffle import ENABLE_COURSE_ABOUT_SIDEBAR_HTML from openedx.features.course_experience.waffle import waffle as course_experience_waffle -from student import auth -from student.auth import has_course_author_access, has_studio_read_access, has_studio_write_access -from student.roles import CourseCreatorRole, CourseInstructorRole, CourseStaffRole, GlobalStaff, UserBasedRole -from util.course import get_link_for_about_page -from util.date_utils import get_default_time_display -from util.json_request import JsonResponse, JsonResponseBadRequest, expect_json -from util.milestones_helpers import ( +from common.djangoapps.student import auth +from common.djangoapps.student.auth import has_course_author_access, has_studio_read_access, has_studio_write_access +from common.djangoapps.student.roles import ( + CourseCreatorRole, CourseInstructorRole, CourseStaffRole, GlobalStaff, UserBasedRole +) +from common.djangoapps.util.course import get_link_for_about_page +from common.djangoapps.util.date_utils import get_default_time_display +from common.djangoapps.util.json_request import JsonResponse, JsonResponseBadRequest, expect_json +from common.djangoapps.util.milestones_helpers import ( is_prerequisite_courses_enabled, is_valid_course_key, remove_prerequisite_course, set_prerequisite_courses ) -from util.organizations_helpers import add_organization_course, get_organization_by_short_name, organizations_enabled -from util.string_utils import _has_non_ascii_characters from openedx.core import toggles as core_toggles -from xblock_django.api import deprecated_xblocks +from common.djangoapps.util.organizations_helpers import ( + add_organization_course, get_organization_by_short_name, organizations_enabled +) +from common.djangoapps.util.string_utils import _has_non_ascii_characters +from common.djangoapps.xblock_django.api import deprecated_xblocks from xmodule.contentstore.content import StaticContent from xmodule.course_module import DEFAULT_START_DATE, CourseFields from xmodule.error_module import ErrorDescriptor diff --git a/cms/djangoapps/contentstore/views/dev.py b/cms/djangoapps/contentstore/views/dev.py index f04818e08e..85d451fb6f 100644 --- a/cms/djangoapps/contentstore/views/dev.py +++ b/cms/djangoapps/contentstore/views/dev.py @@ -4,7 +4,7 @@ These views will NOT be shown on production: trying to access them will result in a 404 error. """ -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response def dev_mode(request): diff --git a/cms/djangoapps/contentstore/views/entrance_exam.py b/cms/djangoapps/contentstore/views/entrance_exam.py index b33b44307c..90528c05fa 100644 --- a/cms/djangoapps/contentstore/views/entrance_exam.py +++ b/cms/djangoapps/contentstore/views/entrance_exam.py @@ -18,8 +18,8 @@ from opaque_keys.edx.keys import CourseKey, UsageKey from cms.djangoapps.models.settings.course_metadata import CourseMetadata from openedx.core.djangolib.js_utils import dump_js_escaped_json -from student.auth import has_course_author_access -from util import milestones_helpers +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.util import milestones_helpers from openedx.core import toggles as core_toggles from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index eb4b234e40..9fd2734b67 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -2,9 +2,9 @@ import functools from django.http import HttpResponse, HttpResponseNotFound, HttpResponseServerError -from edxmako.shortcuts import render_to_response, render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_response, render_to_string from openedx.core.djangolib.js_utils import dump_js_escaped_json -from util.views import fix_crum_request +from common.djangoapps.util.views import fix_crum_request __all__ = ['not_found', 'server_error', 'render_404', 'render_500'] diff --git a/cms/djangoapps/contentstore/views/export_git.py b/cms/djangoapps/contentstore/views/export_git.py index dddfd0cfb4..c392347061 100644 --- a/cms/djangoapps/contentstore/views/export_git.py +++ b/cms/djangoapps/contentstore/views/export_git.py @@ -14,8 +14,8 @@ from django.views.decorators.csrf import ensure_csrf_cookie from opaque_keys.edx.keys import CourseKey import cms.djangoapps.contentstore.git_export_utils as git_export_utils -from edxmako.shortcuts import render_to_response -from student.auth import has_course_author_access +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student.auth import has_course_author_access from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/cms/djangoapps/contentstore/views/helpers.py b/cms/djangoapps/contentstore/views/helpers.py index 2c51df6867..bf563b412b 100644 --- a/cms/djangoapps/contentstore/views/helpers.py +++ b/cms/djangoapps/contentstore/views/helpers.py @@ -12,8 +12,8 @@ from opaque_keys.edx.keys import UsageKey from xblock.core import XBlock from cms.djangoapps.models.settings.course_grading import CourseGradingModel -from edxmako.shortcuts import render_to_string from openedx.core.toggles import ENTRANCE_EXAMS +from common.djangoapps.edxmako.shortcuts import render_to_string from xmodule.modulestore.django import modulestore from xmodule.tabs import StaticTab diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index 83f7703f6a..839005ceb9 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -30,10 +30,10 @@ from storages.backends.s3boto import S3BotoStorage from user_tasks.conf import settings as user_tasks_settings from user_tasks.models import UserTaskArtifact, UserTaskStatus -from edxmako.shortcuts import render_to_response -from student.auth import has_course_author_access -from util.json_request import JsonResponse -from util.views import ensure_valid_course_key +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.util.json_request import JsonResponse +from common.djangoapps.util.views import ensure_valid_course_key from xmodule.modulestore.django import modulestore from ..storage import course_import_export_storage diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index a4ba2a9a40..204c8d0a1f 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -35,16 +35,16 @@ from cms.djangoapps.contentstore.config.waffle import SHOW_REVIEW_RULES_FLAG from cms.djangoapps.models.settings.course_grading import CourseGradingModel from cms.djangoapps.xblock_config.models import CourseEditLTIFieldsEnabledFlag from cms.lib.xblock.authoring_mixin import VISIBILITY_VIEW -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from openedx.core.djangoapps.schedules.config import COURSE_UPDATE_WAFFLE_FLAG from openedx.core.lib.gating import api as gating_api from openedx.core.lib.xblock_utils import hash_resource, request_token, wrap_xblock, wrap_xblock_aside -from static_replace import replace_static_urls -from student.auth import has_studio_read_access, has_studio_write_access -from util.date_utils import get_default_time_display -from util.json_request import JsonResponse, expect_json +from common.djangoapps.static_replace import replace_static_urls +from common.djangoapps.student.auth import has_studio_read_access, has_studio_write_access from openedx.core.toggles import ENTRANCE_EXAMS -from xblock_django.user_service import DjangoXBlockUserService +from common.djangoapps.util.date_utils import get_default_time_display +from common.djangoapps.util.json_request import JsonResponse, expect_json +from common.djangoapps.xblock_django.user_service import DjangoXBlockUserService from xmodule.course_module import DEFAULT_START_DATE from xmodule.library_tools import LibraryToolsService from xmodule.modulestore import EdxJSONEncoder, ModuleStoreEnum diff --git a/cms/djangoapps/contentstore/views/library.py b/cms/djangoapps/contentstore/views/library.py index cb203132d4..0b9a38543a 100644 --- a/cms/djangoapps/contentstore/views/library.py +++ b/cms/djangoapps/contentstore/views/library.py @@ -20,16 +20,16 @@ from opaque_keys.edx.locator import LibraryLocator, LibraryUsageLocator from six import text_type from cms.djangoapps.course_creators.views import get_course_creator_status -from edxmako.shortcuts import render_to_response -from student.auth import ( +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student.auth import ( STUDIO_EDIT_ROLES, STUDIO_VIEW_USERS, get_user_permissions, has_studio_read_access, has_studio_write_access ) -from student.roles import CourseInstructorRole, CourseStaffRole, LibraryUserRole -from util.json_request import JsonResponse, JsonResponseBadRequest, expect_json +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole, LibraryUserRole +from common.djangoapps.util.json_request import JsonResponse, JsonResponseBadRequest, expect_json from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import DuplicateCourseError diff --git a/cms/djangoapps/contentstore/views/organization.py b/cms/djangoapps/contentstore/views/organization.py index 04000259bb..89f6bab278 100644 --- a/cms/djangoapps/contentstore/views/organization.py +++ b/cms/djangoapps/contentstore/views/organization.py @@ -7,7 +7,7 @@ from django.utils.decorators import method_decorator from django.views.generic import View from openedx.core.djangolib.js_utils import dump_js_escaped_json -from util.organizations_helpers import get_organizations +from common.djangoapps.util.organizations_helpers import get_organizations class OrganizationListView(View): diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 638faaea5e..81b1f813da 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -16,10 +16,10 @@ from xblock.django.request import django_to_webob_request, webob_to_django_respo from xblock.exceptions import NoSuchHandlerError from xblock.runtime import KvsFieldData -import static_replace +from common.djangoapps import static_replace from cms.djangoapps.xblock_config.models import StudioConfig from cms.lib.xblock.field_data import CmsFieldData -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from lms.djangoapps.lms_xblock.field_data import LmsFieldData from openedx.core.lib.license import wrap_with_license from openedx.core.lib.xblock_utils import ( @@ -30,7 +30,7 @@ from openedx.core.lib.xblock_utils import ( wrap_xblock_aside, xblock_local_resource_url ) -from xblock_django.user_service import DjangoXBlockUserService +from common.djangoapps.xblock_django.user_service import DjangoXBlockUserService from xmodule.contentstore.django import contentstore from xmodule.error_module import ErrorDescriptor from xmodule.exceptions import NotFoundError, ProcessingError diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index 4462f7d88f..b6fd4a5474 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -8,7 +8,7 @@ from django.shortcuts import redirect from django.utils.http import urlquote_plus from waffle.decorators import waffle_switch -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from ..config import waffle diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index 7b03b0b225..11438ae3e4 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -11,9 +11,9 @@ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods from opaque_keys.edx.keys import CourseKey, UsageKey -from edxmako.shortcuts import render_to_response -from student.auth import has_course_author_access -from util.json_request import JsonResponse, expect_json +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.util.json_request import JsonResponse, expect_json from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.tabs import CourseTab, CourseTabList, InvalidTabsException, StaticTab diff --git a/cms/djangoapps/contentstore/views/tests/test_access.py b/cms/djangoapps/contentstore/views/tests/test_access.py index e410399c4e..fa7cff61cd 100644 --- a/cms/djangoapps/contentstore/views/tests/test_access.py +++ b/cms/djangoapps/contentstore/views/tests/test_access.py @@ -7,9 +7,9 @@ from django.contrib.auth.models import User from django.test import TestCase from opaque_keys.edx.locator import CourseLocator -from student.auth import add_users -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import AdminFactory +from common.djangoapps.student.auth import add_users +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import AdminFactory from ..access import get_user_role diff --git a/cms/djangoapps/contentstore/views/tests/test_assets.py b/cms/djangoapps/contentstore/views/tests/test_assets.py index 1dbefda6e2..872922a7f0 100644 --- a/cms/djangoapps/contentstore/views/tests/test_assets.py +++ b/cms/djangoapps/contentstore/views/tests/test_assets.py @@ -21,7 +21,7 @@ from pytz import UTC from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url from cms.djangoapps.contentstore.views import assets -from static_replace import replace_static_urls +from common.djangoapps.static_replace import replace_static_urls from xmodule.assetstore import AssetMetadata from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore diff --git a/cms/djangoapps/contentstore/views/tests/test_certificates.py b/cms/djangoapps/contentstore/views/tests/test_certificates.py index 4a3bf1cec8..4b36da9212 100644 --- a/cms/djangoapps/contentstore/views/tests/test_certificates.py +++ b/cms/djangoapps/contentstore/views/tests/test_certificates.py @@ -18,11 +18,11 @@ from six.moves import range from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import get_lms_link_for_certificate_web_view, reverse_course_url -from course_modes.tests.factories import CourseModeFactory -from student.models import CourseEnrollment -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import UserFactory -from util.testing import EventTestMixin, UrlResetMixin +from common.djangoapps.course_modes.tests.factories import CourseModeFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import EventTestMixin, UrlResetMixin from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError diff --git a/cms/djangoapps/contentstore/views/tests/test_course_index.py b/cms/djangoapps/contentstore/views/tests/test_course_index.py index ec6b86e906..4ac5f6cf76 100644 --- a/cms/djangoapps/contentstore/views/tests/test_course_index.py +++ b/cms/djangoapps/contentstore/views/tests/test_course_index.py @@ -21,12 +21,12 @@ from search.api import perform_search from cms.djangoapps.contentstore.courseware_index import CoursewareSearchIndexer, SearchIndexingError from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import add_instructor, reverse_course_url, reverse_usage_url -from course_action_state.managers import CourseRerunUIStateManager -from course_action_state.models import CourseRerunState +from common.djangoapps.course_action_state.managers import CourseRerunUIStateManager +from common.djangoapps.course_action_state.models import CourseRerunState from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES -from student.auth import has_course_author_access -from student.roles import CourseStaffRole, GlobalStaff, LibraryUserRole -from student.tests.factories import UserFactory +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.student.roles import CourseStaffRole, GlobalStaff, LibraryUserRole +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, LibraryFactory, check_mongo_calls diff --git a/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py b/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py index 9e07f05748..bb80d7fa89 100644 --- a/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py +++ b/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py @@ -17,8 +17,8 @@ from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient, Cours from cms.djangoapps.contentstore.utils import reverse_url from cms.djangoapps.models.settings.course_grading import CourseGradingModel from cms.djangoapps.models.settings.course_metadata import CourseMetadata -from student.tests.factories import UserFactory -from util import milestones_helpers +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util import milestones_helpers from xmodule.modulestore.django import modulestore from ..entrance_exam import ( diff --git a/cms/djangoapps/contentstore/views/tests/test_exam_settings_view.py b/cms/djangoapps/contentstore/views/tests/test_exam_settings_view.py index 278787855d..c24d3fa044 100644 --- a/cms/djangoapps/contentstore/views/tests/test_exam_settings_view.py +++ b/cms/djangoapps/contentstore/views/tests/test_exam_settings_view.py @@ -11,7 +11,7 @@ from django.test.utils import override_settings from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url -from util.testing import UrlResetMixin +from common.djangoapps.util.testing import UrlResetMixin FEATURES_WITH_CERTS_ENABLED = settings.FEATURES.copy() FEATURES_WITH_CERTS_ENABLED['CERTIFICATES_HTML_VIEW'] = True diff --git a/cms/djangoapps/contentstore/views/tests/test_header_menu.py b/cms/djangoapps/contentstore/views/tests/test_header_menu.py index cd11613c76..f2fd6e8c2d 100644 --- a/cms/djangoapps/contentstore/views/tests/test_header_menu.py +++ b/cms/djangoapps/contentstore/views/tests/test_header_menu.py @@ -10,7 +10,7 @@ from django.test.utils import override_settings from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url -from util.testing import UrlResetMixin +from common.djangoapps.util.testing import UrlResetMixin FEATURES_WITH_CERTS_ENABLED = settings.FEATURES.copy() FEATURES_WITH_CERTS_ENABLED['CERTIFICATES_HTML_VIEW'] = True diff --git a/cms/djangoapps/contentstore/views/tests/test_import_export.py b/cms/djangoapps/contentstore/views/tests/test_import_export.py index 292fb71326..75ad02cc69 100644 --- a/cms/djangoapps/contentstore/views/tests/test_import_export.py +++ b/cms/djangoapps/contentstore/views/tests/test_import_export.py @@ -31,9 +31,9 @@ from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url from cms.djangoapps.models.settings.course_metadata import CourseMetadata from openedx.core.lib.extract_tar import safetar_extractall -from student import auth -from student.roles import CourseInstructorRole, CourseStaffRole -from util import milestones_helpers +from common.djangoapps.student import auth +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.util import milestones_helpers from xmodule.contentstore.django import contentstore from xmodule.modulestore import LIBRARY_ROOT, ModuleStoreEnum from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index ed8707395a..ddf1c8b64d 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -36,9 +36,11 @@ from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url, reverse_usage_url from cms.djangoapps.contentstore.views import item as item_module from lms.djangoapps.lms_xblock.mixin import NONSENSICAL_ACCESS_RESTRICTION -from student.tests.factories import UserFactory -from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag -from xblock_django.user_service import DjangoXBlockUserService +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.xblock_django.models import ( + XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag +) +from common.djangoapps.xblock_django.user_service import DjangoXBlockUserService from xmodule.capa_module import ProblemBlock from xmodule.course_module import DEFAULT_START_DATE from xmodule.modulestore import ModuleStoreEnum diff --git a/cms/djangoapps/contentstore/views/tests/test_library.py b/cms/djangoapps/contentstore/views/tests/test_library.py index bd212b1e56..96d3f68012 100644 --- a/cms/djangoapps/contentstore/views/tests/test_library.py +++ b/cms/djangoapps/contentstore/views/tests/test_library.py @@ -17,7 +17,7 @@ from six.moves import range from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient, CourseTestCase, parse_json from cms.djangoapps.contentstore.utils import reverse_course_url, reverse_library_url from cms.djangoapps.course_creators.views import add_user_with_status_granted as grant_course_creator_status -from student.roles import LibraryUserRole +from common.djangoapps.student.roles import LibraryUserRole from xmodule.modulestore.tests.factories import LibraryFactory from ..component import get_component_templates diff --git a/cms/djangoapps/contentstore/views/tests/test_organizations.py b/cms/djangoapps/contentstore/views/tests/test_organizations.py index 1b7fabe653..6aabcbd781 100644 --- a/cms/djangoapps/contentstore/views/tests/test_organizations.py +++ b/cms/djangoapps/contentstore/views/tests/test_organizations.py @@ -7,8 +7,8 @@ from django.test import TestCase from django.urls import reverse from mock import patch -from student.tests.factories import UserFactory -from util.organizations_helpers import add_organization +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.organizations_helpers import add_organization @patch.dict('django.conf.settings.FEATURES', {'ORGANIZATIONS_APP': True}) diff --git a/cms/djangoapps/contentstore/views/tests/test_preview.py b/cms/djangoapps/contentstore/views/tests/test_preview.py index ba03a735be..efff1760f9 100644 --- a/cms/djangoapps/contentstore/views/tests/test_preview.py +++ b/cms/djangoapps/contentstore/views/tests/test_preview.py @@ -13,7 +13,7 @@ from xblock.core import XBlock, XBlockAside from cms.djangoapps.contentstore.utils import reverse_usage_url from cms.djangoapps.xblock_config.models import StudioConfig -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py b/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py index 2ba55b7cf8..90ce580450 100644 --- a/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py +++ b/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py @@ -14,7 +14,7 @@ from mock import ANY, Mock, patch from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url from openedx.core.djangoapps.profile_images.tests.helpers import make_image_file -from student.roles import CourseStaffRole +from common.djangoapps.student.roles import CourseStaffRole from ..transcript_settings import TranscriptionProviderErrorType, validate_transcript_credentials diff --git a/cms/djangoapps/contentstore/views/tests/test_user.py b/cms/djangoapps/contentstore/views/tests/test_user.py index 51a1a826c9..c0ccf75122 100644 --- a/cms/djangoapps/contentstore/views/tests/test_user.py +++ b/cms/djangoapps/contentstore/views/tests/test_user.py @@ -9,9 +9,9 @@ from django.contrib.auth.models import User from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url -from student import auth -from student.models import CourseEnrollment -from student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student import auth +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole class UsersTestCase(CourseTestCase): diff --git a/cms/djangoapps/contentstore/views/transcript_settings.py b/cms/djangoapps/contentstore/views/transcript_settings.py index f191acfc75..b6bd83add2 100644 --- a/cms/djangoapps/contentstore/views/transcript_settings.py +++ b/cms/djangoapps/contentstore/views/transcript_settings.py @@ -23,8 +23,8 @@ from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.video_config.models import VideoTranscriptEnabledFlag from openedx.core.djangoapps.video_pipeline.api import update_3rd_party_transcription_service_credentials -from student.auth import has_studio_write_access -from util.json_request import JsonResponse, expect_json +from common.djangoapps.student.auth import has_studio_write_access +from common.djangoapps.util.json_request import JsonResponse, expect_json from xmodule.video_module.transcripts_utils import Transcript, TranscriptsGenerationException from .videos import TranscriptProvider diff --git a/cms/djangoapps/contentstore/views/transcripts_ajax.py b/cms/djangoapps/contentstore/views/transcripts_ajax.py index eea7d68139..378d03dd6a 100644 --- a/cms/djangoapps/contentstore/views/transcripts_ajax.py +++ b/cms/djangoapps/contentstore/views/transcripts_ajax.py @@ -25,8 +25,8 @@ from opaque_keys.edx.keys import UsageKey from six import text_type from cms.djangoapps.contentstore.views.videos import TranscriptProvider -from student.auth import has_course_author_access -from util.json_request import JsonResponse +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.util.json_request import JsonResponse from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index b0fc143d07..3af7087d24 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -12,12 +12,12 @@ from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import LibraryLocator from cms.djangoapps.course_creators.views import user_requested_access -from edxmako.shortcuts import render_to_response -from student import auth -from student.auth import STUDIO_EDIT_ROLES, STUDIO_VIEW_USERS, get_user_permissions -from student.models import CourseEnrollment -from student.roles import CourseInstructorRole, CourseStaffRole, LibraryUserRole -from util.json_request import JsonResponse, expect_json +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student import auth +from common.djangoapps.student.auth import STUDIO_EDIT_ROLES, STUDIO_VIEW_USERS, get_user_permissions +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole, LibraryUserRole +from common.djangoapps.util.json_request import JsonResponse, expect_json from xmodule.modulestore.django import modulestore __all__ = ['request_course_creator', 'course_team_handler'] diff --git a/cms/djangoapps/contentstore/views/videos.py b/cms/djangoapps/contentstore/views/videos.py index d00b9d4639..c6e0cabbcd 100644 --- a/cms/djangoapps/contentstore/views/videos.py +++ b/cms/djangoapps/contentstore/views/videos.py @@ -45,7 +45,7 @@ from rest_framework.decorators import api_view from rest_framework.response import Response from edx_toggles.toggles import WaffleFlagNamespace, WaffleSwitchNamespace -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.video_config.models import VideoTranscriptEnabledFlag from openedx.core.djangoapps.video_pipeline.config.waffle import ( DEPRECATE_YOUTUBE, @@ -54,7 +54,7 @@ from openedx.core.djangoapps.video_pipeline.config.waffle import ( ) from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag from openedx.core.lib.api.view_utils import view_auth_classes -from util.json_request import JsonResponse, expect_json +from common.djangoapps.util.json_request import JsonResponse, expect_json from xmodule.video_module.transcripts_utils import Transcript from ..models import VideoUploadConfig diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index 46e9363fc4..5b607eb603 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -18,7 +18,7 @@ from cms.djangoapps.course_creators.models import ( update_creator_state ) from cms.djangoapps.course_creators.views import update_course_creator_group -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string log = logging.getLogger("studio.coursecreatoradmin") diff --git a/cms/djangoapps/course_creators/tests/test_admin.py b/cms/djangoapps/course_creators/tests/test_admin.py index 4bf60e6e30..4905e90bb8 100644 --- a/cms/djangoapps/course_creators/tests/test_admin.py +++ b/cms/djangoapps/course_creators/tests/test_admin.py @@ -13,8 +13,8 @@ from six.moves import range from cms.djangoapps.course_creators.admin import CourseCreatorAdmin from cms.djangoapps.course_creators.models import CourseCreator -from student import auth -from student.roles import CourseCreatorRole +from common.djangoapps.student import auth +from common.djangoapps.student.roles import CourseCreatorRole def mock_render_to_string(template_name, context): diff --git a/cms/djangoapps/course_creators/tests/test_views.py b/cms/djangoapps/course_creators/tests/test_views.py index faea3a70e6..78493ce857 100644 --- a/cms/djangoapps/course_creators/tests/test_views.py +++ b/cms/djangoapps/course_creators/tests/test_views.py @@ -16,8 +16,8 @@ from cms.djangoapps.course_creators.views import ( update_course_creator_group, user_requested_access ) -from student import auth -from student.roles import CourseCreatorRole +from common.djangoapps.student import auth +from common.djangoapps.student.roles import CourseCreatorRole class CourseCreatorView(TestCase): diff --git a/cms/djangoapps/course_creators/views.py b/cms/djangoapps/course_creators/views.py index 06727c17be..80f0817067 100644 --- a/cms/djangoapps/course_creators/views.py +++ b/cms/djangoapps/course_creators/views.py @@ -4,8 +4,8 @@ Methods for interacting programmatically with the user creator table. from cms.djangoapps.course_creators.models import CourseCreator -from student import auth -from student.roles import CourseCreatorRole +from common.djangoapps.student import auth +from common.djangoapps.student.roles import CourseCreatorRole def add_user_with_status_unrequested(user): diff --git a/cms/djangoapps/maintenance/tests.py b/cms/djangoapps/maintenance/tests.py index c15965385e..6200aa8e1e 100644 --- a/cms/djangoapps/maintenance/tests.py +++ b/cms/djangoapps/maintenance/tests.py @@ -12,7 +12,7 @@ from django.urls import reverse from cms.djangoapps.contentstore.management.commands.utils import get_course_versions from openedx.features.announcements.models import Announcement -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/djangoapps/maintenance/views.py b/cms/djangoapps/maintenance/views.py index 4ee6520bb0..207966960e 100644 --- a/cms/djangoapps/maintenance/views.py +++ b/cms/djangoapps/maintenance/views.py @@ -19,11 +19,11 @@ from opaque_keys.edx.keys import CourseKey from six import text_type from cms.djangoapps.contentstore.management.commands.utils import get_course_versions -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.features.announcements.forms import AnnouncementForm from openedx.features.announcements.models import Announcement -from util.json_request import JsonResponse -from util.views import require_global_staff +from common.djangoapps.util.json_request import JsonResponse +from common.djangoapps.util.views import require_global_staff from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/cms/djangoapps/models/settings/course_grading.py b/cms/djangoapps/models/settings/course_grading.py index d34407a7f7..3cc7ff00df 100644 --- a/cms/djangoapps/models/settings/course_grading.py +++ b/cms/djangoapps/models/settings/course_grading.py @@ -12,7 +12,7 @@ from eventtracking import tracker from cms.djangoapps.contentstore.signals.signals import GRADING_POLICY_CHANGED from cms.djangoapps.models.settings.waffle import material_recompute_only -from track.event_transaction_utils import create_new_event_transaction_id +from common.djangoapps.track.event_transaction_utils import create_new_event_transaction_id from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/cms/djangoapps/models/settings/course_metadata.py b/cms/djangoapps/models/settings/course_metadata.py index dfd32fdca1..cd3e5d5884 100644 --- a/cms/djangoapps/models/settings/course_metadata.py +++ b/cms/djangoapps/models/settings/course_metadata.py @@ -16,8 +16,8 @@ from xblock.fields import Scope from openedx.core.lib.teams_config import TeamsetType from openedx.features.course_experience import COURSE_ENABLE_UNENROLLED_ACCESS_FLAG -from student.roles import GlobalStaff -from xblock_django.models import XBlockStudioConfigurationFlag +from common.djangoapps.student.roles import GlobalStaff +from common.djangoapps.xblock_django.models import XBlockStudioConfigurationFlag from xmodule.modulestore.django import modulestore diff --git a/cms/envs/bok_choy.auth.json b/cms/envs/bok_choy.auth.json index 402121e741..4a9a2f7150 100644 --- a/cms/envs/bok_choy.auth.json +++ b/cms/envs/bok_choy.auth.json @@ -78,7 +78,7 @@ "localhost" ], "port": 27017, - "render_template": "edxmako.shortcuts.render_to_string" + "render_template": "common.djangoapps.edxmako.shortcuts.render_to_string" } }, { diff --git a/cms/envs/bok_choy.env.json b/cms/envs/bok_choy.env.json index daff45b443..b40518b7d3 100644 --- a/cms/envs/bok_choy.env.json +++ b/cms/envs/bok_choy.env.json @@ -4,7 +4,7 @@ "CACHES": { "celery": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_celery", "LOCATION": [ "localhost:11211" @@ -12,7 +12,7 @@ }, "default": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_default", "LOCATION": [ "localhost:11211" @@ -20,7 +20,7 @@ }, "general": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_general", "LOCATION": [ "localhost:11211" @@ -28,7 +28,7 @@ }, "mongo_metadata_inheritance": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_mongo_metadata_inheritance", "LOCATION": [ "localhost:11211" @@ -36,7 +36,7 @@ }, "staticfiles": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_static_files", "LOCATION": [ "localhost:11211" diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index 10eb112542..62a6e8aa98 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -90,7 +90,7 @@ MEDIA_ROOT = TEST_ROOT / "uploads" WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = TEST_ROOT / "staticfiles" / "cms" / "webpack-stats.json" LOG_OVERRIDES = [ - ('track.middleware', logging.CRITICAL), + ('common.djangoapps.track.middleware', logging.CRITICAL), ('edx.discussion', logging.CRITICAL), ] for log_name, log_level in LOG_OVERRIDES: diff --git a/cms/envs/bok_choy.yml b/cms/envs/bok_choy.yml index 6aa54f0b84..0064713460 100644 --- a/cms/envs/bok_choy.yml +++ b/cms/envs/bok_choy.yml @@ -7,27 +7,27 @@ BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com CACHES: celery: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['localhost:11211'] default: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['localhost:11211'] general: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['localhost:11211'] mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['localhost:11211'] staticfiles: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['localhost:11211'] CELERY_ALWAYS_EAGER: true diff --git a/cms/envs/bok_choy_docker.auth.json b/cms/envs/bok_choy_docker.auth.json index 1fa9f75494..98c999fb7c 100644 --- a/cms/envs/bok_choy_docker.auth.json +++ b/cms/envs/bok_choy_docker.auth.json @@ -78,7 +78,7 @@ "edx.devstack.mongo" ], "port": 27017, - "render_template": "edxmako.shortcuts.render_to_string" + "render_template": "common.djangoapps.edxmako.shortcuts.render_to_string" } }, { diff --git a/cms/envs/bok_choy_docker.env.json b/cms/envs/bok_choy_docker.env.json index f5d18281e9..628e374856 100644 --- a/cms/envs/bok_choy_docker.env.json +++ b/cms/envs/bok_choy_docker.env.json @@ -4,7 +4,7 @@ "CACHES": { "celery": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_celery", "LOCATION": [ "edx.devstack.memcached:11211" @@ -12,7 +12,7 @@ }, "default": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_default", "LOCATION": [ "edx.devstack.memcached:11211" @@ -20,7 +20,7 @@ }, "general": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_general", "LOCATION": [ "edx.devstack.memcached:11211" @@ -28,7 +28,7 @@ }, "mongo_metadata_inheritance": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_mongo_metadata_inheritance", "LOCATION": [ "edx.devstack.memcached:11211" @@ -36,7 +36,7 @@ }, "staticfiles": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "KEY_FUNCTION": "util.memcache.safe_key", + "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_static_files", "LOCATION": [ "edx.devstack.memcached:11211" diff --git a/cms/envs/bok_choy_docker.yml b/cms/envs/bok_choy_docker.yml index 99aede0ad8..a3bd2151f0 100644 --- a/cms/envs/bok_choy_docker.yml +++ b/cms/envs/bok_choy_docker.yml @@ -7,27 +7,27 @@ BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com CACHES: celery: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['edx.devstack.memcached:11211'] default: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['edx.devstack.memcached:11211'] general: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['edx.devstack.memcached:11211'] mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['edx.devstack.memcached:11211'] staticfiles: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['edx.devstack.memcached:11211'] CELERY_ALWAYS_EAGER: true diff --git a/cms/envs/common.py b/cms/envs/common.py index 0539804ce1..ab1a55e609 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -447,12 +447,10 @@ COURSES_ROOT = ENV_ROOT / "data" GITHUB_REPO_ROOT = ENV_ROOT / "data" -# TODO: Is this next line necessary? -sys.path.append(REPO_ROOT) -# TODO: The next two path modifications will be removed in an upcoming Open edX release. +# TODO: This path modification exists as temporary support for deprecated import patterns. +# It will be removed in an upcoming Open edX release. # See docs/decisions/0007-sys-path-modification-removal.rst sys.path.append(REPO_ROOT / 'import_shims' / 'studio') -sys.path.append(COMMON_ROOT / 'djangoapps') # For geolocation ip database GEOIP_PATH = REPO_ROOT / "common/static/data/geoip/GeoLite2-Country.mmdb" @@ -511,8 +509,8 @@ TEMPLATES = [ # We have to use mako-aware template loaders to be able to include # mako templates inside django templates (such as main_django.html). 'openedx.core.djangoapps.theming.template_loaders.ThemeTemplateLoader', - 'edxmako.makoloader.MakoFilesystemLoader', - 'edxmako.makoloader.MakoAppDirectoriesLoader', + 'common.djangoapps.edxmako.makoloader.MakoFilesystemLoader', + 'common.djangoapps.edxmako.makoloader.MakoAppDirectoriesLoader', ), 'context_processors': CONTEXT_PROCESSORS, # Change 'debug' in your environment settings files - not here. @@ -521,7 +519,7 @@ TEMPLATES = [ }, { 'NAME': 'mako', - 'BACKEND': 'edxmako.backend.Mako', + 'BACKEND': 'common.djangoapps.edxmako.backend.Mako', 'APP_DIRS': False, 'DIRS': _make_mako_template_dirs, 'OPTIONS': { @@ -532,7 +530,7 @@ TEMPLATES = [ { # This separate copy of the Mako backend is used to render previews using the LMS templates 'NAME': 'preview', - 'BACKEND': 'edxmako.backend.Mako', + 'BACKEND': 'common.djangoapps.edxmako.backend.Mako', 'APP_DIRS': False, 'DIRS': lms.envs.common.MAKO_TEMPLATE_DIRS_BASE, 'OPTIONS': { @@ -691,11 +689,11 @@ MIDDLEWARE = [ # Instead of AuthenticationMiddleware, we use a cache-backed version 'openedx.core.djangoapps.cache_toolbox.middleware.CacheBackedAuthenticationMiddleware', - 'student.middleware.UserStandingMiddleware', + 'common.djangoapps.student.middleware.UserStandingMiddleware', 'openedx.core.djangoapps.contentserver.middleware.StaticContentServer', 'django.contrib.messages.middleware.MessageMiddleware', - 'track.middleware.TrackMiddleware', + 'common.djangoapps.track.middleware.TrackMiddleware', # This is used to set or update the user language preferences. 'openedx.core.djangoapps.lang_pref.middleware.LanguagePreferenceMiddleware', @@ -833,7 +831,7 @@ MODULESTORE = { 'OPTIONS': { 'default_class': 'xmodule.hidden_module.HiddenDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'edxmako.shortcuts.render_to_string', + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string', } }, { @@ -843,7 +841,7 @@ MODULESTORE = { 'OPTIONS': { 'default_class': 'xmodule.hidden_module.HiddenDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'edxmako.shortcuts.render_to_string', + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string', } } ] @@ -1347,7 +1345,7 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.contentserver', 'cms.djangoapps.course_creators', - 'student.apps.StudentConfig', # misleading name due to sharing with lms + 'common.djangoapps.student.apps.StudentConfig', # misleading name due to sharing with lms 'openedx.core.djangoapps.course_groups', # not used in cms (yet), but tests run 'cms.djangoapps.xblock_config.apps.XBlockConfig', @@ -1359,13 +1357,13 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.util.apps.UtilConfig', # Tracking - 'track', + 'common.djangoapps.track', 'eventtracking.django.apps.EventTrackingConfig', # For asset pipelining - 'edxmako.apps.EdxMakoConfig', + 'common.djangoapps.edxmako.apps.EdxMakoConfig', 'pipeline', - 'static_replace', + 'common.djangoapps.static_replace', 'require', 'webpack_loader', @@ -1382,7 +1380,7 @@ INSTALLED_APPS = [ 'django.contrib.admin', # for managing course modes - 'course_modes.apps.CourseModesConfig', + 'common.djangoapps.course_modes.apps.CourseModesConfig', # Verified Track Content Cohorting (Beta feature that will hopefully be removed) 'openedx.core.djangoapps.verified_track_content', @@ -1403,7 +1401,7 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.embargo', # Course action state - 'course_action_state', + 'common.djangoapps.course_action_state', # Additional problem types 'edx_jsme', # Molecular Structure @@ -1423,7 +1421,7 @@ INSTALLED_APPS = [ # Credit courses 'openedx.core.djangoapps.credit.apps.CreditConfig', - 'xblock_django', + 'common.djangoapps.xblock_django', # Catalog integration 'openedx.core.djangoapps.catalog', @@ -1470,7 +1468,7 @@ INSTALLED_APPS = [ 'cms.djangoapps.cms_user_tasks.apps.CmsUserTasksConfig', # Unusual migrations - 'database_fixups', + 'common.djangoapps.database_fixups', # Customized celery tasks, including persisting failed tasks so they can # be retried @@ -1487,10 +1485,10 @@ INSTALLED_APPS = [ 'csrf.apps.CsrfAppConfig', # Enables frontend apps to retrieve CSRF tokens. # Entitlements, used in openedx tests - 'entitlements', + 'common.djangoapps.entitlements', # Asset management for mako templates - 'pipeline_mako', + 'common.djangoapps.pipeline_mako', # API Documentation 'drf_yasg', @@ -1542,7 +1540,7 @@ TRACK_MAX_EVENT = 50000 TRACKING_BACKENDS = { 'logger': { - 'ENGINE': 'track.backends.logger.LoggerBackend', + 'ENGINE': 'common.djangoapps.track.backends.logger.LoggerBackend', 'OPTIONS': { 'name': 'tracking' } @@ -1568,8 +1566,8 @@ EVENT_TRACKING_BACKENDS = { } }, 'processors': [ - {'ENGINE': 'track.shim.LegacyFieldMappingProcessor'}, - {'ENGINE': 'track.shim.PrefixedEventProcessor'} + {'ENGINE': 'common.djangoapps.track.shim.LegacyFieldMappingProcessor'}, + {'ENGINE': 'common.djangoapps.track.shim.PrefixedEventProcessor'} ] } }, @@ -1587,7 +1585,7 @@ EVENT_TRACKING_BACKENDS = { } }, { - 'ENGINE': 'track.shim.GoogleAnalyticsProcessor' + 'ENGINE': 'common.djangoapps.track.shim.GoogleAnalyticsProcessor' } ] } @@ -1603,13 +1601,13 @@ AUTH_PASSWORD_VALIDATORS = [ "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", }, { - "NAME": "util.password_policy_validators.MinimumLengthValidator", + "NAME": "common.djangoapps.util.password_policy_validators.MinimumLengthValidator", "OPTIONS": { "min_length": 2 } }, { - "NAME": "util.password_policy_validators.MaximumLengthValidator", + "NAME": "common.djangoapps.util.password_policy_validators.MaximumLengthValidator", "OPTIONS": { "max_length": 75 } @@ -1858,53 +1856,53 @@ DATABASE_ROUTERS = [ CACHES = { 'blockstore': { 'KEY_PREFIX': 'blockstore', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': '86400', # This data should be long-lived for performance, BundleCache handles invalidation 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'course_structure_cache': { 'KEY_PREFIX': 'course_structure', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'celery': { 'KEY_PREFIX': 'celery', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'mongo_metadata_inheritance': { 'KEY_PREFIX': 'mongo_metadata_inheritance', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': 300, 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'staticfiles': { - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'staticfiles_general', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'default': { 'VERSION': '1', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'default', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'configuration': { - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'configuration', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'general': { - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'general', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 215447d856..79d41d6338 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -26,7 +26,7 @@ CMS_BASE = 'localhost:18010' # Disable noisy loggers -for pkg_name in ['track.contexts', 'track.middleware']: +for pkg_name in ['common.djangoapps.track.contexts', 'common.djangoapps.track.middleware']: logging.getLogger(pkg_name).setLevel(logging.CRITICAL) # Docker does not support the syslog socket at /dev/log. Rely on the console. diff --git a/cms/envs/devstack_decentralized.py b/cms/envs/devstack_decentralized.py index 4b33d18c40..40f1d01799 100644 --- a/cms/envs/devstack_decentralized.py +++ b/cms/envs/devstack_decentralized.py @@ -24,7 +24,7 @@ CMS_BASE = 'localhost:8010' # Disable noisy loggers -for pkg_name in ['track.contexts', 'track.middleware']: +for pkg_name in ['common.djangoapps.track.contexts', 'common.djangoapps.track.middleware']: logging.getLogger(pkg_name).setLevel(logging.CRITICAL) # Docker does not support the syslog socket at /dev/log. Rely on the console. diff --git a/cms/envs/test.py b/cms/envs/test.py index 126b941834..579ad6e597 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -146,7 +146,7 @@ CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': 'edx_loc_mem_cache', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', }, # The general cache is what you get if you use our util.cache. It's used for @@ -158,14 +158,14 @@ CACHES = { 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', 'KEY_PREFIX': 'general', 'VERSION': 4, - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', }, 'mongo_metadata_inheritance': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': os.path.join(tempfile.gettempdir(), 'mongo_metadata_inheritance'), 'TIMEOUT': 300, - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', }, 'loc_cache': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', diff --git a/cms/lib/xblock/tagging/tagging.py b/cms/lib/xblock/tagging/tagging.py index cfd2fbf442..067e4ac510 100644 --- a/cms/lib/xblock/tagging/tagging.py +++ b/cms/lib/xblock/tagging/tagging.py @@ -11,7 +11,7 @@ from webob import Response from xblock.core import XBlock, XBlockAside from xblock.fields import Dict, Scope -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from xmodule.capa_module import ProblemBlock from xmodule.x_module import AUTHOR_VIEW diff --git a/cms/lib/xblock/tagging/test.py b/cms/lib/xblock/tagging/test.py index 670831fbda..41e8277dc7 100644 --- a/cms/lib/xblock/tagging/test.py +++ b/cms/lib/xblock/tagging/test.py @@ -23,7 +23,7 @@ from cms.djangoapps.contentstore.views.preview import get_preview_fragment from cms.djangoapps.xblock_config.models import StudioConfig from cms.lib.xblock.tagging import StructuredTagsAside from cms.lib.xblock.tagging.models import TagAvailableValues, TagCategories -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/cms/lib/xblock/test/test_authoring_mixin.py b/cms/lib/xblock/test/test_authoring_mixin.py index 1193e16827..de2559d31d 100644 --- a/cms/lib/xblock/test/test_authoring_mixin.py +++ b/cms/lib/xblock/test/test_authoring_mixin.py @@ -6,7 +6,7 @@ Tests for the Studio authoring XBlock mixin. from django.conf import settings from django.test.utils import override_settings -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.partitions.partitions import ( diff --git a/cms/templates/checklists.html b/cms/templates/checklists.html index d5b602b946..10dc44d836 100644 --- a/cms/templates/checklists.html +++ b/cms/templates/checklists.html @@ -10,7 +10,7 @@ from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json - from util.course import has_certificates_enabled + from common.djangoapps.util.course import has_certificates_enabled %> <%block name="title">${_("Checklists")} <%block name="bodyclass">is-signedin course view-checklists diff --git a/cms/templates/course_outline.html b/cms/templates/course_outline.html index 2de2563610..1be2997a43 100644 --- a/cms/templates/course_outline.html +++ b/cms/templates/course_outline.html @@ -7,7 +7,7 @@ import six from six.moves.urllib.parse import quote from cms.djangoapps.contentstore.config.waffle_utils import should_show_checklists_quality -from util.date_utils import get_default_time_display +from common.djangoapps.util.date_utils import get_default_time_display from django.utils.translation import ugettext as _ from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json from openedx.core.djangolib.markup import HTML, Text diff --git a/cms/templates/widgets/user_dropdown.html b/cms/templates/widgets/user_dropdown.html index 88d03079c4..8e91704d78 100644 --- a/cms/templates/widgets/user_dropdown.html +++ b/cms/templates/widgets/user_dropdown.html @@ -5,7 +5,7 @@ from django.urls import reverse from django.utils.translation import ugettext as _ from edx_django_utils.monitoring import set_custom_attribute - from student.roles import GlobalStaff + from common.djangoapps.student.roles import GlobalStaff %>

diff --git a/cms/urls.py b/cms/urls.py index 0fc4f44351..a03fca8039 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -44,7 +44,7 @@ LIBRARY_KEY_PATTERN = r'(?Plibrary-v1:[^/+]+\+[^/+]+)' urlpatterns = [ url(r'', include('openedx.core.djangoapps.user_authn.urls_common')), - url(r'', include('student.urls')), + url(r'', include('common.djangoapps.student.urls')), url(r'^transcripts/upload$', contentstore_views.upload_transcripts, name='upload_transcripts'), url(r'^transcripts/download$', contentstore_views.download_transcripts, name='download_transcripts'), url(r'^transcripts/check$', contentstore_views.check_transcripts, name='check_transcripts'), diff --git a/common/djangoapps/__init__.py b/common/djangoapps/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/djangoapps/course_action_state/models.py b/common/djangoapps/course_action_state/models.py index 2867ddf8a1..47c194ca41 100644 --- a/common/djangoapps/course_action_state/models.py +++ b/common/djangoapps/course_action_state/models.py @@ -13,7 +13,7 @@ file and check it in at the same time as your model changes. To do that, from django.contrib.auth.models import User from django.db import models from opaque_keys.edx.django.models import CourseKeyField -from course_action_state.managers import CourseActionStateManager, CourseRerunUIStateManager +from common.djangoapps.course_action_state.managers import CourseActionStateManager, CourseRerunUIStateManager class CourseActionState(models.Model): diff --git a/common/djangoapps/course_action_state/tests/test_managers.py b/common/djangoapps/course_action_state/tests/test_managers.py index 68fc954ce4..cdda2aa62b 100644 --- a/common/djangoapps/course_action_state/tests/test_managers.py +++ b/common/djangoapps/course_action_state/tests/test_managers.py @@ -10,8 +10,8 @@ from django.test import TestCase from opaque_keys.edx.locations import CourseLocator from six.moves import range -from course_action_state.managers import CourseActionStateItemNotFoundError -from course_action_state.models import CourseRerunState +from common.djangoapps.course_action_state.managers import CourseActionStateItemNotFoundError +from common.djangoapps.course_action_state.models import CourseRerunState # Sequence of Action models to be tested with ddt. COURSE_ACTION_STATES = (CourseRerunState, ) diff --git a/common/djangoapps/course_action_state/tests/test_rerun_manager.py b/common/djangoapps/course_action_state/tests/test_rerun_manager.py index b0e26b85d5..5292677ea4 100644 --- a/common/djangoapps/course_action_state/tests/test_rerun_manager.py +++ b/common/djangoapps/course_action_state/tests/test_rerun_manager.py @@ -7,9 +7,9 @@ from django.test import TestCase from opaque_keys.edx.locations import CourseLocator from six import text_type -from course_action_state.managers import CourseRerunUIStateManager -from course_action_state.models import CourseRerunState -from student.tests.factories import UserFactory +from common.djangoapps.course_action_state.managers import CourseRerunUIStateManager +from common.djangoapps.course_action_state.models import CourseRerunState +from common.djangoapps.student.tests.factories import UserFactory class TestCourseRerunStateManager(TestCase): diff --git a/common/djangoapps/course_modes/admin.py b/common/djangoapps/course_modes/admin.py index 3138ea989c..56b41001da 100644 --- a/common/djangoapps/course_modes/admin.py +++ b/common/djangoapps/course_modes/admin.py @@ -10,7 +10,7 @@ from django.utils.translation import ugettext_lazy as _ from opaque_keys.edx.keys import CourseKey from pytz import UTC, timezone -from course_modes.models import CourseMode, CourseModeExpirationConfig +from common.djangoapps.course_modes.models import CourseMode, CourseModeExpirationConfig # Technically, we shouldn't be doing this, since verify_student is defined # in LMS, and course_modes is defined in common. # @@ -23,7 +23,7 @@ from course_modes.models import CourseMode, CourseModeExpirationConfig # the verification deadline table won't exist. from lms.djangoapps.verify_student import models as verification_models from openedx.core.lib.courses import clean_course_id -from util.date_utils import get_time_display +from common.djangoapps.util.date_utils import get_time_display COURSE_MODE_SLUG_CHOICES = [(key, enrollment_mode['display_name']) for key, enrollment_mode in six.iteritems(settings.COURSE_ENROLLMENT_MODES)] diff --git a/common/djangoapps/course_modes/api.py b/common/djangoapps/course_modes/api.py index 2dce97f412..8da8167ede 100644 --- a/common/djangoapps/course_modes/api.py +++ b/common/djangoapps/course_modes/api.py @@ -2,7 +2,7 @@ Python APIs exposed by the course_modes app to other in-process apps. """ -from course_modes.models import CourseMode as _CourseMode +from common.djangoapps.course_modes.models import CourseMode as _CourseMode def get_paid_modes_for_course(course_run_id): diff --git a/common/djangoapps/course_modes/apps.py b/common/djangoapps/course_modes/apps.py index e0420ea199..39cf5de2f1 100644 --- a/common/djangoapps/course_modes/apps.py +++ b/common/djangoapps/course_modes/apps.py @@ -5,8 +5,8 @@ from django.apps import AppConfig class CourseModesConfig(AppConfig): - name = 'course_modes' + name = 'common.djangoapps.course_modes' verbose_name = "Course Modes" def ready(self): - import course_modes.signals # pylint: disable=unused-import + from . import signals # pylint: disable=unused-import diff --git a/common/djangoapps/course_modes/helpers.py b/common/djangoapps/course_modes/helpers.py index 7bca76cd21..c237b15223 100644 --- a/common/djangoapps/course_modes/helpers.py +++ b/common/djangoapps/course_modes/helpers.py @@ -8,8 +8,8 @@ from django.utils.translation import ugettext_lazy as _ from requests.exceptions import ConnectionError, Timeout # pylint: disable=redefined-builtin from slumber.exceptions import SlumberBaseException -from course_modes.models import CourseMode -from student.helpers import VERIFY_STATUS_APPROVED, VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.student.helpers import VERIFY_STATUS_APPROVED, VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED from openedx.core.djangoapps.commerce.utils import ecommerce_api_client DISPLAY_VERIFIED = "verified" diff --git a/common/djangoapps/course_modes/rest_api/serializers.py b/common/djangoapps/course_modes/rest_api/serializers.py index 4510fd4eec..f3c73657a2 100644 --- a/common/djangoapps/course_modes/rest_api/serializers.py +++ b/common/djangoapps/course_modes/rest_api/serializers.py @@ -5,7 +5,7 @@ Course modes API serializers. from rest_framework import serializers -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.models import CourseOverview diff --git a/common/djangoapps/course_modes/rest_api/urls.py b/common/djangoapps/course_modes/rest_api/urls.py index 349efb8a3f..9bcba6ec2f 100644 --- a/common/djangoapps/course_modes/rest_api/urls.py +++ b/common/djangoapps/course_modes/rest_api/urls.py @@ -8,5 +8,5 @@ from django.conf.urls import include, url app_name = 'common.djangoapps.course_modes.rest_api' urlpatterns = [ - url(r'^v1/', include('course_modes.rest_api.v1.urls', namespace='v1')), + url(r'^v1/', include('common.djangoapps.course_modes.rest_api.v1.urls', namespace='v1')), ] diff --git a/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py b/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py index 8a079f9bbd..e1eba7eeec 100644 --- a/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py +++ b/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py @@ -14,12 +14,12 @@ from rest_framework import status from rest_framework.test import APITestCase from six import text_type -from course_modes.rest_api.v1.views import CourseModesView -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.rest_api.v1.views import CourseModesView +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.user_authn.tests.utils import JWT_AUTH_TYPES, AuthAndScopesTestMixin, AuthType -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/common/djangoapps/course_modes/rest_api/v1/urls.py b/common/djangoapps/course_modes/rest_api/v1/urls.py index 7dd28e36fd..a95e5de5aa 100644 --- a/common/djangoapps/course_modes/rest_api/v1/urls.py +++ b/common/djangoapps/course_modes/rest_api/v1/urls.py @@ -6,7 +6,7 @@ URL definitions for the course_modes v1 API. from django.conf import settings from django.conf.urls import url -from course_modes.rest_api.v1 import views +from common.djangoapps.course_modes.rest_api.v1 import views app_name = 'v1' diff --git a/common/djangoapps/course_modes/rest_api/v1/views.py b/common/djangoapps/course_modes/rest_api/v1/views.py index e8d963e986..caeebb7097 100644 --- a/common/djangoapps/course_modes/rest_api/v1/views.py +++ b/common/djangoapps/course_modes/rest_api/v1/views.py @@ -14,8 +14,8 @@ from rest_framework import status from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response -from course_modes.rest_api.serializers import CourseModeSerializer -from course_modes.models import CourseMode +from common.djangoapps.course_modes.rest_api.serializers import CourseModeSerializer +from common.djangoapps.course_modes.models import CourseMode from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser from openedx.core.lib.api.parsers import MergePatchParser diff --git a/common/djangoapps/course_modes/tests/factories.py b/common/djangoapps/course_modes/tests/factories.py index dbd7c0bb0d..ee3974dff9 100644 --- a/common/djangoapps/course_modes/tests/factories.py +++ b/common/djangoapps/course_modes/tests/factories.py @@ -10,7 +10,7 @@ from factory import lazy_attribute from factory.django import DjangoModelFactory from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory diff --git a/common/djangoapps/course_modes/tests/test_admin.py b/common/djangoapps/course_modes/tests/test_admin.py index d0b8c91aa6..b71e87db1e 100644 --- a/common/djangoapps/course_modes/tests/test_admin.py +++ b/common/djangoapps/course_modes/tests/test_admin.py @@ -12,17 +12,17 @@ from django.conf import settings from django.urls import reverse from pytz import UTC, timezone -from course_modes.admin import CourseModeForm -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.admin import CourseModeForm +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory # Technically, we shouldn't be importing verify_student, since it's # defined in the LMS and course_modes is in common. However, the benefits # of putting all this configuration in one place outweigh the downsides. # Once the course admin tool is deployed, we can remove this dependency. from lms.djangoapps.verify_student.models import VerificationDeadline from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.tests.factories import UserFactory -from util.date_utils import get_time_display +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.date_utils import get_time_display from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/course_modes/tests/test_models.py b/common/djangoapps/course_modes/tests/test_models.py index 199dcdb4b2..a0e5ed5ffc 100644 --- a/common/djangoapps/course_modes/tests/test_models.py +++ b/common/djangoapps/course_modes/tests/test_models.py @@ -18,9 +18,9 @@ from opaque_keys.edx.locator import CourseLocator import six from six.moves import zip -from course_modes.helpers import enrollment_mode_display -from course_modes.models import CourseMode, Mode, get_cosmetic_display_price, invalidate_course_mode_cache -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.helpers import enrollment_mode_display +from common.djangoapps.course_modes.models import CourseMode, Mode, get_cosmetic_display_price, invalidate_course_mode_cache +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -546,12 +546,18 @@ class TestDisplayPrices(ModuleStoreTestCase): course = CourseFactory.create() registration_price = 99 course.cosmetic_display_price = 10 - with patch('course_modes.models.CourseMode.min_course_price_for_currency', return_value=registration_price): + with patch( + 'common.djangoapps.course_modes.models.CourseMode.min_course_price_for_currency', + return_value=registration_price, + ): # Since registration_price is set, it overrides the cosmetic_display_price and should be returned self.assertEqual(get_cosmetic_display_price(course), "$99") registration_price = 0 - with patch('course_modes.models.CourseMode.min_course_price_for_currency', return_value=registration_price): + with patch( + 'common.djangoapps.course_modes.models.CourseMode.min_course_price_for_currency', + return_value=registration_price, + ): # Since registration_price is not set, cosmetic_display_price should be returned self.assertEqual(get_cosmetic_display_price(course), "$10") diff --git a/common/djangoapps/course_modes/tests/test_signals.py b/common/djangoapps/course_modes/tests/test_signals.py index 6730d42600..679f3c568e 100644 --- a/common/djangoapps/course_modes/tests/test_signals.py +++ b/common/djangoapps/course_modes/tests/test_signals.py @@ -10,8 +10,8 @@ from django.conf import settings from mock import patch from pytz import UTC -from course_modes.models import CourseMode -from course_modes.signals import _listen_for_course_publish +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.signals import _listen_for_course_publish from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory @@ -67,7 +67,7 @@ class CourseModeSignalTest(ModuleStoreTestCase): course_mode, __ = self.create_mode('verified', 'verified', 10) self.assertIsNone(course_mode.expiration_datetime) - with patch('course_modes.models.CourseModeExpirationConfig.current') as config: + with patch('common.djangoapps.course_modes.models.CourseModeExpirationConfig.current') as config: instance = config.return_value instance.verification_window = timedelta(days=verification_window) @@ -83,7 +83,7 @@ class CourseModeSignalTest(ModuleStoreTestCase): course_mode.expiration_datetime_is_explicit = True self.assertIsNone(course_mode.expiration_datetime) - with patch('course_modes.models.CourseModeExpirationConfig.current') as config: + with patch('common.djangoapps.course_modes.models.CourseModeExpirationConfig.current') as config: instance = config.return_value instance.verification_window = timedelta(days=verification_window) diff --git a/common/djangoapps/course_modes/tests/test_views.py b/common/djangoapps/course_modes/tests/test_views.py index f6977ef558..590d577c62 100644 --- a/common/djangoapps/course_modes/tests/test_views.py +++ b/common/djangoapps/course_modes/tests/test_views.py @@ -16,17 +16,17 @@ from django.conf import settings from django.urls import reverse from mock import patch -from course_modes.models import CourseMode, Mode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode, Mode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.commerce.tests import test_utils as ecomm_test_utils from lms.djangoapps.commerce.tests.mocks import mock_payment_processors from openedx.core.djangoapps.catalog.tests.mixins import CatalogIntegrationMixin from openedx.core.djangoapps.embargo.test_utils import restrict_course from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme -from student.models import CourseEnrollment -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.testing import UrlResetMixin -from util.tests.mixins.discovery import CourseCatalogServiceMockMixin +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.testing import UrlResetMixin +from common.djangoapps.util.tests.mixins.discovery import CourseCatalogServiceMockMixin from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -38,7 +38,7 @@ class CourseModeViewTest(CatalogIntegrationMixin, UrlResetMixin, ModuleStoreTest """ Course Mode View tests """ - URLCONF_MODULES = ['course_modes.urls'] + URLCONF_MODULES = ['common.djangoapps.course_modes.urls'] @patch.dict(settings.FEATURES, {'MODE_CREATION_FOR_TESTING': True}) def setUp(self): @@ -200,8 +200,8 @@ class CourseModeViewTest(CatalogIntegrationMixin, UrlResetMixin, ModuleStoreTest self.assertNotContains(response, "Credit") @httpretty.activate - @patch('course_modes.views.enterprise_customer_for_request') - @patch('course_modes.views.get_course_final_price') + @patch('common.djangoapps.course_modes.views.enterprise_customer_for_request') + @patch('common.djangoapps.course_modes.views.get_course_final_price') @ddt.data( (1.0, True), (50.0, False), diff --git a/common/djangoapps/course_modes/urls.py b/common/djangoapps/course_modes/urls.py index c1c8fbe392..8e3937ef14 100644 --- a/common/djangoapps/course_modes/urls.py +++ b/common/djangoapps/course_modes/urls.py @@ -4,7 +4,7 @@ from django.conf import settings from django.conf.urls import url -from course_modes import views +from common.djangoapps.course_modes import views urlpatterns = [ url(r'^choose/{}/$'.format(settings.COURSE_ID_PATTERN), views.ChooseModeView.as_view(), name='course_modes_choose'), diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index 7e01196f10..3f190340b6 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -25,9 +25,9 @@ from ipware.ip import get_ip from opaque_keys.edx.keys import CourseKey from six import text_type -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from common.djangoapps.course_modes.helpers import get_course_final_price -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.experiments.utils import get_experiment_user_metadata_context from lms.djangoapps.verify_student.services import IDVerificationService @@ -37,8 +37,8 @@ from openedx.core.djangoapps.enrollments.permissions import ENROLL_IN_COURSE from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_duration_limits.models import CourseDurationLimitConfig from openedx.features.enterprise_support.api import enterprise_customer_for_request -from student.models import CourseEnrollment -from util.db import outer_atomic +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.db import outer_atomic from xmodule.modulestore.django import modulestore LOG = logging.getLogger(__name__) diff --git a/common/djangoapps/edxmako/apps.py b/common/djangoapps/edxmako/apps.py index 7ac79c3089..5c2f9fdc1e 100644 --- a/common/djangoapps/edxmako/apps.py +++ b/common/djangoapps/edxmako/apps.py @@ -12,7 +12,7 @@ class EdxMakoConfig(AppConfig): """ Configuration class for the edxmako Django application. """ - name = 'edxmako' + name = 'common.djangoapps.edxmako' verbose_name = "edX Mako Templating" def ready(self): diff --git a/common/djangoapps/edxmako/makoloader.py b/common/djangoapps/edxmako/makoloader.py index b0541eae40..c363927399 100644 --- a/common/djangoapps/edxmako/makoloader.py +++ b/common/djangoapps/edxmako/makoloader.py @@ -8,7 +8,7 @@ from django.template import Engine, engines, TemplateDoesNotExist from django.template.loaders.app_directories import Loader as AppDirectoriesLoader from django.template.loaders.filesystem import Loader as FilesystemLoader -from edxmako.template import Template +from common.djangoapps.edxmako.template import Template from openedx.core.lib.tempdir import mkdtemp_clean log = logging.getLogger(__name__) diff --git a/common/djangoapps/edxmako/tests.py b/common/djangoapps/edxmako/tests.py index e3f630c349..1f81a238e9 100644 --- a/common/djangoapps/edxmako/tests.py +++ b/common/djangoapps/edxmako/tests.py @@ -12,11 +12,16 @@ from django.urls import reverse from edx_django_utils.cache import RequestCache from mock import Mock, patch -from edxmako import LOOKUP, add_lookup -from edxmako.request_context import get_template_request_context -from edxmako.shortcuts import is_any_marketing_link_set, is_marketing_link_set, marketing_link, render_to_string -from student.tests.factories import UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.edxmako import LOOKUP, add_lookup +from common.djangoapps.edxmako.request_context import get_template_request_context +from common.djangoapps.edxmako.shortcuts import ( + is_any_marketing_link_set, + is_marketing_link_set, + marketing_link, + render_to_string +) +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import UrlResetMixin @ddt.ddt @@ -118,7 +123,7 @@ class AddLookupTests(TestCase): """ Test the `add_lookup` function. """ - @patch('edxmako.LOOKUP', {}) + @patch('common.djangoapps.edxmako.LOOKUP', {}) def test_with_package(self): add_lookup('test', 'management', __name__) dirs = LOOKUP['test'].directories @@ -147,7 +152,7 @@ class MakoRequestContextTest(TestCase): returns a RequestContext. """ - with patch('edxmako.request_context.get_current_request', return_value=self.request): + with patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=self.request): # requestcontext should not be None. self.assertIsNotNone(get_template_request_context()) @@ -156,7 +161,7 @@ class MakoRequestContextTest(TestCase): Test that if get_current_request returns None, then get_template_request_context returns None. """ - with patch('edxmako.request_context.get_current_request', return_value=None): + with patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=None): # requestcontext should be None. self.assertIsNone(get_template_request_context()) @@ -164,17 +169,17 @@ class MakoRequestContextTest(TestCase): """ Test that the RequestContext is cached in the RequestCache. """ - with patch('edxmako.request_context.get_current_request', return_value=None): + with patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=None): # requestcontext should be None, because the cache isn't filled self.assertIsNone(get_template_request_context()) - with patch('edxmako.request_context.get_current_request', return_value=self.request): + with patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=self.request): # requestcontext should not be None, and should fill the cache self.assertIsNotNone(get_template_request_context()) mock_get_current_request = Mock() - with patch('edxmako.request_context.get_current_request'): - with patch('edxmako.request_context.RequestContext.__init__') as mock_context_init: + with patch('common.djangoapps.edxmako.request_context.get_current_request'): + with patch('common.djangoapps.edxmako.request_context.RequestContext.__init__') as mock_context_init: # requestcontext should not be None, because the cache is filled self.assertIsNotNone(get_template_request_context()) mock_context_init.assert_not_called() @@ -182,7 +187,7 @@ class MakoRequestContextTest(TestCase): RequestCache.clear_all_namespaces() - with patch('edxmako.request_context.get_current_request', return_value=None): + with patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=None): # requestcontext should be None, because the cache isn't filled self.assertIsNone(get_template_request_context()) diff --git a/common/djangoapps/entitlements/apps.py b/common/djangoapps/entitlements/apps.py index 50a8d9a525..0b88b896c8 100644 --- a/common/djangoapps/entitlements/apps.py +++ b/common/djangoapps/entitlements/apps.py @@ -12,7 +12,7 @@ class EntitlementsConfig(AppConfig): """ Application Configuration for Entitlements. """ - name = u'entitlements' + name = 'common.djangoapps.entitlements' def ready(self): """ diff --git a/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py b/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py index 3b76a5ec17..6965a457fb 100644 --- a/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py +++ b/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py @@ -9,8 +9,8 @@ from textwrap import dedent from django.core.management import BaseCommand from six.moves import range -from entitlements.models import CourseEntitlement -from entitlements.tasks import expire_old_entitlements +from common.djangoapps.entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.tasks import expire_old_entitlements logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py b/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py index 7e1e6e489b..fb9663dadd 100644 --- a/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py +++ b/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py @@ -6,12 +6,12 @@ from django.core.management import call_command from django.test import TestCase from six.moves import range -from entitlements.tests.factories import CourseEntitlementFactory +from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory from openedx.core.djangolib.testing.utils import skip_unless_lms @skip_unless_lms -@mock.patch('entitlements.tasks.expire_old_entitlements.delay') +@mock.patch('common.djangoapps.entitlements.tasks.expire_old_entitlements.delay') class TestExpireOldEntitlementsCommand(TestCase): """ Test expire_old_entitlement management command. diff --git a/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py b/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py index f00f0cc662..0b97ce463a 100644 --- a/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py +++ b/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py @@ -8,7 +8,7 @@ from textwrap import dedent from django.core.management import BaseCommand -from entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.models import CourseEntitlement logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/common/djangoapps/entitlements/models.py b/common/djangoapps/entitlements/models.py index 4041f02bc2..23f3b341cf 100644 --- a/common/djangoapps/entitlements/models.py +++ b/common/djangoapps/entitlements/models.py @@ -14,14 +14,14 @@ from model_utils import Choices from model_utils.models import TimeStampedModel from simple_history.models import HistoricalRecords -from course_modes.models import CourseMode -from entitlements.utils import is_course_run_entitlement_fulfillable +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.entitlements.utils import is_course_run_entitlement_fulfillable from lms.djangoapps.certificates.models import GeneratedCertificate from lms.djangoapps.commerce.utils import refund_entitlement from openedx.core.djangoapps.catalog.utils import get_course_uuid_for_course from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment, CourseEnrollmentException -from util.date_utils import strftime_localized +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentException +from common.djangoapps.util.date_utils import strftime_localized log = logging.getLogger("common.entitlements.models") diff --git a/common/djangoapps/entitlements/rest_api/urls.py b/common/djangoapps/entitlements/rest_api/urls.py index cda3bb602e..18bafa5679 100644 --- a/common/djangoapps/entitlements/rest_api/urls.py +++ b/common/djangoapps/entitlements/rest_api/urls.py @@ -6,5 +6,5 @@ from django.conf.urls import include, url app_name = 'entitlements' urlpatterns = [ - url(r'^v1/', include('entitlements.rest_api.v1.urls')), + url(r'^v1/', include('common.djangoapps.entitlements.rest_api.v1.urls')), ] diff --git a/common/djangoapps/entitlements/rest_api/v1/filters.py b/common/djangoapps/entitlements/rest_api/v1/filters.py index 984b746401..78e326bf82 100644 --- a/common/djangoapps/entitlements/rest_api/v1/filters.py +++ b/common/djangoapps/entitlements/rest_api/v1/filters.py @@ -4,7 +4,7 @@ Filters for the Entitlements API. from django_filters import rest_framework as filters -from entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.models import CourseEntitlement class CharListFilter(filters.CharFilter): diff --git a/common/djangoapps/entitlements/rest_api/v1/serializers.py b/common/djangoapps/entitlements/rest_api/v1/serializers.py index 3a7084c4e9..a64d6d25bb 100644 --- a/common/djangoapps/entitlements/rest_api/v1/serializers.py +++ b/common/djangoapps/entitlements/rest_api/v1/serializers.py @@ -6,7 +6,7 @@ Serializers for all Course Entitlement related return objects. from django.contrib.auth import get_user_model from rest_framework import serializers -from entitlements.models import CourseEntitlement, CourseEntitlementSupportDetail +from common.djangoapps.entitlements.models import CourseEntitlement, CourseEntitlementSupportDetail from openedx.core.lib.api.serializers import CourseKeyField diff --git a/common/djangoapps/entitlements/rest_api/v1/tests/test_serializers.py b/common/djangoapps/entitlements/rest_api/v1/tests/test_serializers.py index c1e9a70b34..d3ac3e0c3b 100644 --- a/common/djangoapps/entitlements/rest_api/v1/tests/test_serializers.py +++ b/common/djangoapps/entitlements/rest_api/v1/tests/test_serializers.py @@ -11,8 +11,8 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # Entitlements is not in CMS' INSTALLED_APPS so these imports will error during test collection if settings.ROOT_URLCONF == 'lms.urls': - from entitlements.rest_api.v1.serializers import CourseEntitlementSerializer - from entitlements.tests.factories import CourseEntitlementFactory + from common.djangoapps.entitlements.rest_api.v1.serializers import CourseEntitlementSerializer + from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') diff --git a/common/djangoapps/entitlements/rest_api/v1/tests/test_views.py b/common/djangoapps/entitlements/rest_api/v1/tests/test_views.py index 4195e4a208..a12aa5b179 100644 --- a/common/djangoapps/entitlements/rest_api/v1/tests/test_views.py +++ b/common/djangoapps/entitlements/rest_api/v1/tests/test_views.py @@ -15,16 +15,16 @@ from mock import patch from opaque_keys.edx.locator import CourseKey from pytz import UTC -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.models import DynamicUpgradeDeadlineConfiguration from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangoapps.user_api.models import UserOrgTag -from student.models import CourseEnrollment -from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -32,10 +32,10 @@ log = logging.getLogger(__name__) # Entitlements is not in CMS' INSTALLED_APPS so these imports will error during test collection if settings.ROOT_URLCONF == 'lms.urls': - from entitlements.tests.factories import CourseEntitlementFactory - from entitlements.models import CourseEntitlement, CourseEntitlementPolicy, CourseEntitlementSupportDetail - from entitlements.rest_api.v1.serializers import CourseEntitlementSerializer - from entitlements.rest_api.v1.views import set_entitlement_policy + from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory + from common.djangoapps.entitlements.models import CourseEntitlement, CourseEntitlementPolicy, CourseEntitlementSupportDetail + from common.djangoapps.entitlements.rest_api.v1.serializers import CourseEntitlementSerializer + from common.djangoapps.entitlements.rest_api.v1.views import set_entitlement_policy @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') @@ -370,7 +370,7 @@ class EntitlementViewSetTest(ModuleStoreTestCase): ) assert course_entitlement.policy == policy - @patch("entitlements.rest_api.v1.views.get_owners_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_owners_for_course") def test_email_opt_in_single_org(self, mock_get_owners): course_uuid = uuid.uuid4() entitlement_data = self._get_data_set(self.user, str(course_uuid)) @@ -389,7 +389,7 @@ class EntitlementViewSetTest(ModuleStoreTestCase): result_obj = UserOrgTag.objects.get(user=self.user, org=org, key='email-optin') self.assertEqual(result_obj.value, u"True") - @patch("entitlements.rest_api.v1.views.get_owners_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_owners_for_course") def test_email_opt_in_multiple_orgs(self, mock_get_owners): course_uuid = uuid.uuid4() entitlement_data = self._get_data_set(self.user, str(course_uuid)) @@ -438,7 +438,7 @@ class EntitlementViewSetTest(ModuleStoreTestCase): ) assert results == CourseEntitlementSerializer(course_entitlement).data - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_add_entitlement_and_upgrade_audit_enrollment(self, mock_get_course_runs): """ Verify that if an entitlement is added for a user, if the user has one upgradeable enrollment @@ -475,7 +475,7 @@ class EntitlementViewSetTest(ModuleStoreTestCase): assert course_entitlement.enrollment_course_run == enrollment assert results == CourseEntitlementSerializer(course_entitlement).data - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_add_entitlement_and_upgrade_audit_enrollment_with_dynamic_deadline(self, mock_get_course_runs): """ Verify that if an entitlement is added for a user, if the user has one upgradeable enrollment @@ -524,7 +524,7 @@ class EntitlementViewSetTest(ModuleStoreTestCase): assert course_entitlement.enrollment_course_run == enrollment assert results == CourseEntitlementSerializer(course_entitlement).data - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_add_entitlement_inactive_audit_enrollment(self, mock_get_course_runs): """ Verify that if an entitlement is added for a user, if the user has an inactive audit enrollment @@ -687,7 +687,7 @@ class EntitlementViewSetTest(ModuleStoreTestCase): course_entitlement.refresh_from_db() assert course_entitlement.expired_at is not None - @patch("entitlements.models.get_course_uuid_for_course") + @patch("common.djangoapps.entitlements.models.get_course_uuid_for_course") def test_revoke_unenroll_entitlement(self, mock_course_uuid): enrollment = CourseEnrollmentFactory.create( user=self.user, @@ -846,7 +846,7 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): {'key': str(self.course2.id)} ] - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_user_can_enroll(self, mock_get_course_runs): course_entitlement = CourseEntitlementFactory.create(user=self.user, mode=CourseMode.VERIFIED) mock_get_course_runs.return_value = self.return_values @@ -870,8 +870,8 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert CourseEnrollment.is_enrolled(self.user, self.course.id) assert course_entitlement.enrollment_course_run is not None - @patch("entitlements.models.get_course_uuid_for_course") - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.models.get_course_uuid_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_user_can_unenroll(self, mock_get_course_runs, mock_get_course_uuid): course_entitlement = CourseEntitlementFactory.create(user=self.user, mode=CourseMode.VERIFIED) mock_get_course_runs.return_value = self.return_values @@ -906,7 +906,7 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert not CourseEnrollment.is_enrolled(self.user, self.course.id) assert course_entitlement.enrollment_course_run is None - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_user_can_switch(self, mock_get_course_runs): mock_get_course_runs.return_value = self.return_values course_entitlement = CourseEntitlementFactory.create(user=self.user, mode=CourseMode.VERIFIED) @@ -944,7 +944,7 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert CourseEnrollment.is_enrolled(self.user, self.course2.id) assert course_entitlement.enrollment_course_run is not None - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_user_already_enrolled(self, mock_get_course_runs): course_entitlement = CourseEntitlementFactory.create(user=self.user, mode=CourseMode.VERIFIED) mock_get_course_runs.return_value = self.return_values @@ -969,7 +969,7 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert CourseEnrollment.is_enrolled(self.user, self.course.id) assert course_entitlement.enrollment_course_run is not None - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_already_enrolled_course_ended(self, mock_get_course_runs): """ Test that already enrolled user can still select a session while @@ -1008,7 +1008,7 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert is_active and (enrolled_mode == course_entitlement.mode) assert course_entitlement.enrollment_course_run is not None - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_user_already_enrolled_in_unpaid_mode(self, mock_get_course_runs): course_entitlement = CourseEntitlementFactory.create(user=self.user, mode=CourseMode.VERIFIED) mock_get_course_runs.return_value = self.return_values @@ -1035,7 +1035,7 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert is_active and (enrolled_mode == course_entitlement.mode) assert course_entitlement.enrollment_course_run is not None - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_user_cannot_enroll_in_unknown_course_run_id(self, mock_get_course_runs): fake_course_str = str(self.course.id) + 'fake' fake_course_key = CourseKey.from_string(fake_course_str) @@ -1061,9 +1061,9 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert response.data['message'] == expected_message assert not CourseEnrollment.is_enrolled(self.user, fake_course_key) - @patch('entitlements.models.refund_entitlement', return_value=True) - @patch('entitlements.rest_api.v1.views.get_course_runs_for_course') - @patch("entitlements.models.get_course_uuid_for_course") + @patch('common.djangoapps.entitlements.models.refund_entitlement', return_value=True) + @patch('common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course') + @patch("common.djangoapps.entitlements.models.get_course_uuid_for_course") def test_user_can_revoke_and_refund(self, mock_course_uuid, mock_get_course_runs, mock_refund_entitlement): course_entitlement = CourseEntitlementFactory.create(user=self.user, mode=CourseMode.VERIFIED) mock_get_course_runs.return_value = self.return_values @@ -1103,9 +1103,9 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert course_entitlement.enrollment_course_run is None assert course_entitlement.expired_at is not None - @patch('entitlements.rest_api.v1.views.CourseEntitlement.is_entitlement_refundable', return_value=False) - @patch('entitlements.models.refund_entitlement', return_value=True) - @patch('entitlements.rest_api.v1.views.get_course_runs_for_course') + @patch('common.djangoapps.entitlements.rest_api.v1.views.CourseEntitlement.is_entitlement_refundable', return_value=False) + @patch('common.djangoapps.entitlements.models.refund_entitlement', return_value=True) + @patch('common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course') def test_user_can_revoke_and_no_refund_available( self, mock_get_course_runs, @@ -1147,9 +1147,9 @@ class EntitlementEnrollmentViewSetTest(ModuleStoreTestCase): assert course_entitlement.enrollment_course_run is not None assert course_entitlement.expired_at is None - @patch('entitlements.rest_api.v1.views.CourseEntitlement.is_entitlement_refundable', return_value=True) - @patch('entitlements.models.refund_entitlement', return_value=False) - @patch("entitlements.rest_api.v1.views.get_course_runs_for_course") + @patch('common.djangoapps.entitlements.rest_api.v1.views.CourseEntitlement.is_entitlement_refundable', return_value=True) + @patch('common.djangoapps.entitlements.models.refund_entitlement', return_value=False) + @patch("common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course") def test_user_is_not_unenrolled_on_failed_refund( self, mock_get_course_runs, diff --git a/common/djangoapps/entitlements/rest_api/v1/views.py b/common/djangoapps/entitlements/rest_api/v1/views.py index 81e02f9e86..7fb0133e67 100644 --- a/common/djangoapps/entitlements/rest_api/v1/views.py +++ b/common/djangoapps/entitlements/rest_api/v1/views.py @@ -16,17 +16,17 @@ from rest_framework import permissions, status, viewsets from rest_framework.authentication import SessionAuthentication from rest_framework.response import Response -from course_modes.models import CourseMode -from entitlements.rest_api.v1.filters import CourseEntitlementFilter -from entitlements.rest_api.v1.permissions import IsAdminOrSupportOrAuthenticatedReadOnly -from entitlements.rest_api.v1.serializers import CourseEntitlementSerializer -from entitlements.models import CourseEntitlement, CourseEntitlementPolicy, CourseEntitlementSupportDetail -from entitlements.utils import is_course_run_entitlement_fulfillable +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.entitlements.rest_api.v1.filters import CourseEntitlementFilter +from common.djangoapps.entitlements.rest_api.v1.permissions import IsAdminOrSupportOrAuthenticatedReadOnly +from common.djangoapps.entitlements.rest_api.v1.serializers import CourseEntitlementSerializer +from common.djangoapps.entitlements.models import CourseEntitlement, CourseEntitlementPolicy, CourseEntitlementSupportDetail +from common.djangoapps.entitlements.utils import is_course_run_entitlement_fulfillable from openedx.core.djangoapps.catalog.utils import get_course_runs_for_course, get_owners_for_course from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.cors_csrf.authentication import SessionAuthenticationCrossDomainCsrf from openedx.core.djangoapps.user_api.preferences.api import update_email_opt_in -from student.models import AlreadyEnrolledError, CourseEnrollment, CourseEnrollmentException +from common.djangoapps.student.models import AlreadyEnrolledError, CourseEnrollment, CourseEnrollmentException log = logging.getLogger(__name__) diff --git a/common/djangoapps/entitlements/signals.py b/common/djangoapps/entitlements/signals.py index 8a3c80b1ff..8495e90743 100644 --- a/common/djangoapps/entitlements/signals.py +++ b/common/djangoapps/entitlements/signals.py @@ -5,8 +5,8 @@ Entitlements related signal handlers. from django.dispatch import receiver -from entitlements.models import CourseEntitlement -from student.signals import UNENROLL_DONE +from common.djangoapps.entitlements.models import CourseEntitlement +from common.djangoapps.student.signals import UNENROLL_DONE @receiver(UNENROLL_DONE) diff --git a/common/djangoapps/entitlements/tasks.py b/common/djangoapps/entitlements/tasks.py index 2d3724ce2f..48d7e7f4d1 100644 --- a/common/djangoapps/entitlements/tasks.py +++ b/common/djangoapps/entitlements/tasks.py @@ -7,7 +7,7 @@ from celery import task from celery.utils.log import get_task_logger from django.conf import settings -from entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.models import CourseEntitlement LOGGER = get_task_logger(__name__) # Under cms the following setting is not defined, leading to errors during tests. diff --git a/common/djangoapps/entitlements/tests/factories.py b/common/djangoapps/entitlements/tests/factories.py index b3028db152..934a781bf1 100644 --- a/common/djangoapps/entitlements/tests/factories.py +++ b/common/djangoapps/entitlements/tests/factories.py @@ -6,10 +6,10 @@ from uuid import uuid4 import factory from factory.fuzzy import FuzzyChoice, FuzzyText -from course_modes.helpers import CourseMode -from entitlements.models import CourseEntitlement, CourseEntitlementPolicy +from common.djangoapps.course_modes.helpers import CourseMode +from common.djangoapps.entitlements.models import CourseEntitlement, CourseEntitlementPolicy from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class CourseEntitlementPolicyFactory(factory.django.DjangoModelFactory): diff --git a/common/djangoapps/entitlements/tests/test_models.py b/common/djangoapps/entitlements/tests/test_models.py index 4879723ffe..1c75c1eaea 100644 --- a/common/djangoapps/entitlements/tests/test_models.py +++ b/common/djangoapps/entitlements/tests/test_models.py @@ -10,21 +10,21 @@ from django.test import TestCase from django.utils.timezone import now from mock import patch -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.certificates.api import MODES from lms.djangoapps.certificates.models import CertificateStatuses from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.models import CourseEnrollment -from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory # Entitlements is not in CMS' INSTALLED_APPS so these imports will error during test collection if settings.ROOT_URLCONF == 'lms.urls': - from entitlements.tests.factories import CourseEntitlementFactory - from entitlements.models import CourseEntitlement + from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory + from common.djangoapps.entitlements.models import CourseEntitlement @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') @@ -37,7 +37,7 @@ class TestCourseEntitlementModelHelpers(ModuleStoreTestCase): self.user = UserFactory() self.client.login(username=self.user.username, password=TEST_PASSWORD) - @patch("entitlements.models.get_course_uuid_for_course") + @patch("common.djangoapps.entitlements.models.get_course_uuid_for_course") def test_check_for_existing_entitlement_and_enroll(self, mock_get_course_uuid): course = CourseFactory() CourseModeFactory( @@ -64,7 +64,7 @@ class TestCourseEntitlementModelHelpers(ModuleStoreTestCase): entitlement.refresh_from_db() assert entitlement.enrollment_course_run - @patch("entitlements.models.get_course_uuid_for_course") + @patch("common.djangoapps.entitlements.models.get_course_uuid_for_course") def test_check_for_no_entitlement_and_do_not_enroll(self, mock_get_course_uuid): course = CourseFactory() CourseModeFactory( @@ -302,8 +302,8 @@ class TestModels(TestCase): assert expired_at_datetime assert entitlement.expired_at - @patch("entitlements.models.get_course_uuid_for_course") - @patch("entitlements.models.CourseEntitlement.refund") + @patch("common.djangoapps.entitlements.models.get_course_uuid_for_course") + @patch("common.djangoapps.entitlements.models.CourseEntitlement.refund") def test_unenroll_entitlement_with_audit_course_enrollment(self, mock_refund, mock_get_course_uuid): """ Test that entitlement is not refunded if un-enroll is called on audit course un-enroll. diff --git a/common/djangoapps/entitlements/tests/test_tasks.py b/common/djangoapps/entitlements/tests/test_tasks.py index 7465cee637..8a4278cd01 100644 --- a/common/djangoapps/entitlements/tests/test_tasks.py +++ b/common/djangoapps/entitlements/tests/test_tasks.py @@ -9,9 +9,9 @@ import mock import pytz from django.test import TestCase -from entitlements import tasks -from entitlements.models import CourseEntitlementPolicy -from entitlements.tests.factories import CourseEntitlementFactory +from common.djangoapps.entitlements import tasks +from common.djangoapps.entitlements.models import CourseEntitlementPolicy +from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory from openedx.core.djangolib.testing.utils import skip_unless_lms @@ -40,7 +40,7 @@ class TestExpireOldEntitlementsTask(TestCase): make_entitlement() with mock.patch( - 'entitlements.models.CourseEntitlement.expired_at_datetime', + 'common.djangoapps.entitlements.models.CourseEntitlement.expired_at_datetime', new_callable=mock.PropertyMock ) as mock_datetime: tasks.expire_old_entitlements.delay(1, 3).get() @@ -56,7 +56,7 @@ class TestExpireOldEntitlementsTask(TestCase): make_entitlement() with mock.patch( - 'entitlements.models.CourseEntitlement.expired_at_datetime', + 'common.djangoapps.entitlements.models.CourseEntitlement.expired_at_datetime', new_callable=mock.PropertyMock ) as mock_datetime: tasks.expire_old_entitlements.delay(1, 3).get() @@ -72,7 +72,7 @@ class TestExpireOldEntitlementsTask(TestCase): make_entitlement() with mock.patch( - 'entitlements.models.CourseEntitlement.expired_at_datetime', + 'common.djangoapps.entitlements.models.CourseEntitlement.expired_at_datetime', new_callable=mock.PropertyMock, side_effect=boom ) as mock_datetime: diff --git a/common/djangoapps/entitlements/tests/test_utils.py b/common/djangoapps/entitlements/tests/test_utils.py index b1a91ac720..1bf380a451 100644 --- a/common/djangoapps/entitlements/tests/test_utils.py +++ b/common/djangoapps/entitlements/tests/test_utils.py @@ -9,16 +9,16 @@ from django.conf import settings from django.utils.timezone import now from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, CourseOverviewFactory, UserFactory +from common.djangoapps.student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, CourseOverviewFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # Entitlements is not in CMS' INSTALLED_APPS so these imports will error during test collection if settings.ROOT_URLCONF == 'lms.urls': - from entitlements.tests.factories import CourseEntitlementFactory - from entitlements.utils import is_course_run_entitlement_fulfillable + from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory + from common.djangoapps.entitlements.utils import is_course_run_entitlement_fulfillable @skip_unless_lms diff --git a/common/djangoapps/entitlements/utils.py b/common/djangoapps/entitlements/utils.py index 0b4594e7cf..3d1e5822f5 100644 --- a/common/djangoapps/entitlements/utils.py +++ b/common/djangoapps/entitlements/utils.py @@ -7,9 +7,9 @@ import logging from django.utils import timezone -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment log = logging.getLogger("common.entitlements.utils") diff --git a/common/djangoapps/pipeline_mako/__init__.py b/common/djangoapps/pipeline_mako/__init__.py index 8c82533ad8..ae9ed7705e 100644 --- a/common/djangoapps/pipeline_mako/__init__.py +++ b/common/djangoapps/pipeline_mako/__init__.py @@ -6,8 +6,8 @@ from pipeline.conf import settings from pipeline.packager import Packager from pipeline.utils import guess_type -from edxmako.shortcuts import render_to_string -from static_replace import try_staticfiles_lookup +from common.djangoapps.edxmako.shortcuts import render_to_string +from common.djangoapps.static_replace import try_staticfiles_lookup def compressed_css(package_name, raw=False): diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 1acdf2a8cd..a5a2a575b0 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -3,11 +3,11 @@ import logging import json from django.contrib.staticfiles.storage import staticfiles_storage -from pipeline_mako import compressed_css, compressed_js -from pipeline_mako.helpers.studiofrontend import load_sfe_i18n_messages +from common.djangoapps.pipeline_mako import compressed_css, compressed_js +from common.djangoapps.pipeline_mako.helpers.studiofrontend import load_sfe_i18n_messages from django.utils.translation import get_language_bidi from mako.exceptions import TemplateLookupException -from edxmako.shortcuts import marketing_link +from common.djangoapps.edxmako.shortcuts import marketing_link from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json from openedx.core.djangolib.markup import HTML diff --git a/common/djangoapps/pipeline_mako/tests/test_render.py b/common/djangoapps/pipeline_mako/tests/test_render.py index 77aca11ec1..54121ac091 100644 --- a/common/djangoapps/pipeline_mako/tests/test_render.py +++ b/common/djangoapps/pipeline_mako/tests/test_render.py @@ -9,7 +9,7 @@ from django.test import TestCase from mock import patch from six.moves import map -from pipeline_mako import compressed_css, compressed_js, render_require_js_path_overrides +from common.djangoapps.pipeline_mako import compressed_css, compressed_js, render_require_js_path_overrides class RequireJSPathOverridesTest(TestCase): @@ -50,7 +50,7 @@ class PipelineRenderTest(TestCase): def mock_staticfiles_lookup(path): return '/static/' + path - @patch('static_replace.try_staticfiles_lookup', side_effect=mock_staticfiles_lookup) + @patch('common.djangoapps.static_replace.try_staticfiles_lookup', side_effect=mock_staticfiles_lookup) @ddt.data( (True,), (False,), @@ -72,7 +72,7 @@ class PipelineRenderTest(TestCase): self.assertIn(u'lms-main-v1.css?raw', css_include) @patch('django.contrib.staticfiles.storage.staticfiles_storage.exists', return_value=True) - @patch('static_replace.try_staticfiles_lookup', side_effect=mock_staticfiles_lookup) + @patch('common.djangoapps.static_replace.try_staticfiles_lookup', side_effect=mock_staticfiles_lookup) def test_compressed_js(self, mock_staticfiles_lookup, mock_staticfiles_exists): """ Verify the behavior of compressed_css, with the pipeline diff --git a/common/djangoapps/pipeline_mako/tests/test_static_content.py b/common/djangoapps/pipeline_mako/tests/test_static_content.py index 88eec2c718..8435240b8a 100644 --- a/common/djangoapps/pipeline_mako/tests/test_static_content.py +++ b/common/djangoapps/pipeline_mako/tests/test_static_content.py @@ -5,7 +5,7 @@ Tests of pipeline_mako/templates/static_content.html import unittest -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string class TestStaticContent(unittest.TestCase): diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index c21d273e41..c246a37f4d 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -202,7 +202,7 @@ def replace_static_urls(text, data_directory=None, course_id=None, static_asset_ # if not, then assume it's courseware specific content and then look in the # Mongo-backed database # Import is placed here to avoid model import at project startup. - from static_replace.models import AssetBaseUrlConfig, AssetExcludedExtensionsConfig + from common.djangoapps.static_replace.models import AssetBaseUrlConfig, AssetExcludedExtensionsConfig base_url = AssetBaseUrlConfig.get_base_url() excluded_exts = AssetExcludedExtensionsConfig.get_excluded_extensions() url = StaticContent.get_canonicalized_asset_path(course_id, rest, base_url, excluded_exts) diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index 38c1f45f5e..3ecf9c0c4b 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -14,7 +14,7 @@ from mock import Mock, patch from opaque_keys.edx.keys import CourseKey from PIL import Image -from static_replace import ( +from common.djangoapps.static_replace import ( _url_replace_regex, make_static_urls_absolute, process_static_urls, @@ -91,7 +91,7 @@ def test_static_urls(mock_request): assert result == '\"http:///static/file.png\"' -@patch('static_replace.staticfiles_storage', autospec=True) +@patch('common.djangoapps.static_replace.staticfiles_storage', autospec=True) def test_storage_url_exists(mock_storage): mock_storage.exists.return_value = True mock_storage.url.return_value = '/static/file.png' @@ -101,7 +101,7 @@ def test_storage_url_exists(mock_storage): mock_storage.url.assert_called_once_with('file.png') -@patch('static_replace.staticfiles_storage', autospec=True) +@patch('common.djangoapps.static_replace.staticfiles_storage', autospec=True) def test_storage_url_not_exists(mock_storage): mock_storage.exists.return_value = False mock_storage.url.return_value = '/static/data_dir/file.png' @@ -111,10 +111,10 @@ def test_storage_url_not_exists(mock_storage): mock_storage.url.assert_called_once_with('data_dir/file.png') -@patch('static_replace.StaticContent', autospec=True) +@patch('common.djangoapps.static_replace.StaticContent', autospec=True) @patch('xmodule.modulestore.django.modulestore', autospec=True) -@patch('static_replace.models.AssetBaseUrlConfig.get_base_url') -@patch('static_replace.models.AssetExcludedExtensionsConfig.get_excluded_extensions') +@patch('common.djangoapps.static_replace.models.AssetBaseUrlConfig.get_base_url') +@patch('common.djangoapps.static_replace.models.AssetExcludedExtensionsConfig.get_excluded_extensions') def test_mongo_filestore(mock_get_excluded_extensions, mock_get_base_url, mock_modulestore, mock_static_content): mock_modulestore.return_value = Mock(MongoModuleStore) @@ -132,9 +132,9 @@ def test_mongo_filestore(mock_get_excluded_extensions, mock_get_base_url, mock_m mock_static_content.get_canonicalized_asset_path.assert_called_once_with(COURSE_KEY, 'file.png', u'', ['foobar']) -@patch('static_replace.settings', autospec=True) +@patch('common.djangoapps.static_replace.settings', autospec=True) @patch('xmodule.modulestore.django.modulestore', autospec=True) -@patch('static_replace.staticfiles_storage', autospec=True) +@patch('common.djangoapps.static_replace.staticfiles_storage', autospec=True) def test_data_dir_fallback(mock_storage, mock_modulestore, mock_settings): mock_modulestore.return_value = Mock(XMLModuleStore) mock_storage.url.side_effect = Exception @@ -158,7 +158,7 @@ def test_raw_static_check(): @pytest.mark.django_db -@patch('static_replace.staticfiles_storage', autospec=True) +@patch('common.djangoapps.static_replace.staticfiles_storage', autospec=True) @patch('xmodule.modulestore.django.modulestore', autospec=True) def test_static_url_with_query(mock_modulestore, mock_storage): """ @@ -175,7 +175,7 @@ def test_static_url_with_query(mock_modulestore, mock_storage): @pytest.mark.django_db -@patch('static_replace.staticfiles_storage', autospec=True) +@patch('common.djangoapps.static_replace.staticfiles_storage', autospec=True) @patch('xmodule.modulestore.django.modulestore', autospec=True) def test_static_paths_out(mock_modulestore, mock_storage): """ @@ -221,7 +221,7 @@ def test_regex(): assert not re.match(regex, s) -@patch('static_replace.staticfiles_storage', autospec=True) +@patch('common.djangoapps.static_replace.staticfiles_storage', autospec=True) @patch('xmodule.modulestore.django.modulestore', autospec=True) def test_static_url_with_xblock_resource(mock_modulestore, mock_storage): """ @@ -236,7 +236,7 @@ def test_static_url_with_xblock_resource(mock_modulestore, mock_storage): assert replace_static_urls(pre_text, DATA_DIRECTORY, COURSE_KEY) == post_text -@patch('static_replace.staticfiles_storage', autospec=True) +@patch('common.djangoapps.static_replace.staticfiles_storage', autospec=True) @patch('xmodule.modulestore.django.modulestore', autospec=True) @override_settings(STATIC_URL='https://example.com/static/') def test_static_url_with_xblock_resource_on_cdn(mock_modulestore, mock_storage): diff --git a/common/djangoapps/student/admin.py b/common/djangoapps/student/admin.py index ab9b546b8b..b9e382242d 100644 --- a/common/djangoapps/student/admin.py +++ b/common/djangoapps/student/admin.py @@ -24,8 +24,8 @@ from opaque_keys.edx.keys import CourseKey from edx_toggles.toggles import WaffleSwitch from openedx.core.lib.courses import clean_course_id -from student import STUDENT_WAFFLE_NAMESPACE -from student.models import ( +from common.djangoapps.student import STUDENT_WAFFLE_NAMESPACE +from common.djangoapps.student.models import ( AccountRecovery, AccountRecoveryConfiguration, AllowedAuthUser, @@ -45,7 +45,7 @@ from student.models import ( UserProfile, UserTestGroup ) -from student.roles import REGISTERED_ACCESS_ROLES +from common.djangoapps.student.roles import REGISTERED_ACCESS_ROLES from xmodule.modulestore.django import modulestore User = get_user_model() # pylint:disable=invalid-name diff --git a/common/djangoapps/student/api.py b/common/djangoapps/student/api.py index 610f495d81..6ccdcef748 100644 --- a/common/djangoapps/student/api.py +++ b/common/djangoapps/student/api.py @@ -7,10 +7,10 @@ Python APIs exposed by the student app to other in-process apps. from django.contrib.auth import get_user_model from django.conf import settings -from student.models_api import create_manual_enrollment_audit as _create_manual_enrollment_audit -from student.models_api import get_course_access_role -from student.models_api import get_course_enrollment as _get_course_enrollment -from student.models_api import ( +from common.djangoapps.student.models_api import create_manual_enrollment_audit as _create_manual_enrollment_audit +from common.djangoapps.student.models_api import get_course_access_role +from common.djangoapps.student.models_api import get_course_enrollment as _get_course_enrollment +from common.djangoapps.student.models_api import ( ENROLLED_TO_ENROLLED as _ENROLLED_TO_ENROLLED, ENROLLED_TO_UNENROLLED as _ENROLLED_TO_UNENROLLED, UNENROLLED_TO_ENROLLED as _UNENROLLED_TO_ENROLLED, @@ -20,7 +20,7 @@ from student.models_api import ( ALLOWEDTOENROLL_TO_UNENROLLED as _ALLOWEDTOENROLL_TO_UNENROLLED, DEFAULT_TRANSITION_STATE as _DEFAULT_TRANSITION_STATE, ) -from student.roles import REGISTERED_ACCESS_ROLES as _REGISTERED_ACCESS_ROLES +from common.djangoapps.student.roles import REGISTERED_ACCESS_ROLES as _REGISTERED_ACCESS_ROLES from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers diff --git a/common/djangoapps/student/apps.py b/common/djangoapps/student/apps.py index 83287fc4dd..92ef89cb84 100644 --- a/common/djangoapps/student/apps.py +++ b/common/djangoapps/student/apps.py @@ -12,7 +12,7 @@ class StudentConfig(AppConfig): """ Default configuration for the ``student`` application. """ - name = 'student' + name = 'common.djangoapps.student' def ready(self): # Connect signal handlers. @@ -21,7 +21,7 @@ class StudentConfig(AppConfig): # The django-simple-history model on CourseEnrollment creates performance # problems in testing, we mock it here so that the mock impacts all tests. if os.environ.get('DISABLE_COURSEENROLLMENT_HISTORY', False): - import student.models as student_models + import common.djangoapps.student.models as student_models from mock import MagicMock student_models.CourseEnrollment.history = MagicMock() diff --git a/common/djangoapps/student/auth.py b/common/djangoapps/student/auth.py index 1215972b28..21c476098c 100644 --- a/common/djangoapps/student/auth.py +++ b/common/djangoapps/student/auth.py @@ -11,7 +11,7 @@ from django.conf import settings from django.core.exceptions import PermissionDenied from opaque_keys.edx.locator import LibraryLocator -from student.roles import ( +from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseCreatorRole, CourseInstructorRole, diff --git a/common/djangoapps/student/forms.py b/common/djangoapps/student/forms.py index 6375e30c51..91957b8139 100644 --- a/common/djangoapps/student/forms.py +++ b/common/djangoapps/student/forms.py @@ -24,8 +24,8 @@ from openedx.core.djangoapps.user_api import accounts as accounts_settings from openedx.core.djangoapps.user_api.accounts.utils import is_secondary_email_feature_enabled from openedx.core.djangoapps.user_authn.utils import should_redirect_to_logistration_mircrofrontend from openedx.core.djangoapps.user_api.preferences.api import get_user_preference -from student.message_types import AccountRecovery as AccountRecoveryMessage -from student.models import CourseEnrollmentAllowed, email_exists_or_retired +from common.djangoapps.student.message_types import AccountRecovery as AccountRecoveryMessage +from common.djangoapps.student.models import CourseEnrollmentAllowed, email_exists_or_retired def send_account_recovery_email_for_user(user, request, email=None): diff --git a/common/djangoapps/student/helpers.py b/common/djangoapps/student/helpers.py index 9e49ce19dc..ee1291ed69 100644 --- a/common/djangoapps/student/helpers.py +++ b/common/djangoapps/student/helpers.py @@ -23,8 +23,8 @@ from django.utils.translation import ugettext as _ from pytz import UTC from six import iteritems, text_type -import third_party_auth -from course_modes.models import CourseMode +from common.djangoapps import third_party_auth +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.api import get_certificate_url, has_html_certificates_enabled from lms.djangoapps.certificates.models import CertificateStatuses, certificate_status_for_student from lms.djangoapps.grades.api import CourseGradeFactory @@ -35,7 +35,7 @@ from openedx.core.djangoapps.certificates.api import certificates_viewable_for_c from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.theming.helpers import get_themes from openedx.core.djangoapps.user_authn.utils import is_safe_login_or_logout_redirect -from student.models import ( +from common.djangoapps.student.models import ( CourseEnrollment, LinkedInAddToProfileConfiguration, Registration, @@ -45,7 +45,7 @@ from student.models import ( unique_id_for_user, username_exists_or_retired ) -from util.password_policy_validators import normalize_password +from common.djangoapps.util.password_policy_validators import normalize_password # Enumeration of per-course verification statuses # we display on the student dashboard. diff --git a/common/djangoapps/student/management/commands/_create_users.py b/common/djangoapps/student/management/commands/_create_users.py index ac450db2c1..4c7319155c 100644 --- a/common/djangoapps/student/management/commands/_create_users.py +++ b/common/djangoapps/student/management/commands/_create_users.py @@ -3,8 +3,8 @@ from xmodule.modulestore.django import modulestore from lms.djangoapps.instructor.access import allow_access from openedx.core.djangoapps.user_authn.views.registration_form import AccountCreationForm -from student.helpers import do_create_account -from student.models import CourseEnrollment +from common.djangoapps.student.helpers import do_create_account +from common.djangoapps.student.models import CourseEnrollment def create_users( diff --git a/common/djangoapps/student/management/commands/anonymized_id_mapping.py b/common/djangoapps/student/management/commands/anonymized_id_mapping.py index c29b17d0fe..64684b9c6d 100644 --- a/common/djangoapps/student/management/commands/anonymized_id_mapping.py +++ b/common/djangoapps/student/management/commands/anonymized_id_mapping.py @@ -16,7 +16,7 @@ from django.core.management.base import BaseCommand, CommandError from opaque_keys.edx.keys import CourseKey from six import text_type -from student.models import anonymous_id_for_user +from common.djangoapps.student.models import anonymous_id_for_user class Command(BaseCommand): diff --git a/common/djangoapps/student/management/commands/assigngroups.py b/common/djangoapps/student/management/commands/assigngroups.py index eda3ad5dcb..4a7306a3dc 100644 --- a/common/djangoapps/student/management/commands/assigngroups.py +++ b/common/djangoapps/student/management/commands/assigngroups.py @@ -10,7 +10,7 @@ from django.contrib.auth.models import User from django.core.management.base import BaseCommand from pytz import UTC -from student.models import UserTestGroup +from common.djangoapps.student.models import UserTestGroup # Examples: # python manage.py assigngroups summary_test:0.3,skip_summary_test:0.7 log.txt "Do previews of future materials help?" diff --git a/common/djangoapps/student/management/commands/bulk_change_enrollment.py b/common/djangoapps/student/management/commands/bulk_change_enrollment.py index a1a5c4de5b..9c0e2208fc 100644 --- a/common/djangoapps/student/management/commands/bulk_change_enrollment.py +++ b/common/djangoapps/student/management/commands/bulk_change_enrollment.py @@ -9,9 +9,9 @@ from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from six import text_type -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.django import modulestore logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py b/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py index b835cac477..a9c1d53498 100644 --- a/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py +++ b/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py @@ -14,11 +14,11 @@ from django.db import transaction from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from student.models import CourseEnrollment, CourseEnrollmentAttribute, User +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAttribute, User -from student.models import BulkChangeEnrollmentConfiguration +from common.djangoapps.student.models import BulkChangeEnrollmentConfiguration -logger = logging.getLogger('student.management.commands.bulk_change_enrollment_csv') +logger = logging.getLogger('common.djangoapps.student.management.commands.bulk_change_enrollment_csv') class Command(BaseCommand): diff --git a/common/djangoapps/student/management/commands/bulk_unenroll.py b/common/djangoapps/student/management/commands/bulk_unenroll.py index 4faffa9aac..5caa86e6d9 100644 --- a/common/djangoapps/student/management/commands/bulk_unenroll.py +++ b/common/djangoapps/student/management/commands/bulk_unenroll.py @@ -8,7 +8,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from student.models import CourseEnrollment, BulkUnenrollConfiguration +from common.djangoapps.student.models import CourseEnrollment, BulkUnenrollConfiguration logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/common/djangoapps/student/management/commands/bulk_update_email.py b/common/djangoapps/student/management/commands/bulk_update_email.py index 1f53ea0efd..e5309cf717 100644 --- a/common/djangoapps/student/management/commands/bulk_update_email.py +++ b/common/djangoapps/student/management/commands/bulk_update_email.py @@ -11,7 +11,7 @@ from django.core.management.base import BaseCommand, CommandError from django.contrib.auth import get_user_model -logger = logging.getLogger('student.management.commands.bulk_update_email') +logger = logging.getLogger('common.djangoapps.student.management.commands.bulk_update_email') class Command(BaseCommand): diff --git a/common/djangoapps/student/management/commands/cert_restriction.py b/common/djangoapps/student/management/commands/cert_restriction.py index 450665fff1..bbb12fde4f 100644 --- a/common/djangoapps/student/management/commands/cert_restriction.py +++ b/common/djangoapps/student/management/commands/cert_restriction.py @@ -5,7 +5,7 @@ import os from django.core.management.base import BaseCommand, CommandError -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile class Command(BaseCommand): diff --git a/common/djangoapps/student/management/commands/change_eligibility_deadline.py b/common/djangoapps/student/management/commands/change_eligibility_deadline.py index 680667bd3d..6680df6736 100644 --- a/common/djangoapps/student/management/commands/change_eligibility_deadline.py +++ b/common/djangoapps/student/management/commands/change_eligibility_deadline.py @@ -8,9 +8,9 @@ from django.core.management.base import BaseCommand from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.credit.models import CreditEligibility -from student.models import CourseEnrollment, User +from common.djangoapps.student.models import CourseEnrollment, User logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/common/djangoapps/student/management/commands/change_enrollment.py b/common/djangoapps/student/management/commands/change_enrollment.py index 1fdcc98eb1..af096a8d9a 100644 --- a/common/djangoapps/student/management/commands/change_enrollment.py +++ b/common/djangoapps/student/management/commands/change_enrollment.py @@ -10,7 +10,7 @@ from opaque_keys.edx.keys import CourseKey from six import text_type from openedx.core.djangoapps.credit.email_utils import get_credit_provider_attribute_values -from student.models import CourseEnrollment, CourseEnrollmentAttribute, User +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAttribute, User logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/common/djangoapps/student/management/commands/create_test_users.py b/common/djangoapps/student/management/commands/create_test_users.py index 6c7afddbc6..9b8985767a 100644 --- a/common/djangoapps/student/management/commands/create_test_users.py +++ b/common/djangoapps/student/management/commands/create_test_users.py @@ -2,7 +2,7 @@ from django.core.management.base import BaseCommand from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from common.djangoapps.student.management.commands._create_users import create_users diff --git a/common/djangoapps/student/management/commands/export_staff_users.py b/common/djangoapps/student/management/commands/export_staff_users.py index e8144af8fa..d57c260729 100644 --- a/common/djangoapps/student/management/commands/export_staff_users.py +++ b/common/djangoapps/student/management/commands/export_staff_users.py @@ -12,7 +12,7 @@ from django.template.loader import get_template from pytz import utc from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseAccessRole +from common.djangoapps.student.models import CourseAccessRole logger = logging.getLogger(__name__) diff --git a/common/djangoapps/student/management/commands/manage_user.py b/common/djangoapps/student/management/commands/manage_user.py index 80e2315dc8..fe8259d928 100644 --- a/common/djangoapps/student/management/commands/manage_user.py +++ b/common/djangoapps/student/management/commands/manage_user.py @@ -12,7 +12,7 @@ from django.db import transaction from django.utils.translation import gettext as _ from openedx.core.djangoapps.user_authn.utils import generate_password -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile def is_valid_django_hash(encoded): diff --git a/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py b/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py index ff025428c9..616341c2d5 100644 --- a/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py +++ b/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py @@ -8,7 +8,7 @@ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.management.base import BaseCommand, CommandError -from student.models import Registration, UserAttribute +from common.djangoapps.student.models import Registration, UserAttribute CREATED_ON_SITE = 'created_on_site' diff --git a/common/djangoapps/student/management/commands/recover_account.py b/common/djangoapps/student/management/commands/recover_account.py index b7ce3a5bd1..a2b11e7784 100644 --- a/common/djangoapps/student/management/commands/recover_account.py +++ b/common/djangoapps/student/management/commands/recover_account.py @@ -17,7 +17,7 @@ from django.utils.http import int_to_base36 from edx_ace import ace from edx_ace.recipient import Recipient -from student.models import AccountRecoveryConfiguration +from common.djangoapps.student.models import AccountRecoveryConfiguration from openedx.core.djangoapps.ace_common.template_context import get_base_template_context from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers diff --git a/common/djangoapps/student/management/commands/transfer_students.py b/common/djangoapps/student/management/commands/transfer_students.py index d2820a2170..23b015506b 100644 --- a/common/djangoapps/student/management/commands/transfer_students.py +++ b/common/djangoapps/student/management/commands/transfer_students.py @@ -10,8 +10,8 @@ from django.db import transaction from opaque_keys.edx.keys import CourseKey from six import text_type -from student.models import CourseEnrollment -from track.management.tracked_command import TrackedCommand +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.track.management.tracked_command import TrackedCommand class TransferStudentError(Exception): diff --git a/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py b/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py index c2572f5678..bf7040a0a9 100644 --- a/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py +++ b/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py @@ -7,10 +7,10 @@ from django.core.management.base import CommandError from mock import call, patch from six import text_type -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import EVENT_NAME_ENROLLMENT_MODE_CHANGED, CourseEnrollment -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import EVENT_NAME_ENROLLMENT_MODE_CHANGED, CourseEnrollment +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -26,7 +26,7 @@ class BulkChangeEnrollmentTests(SharedModuleStoreTestCase): self.users = UserFactory.create_batch(5) CourseOverview.load_from_module_store(self.course.id) - @patch('student.models.tracker') + @patch('common.djangoapps.student.models.tracker') @ddt.data(('audit', 'honor'), ('honor', 'audit')) @ddt.unpack def test_bulk_convert(self, from_mode, to_mode, mock_tracker): @@ -54,7 +54,7 @@ class BulkChangeEnrollmentTests(SharedModuleStoreTestCase): CourseEnrollment.objects.get(mode=to_mode, course_id=self.course.id, user=user) self._assert_mode_changed(mock_tracker, self.course, user, to_mode) - @patch('student.models.tracker') + @patch('common.djangoapps.student.models.tracker') @ddt.data(('audit', 'no-id-professional'), ('no-id-professional', 'audit')) @ddt.unpack def test_bulk_convert_with_org(self, from_mode, to_mode, mock_tracker): @@ -107,7 +107,7 @@ class BulkChangeEnrollmentTests(SharedModuleStoreTestCase): self.assertEqual('Error: one of the arguments -c/--course -o/--org is required', text_type(err.exception)) - @patch('student.models.tracker') + @patch('common.djangoapps.student.models.tracker') def test_with_org_and_invalid_to_mode(self, mock_tracker): """Verify that enrollments are changed correctly when org was given.""" from_mode = 'audit' diff --git a/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py b/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py index aa9c38fa51..d473bddba3 100644 --- a/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py +++ b/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py @@ -10,16 +10,16 @@ from django.core.management import call_command from django.core.management.base import CommandError from testfixtures import LogCapture -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory -from student.models import BulkChangeEnrollmentConfiguration +from common.djangoapps.student.models import BulkChangeEnrollmentConfiguration -LOGGER_NAME = 'student.management.commands.bulk_change_enrollment_csv' +LOGGER_NAME = 'common.djangoapps.student.management.commands.bulk_change_enrollment_csv' class BulkChangeEnrollmentCSVTests(SharedModuleStoreTestCase): diff --git a/common/djangoapps/student/management/tests/test_bulk_unenroll.py b/common/djangoapps/student/management/tests/test_bulk_unenroll.py index 664eddbfe5..d46ee93afe 100644 --- a/common/djangoapps/student/management/tests/test_bulk_unenroll.py +++ b/common/djangoapps/student/management/tests/test_bulk_unenroll.py @@ -7,13 +7,13 @@ from django.core.files.uploadedfile import SimpleUploadedFile from django.core.management import call_command from testfixtures import LogCapture -from course_modes.tests.factories import CourseModeFactory -from student.models import BulkUnenrollConfiguration, CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory +from common.djangoapps.student.models import BulkUnenrollConfiguration, CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory -LOGGER_NAME = 'student.management.commands.bulk_unenroll' +LOGGER_NAME = 'common.djangoapps.student.management.commands.bulk_unenroll' class BulkUnenrollTests(SharedModuleStoreTestCase): diff --git a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py index 20fc611fdb..31d287086b 100644 --- a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py +++ b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py @@ -8,14 +8,14 @@ from opaque_keys import InvalidKeyError from six import text_type from testfixtures import LogCapture -from course_modes.tests.factories import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseMode from openedx.core.djangoapps.credit.models import CreditCourse, CreditEligibility -from student.models import CourseEnrollment, User -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment, User +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory -LOGGER_NAME = 'student.management.commands.change_eligibility_deadline' +LOGGER_NAME = 'common.djangoapps.student.management.commands.change_eligibility_deadline' command_args = '--username {username} --course {course} --date {date}' diff --git a/common/djangoapps/student/management/tests/test_change_enrollment.py b/common/djangoapps/student/management/tests/test_change_enrollment.py index 6a27f2dd3b..c74b3b0568 100644 --- a/common/djangoapps/student/management/tests/test_change_enrollment.py +++ b/common/djangoapps/student/management/tests/test_change_enrollment.py @@ -6,9 +6,9 @@ from django.core.management import call_command from mock import patch from six import text_type -from course_modes.tests.factories import CourseModeFactory -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -42,7 +42,7 @@ class ChangeEnrollmentTests(SharedModuleStoreTestCase): self.users.append(user) self.enrollments.append(CourseEnrollment.enroll(user, self.course.id, mode='audit')) - @patch('student.management.commands.change_enrollment.logger') + @patch('common.djangoapps.student.management.commands.change_enrollment.logger') @ddt.data( ('email', False, 3), ('username', False, 3), @@ -86,7 +86,7 @@ class ChangeEnrollmentTests(SharedModuleStoreTestCase): len(self.users) ) - @patch('student.management.commands.change_enrollment.logger') + @patch('common.djangoapps.student.management.commands.change_enrollment.logger') @ddt.data( ('email', 'dtennant@thedoctor.com', 3), ('username', 'dtennant', 3), diff --git a/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py b/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py index 6959a032a1..3b4c1d7aae 100644 --- a/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py +++ b/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py @@ -21,7 +21,7 @@ class ChangeEnterpriseUserUsernameCommandTests(TestCase): """ command = 'change_enterprise_user_username' - @mock.patch('student.management.commands.change_enterprise_user_username.LOGGER') + @mock.patch('common.djangoapps.student.management.commands.change_enterprise_user_username.LOGGER') def test_user_not_enterprise(self, logger_mock): """ Test that the command does not update a user's username if it is not linked to an Enterprise. @@ -37,7 +37,7 @@ class ChangeEnterpriseUserUsernameCommandTests(TestCase): logger_mock.info.assert_called_with('User {} must be an Enterprise User.'.format(user.id)) post_save_handler.assert_not_called() - @mock.patch('student.management.commands.change_enterprise_user_username.LOGGER') + @mock.patch('common.djangoapps.student.management.commands.change_enterprise_user_username.LOGGER') def test_username_updated_successfully(self, logger_mock): """ Test that the command updates the user's username when the user is linked to an Enterprise. diff --git a/common/djangoapps/student/management/tests/test_create_random_users.py b/common/djangoapps/student/management/tests/test_create_random_users.py index 3fc3dae83b..95d757aa3c 100644 --- a/common/djangoapps/student/management/tests/test_create_random_users.py +++ b/common/djangoapps/student/management/tests/test_create_random_users.py @@ -9,7 +9,7 @@ from django.core.management import call_command from opaque_keys import InvalidKeyError from six import text_type -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/management/tests/test_create_test_users.py b/common/djangoapps/student/management/tests/test_create_test_users.py index 1aed1c96c4..9c4180be02 100644 --- a/common/djangoapps/student/management/tests/test_create_test_users.py +++ b/common/djangoapps/student/management/tests/test_create_test_users.py @@ -11,9 +11,9 @@ from django.core.management.base import CommandError from opaque_keys import InvalidKeyError from six import text_type -from student.helpers import AccountValidationError -from student.models import CourseAccessRole, CourseEnrollment -from student.roles import CourseStaffRole +from common.djangoapps.student.helpers import AccountValidationError +from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment +from common.djangoapps.student.roles import CourseStaffRole from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/management/tests/test_export_staff_users.py b/common/djangoapps/student/management/tests/test_export_staff_users.py index 9afc3f667c..794e530d9b 100644 --- a/common/djangoapps/student/management/tests/test_export_staff_users.py +++ b/common/djangoapps/student/management/tests/test_export_staff_users.py @@ -9,7 +9,7 @@ from django.test import TestCase from django.utils.timezone import now from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.tests.factories import CourseAccessRoleFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseAccessRoleFactory, UserFactory class TestExportStaffUsers(TestCase): diff --git a/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py b/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py index 1dc8854271..3660c171bc 100644 --- a/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py +++ b/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py @@ -11,8 +11,8 @@ from django.test import TestCase from six.moves import range from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin -from student.models import Registration, UserAttribute -from student.tests.factories import UserFactory +from common.djangoapps.student.models import Registration, UserAttribute +from common.djangoapps.student.tests.factories import UserFactory CREATED_ON_SITE = 'created_on_site' diff --git a/common/djangoapps/student/management/tests/test_recover_account.py b/common/djangoapps/student/management/tests/test_recover_account.py index 8dabcbcf5f..80d4e89287 100644 --- a/common/djangoapps/student/management/tests/test_recover_account.py +++ b/common/djangoapps/student/management/tests/test_recover_account.py @@ -12,11 +12,11 @@ from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase, RequestFactory from testfixtures import LogCapture -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory -from student.models import AccountRecoveryConfiguration +from common.djangoapps.student.models import AccountRecoveryConfiguration -LOGGER_NAME = 'student.management.commands.recover_account' +LOGGER_NAME = 'common.djangoapps.student.management.commands.recover_account' class RecoverAccountTests(TestCase): diff --git a/common/djangoapps/student/management/tests/test_transfer_students.py b/common/djangoapps/student/management/tests/test_transfer_students.py index 88c51698b6..9353e6397a 100644 --- a/common/djangoapps/student/management/tests/test_transfer_students.py +++ b/common/djangoapps/student/management/tests/test_transfer_students.py @@ -12,15 +12,15 @@ from mock import call, patch from opaque_keys.edx import locator from six import text_type -from course_modes.models import CourseMode -from student.models import ( +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.student.models import ( EVENT_NAME_ENROLLMENT_ACTIVATED, EVENT_NAME_ENROLLMENT_DEACTIVATED, EVENT_NAME_ENROLLMENT_MODE_CHANGED, CourseEnrollment ) -from student.signals import UNENROLL_DONE -from student.tests.factories import UserFactory +from common.djangoapps.student.signals import UNENROLL_DONE +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -42,7 +42,7 @@ class TestTransferStudents(ModuleStoreTestCase): super(TestTransferStudents, self).setUp() UNENROLL_DONE.connect(self.assert_unenroll_signal) - patcher = patch('student.models.tracker') + patcher = patch('common.djangoapps.student.models.tracker') self.mock_tracker = patcher.start() self.addCleanup(patcher.stop) self.addCleanup(UNENROLL_DONE.disconnect, self.assert_unenroll_signal) diff --git a/common/djangoapps/student/middleware.py b/common/djangoapps/student/middleware.py index 940c249662..db07ee7623 100644 --- a/common/djangoapps/student/middleware.py +++ b/common/djangoapps/student/middleware.py @@ -10,7 +10,7 @@ from django.utils.deprecation import MiddlewareMixin from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML, Text -from student.models import UserStanding +from common.djangoapps.student.models import UserStanding class UserStandingMiddleware(MiddlewareMixin): diff --git a/common/djangoapps/student/migrations/0001_squashed_0031_auto_20200317_1122.py b/common/djangoapps/student/migrations/0001_squashed_0031_auto_20200317_1122.py index a632f7af75..c54433a088 100644 --- a/common/djangoapps/student/migrations/0001_squashed_0031_auto_20200317_1122.py +++ b/common/djangoapps/student/migrations/0001_squashed_0031_auto_20200317_1122.py @@ -4,7 +4,6 @@ import uuid -import course_modes.models import django.utils.timezone import django_countries.fields import model_utils.fields @@ -13,9 +12,10 @@ import simple_history.models from django.conf import settings from django.db import migrations, models from lms.djangoapps.experiments.models import ExperimentData -from student.models import CourseEnrollment, FBEEnrollmentExclusion +from common.djangoapps.student.models import CourseEnrollment, FBEEnrollmentExclusion import openedx.core.djangolib.model_mixins +from common.djangoapps.course_modes import models as course_modes_models from openedx.features.course_duration_limits.config import EXPERIMENT_DATA_HOLDBACK_KEY, EXPERIMENT_ID @@ -465,12 +465,12 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='courseenrollment', name='mode', - field=models.CharField(default=course_modes.models.CourseMode.get_default_mode_slug, max_length=100), + field=models.CharField(default=course_modes_models.CourseMode.get_default_mode_slug, max_length=100), ), migrations.AlterField( model_name='historicalcourseenrollment', name='mode', - field=models.CharField(default=course_modes.models.CourseMode.get_default_mode_slug, max_length=100), + field=models.CharField(default=course_modes_models.CourseMode.get_default_mode_slug, max_length=100), ), migrations.CreateModel( name='HistoricalManualEnrollmentAudit', diff --git a/common/djangoapps/student/migrations/0025_auto_20191101_1846.py b/common/djangoapps/student/migrations/0025_auto_20191101_1846.py index c49721e226..1bdfaee558 100644 --- a/common/djangoapps/student/migrations/0025_auto_20191101_1846.py +++ b/common/djangoapps/student/migrations/0025_auto_20191101_1846.py @@ -6,7 +6,7 @@ from django.db import migrations from lms.djangoapps.experiments.models import ExperimentData from openedx.features.course_duration_limits.config import EXPERIMENT_DATA_HOLDBACK_KEY, EXPERIMENT_ID -from student.models import CourseEnrollment, FBEEnrollmentExclusion +from common.djangoapps.student.models import CourseEnrollment, FBEEnrollmentExclusion def populate_fbeenrollmentexclusion(apps, schema_editor): diff --git a/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py b/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py index 51afefac8a..aceb9b6acc 100644 --- a/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py +++ b/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py @@ -2,9 +2,10 @@ # Generated by Django 1.11.22 on 2019-07-19 13:06 -import course_modes.models from django.db import migrations, models +from common.djangoapps.course_modes import models as course_modes_models + class Migration(migrations.Migration): @@ -16,11 +17,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='courseenrollment', name='mode', - field=models.CharField(default=course_modes.models.CourseMode.get_default_mode_slug, max_length=100), + field=models.CharField(default=course_modes_models.CourseMode.get_default_mode_slug, max_length=100), ), migrations.AlterField( model_name='historicalcourseenrollment', name='mode', - field=models.CharField(default=course_modes.models.CourseMode.get_default_mode_slug, max_length=100), + field=models.CharField(default=course_modes_models.CourseMode.get_default_mode_slug, max_length=100), ), ] diff --git a/common/djangoapps/student/migrations/0029_add_data_researcher.py b/common/djangoapps/student/migrations/0029_add_data_researcher.py index ecf4a8ef37..90f9ff98ac 100644 --- a/common/djangoapps/student/migrations/0029_add_data_researcher.py +++ b/common/djangoapps/student/migrations/0029_add_data_researcher.py @@ -3,7 +3,7 @@ from django.db import migrations -from student.models import CourseAccessRole +from common.djangoapps.student.models import CourseAccessRole def add_data_researcher(apps, schema_editor): diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 4a62a02c54..eff31878a5 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -56,7 +56,7 @@ from slumber.exceptions import HttpClientError, HttpServerError from user_util import user_util import openedx.core.djangoapps.django_comment_common.comment_client as cc -from course_modes.models import CourseMode, get_cosmetic_verified_display_price +from common.djangoapps.course_modes.models import CourseMode, get_cosmetic_verified_display_price from lms.djangoapps.certificates.models import GeneratedCertificate from lms.djangoapps.courseware.models import ( CourseDynamicUpgradeDeadlineConfiguration, @@ -75,10 +75,10 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ from openedx.core.djangoapps.xmodule_django.models import NoneToEmptyManager from openedx.core.djangolib.model_mixins import DeletableByUserValue from openedx.core.toggles import ENTRANCE_EXAMS -from student.signals import ENROLL_STATUS_CHANGE, ENROLLMENT_TRACK_UPDATED, UNENROLL_DONE -from track import contexts, segment -from util.model_utils import emit_field_changed_events, get_changed_fields_dict -from util.query import use_read_replica_if_available +from common.djangoapps.student.signals import ENROLL_STATUS_CHANGE, ENROLLMENT_TRACK_UPDATED, UNENROLL_DONE +from common.djangoapps.track import contexts, segment +from common.djangoapps.util.model_utils import emit_field_changed_events, get_changed_fields_dict +from common.djangoapps.util.query import use_read_replica_if_available log = logging.getLogger(__name__) AUDIT_LOG = logging.getLogger("audit") @@ -1068,7 +1068,7 @@ class CourseEnrollmentManager(models.Manager): """ # To avoid circular imports. - from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole + from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole course_locator = course_id if getattr(course_id, 'ccx', None): diff --git a/common/djangoapps/student/models_api.py b/common/djangoapps/student/models_api.py index f6d291314d..14f3a39316 100644 --- a/common/djangoapps/student/models_api.py +++ b/common/djangoapps/student/models_api.py @@ -3,10 +3,10 @@ Provides Python APIs exposed from Student models. """ import logging -from student.models import CourseAccessRole as _CourseAccessRole -from student.models import CourseEnrollment as _CourseEnrollment -from student.models import ManualEnrollmentAudit as _ManualEnrollmentAudit -from student.models import ( +from common.djangoapps.student.models import CourseAccessRole as _CourseAccessRole +from common.djangoapps.student.models import CourseEnrollment as _CourseEnrollment +from common.djangoapps.student.models import ManualEnrollmentAudit as _ManualEnrollmentAudit +from common.djangoapps.student.models import ( ENROLLED_TO_ENROLLED as _ENROLLED_TO_ENROLLED, ENROLLED_TO_UNENROLLED as _ENROLLED_TO_UNENROLLED, UNENROLLED_TO_ENROLLED as _UNENROLLED_TO_ENROLLED, @@ -16,7 +16,7 @@ from student.models import ( ALLOWEDTOENROLL_TO_UNENROLLED as _ALLOWEDTOENROLL_TO_UNENROLLED, DEFAULT_TRANSITION_STATE as _DEFAULT_TRANSITION_STATE, ) -from student.models import UserProfile as _UserProfile +from common.djangoapps.student.models import UserProfile as _UserProfile # This is done so that if these strings change within the app, we can keep exported constants the same ENROLLED_TO_ENROLLED = _ENROLLED_TO_ENROLLED diff --git a/common/djangoapps/student/role_helpers.py b/common/djangoapps/student/role_helpers.py index b5c5ac1058..ffe0f2c9f2 100644 --- a/common/djangoapps/student/role_helpers.py +++ b/common/djangoapps/student/role_helpers.py @@ -10,7 +10,7 @@ from openedx.core.djangoapps.django_comment_common.models import ( FORUM_ROLE_MODERATOR, Role ) -from student.roles import ( +from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseInstructorRole, CourseStaffRole, diff --git a/common/djangoapps/student/roles.py b/common/djangoapps/student/roles.py index 9433022edf..37596f4162 100644 --- a/common/djangoapps/student/roles.py +++ b/common/djangoapps/student/roles.py @@ -13,7 +13,7 @@ from django.contrib.auth.models import User from opaque_keys.edx.django.models import CourseKeyField from openedx.core.lib.cache_utils import get_cache -from student.models import CourseAccessRole +from common.djangoapps.student.models import CourseAccessRole log = logging.getLogger(__name__) @@ -185,7 +185,7 @@ class RoleBase(AccessRole): """ # silently ignores anonymous and inactive users so that any that are # legit get updated. - from student.models import CourseAccessRole + from common.djangoapps.student.models import CourseAccessRole for user in users: if user.is_authenticated and user.is_active and not self.has_user(user): entry = CourseAccessRole(user=user, role=self._role_name, course_id=self.course_key, org=self.org) diff --git a/common/djangoapps/student/signals/__init__.py b/common/djangoapps/student/signals/__init__.py index e46b9a3acc..ace0c99755 100644 --- a/common/djangoapps/student/signals/__init__.py +++ b/common/djangoapps/student/signals/__init__.py @@ -1,6 +1,6 @@ -from student.signals.signals import ( +from common.djangoapps.student.signals.signals import ( ENROLL_STATUS_CHANGE, ENROLLMENT_TRACK_UPDATED, REFUND_ORDER, diff --git a/common/djangoapps/student/signals/receivers.py b/common/djangoapps/student/signals/receivers.py index e4f7a17268..1d1e2b2893 100644 --- a/common/djangoapps/student/signals/receivers.py +++ b/common/djangoapps/student/signals/receivers.py @@ -11,8 +11,8 @@ from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from lms.djangoapps.courseware.toggles import courseware_mfe_first_section_celebration_is_active -from student.helpers import EMAIL_EXISTS_MSG_FMT, USERNAME_EXISTS_MSG_FMT, AccountValidationError -from student.models import CourseEnrollment, CourseEnrollmentCelebration, is_email_retired, is_username_retired +from common.djangoapps.student.helpers import EMAIL_EXISTS_MSG_FMT, USERNAME_EXISTS_MSG_FMT, AccountValidationError +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentCelebration, is_email_retired, is_username_retired @receiver(pre_save, sender=get_user_model()) diff --git a/common/djangoapps/student/tests/factories.py b/common/djangoapps/student/tests/factories.py index 51ab00825c..efd8a1b686 100644 --- a/common/djangoapps/student/tests/factories.py +++ b/common/djangoapps/student/tests/factories.py @@ -14,7 +14,7 @@ from pytz import UTC from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.models import ( +from common.djangoapps.student.models import ( AccountRecovery, CourseAccessRole, CourseEnrollment, diff --git a/common/djangoapps/student/tests/test_activate_account.py b/common/djangoapps/student/tests/test_activate_account.py index b0a51e1848..43c2c34dbe 100644 --- a/common/djangoapps/student/tests/test_activate_account.py +++ b/common/djangoapps/student/tests/test_activate_account.py @@ -11,8 +11,8 @@ from django.urls import reverse from mock import patch from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from student.models import Registration -from student.tests.factories import UserFactory +from common.djangoapps.student.models import Registration +from common.djangoapps.student.tests.factories import UserFactory @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') @@ -70,7 +70,7 @@ class TestActivateAccount(TestCase): self.assertTrue(self.user.is_active) self.assertFalse(mock_segment_identify.called) - @patch('student.models.USER_ACCOUNT_ACTIVATED') + @patch('common.djangoapps.student.models.USER_ACCOUNT_ACTIVATED') def test_activation_signal(self, mock_signal): """ Verify that USER_ACCOUNT_ACTIVATED is emitted upon account email activation. diff --git a/common/djangoapps/student/tests/test_admin_views.py b/common/djangoapps/student/tests/test_admin_views.py index 868e0161c8..bcb2b7d3e5 100644 --- a/common/djangoapps/student/tests/test_admin_views.py +++ b/common/djangoapps/student/tests/test_admin_views.py @@ -18,9 +18,10 @@ from django.utils.timezone import now from edx_toggles.toggles.testutils import override_waffle_switch from mock import Mock from pytz import UTC -from student.admin import COURSE_ENROLLMENT_ADMIN_SWITCH, AllowedAuthUserForm, CourseEnrollmentForm, UserAdmin -from student.models import AllowedAuthUser, CourseEnrollment, LoginFailures -from student.tests.factories import CourseEnrollmentFactory, UserFactory + +from common.djangoapps.student.admin import AllowedAuthUserForm, COURSE_ENROLLMENT_ADMIN_SWITCH, UserAdmin, CourseEnrollmentForm +from common.djangoapps.student.models import AllowedAuthUser, CourseEnrollment, LoginFailures +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/tests/test_authz.py b/common/djangoapps/student/tests/test_authz.py index 858536e0ff..3704a96c63 100644 --- a/common/djangoapps/student/tests/test_authz.py +++ b/common/djangoapps/student/tests/test_authz.py @@ -10,9 +10,9 @@ from django.core.exceptions import PermissionDenied from django.test import TestCase from opaque_keys.edx.locator import CourseLocator -from student.auth import add_users, has_studio_read_access, has_studio_write_access, remove_users, user_has_role -from student.roles import CourseCreatorRole, CourseInstructorRole, CourseStaffRole -from student.tests.factories import AdminFactory +from common.djangoapps.student.auth import add_users, has_studio_read_access, has_studio_write_access, remove_users, user_has_role +from common.djangoapps.student.roles import CourseCreatorRole, CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import AdminFactory class CreatorGroupTest(TestCase): diff --git a/common/djangoapps/student/tests/test_bulk_email_settings.py b/common/djangoapps/student/tests/test_bulk_email_settings.py index 5adac7bc58..5ff02f2a54 100644 --- a/common/djangoapps/student/tests/test_bulk_email_settings.py +++ b/common/djangoapps/student/tests/test_bulk_email_settings.py @@ -15,7 +15,7 @@ from django.urls import reverse # Its testcases are only run under lms. from lms.djangoapps.bulk_email.api import is_bulk_email_feature_enabled from lms.djangoapps.bulk_email.models import BulkEmailFlag, CourseAuthorization -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/tests/test_certificates.py b/common/djangoapps/student/tests/test_certificates.py index 5efa5962bc..8146962aff 100644 --- a/common/djangoapps/student/tests/test_certificates.py +++ b/common/djangoapps/student/tests/test_certificates.py @@ -11,13 +11,13 @@ from django.urls import reverse from mock import patch from pytz import UTC -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.api import get_certificate_url from lms.djangoapps.certificates.models import CertificateStatuses from lms.djangoapps.certificates.tests.factories import ( GeneratedCertificateFactory, LinkedInAddToProfileConfigurationFactory ) -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -167,7 +167,7 @@ class CertificateDisplayTest(CertificateDisplayTestBase): @patch.dict('django.conf.settings.FEATURES', {'CERTIFICATES_HTML_VIEW': False}) def test_no_certificate_status_no_problem(self): - with patch('student.views.dashboard.cert_info', return_value={}): + with patch('common.djangoapps.student.views.dashboard.cert_info', return_value={}): self._create_certificate('honor') self._check_can_not_download_certificate() diff --git a/common/djangoapps/student/tests/test_configuration_overrides.py b/common/djangoapps/student/tests/test_configuration_overrides.py index 0e43043fd9..8de105237a 100644 --- a/common/djangoapps/student/tests/test_configuration_overrides.py +++ b/common/djangoapps/student/tests/test_configuration_overrides.py @@ -10,7 +10,7 @@ from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse -from student.models import UserSignupSource +from common.djangoapps.student.models import UserSignupSource FAKE_SITE = { "SITE_NAME": "openedx.localhost", diff --git a/common/djangoapps/student/tests/test_course_listing.py b/common/djangoapps/student/tests/test_course_listing.py index 67c340b13c..00edc920ee 100644 --- a/common/djangoapps/student/tests/test_course_listing.py +++ b/common/djangoapps/student/tests/test_course_listing.py @@ -13,11 +13,11 @@ from django.test.client import Client from milestones.tests.utils import MilestonesTestCaseMixin from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment, DashboardConfiguration -from student.roles import GlobalStaff -from student.tests.factories import UserFactory -from student.views import get_course_enrollments -from util.milestones_helpers import get_pre_requisite_courses_not_completed, set_prerequisite_courses +from common.djangoapps.student.models import CourseEnrollment, DashboardConfiguration +from common.djangoapps.student.roles import GlobalStaff +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.student.views import get_course_enrollments +from common.djangoapps.util.milestones_helpers import get_pre_requisite_courses_not_completed, set_prerequisite_courses from xmodule.error_module import ErrorDescriptor from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore diff --git a/common/djangoapps/student/tests/test_credit.py b/common/djangoapps/student/tests/test_credit.py index c3b5e218be..33c7b17c73 100644 --- a/common/djangoapps/student/tests/test_credit.py +++ b/common/djangoapps/student/tests/test_credit.py @@ -15,8 +15,8 @@ from mock import patch from openedx.core.djangoapps.credit import api as credit_api from openedx.core.djangoapps.credit.models import CreditCourse, CreditEligibility, CreditProvider -from student.models import CourseEnrollmentAttribute -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollmentAttribute +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -235,7 +235,7 @@ class CreditCourseDashboardTest(ModuleStoreTestCase): self._make_eligible() # The user should have the option to purchase credit - with patch('student.views.dashboard.get_credit_provider_attribute_values') as mock_method: + with patch('common.djangoapps.student.views.dashboard.get_credit_provider_attribute_values') as mock_method: mock_method.return_value = providers_list response = self._load_dashboard() diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py index 921d64869a..9b0bdf72b3 100644 --- a/common/djangoapps/student/tests/test_email.py +++ b/common/djangoapps/student/tests/test_email.py @@ -18,23 +18,23 @@ from django.utils.html import escape from mock import Mock, patch from six import text_type -from edxmako.shortcuts import marketing_link, render_to_string +from common.djangoapps.edxmako.shortcuts import marketing_link, render_to_string from openedx.core.djangoapps.ace_common.tests.mixins import EmailTemplateTagMixin from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme from openedx.core.djangolib.testing.utils import CacheIsolationMixin, CacheIsolationTestCase from openedx.core.lib.request_utils import safe_get_host -from student.models import PendingEmailChange, Registration, UserProfile -from student.tests.factories import PendingEmailChangeFactory, UserFactory -from student.views import ( +from common.djangoapps.student.models import PendingEmailChange, Registration, UserProfile +from common.djangoapps.student.tests.factories import PendingEmailChangeFactory, UserFactory +from common.djangoapps.student.views import ( SETTING_CHANGE_INITIATED, confirm_email_change, do_email_change_request, generate_activation_email_context, validate_new_email ) -from third_party_auth.views import inactive_user_view -from util.testing import EventTestMixin +from common.djangoapps.third_party_auth.views import inactive_user_view +from common.djangoapps.util.testing import EventTestMixin class TestException(Exception): @@ -189,17 +189,17 @@ class ActivationEmailTests(EmailTemplateTagMixin, CacheIsolationTestCase): Registration().register(user) request = RequestFactory().get(settings.SOCIAL_AUTH_INACTIVE_USER_URL) request.user = user - with patch('student.views.management.compose_and_send_activation_email') as email: - with patch('third_party_auth.provider.Registry.get_from_pipeline') as reg: - with patch('third_party_auth.pipeline.get', return_value=pipeline_partial): - with patch('third_party_auth.pipeline.running', return_value=True): - with patch('third_party_auth.is_enabled', return_value=True): + with patch('common.djangoapps.student.views.management.compose_and_send_activation_email') as email: + with patch('common.djangoapps.third_party_auth.provider.Registry.get_from_pipeline') as reg: + with patch('common.djangoapps.third_party_auth.pipeline.get', return_value=pipeline_partial): + with patch('common.djangoapps.third_party_auth.pipeline.running', return_value=True): + with patch('common.djangoapps.third_party_auth.is_enabled', return_value=True): reg.skip_email_verification = True inactive_user_view(request) self.assertEqual(user.is_active, True) self.assertEqual(email.called, False, msg='method should not have been called') - @patch('student.views.management.compose_activation_email') + @patch('common.djangoapps.student.views.management.compose_activation_email') def test_send_email_to_inactive_user(self, email): """ Tests that when an inactive user logs-in using the social auth, system @@ -209,8 +209,8 @@ class ActivationEmailTests(EmailTemplateTagMixin, CacheIsolationTestCase): Registration().register(inactive_user) request = RequestFactory().get(settings.SOCIAL_AUTH_INACTIVE_USER_URL) request.user = inactive_user - with patch('edxmako.request_context.get_current_request', return_value=request): - with patch('third_party_auth.pipeline.running', return_value=False): + with patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=request): + with patch('common.djangoapps.third_party_auth.pipeline.running', return_value=False): inactive_user_view(request) self.assertEqual(email.called, True, msg='method should have been called') @@ -221,7 +221,7 @@ class EmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, CacheIsolat Test changing a user's email address """ - def setUp(self, tracker='student.views.management.tracker'): + def setUp(self, tracker='common.djangoapps.student.views.management.tracker'): super(EmailChangeRequestTests, self).setUp(tracker) self.user = UserFactory.create() self.new_email = 'new.email@edx.org' @@ -257,7 +257,7 @@ class EmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, CacheIsolat self.assertEqual(expected_error, response_data['error']) self.assertFalse(self.user.email_user.called) - @patch('student.views.management.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True)) + @patch('common.djangoapps.student.views.management.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True)) def test_duplicate_activation_key(self): """ Assert that if two users change Email address simultaneously, no error is thrown @@ -346,8 +346,8 @@ class EmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, CacheIsolat @ddt.ddt -@patch('student.views.management.render_to_response', Mock(side_effect=mock_render_to_response, autospec=True)) -@patch('student.views.management.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True)) +@patch('common.djangoapps.student.views.management.render_to_response', Mock(side_effect=mock_render_to_response, autospec=True)) +@patch('common.djangoapps.student.views.management.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True)) class EmailChangeConfirmationTests(EmailTestMixin, EmailTemplateTagMixin, CacheIsolationMixin, TransactionTestCase): """ Test that confirmation of email change requests function even in the face of exceptions thrown while sending email @@ -472,7 +472,7 @@ class EmailChangeConfirmationTests(EmailTestMixin, EmailTemplateTagMixin, CacheI self.assertFailedBeforeEmailing() @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', "Test only valid in LMS") - @patch('student.views.management.ace') + @patch('common.djangoapps.student.views.management.ace') def test_old_email_fails(self, ace_mail): ace_mail.send.side_effect = [Exception, None] self.check_confirm_email_change('email_change_failed.html', { @@ -482,7 +482,7 @@ class EmailChangeConfirmationTests(EmailTestMixin, EmailTemplateTagMixin, CacheI self.assertRolledBack() @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', "Test only valid in LMS") - @patch('student.views.management.ace') + @patch('common.djangoapps.student.views.management.ace') def test_new_email_fails(self, ace_mail): ace_mail.send.side_effect = [None, Exception] self.check_confirm_email_change('email_change_failed.html', { @@ -513,7 +513,7 @@ class EmailChangeConfirmationTests(EmailTestMixin, EmailTemplateTagMixin, CacheI ) self.assertEqual(0, PendingEmailChange.objects.count()) - @patch('student.views.PendingEmailChange.objects.get', Mock(side_effect=TestException)) + @patch('common.djangoapps.student.views.PendingEmailChange.objects.get', Mock(side_effect=TestException)) def test_always_rollback(self): connection = transaction.get_connection() with patch.object(connection, 'rollback', wraps=connection.rollback) as mock_rollback: @@ -529,7 +529,7 @@ class SecondaryEmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, Ca Test changing a user's email address """ - def setUp(self, tracker='student.views.management.tracker'): + def setUp(self, tracker='common.djangoapps.student.views.management.tracker'): super(SecondaryEmailChangeRequestTests, self).setUp(tracker) self.user = UserFactory.create() self.new_secondary_email = 'new.secondary.email@edx.org' diff --git a/common/djangoapps/student/tests/test_enrollment.py b/common/djangoapps/student/tests/test_enrollment.py index da63d5a063..6511ef95cb 100644 --- a/common/djangoapps/student/tests/test_enrollment.py +++ b/common/djangoapps/student/tests/test_enrollment.py @@ -11,18 +11,18 @@ from django.conf import settings from django.urls import reverse from mock import patch -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.embargo.test_utils import restrict_course -from student.models import ( +from common.djangoapps.student.models import ( SCORE_RECALCULATION_DELAY_ON_ENROLLMENT_UPDATE, CourseEnrollment, CourseFullError, EnrollmentClosedError ) -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import CourseEnrollmentAllowedFactory, UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentAllowedFactory, UserFactory +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/tests/test_events.py b/common/djangoapps/student/tests/test_events.py index b335738758..40a565e39c 100644 --- a/common/djangoapps/student/tests/test_events.py +++ b/common/djangoapps/student/tests/test_events.py @@ -9,9 +9,9 @@ from django.db.utils import IntegrityError from django.test import TestCase from django_countries.fields import Country -from student.models import CourseEnrollmentAllowed -from student.tests.factories import CourseEnrollmentAllowedFactory, UserFactory -from student.tests.tests import UserSettingsEventTestMixin +from common.djangoapps.student.models import CourseEnrollmentAllowed +from common.djangoapps.student.tests.factories import CourseEnrollmentAllowedFactory, UserFactory +from common.djangoapps.student.tests.tests import UserSettingsEventTestMixin class TestUserProfileEvents(UserSettingsEventTestMixin, TestCase): @@ -75,7 +75,7 @@ class TestUserProfileEvents(UserSettingsEventTestMixin, TestCase): self.profile.save() self.assert_no_events_were_emitted() - @mock.patch('student.models.UserProfile.save', side_effect=IntegrityError) + @mock.patch('common.djangoapps.student.models.UserProfile.save', side_effect=IntegrityError) def test_no_event_if_save_failed(self, _save_mock): """ Verify no event is triggered if the save does not complete. Note that the pre_save diff --git a/common/djangoapps/student/tests/test_helpers.py b/common/djangoapps/student/tests/test_helpers.py index 3992cf3e6c..761cc0d1da 100644 --- a/common/djangoapps/student/tests/test_helpers.py +++ b/common/djangoapps/student/tests/test_helpers.py @@ -14,9 +14,9 @@ from mock import patch from testfixtures import LogCapture from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context -from student.helpers import get_next_url_for_login_page +from common.djangoapps.student.helpers import get_next_url_for_login_page -LOGGER_NAME = "student.helpers" +LOGGER_NAME = "common.djangoapps.student.helpers" @ddt.ddt @@ -102,7 +102,7 @@ class TestLoginHelper(TestCase): for method in ['GET', 'POST'] ] - @patch('student.helpers.third_party_auth.pipeline.get') + @patch('common.djangoapps.student.helpers.third_party_auth.pipeline.get') @ddt.data(*tpa_hint_test_cases_with_method) @ddt.unpack def test_third_party_auth_hint( diff --git a/common/djangoapps/student/tests/test_models.py b/common/djangoapps/student/tests/test_models.py index b61822a158..a760f28789 100644 --- a/common/djangoapps/student/tests/test_models.py +++ b/common/djangoapps/student/tests/test_models.py @@ -11,14 +11,14 @@ from django.db.models.functions import Lower from django.test import TestCase from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.models import DynamicUpgradeDeadlineConfiguration from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.schedules.models import Schedule from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import ( +from common.djangoapps.student.models import ( ALLOWEDTOENROLL_TO_ENROLLED, AccountRecovery, CourseEnrollment, @@ -27,7 +27,7 @@ from student.models import ( PendingEmailChange, PendingNameChange ) -from student.tests.factories import AccountRecoveryFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import AccountRecoveryFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/tests/test_parental_controls.py b/common/djangoapps/student/tests/test_parental_controls.py index 236ba998e7..109789188e 100644 --- a/common/djangoapps/student/tests/test_parental_controls.py +++ b/common/djangoapps/student/tests/test_parental_controls.py @@ -7,8 +7,8 @@ from django.test import TestCase from django.test.utils import override_settings from django.utils.timezone import now -from student.models import UserProfile -from student.tests.factories import UserFactory +from common.djangoapps.student.models import UserProfile +from common.djangoapps.student.tests.factories import UserFactory class ProfileParentalControlsTest(TestCase): diff --git a/common/djangoapps/student/tests/test_password_policy.py b/common/djangoapps/student/tests/test_password_policy.py index d532ab0ac5..8767810a23 100644 --- a/common/djangoapps/student/tests/test_password_policy.py +++ b/common/djangoapps/student/tests/test_password_policy.py @@ -14,7 +14,7 @@ from django.urls import reverse from mock import patch from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory -from util.password_policy_validators import create_validator_config +from common.djangoapps.util.password_policy_validators import create_validator_config class TestPasswordPolicy(TestCase): @@ -34,7 +34,7 @@ class TestPasswordPolicy(TestCase): } @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 6}) + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 6}) ]) def test_password_length_too_short(self): self.url_params['password'] = 'aaa' @@ -47,7 +47,7 @@ class TestPasswordPolicy(TestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 6}) + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 6}) ]) def test_password_length_long_enough(self): self.url_params['password'] = 'ThisIsALongerPassword' @@ -57,7 +57,7 @@ class TestPasswordPolicy(TestCase): self.assertTrue(obj['success']) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MaximumLengthValidator', {'max_length': 12}) + create_validator_config('common.djangoapps.util.password_policy_validators.MaximumLengthValidator', {'max_length': 12}) ]) def test_password_length_too_long(self): self.url_params['password'] = 'ThisPasswordIsWayTooLong' @@ -70,7 +70,7 @@ class TestPasswordPolicy(TestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 3}) ]) def test_password_not_enough_uppercase(self): self.url_params['password'] = 'thisshouldfail' @@ -83,7 +83,7 @@ class TestPasswordPolicy(TestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 3}) ]) def test_password_enough_uppercase(self): self.url_params['password'] = 'ThisShouldPass' @@ -93,7 +93,7 @@ class TestPasswordPolicy(TestCase): self.assertTrue(obj['success']) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.LowercaseValidator', {'min_lower': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.LowercaseValidator', {'min_lower': 3}) ]) def test_password_not_enough_lowercase(self): self.url_params['password'] = 'THISSHOULDFAIL' @@ -106,7 +106,7 @@ class TestPasswordPolicy(TestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.LowercaseValidator', {'min_lower': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.LowercaseValidator', {'min_lower': 3}) ]) def test_password_enough_lowercase(self): self.url_params['password'] = 'ThisShouldPass' @@ -116,7 +116,7 @@ class TestPasswordPolicy(TestCase): self.assertTrue(obj['success']) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}) ]) def test_not_enough_punctuations(self): self.url_params['password'] = 'thisshouldfail' @@ -129,7 +129,7 @@ class TestPasswordPolicy(TestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}) ]) def test_enough_punctuations(self): self.url_params['password'] = 'Th!sSh.uldPa$*' @@ -139,7 +139,7 @@ class TestPasswordPolicy(TestCase): self.assertTrue(obj['success']) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 3}) ]) def test_not_enough_numeric_characters(self): # The unicode ២ is the number 2 in Khmer and the ٧ is the Arabic-Indic number 7 @@ -153,7 +153,7 @@ class TestPasswordPolicy(TestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 3}) ]) def test_enough_numeric_characters(self): # The unicode ២ is the number 2 in Khmer @@ -164,7 +164,7 @@ class TestPasswordPolicy(TestCase): self.assertTrue(obj['success']) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 3}) ]) def test_not_enough_alphabetic_characters(self): self.url_params['password'] = '123456ab' @@ -177,7 +177,7 @@ class TestPasswordPolicy(TestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 3}) + create_validator_config('common.djangoapps.util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 3}) ]) def test_enough_alphabetic_characters(self): self.url_params['password'] = u'𝒯𝓗Ï𝓼𝒫å𝓼𝓼𝔼𝓼' @@ -187,10 +187,10 @@ class TestPasswordPolicy(TestCase): self.assertTrue(obj['success']) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 3}), - create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 3}), - create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 3}), - create_validator_config('util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}), ]) def test_multiple_errors_fail(self): self.url_params['password'] = 'thisshouldfail' @@ -206,11 +206,11 @@ class TestPasswordPolicy(TestCase): self.assertEqual(obj['password'][i]['user_message'], error_strings[i]) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 3}), - create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 3}), - create_validator_config('util.password_policy_validators.LowercaseValidator', {'min_lower': 3}), - create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 3}), - create_validator_config('util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.LowercaseValidator', {'min_lower': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3}), ]) def test_multiple_errors_pass(self): self.url_params['password'] = u'tH1s Sh0u!d P3#$!' @@ -243,8 +243,8 @@ class TestPasswordPolicy(TestCase): self.assertTrue(obj['success']) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 6}), - create_validator_config('util.password_policy_validators.MaximumLengthValidator', {'max_length': 75}), + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 6}), + create_validator_config('common.djangoapps.util.password_policy_validators.MaximumLengthValidator', {'max_length': 75}), ]) def test_with_unicode(self): self.url_params['password'] = u'四節比分和七年前' diff --git a/common/djangoapps/student/tests/test_receivers.py b/common/djangoapps/student/tests/test_receivers.py index 40376dc4a6..ce3124ca9c 100644 --- a/common/djangoapps/student/tests/test_receivers.py +++ b/common/djangoapps/student/tests/test_receivers.py @@ -7,8 +7,8 @@ from lms.djangoapps.courseware.toggles import ( REDIRECT_TO_COURSEWARE_MICROFRONTEND ) from lms.djangoapps.experiments.testutils import override_experiment_waffle_flag -from student.models import CourseEnrollmentCelebration -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.models import CourseEnrollmentCelebration +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/common/djangoapps/student/tests/test_recent_enrollments.py b/common/djangoapps/student/tests/test_recent_enrollments.py index af90a8376a..b881207b87 100644 --- a/common/djangoapps/student/tests/test_recent_enrollments.py +++ b/common/djangoapps/student/tests/test_recent_enrollments.py @@ -15,12 +15,12 @@ from pytz import UTC from six.moves import range, zip from common.test.utils import XssTestMixin -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context -from student.models import CourseEnrollment, DashboardConfiguration -from student.tests.factories import UserFactory -from student.views import get_course_enrollments -from student.views.dashboard import _get_recently_enrolled_courses +from common.djangoapps.student.models import CourseEnrollment, DashboardConfiguration +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.student.views import get_course_enrollments +from common.djangoapps.student.views.dashboard import _get_recently_enrolled_courses from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/tests/test_refunds.py b/common/djangoapps/student/tests/test_refunds.py index 2cd3fbdafe..4a1700a8b3 100644 --- a/common/djangoapps/student/tests/test_refunds.py +++ b/common/djangoapps/student/tests/test_refunds.py @@ -21,12 +21,12 @@ from six.moves import range # These imports refer to lms djangoapps. # Their testcases are only run under lms. -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from openedx.core.djangoapps.commerce.utils import ECOMMERCE_DATE_FORMAT -from student.models import CourseEnrollment, CourseEnrollmentAttribute, EnrollmentRefundConfiguration -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAttribute, EnrollmentRefundConfiguration +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -65,13 +65,13 @@ class RefundableTest(SharedModuleStoreTestCase): self.client = Client() cache.clear() - @patch('student.models.CourseEnrollment.refund_cutoff_date') + @patch('common.djangoapps.student.models.CourseEnrollment.refund_cutoff_date') def test_refundable(self, cutoff_date): """ Assert base case is refundable""" cutoff_date.return_value = datetime.now(pytz.UTC) + timedelta(days=1) self.assertTrue(self.enrollment.refundable()) - @patch('student.models.CourseEnrollment.refund_cutoff_date') + @patch('common.djangoapps.student.models.CourseEnrollment.refund_cutoff_date') def test_refundable_expired_verification(self, cutoff_date): """ Assert that enrollment is refundable if course mode has expired.""" cutoff_date.return_value = datetime.now(pytz.UTC) + timedelta(days=1) @@ -79,7 +79,7 @@ class RefundableTest(SharedModuleStoreTestCase): self.verified_mode.save() self.assertTrue(self.enrollment.refundable()) - @patch('student.models.CourseEnrollment.refund_cutoff_date') + @patch('common.djangoapps.student.models.CourseEnrollment.refund_cutoff_date') def test_refundable_when_certificate_exists(self, cutoff_date): """ Assert that enrollment is not refundable once a certificat has been generated.""" @@ -110,7 +110,7 @@ class RefundableTest(SharedModuleStoreTestCase): ) ) - @patch('student.models.CourseEnrollment.refund_cutoff_date') + @patch('common.djangoapps.student.models.CourseEnrollment.refund_cutoff_date') def test_refundable_with_cutoff_date(self, cutoff_date): """ Assert enrollment is refundable before cutoff and not refundable after.""" cutoff_date.return_value = datetime.now(pytz.UTC) + timedelta(days=1) @@ -158,7 +158,7 @@ class RefundableTest(SharedModuleStoreTestCase): value=self.ORDER_NUMBER ) - with patch('student.models.EnrollmentRefundConfiguration.current') as config: + with patch('common.djangoapps.student.models.EnrollmentRefundConfiguration.current') as config: instance = config.return_value instance.refund_window = refund_period self.assertEqual( diff --git a/common/djangoapps/student/tests/test_retirement.py b/common/djangoapps/student/tests/test_retirement.py index b24a226b35..ed174e4a8c 100644 --- a/common/djangoapps/student/tests/test_retirement.py +++ b/common/djangoapps/student/tests/test_retirement.py @@ -14,7 +14,7 @@ from django.test import TestCase from django.urls import reverse from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import ( +from common.djangoapps.student.models import ( _get_all_retired_emails_by_email, _get_all_retired_usernames_by_username, get_potentially_retired_user_by_username, @@ -24,7 +24,7 @@ from student.models import ( is_email_retired, is_username_retired ) -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory # Tell pytest it's ok to user the Django db pytestmark = pytest.mark.django_db diff --git a/common/djangoapps/student/tests/test_roles.py b/common/djangoapps/student/tests/test_roles.py index 46f1bc3f0e..54e0652ea0 100644 --- a/common/djangoapps/student/tests/test_roles.py +++ b/common/djangoapps/student/tests/test_roles.py @@ -9,7 +9,7 @@ from django.test import TestCase from opaque_keys.edx.keys import CourseKey from lms.djangoapps.courseware.tests.factories import InstructorFactory, StaffFactory, UserFactory -from student.roles import ( +from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseInstructorRole, CourseRole, @@ -19,7 +19,7 @@ from student.roles import ( OrgStaffRole, RoleCache ) -from student.tests.factories import AnonymousUserFactory +from common.djangoapps.student.tests.factories import AnonymousUserFactory class RolesTestCase(TestCase): diff --git a/common/djangoapps/student/tests/test_tasks.py b/common/djangoapps/student/tests/test_tasks.py index 06ab5893af..3de3517746 100644 --- a/common/djangoapps/student/tests/test_tasks.py +++ b/common/djangoapps/student/tests/test_tasks.py @@ -10,9 +10,9 @@ from six.moves import range from edx_ace.errors import ChannelError, RecoverableChannelDeliveryError from lms.djangoapps.courseware.tests.factories import UserFactory -from student.models import Registration -from student.tasks import send_activation_email -from student.views.management import compose_activation_email +from common.djangoapps.student.models import Registration +from common.djangoapps.student.tasks import send_activation_email +from common.djangoapps.student.views.management import compose_activation_email class SendActivationEmailTestCase(TestCase): @@ -40,8 +40,8 @@ class SendActivationEmailTestCase(TestCase): self.assertEqual(self.msg.context['routed_profile_name'], '') @mock.patch('time.sleep', mock.Mock(return_value=None)) - @mock.patch('student.tasks.log') - @mock.patch('student.tasks.ace.send', mock.Mock(side_effect=RecoverableChannelDeliveryError(None, None))) + @mock.patch('common.djangoapps.student.tasks.log') + @mock.patch('common.djangoapps.student.tasks.ace.send', mock.Mock(side_effect=RecoverableChannelDeliveryError(None, None))) def test_RetrySendUntilFail(self, mock_log): """ Tests retries when the activation email doesn't send @@ -70,8 +70,8 @@ class SendActivationEmailTestCase(TestCase): ) self.assertEqual(mock_log.error.call_count, 1) - @mock.patch('student.tasks.log') - @mock.patch('student.tasks.ace.send', mock.Mock(side_effect=ChannelError)) + @mock.patch('common.djangoapps.student.tasks.log') + @mock.patch('common.djangoapps.student.tasks.ace.send', mock.Mock(side_effect=ChannelError)) def test_UnrecoverableSendError(self, mock_log): """ Tests that a major failure of the send is logged diff --git a/common/djangoapps/student/tests/test_user_profile_properties.py b/common/djangoapps/student/tests/test_user_profile_properties.py index 9400e93523..e497d6bf5d 100644 --- a/common/djangoapps/student/tests/test_user_profile_properties.py +++ b/common/djangoapps/student/tests/test_user_profile_properties.py @@ -8,8 +8,8 @@ from django.core.cache import cache from django.core.exceptions import ValidationError from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.models import UserProfile -from student.tests.factories import UserFactory +from common.djangoapps.student.models import UserProfile +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/common/djangoapps/student/tests/test_userstanding.py b/common/djangoapps/student/tests/test_userstanding.py index 0e1f5df5f4..21431784de 100644 --- a/common/djangoapps/student/tests/test_userstanding.py +++ b/common/djangoapps/student/tests/test_userstanding.py @@ -10,8 +10,8 @@ from django.conf import settings from django.test import Client, TestCase from django.urls import reverse -from student.models import UserStanding -from student.tests.factories import UserFactory, UserStandingFactory +from common.djangoapps.student.models import UserStanding +from common.djangoapps.student.tests.factories import UserFactory, UserStandingFactory class UserStandingTest(TestCase): diff --git a/common/djangoapps/student/tests/test_verification_status.py b/common/djangoapps/student/tests/test_verification_status.py index 02cd5729fd..e437a1bc0c 100644 --- a/common/djangoapps/student/tests/test_verification_status.py +++ b/common/djangoapps/student/tests/test_verification_status.py @@ -14,9 +14,9 @@ from django.utils.timezone import now from mock import patch from pytz import UTC -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification, VerificationDeadline -from student.helpers import ( +from common.djangoapps.student.helpers import ( VERIFY_STATUS_APPROVED, VERIFY_STATUS_MISSED_DEADLINE, VERIFY_STATUS_NEED_TO_REVERIFY, @@ -24,8 +24,8 @@ from student.helpers import ( VERIFY_STATUS_RESUBMITTED, VERIFY_STATUS_SUBMITTED ) -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/student/tests/test_views.py b/common/djangoapps/student/tests/test_views.py index ed895af31a..3f55511798 100644 --- a/common/djangoapps/student/tests/test_views.py +++ b/common/djangoapps/student/tests/test_views.py @@ -25,8 +25,8 @@ from opaque_keys.edx.keys import CourseKey from pyquery import PyQuery as pq from six.moves import range -from course_modes.models import CourseMode -from entitlements.tests.factories import CourseEntitlementFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from openedx.core.djangoapps.catalog.tests.factories import ProgramFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview @@ -36,12 +36,12 @@ from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context from openedx.features.course_duration_limits.models import CourseDurationLimitConfig from openedx.features.course_experience.tests.views.helpers import add_course_mode -from student.helpers import DISABLE_UNENROLL_CERT_STATES -from student.models import CourseEnrollment, UserProfile -from student.signals import REFUND_ORDER -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.milestones_helpers import get_course_milestones, remove_prerequisite_course, set_prerequisite_courses -from util.testing import UrlResetMixin +from common.djangoapps.student.helpers import DISABLE_UNENROLL_CERT_STATES +from common.djangoapps.student.models import CourseEnrollment, UserProfile +from common.djangoapps.student.signals import REFUND_ORDER +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.milestones_helpers import get_course_milestones, remove_prerequisite_course, set_prerequisite_courses +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory @@ -93,7 +93,7 @@ class TestStudentDashboardUnenrollments(SharedModuleStoreTestCase): """ Assert that the unenroll action is shown or not based on the cert status.""" self.cert_status = cert_status - with patch('student.views.dashboard.cert_info', side_effect=self.mock_cert): + with patch('common.djangoapps.student.views.dashboard.cert_info', side_effect=self.mock_cert): response = self.client.get(reverse('dashboard')) self.assertEqual(pq(response.content)(self.UNENROLL_ELEMENT_ID).length, unenroll_action_count) @@ -111,7 +111,7 @@ class TestStudentDashboardUnenrollments(SharedModuleStoreTestCase): """ Assert that the unenroll method is called or not based on the cert status""" self.cert_status = cert_status - with patch('student.views.management.cert_info', side_effect=self.mock_cert): + with patch('common.djangoapps.student.views.management.cert_info', side_effect=self.mock_cert): with patch('lms.djangoapps.commerce.signals.handle_refund_order') as mock_refund_handler: REFUND_ORDER.connect(mock_refund_handler) response = self.client.post( @@ -138,13 +138,13 @@ class TestStudentDashboardUnenrollments(SharedModuleStoreTestCase): def test_course_run_refund_status_successful(self): """ Assert that view:course_run_refund_status returns correct Json for successful refund call.""" - with patch('student.models.CourseEnrollment.refundable', return_value=True): + with patch('common.djangoapps.student.models.CourseEnrollment.refundable', return_value=True): response = self.client.get(reverse('course_run_refund_status', kwargs={'course_id': self.course.id})) self.assertEqual(json.loads(response.content.decode('utf-8')), {'course_refundable_status': True}) self.assertEqual(response.status_code, 200) - with patch('student.models.CourseEnrollment.refundable', return_value=False): + with patch('common.djangoapps.student.models.CourseEnrollment.refundable', return_value=False): response = self.client.get(reverse('course_run_refund_status', kwargs={'course_id': self.course.id})) self.assertEqual(json.loads(response.content.decode('utf-8')), {'course_refundable_status': False}) @@ -303,8 +303,8 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin, self.assertNotContains(response, '
') @patch('openedx.core.djangoapps.programs.utils.get_programs') - @patch('student.views.dashboard.get_visible_sessions_for_entitlement') - @patch('student.views.dashboard.get_pseudo_session_for_entitlement') + @patch('common.djangoapps.student.views.dashboard.get_visible_sessions_for_entitlement') + @patch('common.djangoapps.student.views.dashboard.get_pseudo_session_for_entitlement') @patch.object(CourseOverview, 'get_from_id') def test_unfulfilled_entitlement(self, mock_course_overview, mock_pseudo_session, mock_course_runs, mock_get_programs): @@ -363,7 +363,7 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin, self.assertContains(response, 'You must select a session to access the course.') self.assertNotContains(response, 'To access the course, select a session.') - @patch('student.views.dashboard.get_visible_sessions_for_entitlement') + @patch('common.djangoapps.student.views.dashboard.get_visible_sessions_for_entitlement') @patch.object(CourseOverview, 'get_from_id') def test_unfulfilled_expired_entitlement(self, mock_course_overview, mock_course_runs): """ @@ -389,7 +389,7 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin, response = self.client.get(self.path) self.assertNotContains(response, '
  • ') - @patch('entitlements.rest_api.v1.views.get_course_runs_for_course') + @patch('common.djangoapps.entitlements.rest_api.v1.views.get_course_runs_for_course') @patch.object(CourseOverview, 'get_from_id') def test_sessions_for_entitlement_course_runs(self, mock_course_overview, mock_course_runs): """ @@ -456,7 +456,7 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin, # self.assertNotIn(noAvailableSessions, response.content) @patch('openedx.core.djangoapps.programs.utils.get_programs') - @patch('student.views.dashboard.get_visible_sessions_for_entitlement') + @patch('common.djangoapps.student.views.dashboard.get_visible_sessions_for_entitlement') @patch.object(CourseOverview, 'get_from_id') def test_fulfilled_entitlement(self, mock_course_overview, mock_course_runs, mock_get_programs): """ @@ -492,7 +492,7 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin, self.assertContains(response, 'Related Programs:') @patch('openedx.core.djangoapps.programs.utils.get_programs') - @patch('student.views.dashboard.get_visible_sessions_for_entitlement') + @patch('common.djangoapps.student.views.dashboard.get_visible_sessions_for_entitlement') @patch.object(CourseOverview, 'get_from_id') def test_fulfilled_expired_entitlement(self, mock_course_overview, mock_course_runs, mock_get_programs): """ @@ -527,7 +527,7 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin, self.assertContains(response, 'Related Programs:') @patch('openedx.core.djangoapps.catalog.utils.get_course_runs_for_course') - @patch('student.views.dashboard.is_bulk_email_feature_enabled') + @patch('common.djangoapps.student.views.dashboard.is_bulk_email_feature_enabled') def test_email_settings_fulfilled_entitlement(self, mock_email_feature, mock_get_course_runs): """ Assert that the Email Settings action is shown when the user has a fulfilled entitlement. @@ -548,7 +548,7 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin, self.assertEqual(pq(response.content)(self.EMAIL_SETTINGS_ELEMENT_ID).length, 1) @patch.object(CourseOverview, 'get_from_id') - @patch('student.views.dashboard.is_bulk_email_feature_enabled') + @patch('common.djangoapps.student.views.dashboard.is_bulk_email_feature_enabled') def test_email_settings_unfulfilled_entitlement(self, mock_email_feature, mock_course_overview): """ Assert that the Email Settings action is not shown when the entitlement is not fulfilled. diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index d7017d3bba..339ede82e5 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -23,8 +23,8 @@ from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locations import CourseLocator from pyquery import PyQuery as pq -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.certificates.models import CertificateStatuses from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from lms.djangoapps.verify_student.tests import TestVerificationBase @@ -34,8 +34,8 @@ from openedx.core.djangoapps.content.course_overviews.tests.factories import Cou from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms -from student.helpers import _cert_info, process_survey_link -from student.models import ( +from common.djangoapps.student.helpers import _cert_info, process_survey_link +from common.djangoapps.student.models import ( CourseEnrollment, LinkedInAddToProfileConfiguration, UserAttribute, @@ -43,10 +43,10 @@ from student.models import ( unique_id_for_user, user_by_anonymous_id ) -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from student.views import complete_course_mode_info -from util.model_utils import USER_SETTINGS_CHANGED_EVENT_NAME -from util.testing import EventTestMixin +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.views import complete_course_mode_info +from common.djangoapps.util.model_utils import USER_SETTINGS_CHANGED_EVENT_NAME +from common.djangoapps.util.testing import EventTestMixin from xmodule.modulestore.tests.django_utils import ModuleStoreEnum, ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls @@ -624,7 +624,7 @@ class UserSettingsEventTestMixin(EventTestMixin): Mixin for verifying that user setting events were emitted during a test. """ def setUp(self): - super(UserSettingsEventTestMixin, self).setUp('util.model_utils.tracker') + super(UserSettingsEventTestMixin, self).setUp('common.djangoapps.util.model_utils.tracker') def assert_user_setting_event_emitted(self, **kwargs): """ @@ -651,7 +651,7 @@ class UserSettingsEventTestMixin(EventTestMixin): class EnrollmentEventTestMixin(EventTestMixin): """ Mixin with assertions for validating enrollment events. """ def setUp(self): - super(EnrollmentEventTestMixin, self).setUp('student.models.tracker') + super(EnrollmentEventTestMixin, self).setUp('common.djangoapps.student.models.tracker') def assert_enrollment_mode_change_event_was_emitted(self, user, course_key, mode): """Ensures an enrollment mode change event was emitted""" @@ -969,7 +969,7 @@ class AnonymousLookupTable(ModuleStoreTestCase): mode_slug='honor', mode_display_name='Honor Code', ) - patcher = patch('student.models.tracker') + patcher = patch('common.djangoapps.student.models.tracker') patcher.start() self.addCleanup(patcher.stop) diff --git a/common/djangoapps/student/views/dashboard.py b/common/djangoapps/student/views/dashboard.py index 55e1e2497a..cc6fefc59f 100644 --- a/common/djangoapps/student/views/dashboard.py +++ b/common/djangoapps/student/views/dashboard.py @@ -21,12 +21,11 @@ from opaque_keys.edx.keys import CourseKey from pytz import UTC from six import iteritems, text_type -import track.views from lms.djangoapps.bulk_email.api import is_bulk_email_feature_enabled from lms.djangoapps.bulk_email.models import Optout -from course_modes.models import CourseMode -from edxmako.shortcuts import render_to_response, render_to_string -from entitlements.models import CourseEntitlement +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.edxmako.shortcuts import render_to_response, render_to_string +from common.djangoapps.entitlements.models import CourseEntitlement from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.courseware.access import has_access from lms.djangoapps.experiments.utils import get_dashboard_course_info, get_experiment_user_metadata_context @@ -48,9 +47,9 @@ from openedx.features.enterprise_support.api import ( get_dashboard_consent_notification, get_enterprise_learner_portal_enabled_message ) -from student.api import COURSE_DASHBOARD_PLUGIN_VIEW_NAME -from student.helpers import cert_info, check_verify_status_by_course, get_resume_urls_for_enrollments -from student.models import ( +from common.djangoapps.student.api import COURSE_DASHBOARD_PLUGIN_VIEW_NAME +from common.djangoapps.student.helpers import cert_info, check_verify_status_by_course, get_resume_urls_for_enrollments +from common.djangoapps.student.models import ( AccountRecovery, CourseEnrollment, CourseEnrollmentAttribute, @@ -58,7 +57,7 @@ from student.models import ( PendingSecondaryEmailChange, UserProfile ) -from util.milestones_helpers import get_pre_requisite_courses_not_completed +from common.djangoapps.util.milestones_helpers import get_pre_requisite_courses_not_completed from xmodule.modulestore.django import modulestore log = logging.getLogger("edx.student") diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index 39d9abe85d..17b8d99da0 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -36,12 +36,12 @@ from opaque_keys.edx.keys import CourseKey from pytz import UTC from six import text_type -import track.views +from common.djangoapps.track import views as track_views from lms.djangoapps.bulk_email.models import Optout -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.courses import get_courses, sort_by_announcement, sort_by_start_date -from edxmako.shortcuts import marketing_link, render_to_response, render_to_string -from entitlements.models import CourseEntitlement +from common.djangoapps.edxmako.shortcuts import marketing_link, render_to_response, render_to_string +from common.djangoapps.entitlements.models import CourseEntitlement from openedx.core.djangoapps.ace_common.template_context import get_base_template_context from openedx.core.djangoapps.catalog.utils import get_programs_with_type from openedx.core.djangoapps.embargo import api as embargo_api @@ -51,9 +51,9 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ from openedx.core.djangoapps.theming import helpers as theming_helpers from openedx.core.djangoapps.user_api.preferences import api as preferences_api from openedx.core.djangolib.markup import HTML, Text -from student.helpers import DISABLE_UNENROLL_CERT_STATES, cert_info, generate_activation_email_context -from student.message_types import AccountActivation, EmailChange, EmailChangeConfirmation, RecoveryEmailCreate -from student.models import ( +from common.djangoapps.student.helpers import DISABLE_UNENROLL_CERT_STATES, cert_info, generate_activation_email_context +from common.djangoapps.student.message_types import AccountActivation, EmailChange, EmailChangeConfirmation, RecoveryEmailCreate +from common.djangoapps.student.models import ( AccountRecovery, CourseEnrollment, PendingEmailChange, @@ -67,11 +67,11 @@ from student.models import ( create_comments_service_user, email_exists_or_retired ) -from student.signals import REFUND_ORDER -from student.tasks import send_activation_email -from student.text_me_the_app import TextMeTheAppFragmentView -from util.db import outer_atomic -from util.json_request import JsonResponse +from common.djangoapps.student.signals import REFUND_ORDER +from common.djangoapps.student.tasks import send_activation_email +from common.djangoapps.student.text_me_the_app import TextMeTheAppFragmentView +from common.djangoapps.util.db import outer_atomic +from common.djangoapps.util.json_request import JsonResponse from xmodule.modulestore.django import modulestore log = logging.getLogger("edx.student") @@ -824,7 +824,7 @@ def change_email_settings(request): user.email, course_id, ) - track.views.server_track( + track_views.server_track( request, "change-email-settings", {"receive_emails": "yes", "course": course_id}, @@ -838,7 +838,7 @@ def change_email_settings(request): user.email, course_id, ) - track.views.server_track( + track_views.server_track( request, "change-email-settings", {"receive_emails": "no", "course": course_id}, diff --git a/common/djangoapps/terrain/stubs/tests/test_http.py b/common/djangoapps/terrain/stubs/tests/test_http.py index 5568a297b5..75a913c984 100644 --- a/common/djangoapps/terrain/stubs/tests/test_http.py +++ b/common/djangoapps/terrain/stubs/tests/test_http.py @@ -9,7 +9,7 @@ import unittest import requests import six -from terrain.stubs.http import StubHttpRequestHandler, StubHttpService, require_params +from common.djangoapps.terrain.stubs.http import StubHttpRequestHandler, StubHttpService, require_params class StubHttpServiceTest(unittest.TestCase): diff --git a/common/djangoapps/terrain/stubs/tests/test_lti_stub.py b/common/djangoapps/terrain/stubs/tests/test_lti_stub.py index 64185229d1..501a2dec83 100644 --- a/common/djangoapps/terrain/stubs/tests/test_lti_stub.py +++ b/common/djangoapps/terrain/stubs/tests/test_lti_stub.py @@ -9,7 +9,7 @@ import requests import six from mock import Mock, patch -from terrain.stubs.lti import StubLtiService +from common.djangoapps.terrain.stubs.lti import StubLtiService class StubLtiServiceTest(unittest.TestCase): @@ -59,7 +59,7 @@ class StubLtiServiceTest(unittest.TestCase): response = requests.post(self.launch_uri, data=self.payload) self.assertIn(b'Wrong LTI signature', response.content) - @patch('terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) + @patch('common.djangoapps.terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) def test_success_response_launch_lti(self, check_oauth): """ Success lti launch. @@ -67,32 +67,32 @@ class StubLtiServiceTest(unittest.TestCase): response = requests.post(self.launch_uri, data=self.payload) self.assertIn(b'This is LTI tool. Success.', response.content) - @patch('terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) + @patch('common.djangoapps.terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) def test_send_graded_result(self, verify_hmac): # pylint: disable=unused-argument response = requests.post(self.launch_uri, data=self.payload) self.assertIn(b'This is LTI tool. Success.', response.content) grade_uri = self.uri + 'grade' - with patch('terrain.stubs.lti.requests.post') as mocked_post: + with patch('common.djangoapps.terrain.stubs.lti.requests.post') as mocked_post: mocked_post.return_value = Mock(content='Test response', status_code=200) response = six.moves.urllib.request.urlopen(grade_uri, data=b'') self.assertIn(b'Test response', response.read()) - @patch('terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) + @patch('common.djangoapps.terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) def test_lti20_outcomes_put(self, verify_hmac): # pylint: disable=unused-argument response = requests.post(self.launch_uri, data=self.payload) self.assertIn(b'This is LTI tool. Success.', response.content) grade_uri = self.uri + 'lti2_outcome' - with patch('terrain.stubs.lti.requests.put') as mocked_put: + with patch('common.djangoapps.terrain.stubs.lti.requests.put') as mocked_put: mocked_put.return_value = Mock(status_code=200) response = six.moves.urllib.request.urlopen(grade_uri, data=b'') self.assertIn(b'LTI consumer (edX) responded with HTTP 200', response.read()) - @patch('terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) + @patch('common.djangoapps.terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True) def test_lti20_outcomes_put_like_delete(self, verify_hmac): # pylint: disable=unused-argument response = requests.post(self.launch_uri, data=self.payload) self.assertIn(b'This is LTI tool. Success.', response.content) grade_uri = self.uri + 'lti2_delete' - with patch('terrain.stubs.lti.requests.put') as mocked_put: + with patch('common.djangoapps.terrain.stubs.lti.requests.put') as mocked_put: mocked_put.return_value = Mock(status_code=200) response = six.moves.urllib.request.urlopen(grade_uri, data=b'') self.assertIn(b'LTI consumer (edX) responded with HTTP 200', response.read()) diff --git a/common/djangoapps/terrain/stubs/tests/test_video.py b/common/djangoapps/terrain/stubs/tests/test_video.py index 8f2be6d600..f6da4da2b3 100644 --- a/common/djangoapps/terrain/stubs/tests/test_video.py +++ b/common/djangoapps/terrain/stubs/tests/test_video.py @@ -8,7 +8,7 @@ import unittest import requests from django.conf import settings -from terrain.stubs.video_source import VideoSourceHttpService +from common.djangoapps.terrain.stubs.video_source import VideoSourceHttpService HLS_MANIFEST_TEXT = """ #EXTM3U diff --git a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py index d88fe4c48f..b60180275f 100644 --- a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py +++ b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py @@ -33,12 +33,12 @@ class StubXQueueServiceTest(unittest.TestCase): self.addCleanup(self.server.shutdown) # Patch the timer async calls - patcher = mock.patch('terrain.stubs.xqueue.post') + patcher = mock.patch('common.djangoapps.terrain.stubs.xqueue.post') self.post = patcher.start() self.addCleanup(patcher.stop) # Patch POST requests - patcher = mock.patch('terrain.stubs.xqueue.Timer') + patcher = mock.patch('common.djangoapps.terrain.stubs.xqueue.Timer') timer = patcher.start() timer.side_effect = FakeTimer self.addCleanup(patcher.stop) @@ -105,7 +105,7 @@ class StubXQueueServiceTest(unittest.TestCase): self.server.config['test_1'] = {'response': True} self.server.config['test_2'] = {'response': False} - with mock.patch('terrain.stubs.http.LOGGER') as logger: + with mock.patch('common.djangoapps.terrain.stubs.http.LOGGER') as logger: # Post a submission to the XQueue stub callback_url = 'http://127.0.0.1:8000/test_callback' diff --git a/common/djangoapps/third_party_auth/__init__.py b/common/djangoapps/third_party_auth/__init__.py index d133c10a26..dcc2964a8f 100644 --- a/common/djangoapps/third_party_auth/__init__.py +++ b/common/djangoapps/third_party_auth/__init__.py @@ -3,7 +3,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -default_app_config = 'third_party_auth.apps.ThirdPartyAuthConfig' +default_app_config = 'common.djangoapps.third_party_auth.apps.ThirdPartyAuthConfig' def is_enabled(): diff --git a/common/djangoapps/third_party_auth/api/tests/test_permissions.py b/common/djangoapps/third_party_auth/api/tests/test_permissions.py index ab9d3e42be..89f13f5bbb 100644 --- a/common/djangoapps/third_party_auth/api/tests/test_permissions.py +++ b/common/djangoapps/third_party_auth/api/tests/test_permissions.py @@ -14,9 +14,9 @@ from mock import patch from rest_framework.authentication import SessionAuthentication from rest_framework.response import Response from rest_framework.views import APIView -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory -from third_party_auth.api.permissions import TPA_PERMISSIONS +from common.djangoapps.third_party_auth.api.permissions import TPA_PERMISSIONS IDP_SLUG_TESTSHIB = 'testshib' PROVIDER_ID_TESTSHIB = 'saml-' + IDP_SLUG_TESTSHIB diff --git a/common/djangoapps/third_party_auth/api/tests/test_views.py b/common/djangoapps/third_party_auth/api/tests/test_views.py index db55f2c9fe..3f05e01d29 100644 --- a/common/djangoapps/third_party_auth/api/tests/test_views.py +++ b/common/djangoapps/third_party_auth/api/tests/test_views.py @@ -17,13 +17,13 @@ from rest_framework.test import APITestCase from six.moves import range from social_django.models import UserSocialAuth -from student.tests.factories import UserFactory -from third_party_auth.api.permissions import ( +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.api.permissions import ( JwtHasScope, JwtHasTpaProviderFilterForRequestedProvider, JwtRestrictedApplication ) -from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin +from common.djangoapps.third_party_auth.tests.testutil import ThirdPartyAuthTestMixin VALID_API_KEY = "i am a key" IDP_SLUG_TESTSHIB = 'testshib' diff --git a/common/djangoapps/third_party_auth/api/views.py b/common/djangoapps/third_party_auth/api/views.py index 52c49ea092..7b0ab3469c 100644 --- a/common/djangoapps/third_party_auth/api/views.py +++ b/common/djangoapps/third_party_auth/api/views.py @@ -23,10 +23,10 @@ from openedx.core.lib.api.authentication import ( BearerAuthenticationAllowInactiveUser ) from openedx.core.lib.api.permissions import ApiKeyHeaderPermission -from third_party_auth import pipeline -from third_party_auth.api import serializers -from third_party_auth.api.permissions import TPA_PERMISSIONS -from third_party_auth.provider import Registry +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.third_party_auth.api import serializers +from common.djangoapps.third_party_auth.api.permissions import TPA_PERMISSIONS +from common.djangoapps.third_party_auth.provider import Registry from common.djangoapps.third_party_auth.api.utils import filter_user_social_auth_queryset_by_provider diff --git a/common/djangoapps/third_party_auth/apps.py b/common/djangoapps/third_party_auth/apps.py index 40fc9ca3c6..be657e35a3 100644 --- a/common/djangoapps/third_party_auth/apps.py +++ b/common/djangoapps/third_party_auth/apps.py @@ -5,7 +5,7 @@ from django.conf import settings class ThirdPartyAuthConfig(AppConfig): - name = 'third_party_auth' + name = 'common.djangoapps.third_party_auth' verbose_name = "Third-party authentication" def ready(self): @@ -19,5 +19,5 @@ class ThirdPartyAuthConfig(AppConfig): using other identity providers. For configuration details, see common/djangoapps/third_party_auth/settings.py. """ - from third_party_auth import settings as auth_settings + from common.djangoapps.third_party_auth import settings as auth_settings auth_settings.apply_settings(settings) diff --git a/common/djangoapps/third_party_auth/decorators.py b/common/djangoapps/third_party_auth/decorators.py index 59d909f3c9..b2deff2a2b 100644 --- a/common/djangoapps/third_party_auth/decorators.py +++ b/common/djangoapps/third_party_auth/decorators.py @@ -10,8 +10,8 @@ from django.shortcuts import redirect from django.utils.decorators import available_attrs from six.moves.urllib.parse import urlencode, urlparse -from third_party_auth.models import LTIProviderConfig -from third_party_auth.provider import Registry +from common.djangoapps.third_party_auth.models import LTIProviderConfig +from common.djangoapps.third_party_auth.provider import Registry def xframe_allow_whitelisted(view_func): diff --git a/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py b/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py index 1cee572d43..406044fc72 100644 --- a/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py +++ b/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py @@ -12,7 +12,7 @@ from django.core.management.base import BaseCommand, CommandError from django.db import transaction from six.moves import input -from third_party_auth.models import SAMLProviderConfig +from common.djangoapps.third_party_auth.models import SAMLProviderConfig log = logging.getLogger(__name__) diff --git a/common/djangoapps/third_party_auth/management/commands/saml.py b/common/djangoapps/third_party_auth/management/commands/saml.py index 108a993f32..13a5304dd9 100644 --- a/common/djangoapps/third_party_auth/management/commands/saml.py +++ b/common/djangoapps/third_party_auth/management/commands/saml.py @@ -8,7 +8,7 @@ import logging from django.core.management.base import BaseCommand, CommandError -from third_party_auth.tasks import fetch_saml_metadata +from common.djangoapps.third_party_auth.tasks import fetch_saml_metadata class Command(BaseCommand): @@ -26,7 +26,7 @@ class Command(BaseCommand): log_handler = logging.StreamHandler(self.stdout) log_handler.setLevel(logging.DEBUG) - log = logging.getLogger('third_party_auth.tasks') + log = logging.getLogger('common.djangoapps.third_party_auth.tasks') log.propagate = False log.addHandler(log_handler) total, skipped, attempted, updated, failed, failure_messages = fetch_saml_metadata() diff --git a/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py b/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py index 19587fa8c3..ddd75d23d2 100644 --- a/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py +++ b/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py @@ -15,10 +15,10 @@ from django.test import TestCase, override_settings from six import StringIO from social_django.models import UserSocialAuth -from student.models import User -from student.tests.factories import UserFactory -from third_party_auth.management.commands import remove_social_auth_users -from third_party_auth.tests.factories import SAMLProviderConfigFactory +from common.djangoapps.student.models import User +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.management.commands import remove_social_auth_users +from common.djangoapps.third_party_auth.tests.factories import SAMLProviderConfigFactory FEATURES_WITH_ENABLED = settings.FEATURES.copy() FEATURES_WITH_ENABLED['ENABLE_ENROLLMENT_RESET'] = True diff --git a/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py b/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py index 92686f31c6..46144f3b04 100644 --- a/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py +++ b/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py @@ -16,7 +16,7 @@ from requests import exceptions from requests.models import Response from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from third_party_auth.tests.factories import SAMLConfigurationFactory, SAMLProviderConfigFactory +from common.djangoapps.third_party_auth.tests.factories import SAMLConfigurationFactory, SAMLProviderConfigFactory def mock_get(status_code=200): diff --git a/common/djangoapps/third_party_auth/middleware.py b/common/djangoapps/third_party_auth/middleware.py index 6a94eb9e44..0023ee36c0 100644 --- a/common/djangoapps/third_party_auth/middleware.py +++ b/common/djangoapps/third_party_auth/middleware.py @@ -10,7 +10,7 @@ from django.utils.translation import ugettext as _ from requests import HTTPError from social_django.middleware import SocialAuthExceptionMiddleware -from student.helpers import get_next_url_for_login_page +from common.djangoapps.student.helpers import get_next_url_for_login_page from . import pipeline diff --git a/common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py b/common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py index 43d63f5670..adb27137f3 100644 --- a/common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py +++ b/common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py @@ -3,8 +3,9 @@ from django.conf import settings from django.db import migrations, models import django.db.models.deletion + import openedx.core.lib.hash_utils -import third_party_auth.models +from common.djangoapps.third_party_auth import models as third_party_auth_models # These should be no-ops, becuse we don't need to migrate any data on initial creation. # third_party_auth.migrations.0019_consolidate_slug @@ -156,7 +157,7 @@ class Migration(migrations.Migration): ('send_to_registration_first', models.BooleanField(default=False, help_text='If this option is selected, users will be directed to the registration page immediately after authenticating with the third party instead of the login page.')), ('sync_learner_profile_data', models.BooleanField(default=False, help_text='Synchronize user profile data received from the identity provider with the edX user account on each SSO login. The user will be notified if the email address associated with their account is changed as a part of this synchronization.')), ('archived', models.BooleanField(default=False)), - ('saml_configuration', models.ForeignKey(blank=True, limit_choices_to=third_party_auth.models.active_saml_configurations_filter, null=True, on_delete=django.db.models.deletion.SET_NULL, to='third_party_auth.SAMLConfiguration')), + ('saml_configuration', models.ForeignKey(blank=True, limit_choices_to=third_party_auth_models.active_saml_configurations_filter, null=True, on_delete=django.db.models.deletion.SET_NULL, to='third_party_auth.SAMLConfiguration')), ('send_welcome_email', models.BooleanField(default=False, help_text='If this option is selected, users will be sent a welcome email upon registration.')), ('slug', models.SlugField(default='default', help_text='A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30)), ('enable_sso_id_verification', models.BooleanField(default=False, help_text='Use the presence of a profile from a trusted third party as proof of identity verification.')), diff --git a/common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py b/common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py index fc57476155..7a5cf16ce9 100644 --- a/common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py +++ b/common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py @@ -2,7 +2,8 @@ from django.db import migrations, models import django.db.models.deletion -import third_party_auth.models + +from common.djangoapps.third_party_auth import models as third_party_auth_models class Migration(migrations.Migration): @@ -15,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='samlproviderconfig', name='saml_configuration', - field=models.ForeignKey(blank=True, limit_choices_to=third_party_auth.models.active_saml_configurations_filter, null=True, on_delete=django.db.models.deletion.SET_NULL, to='third_party_auth.SAMLConfiguration'), + field=models.ForeignKey(blank=True, limit_choices_to=third_party_auth_models.active_saml_configurations_filter, null=True, on_delete=django.db.models.deletion.SET_NULL, to='third_party_auth.SAMLConfiguration'), ), ] diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index 18924f21ce..fd96aa88e7 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -80,16 +80,16 @@ from social_core.pipeline import partial from social_core.pipeline.social_auth import associate_by_email from social_core.utils import module_member, slugify -import third_party_auth -from edxmako.shortcuts import render_to_string +from common.djangoapps import third_party_auth +from common.djangoapps.edxmako.shortcuts import render_to_string from lms.djangoapps.verify_student.models import SSOVerification from lms.djangoapps.verify_student.utils import earliest_allowed_verification_date from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_api import accounts from openedx.core.djangoapps.user_authn import cookies as user_authn_cookies -from third_party_auth.utils import user_exists -from track import segment -from util.json_request import JsonResponse +from common.djangoapps.third_party_auth.utils import user_exists +from common.djangoapps.track import segment +from common.djangoapps.util.json_request import JsonResponse from . import provider diff --git a/common/djangoapps/third_party_auth/saml.py b/common/djangoapps/third_party_auth/saml.py index 6a06a86d46..44960b3b78 100644 --- a/common/djangoapps/third_party_auth/saml.py +++ b/common/djangoapps/third_party_auth/saml.py @@ -17,7 +17,7 @@ from social_core.backends.saml import OID_EDU_PERSON_ENTITLEMENT, SAMLAuth, SAML from social_core.exceptions import AuthForbidden from openedx.core.djangoapps.theming.helpers import get_current_request -from third_party_auth.exceptions import IncorrectConfigurationException +from common.djangoapps.third_party_auth.exceptions import IncorrectConfigurationException STANDARD_SAML_PROVIDER_KEY = u'standard_saml_provider' SAP_SUCCESSFACTORS_SAML_KEY = u'sap_success_factors' @@ -26,7 +26,7 @@ log = logging.getLogger(__name__) class SAMLAuthBackend(SAMLAuth): # pylint: disable=abstract-method """ - Customized version of SAMLAuth that gets the list of IdPs from third_party_auth's list of + Customized version of SAMLAuth that gets the list of IdPs from common.djangoapps.third_party_auth's list of enabled providers. """ name = "tpa-saml" diff --git a/common/djangoapps/third_party_auth/saml_configuration/serializers.py b/common/djangoapps/third_party_auth/saml_configuration/serializers.py index 0f518a9628..f460e216d4 100644 --- a/common/djangoapps/third_party_auth/saml_configuration/serializers.py +++ b/common/djangoapps/third_party_auth/saml_configuration/serializers.py @@ -4,7 +4,7 @@ Serializer for SAMLConfiguration from rest_framework import serializers -from third_party_auth.models import SAMLConfiguration +from common.djangoapps.third_party_auth.models import SAMLConfiguration class SAMLConfigurationSerializer(serializers.ModelSerializer): diff --git a/common/djangoapps/third_party_auth/saml_configuration/tests/test_saml_configuration.py b/common/djangoapps/third_party_auth/saml_configuration/tests/test_saml_configuration.py index ad9bae8d0a..bf383d7d45 100644 --- a/common/djangoapps/third_party_auth/saml_configuration/tests/test_saml_configuration.py +++ b/common/djangoapps/third_party_auth/saml_configuration/tests/test_saml_configuration.py @@ -9,9 +9,9 @@ from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APITestCase -from third_party_auth.models import SAMLConfiguration -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth.models import SAMLConfiguration +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth SAML_CONFIGURATIONS = [ { 'site': 1, diff --git a/common/djangoapps/third_party_auth/samlproviderconfig/serializers.py b/common/djangoapps/third_party_auth/samlproviderconfig/serializers.py index 3502170a04..3e44d85a6c 100644 --- a/common/djangoapps/third_party_auth/samlproviderconfig/serializers.py +++ b/common/djangoapps/third_party_auth/samlproviderconfig/serializers.py @@ -4,7 +4,7 @@ Serializer for SAMLProviderConfig from rest_framework import serializers -from third_party_auth.models import SAMLProviderConfig, SAMLConfiguration +from common.djangoapps.third_party_auth.models import SAMLProviderConfig, SAMLConfiguration class SAMLProviderConfigSerializer(serializers.ModelSerializer): diff --git a/common/djangoapps/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py b/common/djangoapps/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py index 313ac55a03..49f9c86923 100644 --- a/common/djangoapps/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py +++ b/common/djangoapps/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py @@ -14,11 +14,11 @@ from rest_framework.test import APITestCase from enterprise.models import EnterpriseCustomerIdentityProvider, EnterpriseCustomer from enterprise.constants import ENTERPRISE_ADMIN_ROLE, ENTERPRISE_LEARNER_ROLE -from third_party_auth.tests.samlutils import set_jwt_cookie -from third_party_auth.models import SAMLProviderConfig, SAMLConfiguration -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth -from third_party_auth.utils import convert_saml_slug_provider_id +from common.djangoapps.third_party_auth.tests.samlutils import set_jwt_cookie +from common.djangoapps.third_party_auth.models import SAMLProviderConfig, SAMLConfiguration +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth.utils import convert_saml_slug_provider_id # country here refers to the URN provided by a user's IDP SINGLE_PROVIDER_CONFIG = { diff --git a/common/djangoapps/third_party_auth/samlproviderconfig/views.py b/common/djangoapps/third_party_auth/samlproviderconfig/views.py index 605864a350..1b069443ca 100644 --- a/common/djangoapps/third_party_auth/samlproviderconfig/views.py +++ b/common/djangoapps/third_party_auth/samlproviderconfig/views.py @@ -11,7 +11,7 @@ from rest_framework.authentication import SessionAuthentication from rest_framework.exceptions import ParseError, ValidationError from enterprise.models import EnterpriseCustomerIdentityProvider, EnterpriseCustomer -from third_party_auth.utils import validate_uuid4_string +from common.djangoapps.third_party_auth.utils import validate_uuid4_string from ..models import SAMLProviderConfig from .serializers import SAMLProviderConfigSerializer diff --git a/common/djangoapps/third_party_auth/samlproviderdata/serializers.py b/common/djangoapps/third_party_auth/samlproviderdata/serializers.py index 14e8c83070..ed7a1bc9f6 100644 --- a/common/djangoapps/third_party_auth/samlproviderdata/serializers.py +++ b/common/djangoapps/third_party_auth/samlproviderdata/serializers.py @@ -4,7 +4,7 @@ from rest_framework import serializers -from third_party_auth.models import SAMLProviderData +from common.djangoapps.third_party_auth.models import SAMLProviderData class SAMLProviderDataSerializer(serializers.ModelSerializer): diff --git a/common/djangoapps/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py b/common/djangoapps/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py index 942dedc189..37437b0581 100644 --- a/common/djangoapps/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py +++ b/common/djangoapps/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py @@ -13,11 +13,11 @@ from rest_framework.test import APITestCase from enterprise.models import EnterpriseCustomer, EnterpriseCustomerIdentityProvider from enterprise.constants import ENTERPRISE_ADMIN_ROLE, ENTERPRISE_LEARNER_ROLE -from third_party_auth.tests import testutil -from third_party_auth.models import SAMLProviderData, SAMLProviderConfig -from third_party_auth.tests.samlutils import set_jwt_cookie -from third_party_auth.tests.utils import skip_unless_thirdpartyauth -from third_party_auth.utils import convert_saml_slug_provider_id +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.models import SAMLProviderData, SAMLProviderConfig +from common.djangoapps.third_party_auth.tests.samlutils import set_jwt_cookie +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth.utils import convert_saml_slug_provider_id SINGLE_PROVIDER_CONFIG = { 'entity_id': 'http://entity-id-1', diff --git a/common/djangoapps/third_party_auth/samlproviderdata/views.py b/common/djangoapps/third_party_auth/samlproviderdata/views.py index eacab0a07e..756fe8d7ca 100644 --- a/common/djangoapps/third_party_auth/samlproviderdata/views.py +++ b/common/djangoapps/third_party_auth/samlproviderdata/views.py @@ -11,7 +11,7 @@ from rest_framework.authentication import SessionAuthentication from rest_framework.exceptions import ParseError from enterprise.models import EnterpriseCustomerIdentityProvider -from third_party_auth.utils import validate_uuid4_string, convert_saml_slug_provider_id +from common.djangoapps.third_party_auth.utils import validate_uuid4_string, convert_saml_slug_provider_id from ..models import SAMLProviderConfig, SAMLProviderData from .serializers import SAMLProviderDataSerializer diff --git a/common/djangoapps/third_party_auth/settings.py b/common/djangoapps/third_party_auth/settings.py index b28f810df6..c22da772b7 100644 --- a/common/djangoapps/third_party_auth/settings.py +++ b/common/djangoapps/third_party_auth/settings.py @@ -24,7 +24,7 @@ def apply_settings(django_settings): # Inject exception middleware to make redirects fire. django_settings.MIDDLEWARE.extend( - ['third_party_auth.middleware.ExceptionMiddleware'] + ['common.djangoapps.third_party_auth.middleware.ExceptionMiddleware'] ) # Where to send the user if there's an error during social authentication @@ -48,30 +48,30 @@ def apply_settings(django_settings): # Inject our customized auth pipeline. All auth backends must work with # this pipeline. django_settings.SOCIAL_AUTH_PIPELINE = [ - 'third_party_auth.pipeline.parse_query_params', + 'common.djangoapps.third_party_auth.pipeline.parse_query_params', 'social_core.pipeline.social_auth.social_details', 'social_core.pipeline.social_auth.social_uid', 'social_core.pipeline.social_auth.auth_allowed', 'social_core.pipeline.social_auth.social_user', - 'third_party_auth.pipeline.associate_by_email_if_login_api', - 'third_party_auth.pipeline.get_username', - 'third_party_auth.pipeline.set_pipeline_timeout', - 'third_party_auth.pipeline.ensure_user_information', + 'common.djangoapps.third_party_auth.pipeline.associate_by_email_if_login_api', + 'common.djangoapps.third_party_auth.pipeline.get_username', + 'common.djangoapps.third_party_auth.pipeline.set_pipeline_timeout', + 'common.djangoapps.third_party_auth.pipeline.ensure_user_information', 'social_core.pipeline.user.create_user', 'social_core.pipeline.social_auth.associate_user', 'social_core.pipeline.social_auth.load_extra_data', 'social_core.pipeline.user.user_details', - 'third_party_auth.pipeline.user_details_force_sync', - 'third_party_auth.pipeline.set_id_verification_status', - 'third_party_auth.pipeline.set_logged_in_cookies', - 'third_party_auth.pipeline.login_analytics', + 'common.djangoapps.third_party_auth.pipeline.user_details_force_sync', + 'common.djangoapps.third_party_auth.pipeline.set_id_verification_status', + 'common.djangoapps.third_party_auth.pipeline.set_logged_in_cookies', + 'common.djangoapps.third_party_auth.pipeline.login_analytics', ] # Add enterprise pipeline elements if the enterprise app is installed insert_enterprise_pipeline_elements(django_settings.SOCIAL_AUTH_PIPELINE) # Required so that we can use unmodified PSA OAuth2 backends: - django_settings.SOCIAL_AUTH_STRATEGY = 'third_party_auth.strategy.ConfigurationModelStrategy' + django_settings.SOCIAL_AUTH_STRATEGY = 'common.djangoapps.third_party_auth.strategy.ConfigurationModelStrategy' # We let the user specify their email address during signup. django_settings.SOCIAL_AUTH_PROTECTED_USER_FIELDS = ['email'] @@ -82,7 +82,7 @@ def apply_settings(django_settings): django_settings.SOCIAL_AUTH_RAISE_EXCEPTIONS = False # Clean username to make sure username is compatible with our system requirements - django_settings.SOCIAL_AUTH_CLEAN_USERNAME_FUNCTION = 'third_party_auth.models.clean_username' + django_settings.SOCIAL_AUTH_CLEAN_USERNAME_FUNCTION = 'common.djangoapps.third_party_auth.models.clean_username' # Allow users to login using social auth even if their account is not verified yet # This is required since we [ab]use django's 'is_active' flag to indicate verified diff --git a/common/djangoapps/third_party_auth/tasks.py b/common/djangoapps/third_party_auth/tasks.py index 293ae3a00b..514a82b373 100644 --- a/common/djangoapps/third_party_auth/tasks.py +++ b/common/djangoapps/third_party_auth/tasks.py @@ -18,7 +18,7 @@ from requests import exceptions from six import text_type from openedx.core.djangolib.markup import Text -from third_party_auth.models import SAMLConfiguration, SAMLProviderConfig, SAMLProviderData +from common.djangoapps.third_party_auth.models import SAMLConfiguration, SAMLProviderConfig, SAMLProviderData log = logging.getLogger(__name__) @@ -30,7 +30,7 @@ class MetadataParseError(Exception): pass -@task(name='third_party_auth.fetch_saml_metadata') +@task(name='common.djangoapps.third_party_auth.fetch_saml_metadata') def fetch_saml_metadata(): """ Fetch and store/update the metadata of all IdPs diff --git a/common/djangoapps/third_party_auth/tests/factories.py b/common/djangoapps/third_party_auth/tests/factories.py index 0c09e94cb9..df3ecd9848 100644 --- a/common/djangoapps/third_party_auth/tests/factories.py +++ b/common/djangoapps/third_party_auth/tests/factories.py @@ -7,7 +7,7 @@ from factory import SubFactory from factory.django import DjangoModelFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory -from third_party_auth.models import SAMLConfiguration, SAMLProviderConfig +from common.djangoapps.third_party_auth.models import SAMLConfiguration, SAMLProviderConfig class SAMLConfigurationFactory(DjangoModelFactory): diff --git a/common/djangoapps/third_party_auth/tests/specs/base.py b/common/djangoapps/third_party_auth/tests/specs/base.py index 5355af0a8c..6d2b347913 100644 --- a/common/djangoapps/third_party_auth/tests/specs/base.py +++ b/common/djangoapps/third_party_auth/tests/specs/base.py @@ -26,11 +26,11 @@ from openedx.core.djangoapps.user_authn.views.login_form import login_and_regist from openedx.core.djangoapps.user_authn.views.register import RegistrationView from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangoapps.user_api.accounts.settings_views import account_settings_context -from student import models as student_models -from student.tests.factories import UserFactory +from common.djangoapps.student import models as student_models +from common.djangoapps.student.tests.factories import UserFactory -from third_party_auth import middleware, pipeline -from third_party_auth.tests import testutil +from common.djangoapps.third_party_auth import middleware, pipeline +from common.djangoapps.third_party_auth.tests import testutil def create_account(request): @@ -291,7 +291,7 @@ class HelperMixin(object): def _patch_edxmako_current_request(self, request): """Make ``request`` be the current request for edxmako template rendering.""" - with mock.patch('edxmako.request_context.get_current_request', return_value=request): + with mock.patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=request): yield def get_user_by_email(self, strategy, email): @@ -547,7 +547,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase, HelperMixin): def test_canceling_authentication_redirects_to_root_when_auth_entry_not_set(self): self.assert_exception_redirect_looks_correct('/') - @mock.patch('third_party_auth.pipeline.segment.track') + @mock.patch('common.djangoapps.third_party_auth.pipeline.segment.track') def test_full_pipeline_succeeds_for_linking_account(self, _mock_segment_track): # First, create, the GET request and strategy that store pipeline state, # configure the backend, and mock out wire traffic. @@ -699,7 +699,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase, HelperMixin): self.assert_account_settings_context_looks_correct( account_settings_context(post_request), duplicate=True, linked=True) - @mock.patch('third_party_auth.pipeline.segment.track') + @mock.patch('common.djangoapps.third_party_auth.pipeline.segment.track') def test_full_pipeline_succeeds_for_signing_in_to_existing_active_account(self, _mock_segment_track): # First, create, the GET request and strategy that store pipeline state, # configure the backend, and mock out wire traffic. diff --git a/common/djangoapps/third_party_auth/tests/specs/test_azuread.py b/common/djangoapps/third_party_auth/tests/specs/test_azuread.py index 096621508b..c7967aa2e2 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_azuread.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_azuread.py @@ -1,7 +1,7 @@ """Integration tests for Azure Active Directory / Microsoft Account provider.""" -from third_party_auth.tests.specs import base +from common.djangoapps.third_party_auth.tests.specs import base class AzureADOauth2IntegrationTest(base.Oauth2IntegrationTest): diff --git a/common/djangoapps/third_party_auth/tests/specs/test_generic.py b/common/djangoapps/third_party_auth/tests/specs/test_generic.py index 725ff441f1..7fb37b4d15 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_generic.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_generic.py @@ -4,8 +4,8 @@ Use the 'Dummy' auth provider for generic integration tests of third_party_auth. import unittest -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth from .base import IntegrationTestMixin diff --git a/common/djangoapps/third_party_auth/tests/specs/test_google.py b/common/djangoapps/third_party_auth/tests/specs/test_google.py index 2ae657a668..6d21542681 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_google.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_google.py @@ -11,9 +11,9 @@ from django.urls import reverse from mock import patch from social_core.exceptions import AuthException -from student.tests.factories import UserFactory -from third_party_auth import pipeline -from third_party_auth.tests.specs import base +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.third_party_auth.tests.specs import base class GoogleOauth2IntegrationTest(base.Oauth2IntegrationTest): diff --git a/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py b/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py index 83b4552e8b..6c6b7dcdcf 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py @@ -1,7 +1,7 @@ """Integration tests for LinkedIn providers.""" -from third_party_auth.tests.specs import base +from common.djangoapps.third_party_auth.tests.specs import base def get_localized_name(name): diff --git a/common/djangoapps/third_party_auth/tests/specs/test_lti.py b/common/djangoapps/third_party_auth/tests/specs/test_lti.py index 19493cbdff..811be51963 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_lti.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_lti.py @@ -8,7 +8,7 @@ from django.conf import settings from django.contrib.auth.models import User from django.urls import reverse from oauthlib.oauth1.rfc5849 import Client, SIGNATURE_TYPE_BODY -from third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests import testutil FORM_ENCODED = 'application/x-www-form-urlencoded' diff --git a/common/djangoapps/third_party_auth/tests/specs/test_testshib.py b/common/djangoapps/third_party_auth/tests/specs/test_testshib.py index e629a2a01b..0e54714b22 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_testshib.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_testshib.py @@ -25,10 +25,10 @@ from enterprise.models import EnterpriseCustomerIdentityProvider, EnterpriseCust from openedx.core.djangoapps.user_authn.views.login import login_user from openedx.core.djangoapps.user_api.accounts.settings_views import account_settings_context from openedx.features.enterprise_support.tests.factories import EnterpriseCustomerFactory -from third_party_auth import pipeline -from third_party_auth.saml import SapSuccessFactorsIdentityProvider, log as saml_log -from third_party_auth.tasks import fetch_saml_metadata -from third_party_auth.tests import testutil, utils +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.third_party_auth.saml import SapSuccessFactorsIdentityProvider, log as saml_log +from common.djangoapps.third_party_auth.tasks import fetch_saml_metadata +from common.djangoapps.third_party_auth.tests import testutil, utils from .base import IntegrationTestMixin diff --git a/common/djangoapps/third_party_auth/tests/specs/test_twitter.py b/common/djangoapps/third_party_auth/tests/specs/test_twitter.py index 55b6cf194c..e4e43f283a 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_twitter.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_twitter.py @@ -4,7 +4,7 @@ Separate integration test for Twitter which is an OAuth1 provider. from mock import patch -from third_party_auth.tests.specs import base +from common.djangoapps.third_party_auth.tests.specs import base class TwitterIntegrationTest(base.Oauth2IntegrationTest): diff --git a/common/djangoapps/third_party_auth/tests/test_admin.py b/common/djangoapps/third_party_auth/tests/test_admin.py index 564750e0bf..63ad2bf8cb 100644 --- a/common/djangoapps/third_party_auth/tests/test_admin.py +++ b/common/djangoapps/third_party_auth/tests/test_admin.py @@ -10,11 +10,11 @@ from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import models from django.urls import reverse -from student.tests.factories import UserFactory -from third_party_auth.admin import OAuth2ProviderConfigAdmin -from third_party_auth.models import OAuth2ProviderConfig -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.admin import OAuth2ProviderConfigAdmin +from common.djangoapps.third_party_auth.models import OAuth2ProviderConfig +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth # This is necessary because cms does not implement third party auth diff --git a/common/djangoapps/third_party_auth/tests/test_decorators.py b/common/djangoapps/third_party_auth/tests/test_decorators.py index afb057a9e7..b7cb5ea1a9 100644 --- a/common/djangoapps/third_party_auth/tests/test_decorators.py +++ b/common/djangoapps/third_party_auth/tests/test_decorators.py @@ -10,9 +10,9 @@ from django.conf import settings from django.http import HttpResponse from django.test import RequestFactory -from third_party_auth.decorators import xframe_allow_whitelisted -from third_party_auth.tests.testutil import TestCase -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth.decorators import xframe_allow_whitelisted +from common.djangoapps.third_party_auth.tests.testutil import TestCase +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth @xframe_allow_whitelisted diff --git a/common/djangoapps/third_party_auth/tests/test_identityserver3.py b/common/djangoapps/third_party_auth/tests/test_identityserver3.py index c9b28286dd..1eabc7fd2c 100644 --- a/common/djangoapps/third_party_auth/tests/test_identityserver3.py +++ b/common/djangoapps/third_party_auth/tests/test_identityserver3.py @@ -4,9 +4,9 @@ Unit tests for the IdentityServer3 OAuth2 Backend import json import ddt import unittest -from third_party_auth.identityserver3 import IdentityServer3 -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth.identityserver3 import IdentityServer3 +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth @skip_unless_thirdpartyauth() diff --git a/common/djangoapps/third_party_auth/tests/test_lti.py b/common/djangoapps/third_party_auth/tests/test_lti.py index 01e47076fa..12d2f2fe20 100644 --- a/common/djangoapps/third_party_auth/tests/test_lti.py +++ b/common/djangoapps/third_party_auth/tests/test_lti.py @@ -7,8 +7,8 @@ import unittest from oauthlib.common import Request -from third_party_auth.lti import LTI_PARAMS_KEY, LTIAuthBackend -from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin +from common.djangoapps.third_party_auth.lti import LTI_PARAMS_KEY, LTIAuthBackend +from common.djangoapps.third_party_auth.tests.testutil import ThirdPartyAuthTestMixin class UnitTestLTI(unittest.TestCase, ThirdPartyAuthTestMixin): diff --git a/common/djangoapps/third_party_auth/tests/test_middleware.py b/common/djangoapps/third_party_auth/tests/test_middleware.py index f9c1d8c0a6..3ff7b8b7d1 100644 --- a/common/djangoapps/third_party_auth/tests/test_middleware.py +++ b/common/djangoapps/third_party_auth/tests/test_middleware.py @@ -10,9 +10,9 @@ from django.test.client import RequestFactory from requests.exceptions import HTTPError from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.helpers import get_next_url_for_login_page -from third_party_auth.middleware import ExceptionMiddleware -from third_party_auth.tests.testutil import TestCase +from common.djangoapps.student.helpers import get_next_url_for_login_page +from common.djangoapps.third_party_auth.middleware import ExceptionMiddleware +from common.djangoapps.third_party_auth.tests.testutil import TestCase class ThirdPartyAuthMiddlewareTestCase(TestCase): diff --git a/common/djangoapps/third_party_auth/tests/test_pipeline.py b/common/djangoapps/third_party_auth/tests/test_pipeline.py index de2da31874..876ae969f9 100644 --- a/common/djangoapps/third_party_auth/tests/test_pipeline.py +++ b/common/djangoapps/third_party_auth/tests/test_pipeline.py @@ -7,12 +7,12 @@ import unittest import ddt import mock -from third_party_auth import pipeline -from third_party_auth.tests import testutil -from third_party_auth.tests.specs.base import IntegrationTestMixin -from third_party_auth.tests.specs.test_testshib import SamlIntegrationTestUtilities -from third_party_auth.tests.testutil import simulate_running_pipeline -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.specs.base import IntegrationTestMixin +from common.djangoapps.third_party_auth.tests.specs.test_testshib import SamlIntegrationTestUtilities +from common.djangoapps.third_party_auth.tests.testutil import simulate_running_pipeline +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth @skip_unless_thirdpartyauth() @@ -50,7 +50,7 @@ class ProviderUserStateTestCase(testutil.TestCase): "idp_name": idp_slug } } - with simulate_running_pipeline("third_party_auth.pipeline", backend_name, **kwargs): + with simulate_running_pipeline("common.djangoapps.third_party_auth.pipeline", backend_name, **kwargs): logout_url = pipeline.get_idp_logout_url_from_running_pipeline(request) self.assertEqual(idp_config['logout_url'], logout_url) @@ -82,7 +82,7 @@ class PipelineOverridesTest(SamlIntegrationTestUtilities, IntegrationTestMixin, ('usernamewithcharacterlengthofmorethan30chars', 'usernamewithcharacterlengt9fe2', True), ) @ddt.unpack - @mock.patch('third_party_auth.pipeline.user_exists') + @mock.patch('common.djangoapps.third_party_auth.pipeline.user_exists') def test_get_username_in_pipeline(self, idp_username, expected_username, already_exists, mock_user_exists): """ Test get_username method of running pipeline @@ -93,7 +93,7 @@ class PipelineOverridesTest(SamlIntegrationTestUtilities, IntegrationTestMixin, } mock_user_exists.side_effect = [already_exists, False] __, strategy = self.get_request_and_strategy() - with mock.patch('third_party_auth.pipeline.uuid4') as mock_uuid: + with mock.patch('common.djangoapps.third_party_auth.pipeline.uuid4') as mock_uuid: uuid4 = mock.Mock() type(uuid4).hex = mock.PropertyMock(return_value='9fe2c4e93f654fdbb24c02b15259716c') mock_uuid.return_value = uuid4 diff --git a/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py b/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py index 782e805de4..a182a669d9 100644 --- a/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py +++ b/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py @@ -13,10 +13,10 @@ from django.core import mail from social_django import models as social_models from lms.djangoapps.verify_student.models import SSOVerification -from student.tests.factories import UserFactory -from third_party_auth import pipeline, provider -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth import pipeline, provider +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth # Get Django User model by reference from python-social-auth. Not a type # constant, pylint. User = social_models.DjangoStorage.user.user_model() # pylint: disable=invalid-name @@ -239,7 +239,7 @@ class TestPipelineUtilityFunctions(TestCase): } } - with mock.patch('third_party_auth.pipeline.get') as get_pipeline: + with mock.patch('common.djangoapps.third_party_auth.pipeline.get') as get_pipeline: get_pipeline.return_value = pipeline_partial real_social = pipeline.get_real_social_auth_object(request) self.assertEqual(real_social, self.social_auth) @@ -256,7 +256,7 @@ class TestPipelineUtilityFunctions(TestCase): } } - with mock.patch('third_party_auth.pipeline.get') as get_pipeline: + with mock.patch('common.djangoapps.third_party_auth.pipeline.get') as get_pipeline: get_pipeline.return_value = pipeline_partial real_social = pipeline.get_real_social_auth_object(request) self.assertEqual(real_social, self.social_auth) @@ -330,7 +330,7 @@ class EnsureUserInformationTestCase(TestCase): skip_email_verification=False ) - with mock.patch('third_party_auth.pipeline.provider.Registry.get_from_pipeline') as get_from_pipeline: + with mock.patch('common.djangoapps.third_party_auth.pipeline.provider.Registry.get_from_pipeline') as get_from_pipeline: get_from_pipeline.return_value = provider with mock.patch('social_core.pipeline.partial.partial_prepare') as partial_prepare: partial_prepare.return_value = mock.MagicMock(token='') @@ -363,10 +363,10 @@ class EnsureUserInformationTestCase(TestCase): send_to_registration_first=True, skip_email_verification=False ) - with mock.patch('third_party_auth.pipeline.provider.Registry.get_from_pipeline') as get_from_pipeline: + with mock.patch('common.djangoapps.third_party_auth.pipeline.provider.Registry.get_from_pipeline') as get_from_pipeline: get_from_pipeline.return_value = saml_provider with mock.patch( - 'third_party_auth.pipeline.provider.Registry.get_enabled_by_backend_name' + 'common.djangoapps.third_party_auth.pipeline.provider.Registry.get_enabled_by_backend_name' ) as enabled_saml_providers: enabled_saml_providers.return_value = [saml_provider, ] if is_saml else [] with mock.patch('social_core.pipeline.partial.partial_prepare') as partial_prepare: @@ -404,7 +404,7 @@ class UserDetailsForceSyncTestCase(TestCase): self.strategy = mock.MagicMock() self.strategy.storage.user.changed.side_effect = lambda user: user.save() - get_from_pipeline = mock.patch('third_party_auth.pipeline.provider.Registry.get_from_pipeline') + get_from_pipeline = mock.patch('common.djangoapps.third_party_auth.pipeline.provider.Registry.get_from_pipeline') self.get_from_pipeline = get_from_pipeline.start() self.get_from_pipeline.return_value = mock.MagicMock(sync_learner_profile_data=True) self.addCleanup(get_from_pipeline.stop) @@ -493,7 +493,7 @@ class SetIDVerificationStatusTestCase(TestCase): def setUp(self): super(SetIDVerificationStatusTestCase, self).setUp() self.user = UserFactory.create() - self.provider_class_name = 'third_party_auth.models.SAMLProviderConfig' + self.provider_class_name = 'common.djangoapps.third_party_auth.models.SAMLProviderConfig' self.provider_slug = 'default' self.details = {} @@ -501,7 +501,7 @@ class SetIDVerificationStatusTestCase(TestCase): self.strategy = mock.MagicMock() self.strategy.storage.user.changed.side_effect = lambda user: user.save() - get_from_pipeline = mock.patch('third_party_auth.pipeline.provider.Registry.get_from_pipeline') + get_from_pipeline = mock.patch('common.djangoapps.third_party_auth.pipeline.provider.Registry.get_from_pipeline') self.get_from_pipeline = get_from_pipeline.start() self.get_from_pipeline.return_value = mock.MagicMock( enable_sso_id_verification=True, @@ -565,7 +565,7 @@ class SetIDVerificationStatusTestCase(TestCase): identity_provider_slug=self.provider_slug, ) - with mock.patch('third_party_auth.pipeline.earliest_allowed_verification_date') as earliest_date: + with mock.patch('common.djangoapps.third_party_auth.pipeline.earliest_allowed_verification_date') as earliest_date: earliest_date.return_value = datetime.datetime.now(pytz.UTC) + datetime.timedelta(days=1) # Begin the pipeline. pipeline.set_id_verification_status( diff --git a/common/djangoapps/third_party_auth/tests/test_provider.py b/common/djangoapps/third_party_auth/tests/test_provider.py index d9d945ddd8..766b1e6736 100644 --- a/common/djangoapps/third_party_auth/tests/test_provider.py +++ b/common/djangoapps/third_party_auth/tests/test_provider.py @@ -10,9 +10,9 @@ from django.test.utils import CaptureQueriesContext from mock import Mock, patch from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration -from third_party_auth import provider -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth import provider +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth SITE_DOMAIN_A = 'professionalx.example.com' SITE_DOMAIN_B = 'somethingelse.example.com' @@ -75,7 +75,7 @@ class RegistryTest(testutil.TestCase): backend_names.append(backend_name) self.configure_oauth_provider(enabled=True, name=name, backend_name=backend_name) - with patch('third_party_auth.provider._PSA_OAUTH2_BACKENDS', backend_names): + with patch('common.djangoapps.third_party_auth.provider._PSA_OAUTH2_BACKENDS', backend_names): self.assertEqual(sorted(provider_names), [prov.name for prov in provider.Registry.enabled()]) def test_enabled_doesnt_query_site(self): diff --git a/common/djangoapps/third_party_auth/tests/test_saml.py b/common/djangoapps/third_party_auth/tests/test_saml.py index 7579b5e0ce..e40be8132b 100644 --- a/common/djangoapps/third_party_auth/tests/test_saml.py +++ b/common/djangoapps/third_party_auth/tests/test_saml.py @@ -5,20 +5,20 @@ Unit tests for third_party_auth SAML auth providers import mock -from third_party_auth.saml import EdXSAMLIdentityProvider, get_saml_idp_class -from third_party_auth.tests.data.saml_identity_provider_mock_data import ( +from common.djangoapps.third_party_auth.saml import EdXSAMLIdentityProvider, get_saml_idp_class +from common.djangoapps.third_party_auth.tests.data.saml_identity_provider_mock_data import ( expected_user_details, mock_attributes, mock_conf ) -from third_party_auth.tests.testutil import SAMLTestCase +from common.djangoapps.third_party_auth.tests.testutil import SAMLTestCase class TestEdXSAMLIdentityProvider(SAMLTestCase): """ Test EdXSAMLIdentityProvider. """ - @mock.patch('third_party_auth.saml.log') + @mock.patch('common.djangoapps.third_party_auth.saml.log') def test_get_saml_idp_class_with_fake_identifier(self, log_mock): error_mock = log_mock.error idp_class = get_saml_idp_class('fake_idp_class_option') diff --git a/common/djangoapps/third_party_auth/tests/test_settings.py b/common/djangoapps/third_party_auth/tests/test_settings.py index c7721fa078..29a02b6aea 100644 --- a/common/djangoapps/third_party_auth/tests/test_settings.py +++ b/common/djangoapps/third_party_auth/tests/test_settings.py @@ -4,9 +4,9 @@ import unittest from mock import patch -from third_party_auth import provider, settings -from third_party_auth.tests import testutil -from third_party_auth.tests.utils import skip_unless_thirdpartyauth +from common.djangoapps.third_party_auth import provider, settings +from common.djangoapps.third_party_auth.tests import testutil +from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth _ORIGINAL_AUTHENTICATION_BACKENDS = ['first_authentication_backend'] _ORIGINAL_INSTALLED_APPS = ['first_installed_app'] _ORIGINAL_MIDDLEWARE_CLASSES = ['first_middleware_class'] @@ -37,7 +37,7 @@ class SettingsUnitTest(testutil.TestCase): def test_apply_settings_adds_exception_middleware(self): settings.apply_settings(self.settings) - self.assertIn('third_party_auth.middleware.ExceptionMiddleware', self.settings.MIDDLEWARE) + self.assertIn('common.djangoapps.third_party_auth.middleware.ExceptionMiddleware', self.settings.MIDDLEWARE) def test_apply_settings_adds_fields_stored_in_session(self): settings.apply_settings(self.settings) diff --git a/common/djangoapps/third_party_auth/tests/test_utils.py b/common/djangoapps/third_party_auth/tests/test_utils.py index 7d18e64e7e..ada897d320 100644 --- a/common/djangoapps/third_party_auth/tests/test_utils.py +++ b/common/djangoapps/third_party_auth/tests/test_utils.py @@ -7,9 +7,9 @@ import unittest from django.conf import settings -from student.tests.factories import UserFactory -from third_party_auth.tests.testutil import TestCase -from third_party_auth.utils import user_exists, convert_saml_slug_provider_id +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.tests.testutil import TestCase +from common.djangoapps.third_party_auth.utils import user_exists, convert_saml_slug_provider_id @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') diff --git a/common/djangoapps/third_party_auth/tests/test_views.py b/common/djangoapps/third_party_auth/tests/test_views.py index 7bc3248161..642d24d57d 100644 --- a/common/djangoapps/third_party_auth/tests/test_views.py +++ b/common/djangoapps/third_party_auth/tests/test_views.py @@ -11,9 +11,9 @@ from django.urls import reverse from lxml import etree from onelogin.saml2.errors import OneLogin_Saml2_Error -from third_party_auth import pipeline +from common.djangoapps.third_party_auth import pipeline # Define some XML namespaces: -from third_party_auth.tasks import SAML_XML_NS +from common.djangoapps.third_party_auth.tasks import SAML_XML_NS from .testutil import AUTH_FEATURE_ENABLED, AUTH_FEATURES_KEY, SAMLTestCase diff --git a/common/djangoapps/third_party_auth/tests/testutil.py b/common/djangoapps/third_party_auth/tests/testutil.py index dbe8082cc5..4448c2d350 100644 --- a/common/djangoapps/third_party_auth/tests/testutil.py +++ b/common/djangoapps/third_party_auth/tests/testutil.py @@ -19,13 +19,13 @@ from oauth2_provider.models import Application from openedx.core.djangolib.testing.utils import CacheIsolationMixin from openedx.core.storage import OverwriteStorage -from third_party_auth.models import ( +from common.djangoapps.third_party_auth.models import ( LTIProviderConfig, OAuth2ProviderConfig, SAMLConfiguration, SAMLProviderConfig ) -from third_party_auth.models import cache as config_cache +from common.djangoapps.third_party_auth.models import cache as config_cache AUTH_FEATURES_KEY = 'ENABLE_THIRD_PARTY_AUTH' AUTH_FEATURE_ENABLED = AUTH_FEATURES_KEY in settings.FEATURES @@ -228,7 +228,7 @@ def simulate_running_pipeline(pipeline_target, backend, email=None, fullname=Non so you will need to provide the "target" module *as it is imported* in the software under test. For example, if `foo/bar.py` does this: - >>> from third_party_auth import pipeline + >>> from common.djangoapps.third_party_auth import pipeline then you will need to do something like this: @@ -237,7 +237,7 @@ def simulate_running_pipeline(pipeline_target, backend, email=None, fullname=Non If, on the other hand, `foo/bar.py` had done this: - >>> import third_party_auth + >>> from common.djangoapps import third_party_auth then you would use the target "foo.bar.third_party_auth.pipeline" instead. diff --git a/common/djangoapps/third_party_auth/tests/utils.py b/common/djangoapps/third_party_auth/tests/utils.py index b6c3afae10..cfdd989911 100644 --- a/common/djangoapps/third_party_auth/tests/utils.py +++ b/common/djangoapps/third_party_auth/tests/utils.py @@ -12,7 +12,7 @@ from social_core.backends.facebook import API_VERSION as FACEBOOK_API_VERSION from social_core.backends.facebook import FacebookOAuth2 from social_django.models import Partial, UserSocialAuth -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from .testutil import ThirdPartyAuthTestMixin, AUTH_FEATURE_ENABLED, AUTH_FEATURES_KEY diff --git a/common/djangoapps/third_party_auth/urls.py b/common/djangoapps/third_party_auth/urls.py index d123bf3855..4a90ef174f 100644 --- a/common/djangoapps/third_party_auth/urls.py +++ b/common/djangoapps/third_party_auth/urls.py @@ -17,7 +17,7 @@ urlpatterns = [ url(r'^auth/login/(?Plti)/$', lti_login_and_complete_view), url(r'^auth/idp_redirect/(?P[\w-]+)', IdPRedirectView.as_view(), name="idp_redirect"), url(r'^auth/', include('social_django.urls', namespace='social')), - url(r'^auth/saml/v0/', include('third_party_auth.samlproviderconfig.urls')), - url(r'^auth/saml/v0/', include('third_party_auth.samlproviderdata.urls')), - url(r'^auth/saml/v0/', include('third_party_auth.saml_configuration.urls')), + url(r'^auth/saml/v0/', include('common.djangoapps.third_party_auth.samlproviderconfig.urls')), + url(r'^auth/saml/v0/', include('common.djangoapps.third_party_auth.samlproviderdata.urls')), + url(r'^auth/saml/v0/', include('common.djangoapps.third_party_auth.saml_configuration.urls')), ] diff --git a/common/djangoapps/third_party_auth/views.py b/common/djangoapps/third_party_auth/views.py index f1d0d306b9..c1b52b0305 100644 --- a/common/djangoapps/third_party_auth/views.py +++ b/common/djangoapps/third_party_auth/views.py @@ -13,11 +13,11 @@ from social_core.utils import setting_name from social_django.utils import load_backend, load_strategy, psa from social_django.views import complete -import third_party_auth -from student.helpers import get_next_url_for_login_page -from student.models import UserProfile -from student.views import compose_and_send_activation_email -from third_party_auth import pipeline, provider +from common.djangoapps import third_party_auth +from common.djangoapps.student.helpers import get_next_url_for_login_page +from common.djangoapps.student.models import UserProfile +from common.djangoapps.student.views import compose_and_send_activation_email +from common.djangoapps.third_party_auth import pipeline, provider from .models import SAMLConfiguration, SAMLProviderConfig diff --git a/common/djangoapps/track/backends/logger.py b/common/djangoapps/track/backends/logger.py index baec3bbb2f..5647584baf 100644 --- a/common/djangoapps/track/backends/logger.py +++ b/common/djangoapps/track/backends/logger.py @@ -6,11 +6,11 @@ import logging from django.conf import settings -from track.backends import BaseBackend -from track.utils import DateTimeJSONEncoder +from common.djangoapps.track.backends import BaseBackend +from common.djangoapps.track.utils import DateTimeJSONEncoder -log = logging.getLogger('track.backends.logger') -application_log = logging.getLogger('track.backends.application_log') # pylint: disable=invalid-name +log = logging.getLogger('common.djangoapps.track.backends.logger') +application_log = logging.getLogger('common.djangoapps.track.backends.application_log') # pylint: disable=invalid-name class LoggerBackend(BaseBackend): diff --git a/common/djangoapps/track/backends/mongodb.py b/common/djangoapps/track/backends/mongodb.py index 07687eae98..5aaa12ecd5 100644 --- a/common/djangoapps/track/backends/mongodb.py +++ b/common/djangoapps/track/backends/mongodb.py @@ -8,7 +8,7 @@ from bson.errors import BSONError from pymongo import MongoClient from pymongo.errors import PyMongoError -from track.backends import BaseBackend +from common.djangoapps.track.backends import BaseBackend log = logging.getLogger(__name__) diff --git a/common/djangoapps/track/backends/tests/test_logger.py b/common/djangoapps/track/backends/tests/test_logger.py index 0e8564ea60..a490777c0f 100644 --- a/common/djangoapps/track/backends/tests/test_logger.py +++ b/common/djangoapps/track/backends/tests/test_logger.py @@ -6,7 +6,7 @@ import datetime import json import logging -from track.backends.logger import LoggerBackend +from common.djangoapps.track.backends.logger import LoggerBackend def test_logger_backend(caplog): @@ -15,7 +15,7 @@ def test_logger_backend(caplog): by the logger. The events are serialized to JSON. """ caplog.set_level(logging.INFO) - logger_name = 'track.backends.logger.test' + logger_name = 'common.djangoapps.track.backends.logger.test' backend = LoggerBackend(name=logger_name) event = { 'test': True, diff --git a/common/djangoapps/track/backends/tests/test_mongodb.py b/common/djangoapps/track/backends/tests/test_mongodb.py index a73b06e013..62582c3b7f 100644 --- a/common/djangoapps/track/backends/tests/test_mongodb.py +++ b/common/djangoapps/track/backends/tests/test_mongodb.py @@ -3,13 +3,13 @@ from django.test import TestCase from mock import patch -from track.backends.mongodb import MongoBackend +from common.djangoapps.track.backends.mongodb import MongoBackend class TestMongoBackend(TestCase): def setUp(self): super(TestMongoBackend, self).setUp() - self.mongo_patcher = patch('track.backends.mongodb.MongoClient') + self.mongo_patcher = patch('common.djangoapps.track.backends.mongodb.MongoClient') self.mongo_patcher.start() self.addCleanup(self.mongo_patcher.stop) diff --git a/common/djangoapps/track/management/commands/tracked_dummy_command.py b/common/djangoapps/track/management/commands/tracked_dummy_command.py index f3fa95e711..e758c422dd 100644 --- a/common/djangoapps/track/management/commands/tracked_dummy_command.py +++ b/common/djangoapps/track/management/commands/tracked_dummy_command.py @@ -8,7 +8,7 @@ from textwrap import dedent from eventtracking import tracker as eventtracker -from track.management.tracked_command import TrackedCommand +from common.djangoapps.track.management.tracked_command import TrackedCommand class Command(TrackedCommand): diff --git a/common/djangoapps/track/middleware.py b/common/djangoapps/track/middleware.py index 6e8abb96cb..4bdc1627b1 100644 --- a/common/djangoapps/track/middleware.py +++ b/common/djangoapps/track/middleware.py @@ -19,7 +19,7 @@ from django.utils.deprecation import MiddlewareMixin from eventtracking import tracker from ipware.ip import get_ip -from track import contexts, views +from common.djangoapps.track import contexts, views log = logging.getLogger(__name__) diff --git a/common/djangoapps/track/segment.py b/common/djangoapps/track/segment.py index 9bcbf6ffae..b55cc7b34d 100644 --- a/common/djangoapps/track/segment.py +++ b/common/djangoapps/track/segment.py @@ -5,7 +5,7 @@ These take advantage of properties that are extracted from incoming requests by stored in tracking context objects, and extracted here to be passed to Segment as part of context required by server-side events. -To use, call "from track import segment", then call segment.track() or segment.identify(). +To use, call "from common.djangoapps.track import segment", then call segment.track() or segment.identify(). """ diff --git a/common/djangoapps/track/tests/__init__.py b/common/djangoapps/track/tests/__init__.py index 2cf19ca9a4..09d795f24c 100644 --- a/common/djangoapps/track/tests/__init__.py +++ b/common/djangoapps/track/tests/__init__.py @@ -13,7 +13,7 @@ from pytz import UTC FROZEN_TIME = datetime(2013, 10, 3, 8, 24, 55, tzinfo=UTC) IN_MEMORY_BACKEND_CONFIG = { 'mem': { - 'ENGINE': 'track.tests.InMemoryBackend' + 'ENGINE': 'common.djangoapps.track.tests.InMemoryBackend' } } diff --git a/common/djangoapps/track/tests/test_contexts.py b/common/djangoapps/track/tests/test_contexts.py index c1fad8838c..81b0b74f87 100644 --- a/common/djangoapps/track/tests/test_contexts.py +++ b/common/djangoapps/track/tests/test_contexts.py @@ -2,7 +2,7 @@ from unittest import TestCase import ddt -from track import contexts +from common.djangoapps.track import contexts @ddt.ddt diff --git a/common/djangoapps/track/tests/test_middleware.py b/common/djangoapps/track/tests/test_middleware.py index 7de0cda2f7..62f910b9cd 100644 --- a/common/djangoapps/track/tests/test_middleware.py +++ b/common/djangoapps/track/tests/test_middleware.py @@ -12,7 +12,7 @@ from django.test.utils import override_settings from eventtracking import tracker from mock import patch, sentinel -from track.middleware import TrackMiddleware +from common.djangoapps.track.middleware import TrackMiddleware @ddt.ddt @@ -24,7 +24,7 @@ class TrackMiddlewareTestCase(TestCase): self.track_middleware = TrackMiddleware() self.request_factory = RequestFactory() - patcher = patch('track.views.server_track') + patcher = patch('common.djangoapps.track.views.server_track') self.mock_server_track = patcher.start() self.addCleanup(patcher.stop) diff --git a/common/djangoapps/track/tests/test_segment.py b/common/djangoapps/track/tests/test_segment.py index 5afc38660b..b1e50e589d 100644 --- a/common/djangoapps/track/tests/test_segment.py +++ b/common/djangoapps/track/tests/test_segment.py @@ -8,7 +8,7 @@ from eventtracking import tracker from eventtracking.django import DjangoTracker from mock import patch, sentinel -from track import segment +from common.djangoapps.track import segment @ddt.ddt @@ -21,7 +21,7 @@ class SegmentTrackTestCase(TestCase): tracker.register_tracker(self.tracker) self.properties = {sentinel.key: sentinel.value} - patcher = patch('track.segment.analytics.track') + patcher = patch('common.djangoapps.track.segment.analytics.track') self.mock_segment_track = patcher.start() self.addCleanup(patcher.stop) @@ -120,7 +120,7 @@ class SegmentIdentifyTestCase(TestCase): def setUp(self): super(SegmentIdentifyTestCase, self).setUp() - patcher = patch('track.segment.analytics.identify') + patcher = patch('common.djangoapps.track.segment.analytics.identify') self.mock_segment_identify = patcher.start() self.addCleanup(patcher.stop) self.properties = {sentinel.key: sentinel.value} diff --git a/common/djangoapps/track/tests/test_shim.py b/common/djangoapps/track/tests/test_shim.py index af52b2ff91..5de5669b11 100644 --- a/common/djangoapps/track/tests/test_shim.py +++ b/common/djangoapps/track/tests/test_shim.py @@ -15,13 +15,13 @@ from . import FROZEN_TIME, EventTrackingTestCase LEGACY_SHIM_PROCESSOR = [ { - 'ENGINE': 'track.shim.LegacyFieldMappingProcessor' + 'ENGINE': 'common.djangoapps.track.shim.LegacyFieldMappingProcessor' } ] GOOGLE_ANALYTICS_PROCESSOR = [ { - 'ENGINE': 'track.shim.GoogleAnalyticsProcessor' + 'ENGINE': 'common.djangoapps.track.shim.GoogleAnalyticsProcessor' } ] @@ -163,11 +163,11 @@ class GoogleAnalyticsProcessorTestCase(EventTrackingTestCase): 'ENGINE': 'eventtracking.backends.routing.RoutingBackend', 'OPTIONS': { 'backends': { - 'first': {'ENGINE': 'track.tests.InMemoryBackend'} + 'first': {'ENGINE': 'common.djangoapps.track.tests.InMemoryBackend'} }, 'processors': [ { - 'ENGINE': 'track.shim.GoogleAnalyticsProcessor' + 'ENGINE': 'common.djangoapps.track.shim.GoogleAnalyticsProcessor' } ] } @@ -177,7 +177,7 @@ class GoogleAnalyticsProcessorTestCase(EventTrackingTestCase): 'OPTIONS': { 'backends': { 'second': { - 'ENGINE': 'track.tests.InMemoryBackend' + 'ENGINE': 'common.djangoapps.track.tests.InMemoryBackend' } } } diff --git a/common/djangoapps/track/tests/test_tracker.py b/common/djangoapps/track/tests/test_tracker.py index 77b3afc87c..db7762919b 100644 --- a/common/djangoapps/track/tests/test_tracker.py +++ b/common/djangoapps/track/tests/test_tracker.py @@ -5,12 +5,12 @@ from django.test import TestCase from django.test.utils import override_settings from six.moves import range -import track.tracker as tracker -from track.backends import BaseBackend +from common.djangoapps.track import tracker +from common.djangoapps.track.backends import BaseBackend SIMPLE_SETTINGS = { 'default': { - 'ENGINE': 'track.tests.test_tracker.DummyBackend', + 'ENGINE': 'common.djangoapps.track.tests.test_tracker.DummyBackend', 'OPTIONS': { 'flag': True } @@ -19,10 +19,10 @@ SIMPLE_SETTINGS = { MULTI_SETTINGS = { 'first': { - 'ENGINE': 'track.tests.test_tracker.DummyBackend', + 'ENGINE': 'common.djangoapps.track.tests.test_tracker.DummyBackend', }, 'second': { - 'ENGINE': 'track.tests.test_tracker.DummyBackend', + 'ENGINE': 'common.djangoapps.track.tests.test_tracker.DummyBackend', } } @@ -35,7 +35,7 @@ class TestTrackerInstantiation(TestCase): self.get_backend = tracker._instantiate_backend_from_name def test_instatiate_backend(self): - name = 'track.tests.test_tracker.DummyBackend' + name = 'common.djangoapps.track.tests.test_tracker.DummyBackend' options = {'flag': True} backend = self.get_backend(name, options) @@ -47,10 +47,10 @@ class TestTrackerInstantiation(TestCase): return self.get_backend(name, parameters) options = {} - name = 'track.backends.logger' + name = 'common.djangoapps.track.backends.logger' self.assertRaises(ValueError, get_invalid_backend, name, options) - name = 'track.backends.logger.Foo' + name = 'common.djangoapps.track.backends.logger.Foo' self.assertRaises(ValueError, get_invalid_backend, name, options) name = 'this.package.does.not.exists' diff --git a/common/djangoapps/track/tests/test_util.py b/common/djangoapps/track/tests/test_util.py index a543acbadf..8f213a157e 100644 --- a/common/djangoapps/track/tests/test_util.py +++ b/common/djangoapps/track/tests/test_util.py @@ -6,7 +6,7 @@ from datetime import datetime from django.test import TestCase from pytz import UTC -from track.utils import DateTimeJSONEncoder +from common.djangoapps.track.utils import DateTimeJSONEncoder class TestDateTimeJSONEncoder(TestCase): diff --git a/common/djangoapps/track/tracker.py b/common/djangoapps/track/tracker.py index 67cd9d33fe..20fd1004ed 100644 --- a/common/djangoapps/track/tracker.py +++ b/common/djangoapps/track/tracker.py @@ -27,7 +27,7 @@ from importlib import import_module import six from django.conf import settings -from track.backends import BaseBackend +from common.djangoapps.track.backends import BaseBackend __all__ = ['send'] diff --git a/common/djangoapps/track/urls.py b/common/djangoapps/track/urls.py index ab08556792..47f2589956 100644 --- a/common/djangoapps/track/urls.py +++ b/common/djangoapps/track/urls.py @@ -6,10 +6,10 @@ URLs for track app from django.conf import settings from django.conf.urls import url -import track.views -import track.views.segmentio +from . import views +from .views import segmentio urlpatterns = [ - url(r'^event$', track.views.user_track), - url(r'^segmentio/event$', track.views.segmentio.segmentio_event), + url(r'^event$', views.user_track), + url(r'^segmentio/event$', segmentio.segmentio_event), ] diff --git a/common/djangoapps/track/views/__init__.py b/common/djangoapps/track/views/__init__.py index dd975e3b2c..419c4461ba 100644 --- a/common/djangoapps/track/views/__init__.py +++ b/common/djangoapps/track/views/__init__.py @@ -8,7 +8,7 @@ from django.http import HttpResponse from eventtracking import tracker as eventtracker from ipware.ip import get_ip -from track import contexts, shim, tracker +from common.djangoapps.track import contexts, shim, tracker def _get_request_header(request, header_name, default=''): diff --git a/common/djangoapps/track/views/segmentio.py b/common/djangoapps/track/views/segmentio.py index 534323c83e..87c84cd60d 100644 --- a/common/djangoapps/track/views/segmentio.py +++ b/common/djangoapps/track/views/segmentio.py @@ -14,7 +14,7 @@ from eventtracking import tracker from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from util.json_request import expect_json +from common.djangoapps.util.json_request import expect_json log = logging.getLogger(__name__) diff --git a/common/djangoapps/track/views/tests/base.py b/common/djangoapps/track/views/tests/base.py index 5709b53935..b9597b4753 100644 --- a/common/djangoapps/track/views/tests/base.py +++ b/common/djangoapps/track/views/tests/base.py @@ -10,16 +10,16 @@ from django.test.client import RequestFactory from django.test.utils import override_settings from mock import sentinel -from track.tests import EventTrackingTestCase -from track.views import segmentio +from common.djangoapps.track.tests import EventTrackingTestCase +from common.djangoapps.track.views import segmentio SEGMENTIO_TEST_SECRET = 'anything' SEGMENTIO_TEST_ENDPOINT = '/segmentio/test/event' SEGMENTIO_TEST_USER_ID = 10 _MOBILE_SHIM_PROCESSOR = [ - {'ENGINE': 'track.shim.LegacyFieldMappingProcessor'}, - {'ENGINE': 'track.shim.PrefixedEventProcessor'}, + {'ENGINE': 'common.djangoapps.track.shim.LegacyFieldMappingProcessor'}, + {'ENGINE': 'common.djangoapps.track.shim.PrefixedEventProcessor'}, ] diff --git a/common/djangoapps/track/views/tests/test_segmentio.py b/common/djangoapps/track/views/tests/test_segmentio.py index 640f55e73e..dd84673d2f 100644 --- a/common/djangoapps/track/views/tests/test_segmentio.py +++ b/common/djangoapps/track/views/tests/test_segmentio.py @@ -10,9 +10,9 @@ from django.test.utils import override_settings from mock import sentinel from openedx.core.lib.tests.assertions.events import assert_event_matches -from track.middleware import TrackMiddleware -from track.views import segmentio -from track.views.tests.base import SEGMENTIO_TEST_ENDPOINT, SEGMENTIO_TEST_USER_ID, SegmentIOTrackingTestCaseBase +from common.djangoapps.track.middleware import TrackMiddleware +from common.djangoapps.track.views import segmentio +from common.djangoapps.track.views.tests.base import SEGMENTIO_TEST_ENDPOINT, SEGMENTIO_TEST_USER_ID, SegmentIOTrackingTestCaseBase def expect_failure_with_message(message): diff --git a/common/djangoapps/track/views/tests/test_views.py b/common/djangoapps/track/views/tests/test_views.py index c9cb595b75..14a8cc8bb6 100644 --- a/common/djangoapps/track/views/tests/test_views.py +++ b/common/djangoapps/track/views/tests/test_views.py @@ -6,9 +6,9 @@ from django.test.utils import override_settings from mock import patch, sentinel from openedx.core.lib.tests.assertions.events import assert_event_matches -from track import views -from track.middleware import TrackMiddleware -from track.tests import FROZEN_TIME, EventTrackingTestCase +from common.djangoapps.track import views +from common.djangoapps.track.middleware import TrackMiddleware +from common.djangoapps.track.tests import FROZEN_TIME, EventTrackingTestCase TEST_USERNAME = 'test-username' TEST_USER_ID = 1000 @@ -27,7 +27,7 @@ class TestTrackViews(EventTrackingTestCase): self.request_factory = RequestFactory() - patcher = patch('track.views.tracker', autospec=True) + patcher = patch('common.djangoapps.track.views.tracker', autospec=True) self.mock_tracker = patcher.start() self.addCleanup(patcher.stop) @@ -141,7 +141,7 @@ class TestTrackViews(EventTrackingTestCase): assert_event_matches(expected_event, actual_event) @override_settings( - EVENT_TRACKING_PROCESSORS=[{'ENGINE': 'track.shim.LegacyFieldMappingProcessor'}], + EVENT_TRACKING_PROCESSORS=[{'ENGINE': 'common.djangoapps.track.shim.LegacyFieldMappingProcessor'}], ) def test_user_track_with_middleware_and_processors(self): self.recreate_tracker() diff --git a/common/djangoapps/util/admin.py b/common/djangoapps/util/admin.py index 99782fac1f..813c0691dc 100644 --- a/common/djangoapps/util/admin.py +++ b/common/djangoapps/util/admin.py @@ -3,6 +3,6 @@ from django.contrib import admin -from util.models import RateLimitConfiguration +from common.djangoapps.util.models import RateLimitConfiguration admin.site.register(RateLimitConfiguration) diff --git a/common/djangoapps/util/disable_rate_limit.py b/common/djangoapps/util/disable_rate_limit.py index cd1cc9ec39..c70b948f28 100644 --- a/common/djangoapps/util/disable_rate_limit.py +++ b/common/djangoapps/util/disable_rate_limit.py @@ -20,7 +20,7 @@ from functools import wraps from rest_framework.views import APIView -from util.models import RateLimitConfiguration +from common.djangoapps.util.models import RateLimitConfiguration LOGGER = logging.getLogger(__name__) diff --git a/common/djangoapps/util/keyword_substitution.py b/common/djangoapps/util/keyword_substitution.py index 97a08f7ea4..ea60a5def5 100644 --- a/common/djangoapps/util/keyword_substitution.py +++ b/common/djangoapps/util/keyword_substitution.py @@ -21,7 +21,7 @@ Usage: from django.contrib.auth.models import User -from student.models import anonymous_id_for_user +from common.djangoapps.student.models import anonymous_id_for_user def anonymous_id_from_user_id(user_id): diff --git a/common/djangoapps/util/password_policy_validators.py b/common/djangoapps/util/password_policy_validators.py index 73e18eb89b..5d87292a5e 100644 --- a/common/djangoapps/util/password_policy_validators.py +++ b/common/djangoapps/util/password_policy_validators.py @@ -28,7 +28,7 @@ def create_validator_config(name, options={}): This function is meant to be used for testing purposes to create validators easily. It returns a validator config of the form: { - "NAME": "util.password_policy_validators.SymbolValidator", + "NAME": "common.djangoapps.util.password_policy_validators.SymbolValidator", "OPTIONS": {"min_symbol": 1} } diff --git a/common/djangoapps/util/testing.py b/common/djangoapps/util/testing.py index 3218f51708..194f59e502 100644 --- a/common/djangoapps/util/testing.py +++ b/common/djangoapps/util/testing.py @@ -12,7 +12,7 @@ from django.test import TestCase from django.urls import clear_url_caches, resolve from mock import patch -from util.db import OuterAtomic +from common.djangoapps.util.db import OuterAtomic if six.PY3: from importlib import reload diff --git a/common/djangoapps/util/tests/test_course.py b/common/djangoapps/util/tests/test_course.py index 80b0c384f3..b9b0295c41 100644 --- a/common/djangoapps/util/tests/test_course.py +++ b/common/djangoapps/util/tests/test_course.py @@ -8,7 +8,7 @@ import mock from django.conf import settings from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from util.course import get_link_for_about_page +from common.djangoapps.util.course import get_link_for_about_page from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/util/tests/test_date_utils.py b/common/djangoapps/util/tests/test_date_utils.py index 8e42299d69..fa99ece333 100644 --- a/common/djangoapps/util/tests/test_date_utils.py +++ b/common/djangoapps/util/tests/test_date_utils.py @@ -12,7 +12,7 @@ import six from mock import patch from pytz import utc -from util.date_utils import almost_same_datetime, get_default_time_display, get_time_display, strftime_localized +from common.djangoapps.util.date_utils import almost_same_datetime, get_default_time_display, get_time_display, strftime_localized def test_get_default_time_display(): @@ -150,7 +150,7 @@ class StrftimeLocalizedTest(unittest.TestCase): dtime = datetime(2013, 2, 14, 16, 41, 17) self.assertEqual(expected, strftime_localized(dtime, fmt)) - @patch('util.date_utils.pgettext', fake_pgettext(translations={ + @patch('common.djangoapps.util.date_utils.pgettext', fake_pgettext(translations={ ("abbreviated month name", "Feb"): "XXfebXX", ("month name", "February"): "XXfebruaryXX", ("abbreviated weekday name", "Thu"): "XXthuXX", @@ -169,7 +169,7 @@ class StrftimeLocalizedTest(unittest.TestCase): dtime = datetime(2013, 2, 14, 16, 41, 17) self.assertEqual(expected, strftime_localized(dtime, fmt)) - @patch('util.date_utils.ugettext', fake_ugettext(translations={ + @patch('common.djangoapps.util.date_utils.ugettext', fake_ugettext(translations={ "SHORT_DATE_FORMAT": "date(%Y.%m.%d)", "LONG_DATE_FORMAT": "date(%A.%Y.%B.%d)", "DATE_TIME_FORMAT": "date(%Y.%m.%d@%H.%M)", @@ -189,7 +189,7 @@ class StrftimeLocalizedTest(unittest.TestCase): dtime = datetime(2013, 2, 14, 16, 41, 17) self.assertEqual(expected, strftime_localized(dtime, fmt)) - @patch('util.date_utils.ugettext', fake_ugettext(translations={ + @patch('common.djangoapps.util.date_utils.ugettext', fake_ugettext(translations={ "SHORT_DATE_FORMAT": "oops date(%Y.%x.%d)", "TIME_FORMAT": "oops %Hh.%Xm.%Ss", })) diff --git a/common/djangoapps/util/tests/test_db.py b/common/djangoapps/util/tests/test_db.py index 7bb263c237..a258920890 100644 --- a/common/djangoapps/util/tests/test_db.py +++ b/common/djangoapps/util/tests/test_db.py @@ -15,7 +15,7 @@ from django.test.utils import override_settings from django.utils.six import StringIO from six.moves import range -from util.db import enable_named_outer_atomic, generate_int_id, outer_atomic +from common.djangoapps.util.db import enable_named_outer_atomic, generate_int_id, outer_atomic def do_nothing(): diff --git a/common/djangoapps/util/tests/test_disable_rate_limit.py b/common/djangoapps/util/tests/test_disable_rate_limit.py index 90c537929d..1326ccc548 100644 --- a/common/djangoapps/util/tests/test_disable_rate_limit.py +++ b/common/djangoapps/util/tests/test_disable_rate_limit.py @@ -11,8 +11,8 @@ from rest_framework.exceptions import Throttled from rest_framework.throttling import BaseThrottle from rest_framework.views import APIView -from util.disable_rate_limit import can_disable_rate_limit -from util.models import RateLimitConfiguration +from common.djangoapps.util.disable_rate_limit import can_disable_rate_limit +from common.djangoapps.util.models import RateLimitConfiguration class FakeThrottle(BaseThrottle): diff --git a/common/djangoapps/util/tests/test_file.py b/common/djangoapps/util/tests/test_file.py index 109fba5087..0a3ef65260 100644 --- a/common/djangoapps/util/tests/test_file.py +++ b/common/djangoapps/util/tests/test_file.py @@ -20,8 +20,8 @@ from opaque_keys.edx.locations import CourseLocator from pytz import UTC from six import text_type -import util.file -from util.file import ( +import common.djangoapps.util.file +from common.djangoapps.util.file import ( FileValidationException, UniversalNewlineIterator, course_and_time_based_filename_generator, @@ -54,7 +54,7 @@ class FilenameGeneratorTestCase(TestCase): def setUp(self): super(FilenameGeneratorTestCase, self).setUp() datetime_patcher = patch.object( - util.file, 'datetime', + common.djangoapps.util.file, 'datetime', Mock(wraps=datetime) ) mocked_datetime = datetime_patcher.start() diff --git a/common/djangoapps/util/tests/test_json_request.py b/common/djangoapps/util/tests/test_json_request.py index 50ceea67f2..08590fbdb8 100644 --- a/common/djangoapps/util/tests/test_json_request.py +++ b/common/djangoapps/util/tests/test_json_request.py @@ -9,7 +9,7 @@ import unittest import mock from django.http import HttpResponse, HttpResponseBadRequest -from util.json_request import JsonResponse, JsonResponseBadRequest +from common.djangoapps.util.json_request import JsonResponse, JsonResponseBadRequest class JsonResponseTestCase(unittest.TestCase): diff --git a/common/djangoapps/util/tests/test_keyword_sub_utils.py b/common/djangoapps/util/tests/test_keyword_sub_utils.py index a2dcb797e2..20578c94fc 100644 --- a/common/djangoapps/util/tests/test_keyword_sub_utils.py +++ b/common/djangoapps/util/tests/test_keyword_sub_utils.py @@ -7,9 +7,9 @@ import six from ddt import ddt, file_data from mock import patch -from student.tests.factories import UserFactory -from util import keyword_substitution as Ks -from util.date_utils import get_default_time_display +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util import keyword_substitution as Ks +from common.djangoapps.util.date_utils import get_default_time_display from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -103,7 +103,7 @@ class KeywordSubTest(ModuleStoreTestCase): """ Test that subbing works with multiple subtags """ anon_id = '123456789' - with patch('util.keyword_substitution.anonymous_id_from_user_id', lambda user_id: anon_id): + with patch('common.djangoapps.util.keyword_substitution.anonymous_id_from_user_id', lambda user_id: anon_id): result = Ks.substitute_keywords_with_data( test_string, self.context, ) diff --git a/common/djangoapps/util/tests/test_memcache.py b/common/djangoapps/util/tests/test_memcache.py index da9dc92bd7..9c935e72d2 100644 --- a/common/djangoapps/util/tests/test_memcache.py +++ b/common/djangoapps/util/tests/test_memcache.py @@ -8,7 +8,7 @@ from django.test import TestCase from six import unichr from six.moves import range -from util.memcache import safe_key +from common.djangoapps.util.memcache import safe_key class MemcacheTest(TestCase): diff --git a/common/djangoapps/util/tests/test_milestones_helpers.py b/common/djangoapps/util/tests/test_milestones_helpers.py index cca096dda1..62dd1e534c 100644 --- a/common/djangoapps/util/tests/test_milestones_helpers.py +++ b/common/djangoapps/util/tests/test_milestones_helpers.py @@ -13,7 +13,7 @@ from milestones.exceptions import InvalidCourseKeyException, InvalidUserExceptio from milestones.models import MilestoneRelationshipType from mock import patch -from util import milestones_helpers +from common.djangoapps.util import milestones_helpers from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/util/tests/test_organizations_helpers.py b/common/djangoapps/util/tests/test_organizations_helpers.py index 24c949e6c4..9c48fa8ded 100644 --- a/common/djangoapps/util/tests/test_organizations_helpers.py +++ b/common/djangoapps/util/tests/test_organizations_helpers.py @@ -6,7 +6,7 @@ Tests for the organizations helpers library, which is the integration point for import six from mock import patch -from util import organizations_helpers +from common.djangoapps.util import organizations_helpers from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/common/djangoapps/util/tests/test_password_policy_validators.py b/common/djangoapps/util/tests/test_password_policy_validators.py index ae368330b8..e652c52cb1 100644 --- a/common/djangoapps/util/tests/test_password_policy_validators.py +++ b/common/djangoapps/util/tests/test_password_policy_validators.py @@ -9,7 +9,7 @@ from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.test.utils import override_settings -from util.password_policy_validators import ( +from common.djangoapps.util.password_policy_validators import ( create_validator_config, password_validators_instruction_texts, validate_password @@ -73,25 +73,25 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): 'This password is too short. It must contain at least 2 characters.') @data( - ([create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 2})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 2})], 'at least 2 characters.'), ([ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), - create_validator_config('util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 2}), + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), + create_validator_config('common.djangoapps.util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 2}), ], 'characters, including 2 letters.'), ([ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), - create_validator_config('util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 2}), - create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 1}), + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), + create_validator_config('common.djangoapps.util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 2}), + create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 1}), ], 'characters, including 2 letters & 1 number.'), ([ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), - create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 3}), - create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 1}), - create_validator_config('util.password_policy_validators.SymbolValidator', {'min_symbol': 2}), + create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), + create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 3}), + create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 1}), + create_validator_config('common.djangoapps.util.password_policy_validators.SymbolValidator', {'min_symbol': 2}), ], 'including 3 uppercase letters & 1 number & 2 symbols.'), ) @unpack @@ -116,13 +116,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg, user) @data( - ([create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 1})], u'', 'This password is too short. It must contain at least 1 character.'), - ([create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 8})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 8})], u'd', 'This password is too short. It must contain at least 8 characters.'), - ([create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 8})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 8})], u'longpassword', None), ) @unpack @@ -132,13 +132,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg) @data( - ([create_validator_config('util.password_policy_validators.MaximumLengthValidator', {'max_length': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.MaximumLengthValidator', {'max_length': 1})], u'longpassword', 'This password is too long. It must contain no more than 1 character.'), - ([create_validator_config('util.password_policy_validators.MaximumLengthValidator', {'max_length': 10})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.MaximumLengthValidator', {'max_length': 10})], u'longpassword', 'This password is too long. It must contain no more than 10 characters.'), - ([create_validator_config('util.password_policy_validators.MaximumLengthValidator', {'max_length': 20})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.MaximumLengthValidator', {'max_length': 20})], u'shortpassword', None), ) @unpack @@ -160,13 +160,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg) @data( - ([create_validator_config('util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 1})], u'12345', 'This password must contain at least 1 letter.'), - ([create_validator_config('util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 5})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 5})], u'test123', 'This password must contain at least 5 letters.'), - ([create_validator_config('util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 2})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.AlphabeticValidator', {'min_alphabetic': 2})], u'password', None), ) @unpack @@ -176,13 +176,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg) @data( - ([create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 1})], u'test', 'This password must contain at least 1 number.'), - ([create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 4})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 4})], u'test123', 'This password must contain at least 4 numbers.'), - ([create_validator_config('util.password_policy_validators.NumericValidator', {'min_numeric': 2})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.NumericValidator', {'min_numeric': 2})], u'password123', None), ) @unpack @@ -192,13 +192,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg) @data( - ([create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 1})], u'lowercase', 'This password must contain at least 1 uppercase letter.'), - ([create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 6})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 6})], u'NOTenough', 'This password must contain at least 6 uppercase letters.'), - ([create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 1})], u'camelCase', None), ) @unpack @@ -208,13 +208,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg) @data( - ([create_validator_config('util.password_policy_validators.LowercaseValidator', {'min_lower': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.LowercaseValidator', {'min_lower': 1})], u'UPPERCASE', 'This password must contain at least 1 lowercase letter.'), - ([create_validator_config('util.password_policy_validators.LowercaseValidator', {'min_lower': 4})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.LowercaseValidator', {'min_lower': 4})], u'notENOUGH', 'This password must contain at least 4 lowercase letters.'), - ([create_validator_config('util.password_policy_validators.LowercaseValidator', {'min_lower': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.LowercaseValidator', {'min_lower': 1})], u'goodPassword', None), ) @unpack @@ -224,13 +224,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg) @data( - ([create_validator_config('util.password_policy_validators.PunctuationValidator', {'min_punctuation': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.PunctuationValidator', {'min_punctuation': 1})], u'no punctuation', 'This password must contain at least 1 punctuation mark.'), - ([create_validator_config('util.password_policy_validators.PunctuationValidator', {'min_punctuation': 7})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.PunctuationValidator', {'min_punctuation': 7})], u'p@$$w0rd$!', 'This password must contain at least 7 punctuation marks.'), - ([create_validator_config('util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.PunctuationValidator', {'min_punctuation': 3})], u'excl@m@t!on', None), ) @unpack @@ -240,13 +240,13 @@ class PasswordPolicyValidatorsTestCase(unittest.TestCase): self.validation_errors_checker(password, msg) @data( - ([create_validator_config('util.password_policy_validators.SymbolValidator', {'min_symbol': 1})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.SymbolValidator', {'min_symbol': 1})], u'no symbol', 'This password must contain at least 1 symbol.'), - ([create_validator_config('util.password_policy_validators.SymbolValidator', {'min_symbol': 3})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.SymbolValidator', {'min_symbol': 3})], u'☹️boo☹️', 'This password must contain at least 3 symbols.'), - ([create_validator_config('util.password_policy_validators.SymbolValidator', {'min_symbol': 2})], + ([create_validator_config('common.djangoapps.util.password_policy_validators.SymbolValidator', {'min_symbol': 2})], u'☪symbols!☹️', None), ) @unpack diff --git a/common/djangoapps/util/tests/test_string_utils.py b/common/djangoapps/util/tests/test_string_utils.py index 87b3909837..49872c54c6 100644 --- a/common/djangoapps/util/tests/test_string_utils.py +++ b/common/djangoapps/util/tests/test_string_utils.py @@ -5,7 +5,7 @@ Tests for string_utils.py from django.test import TestCase -from util.string_utils import str_to_bool +from common.djangoapps.util.string_utils import str_to_bool class StringUtilsTest(TestCase): diff --git a/common/djangoapps/util/views.py b/common/djangoapps/util/views.py index ecad99bf84..d7c1faf00b 100644 --- a/common/djangoapps/util/views.py +++ b/common/djangoapps/util/views.py @@ -14,14 +14,14 @@ from django.shortcuts import redirect from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey, UsageKey from six.moves import map + from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.masquerade import setup_masquerade from openedx.core.djangoapps.schedules.utils import reset_self_paced_schedule from openedx.features.course_experience.utils import dates_banner_should_display - -import track.views -from edxmako.shortcuts import render_to_response -from student.roles import GlobalStaff +from common.djangoapps.track import views as track_views +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.student.roles import GlobalStaff log = logging.getLogger(__name__) @@ -162,7 +162,7 @@ def calculate(request): except: event = {'error': list(map(str, sys.exc_info())), 'equation': equation} - track.views.server_track(request, 'error:calc', event, page='calc') + track_views.server_track(request, 'error:calc', event, page='calc') return HttpResponse(json.dumps({'result': 'Invalid syntax'})) return HttpResponse(json.dumps({'result': str(result)})) diff --git a/common/djangoapps/xblock_django/admin.py b/common/djangoapps/xblock_django/admin.py index bd03d2676e..21a8950b75 100644 --- a/common/djangoapps/xblock_django/admin.py +++ b/common/djangoapps/xblock_django/admin.py @@ -7,7 +7,7 @@ from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModel from django.contrib import admin from django.utils.translation import ugettext_lazy as _ -from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag +from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag class XBlockConfigurationAdmin(KeyedConfigurationModelAdmin): diff --git a/common/djangoapps/xblock_django/api.py b/common/djangoapps/xblock_django/api.py index c591ce0361..163683ab0c 100644 --- a/common/djangoapps/xblock_django/api.py +++ b/common/djangoapps/xblock_django/api.py @@ -4,7 +4,7 @@ API methods related to xblock state. from openedx.core.lib.cache_utils import CacheInvalidationManager -from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration +from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration cacher = CacheInvalidationManager(model=XBlockConfiguration) diff --git a/common/djangoapps/xblock_django/tests/test_api.py b/common/djangoapps/xblock_django/tests/test_api.py index 4b59c38af2..68499af1c0 100644 --- a/common/djangoapps/xblock_django/tests/test_api.py +++ b/common/djangoapps/xblock_django/tests/test_api.py @@ -6,8 +6,8 @@ Tests related to XBlock support API. import six from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from xblock_django.api import authorable_xblocks, deprecated_xblocks, disabled_xblocks -from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag +from common.djangoapps.xblock_django.api import authorable_xblocks, deprecated_xblocks, disabled_xblocks +from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag class XBlockSupportTestCase(CacheIsolationTestCase): diff --git a/common/djangoapps/xblock_django/tests/test_user_service.py b/common/djangoapps/xblock_django/tests/test_user_service.py index 2a41eb86f1..c47e10f7c9 100644 --- a/common/djangoapps/xblock_django/tests/test_user_service.py +++ b/common/djangoapps/xblock_django/tests/test_user_service.py @@ -8,9 +8,9 @@ from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.user_api.preferences.api import set_user_preference from openedx.core.djangoapps.external_user_ids.models import ExternalIdType -from student.models import anonymous_id_for_user -from student.tests.factories import AnonymousUserFactory, UserFactory -from xblock_django.user_service import ( +from common.djangoapps.student.models import anonymous_id_for_user +from common.djangoapps.student.tests.factories import AnonymousUserFactory, UserFactory +from common.djangoapps.xblock_django.user_service import ( ATTR_KEY_IS_AUTHENTICATED, ATTR_KEY_USER_ID, ATTR_KEY_USER_IS_STAFF, diff --git a/common/djangoapps/xblock_django/user_service.py b/common/djangoapps/xblock_django/user_service.py index f09757677a..be41454b8f 100644 --- a/common/djangoapps/xblock_django/user_service.py +++ b/common/djangoapps/xblock_django/user_service.py @@ -9,7 +9,7 @@ from xblock.reference.user_service import UserService, XBlockUser from openedx.core.djangoapps.external_user_ids.models import ExternalId from openedx.core.djangoapps.user_api.preferences.api import get_user_preferences -from student.models import anonymous_id_for_user, get_user_by_username_or_email +from common.djangoapps.student.models import anonymous_id_for_user, get_user_by_username_or_email ATTR_KEY_IS_AUTHENTICATED = 'edx-platform.is_authenticated' ATTR_KEY_USER_ID = 'edx-platform.user_id' diff --git a/common/lib/xmodule/xmodule/library_tools.py b/common/lib/xmodule/xmodule/library_tools.py index b3589b78c8..d3b4209edd 100644 --- a/common/lib/xmodule/xmodule/library_tools.py +++ b/common/lib/xmodule/xmodule/library_tools.py @@ -14,7 +14,7 @@ from xblock.fields import Scope from openedx.core.djangoapps.content_libraries import api as library_api from openedx.core.djangoapps.xblock.api import load_block from openedx.core.lib import blockstore_api -from student.auth import has_studio_write_access +from common.djangoapps.student.auth import has_studio_write_access from xmodule.capa_module import ProblemBlock from xmodule.library_content_module import ANY_CAPA_TYPE_VALUE from xmodule.modulestore import ModuleStoreEnum diff --git a/common/lib/xmodule/xmodule/modulestore/django.py b/common/lib/xmodule/xmodule/modulestore/django.py index 605d220165..3f65a538ac 100644 --- a/common/lib/xmodule/xmodule/modulestore/django.py +++ b/common/lib/xmodule/xmodule/modulestore/django.py @@ -32,7 +32,7 @@ from xmodule.util.xmodule_django import get_current_request_hostname # We also may not always have the current request user (crum) module available try: - from xblock_django.user_service import DjangoXBlockUserService + from common.djangoapps.xblock_django.user_service import DjangoXBlockUserService from crum import get_current_user HAS_USER_SERVICE = True @@ -40,7 +40,7 @@ except ImportError: HAS_USER_SERVICE = False try: - from xblock_django.api import disabled_xblocks + from common.djangoapps.xblock_django.api import disabled_xblocks except ImportError: disabled_xblocks = None @@ -398,7 +398,7 @@ class ModuleI18nService(object): # refactored to a place that will be right, and the code can be made # right there. If you are reading this comment after April 1, 2014, # then Cale was a liar. - from util.date_utils import strftime_localized + from common.djangoapps.util.date_utils import strftime_localized return strftime_localized(*args, **kwargs) diff --git a/common/lib/xmodule/xmodule/modulestore/search.py b/common/lib/xmodule/xmodule/modulestore/search.py index bc0e0de893..872c8909d7 100644 --- a/common/lib/xmodule/xmodule/modulestore/search.py +++ b/common/lib/xmodule/xmodule/modulestore/search.py @@ -6,7 +6,7 @@ from logging import getLogger from six.moves import range from lms.djangoapps.courseware.masquerade import MASQUERADE_SETTINGS_KEY -from student.roles import GlobalStaff +from common.djangoapps.student.roles import GlobalStaff from .exceptions import ItemNotFoundError, NoPathToItem LOGGER = getLogger(__name__) diff --git a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py index 1544a69ef3..a8104e867d 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py @@ -21,8 +21,8 @@ from lms.djangoapps.courseware.tests.factories import StaffFactory from lms.djangoapps.courseware.field_overrides import OverrideFieldData from openedx.core.djangolib.testing.utils import CacheIsolationMixin, CacheIsolationTestCase, FilteredQueryCountMixin from openedx.core.lib.tempdir import mkdtemp_clean -from student.models import CourseEnrollment -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.contentstore.django import _CONTENTSTORE from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import SignalHandler, clear_existing_modulestores, modulestore @@ -97,7 +97,7 @@ def draft_mongo_store_config(data_dir): modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': data_dir, - 'render_template': 'edxmako.shortcuts.render_to_string' + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string' } store = { @@ -124,7 +124,7 @@ def split_mongo_store_config(data_dir): modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': data_dir, - 'render_template': 'edxmako.shortcuts.render_to_string', + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string', } store = { @@ -371,7 +371,7 @@ class SharedModuleStoreTestCase( How to use:: from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase - from student.tests.factories import CourseEnrollmentFactory, UserFactory + from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory class MyModuleStoreTestCase(SharedModuleStoreTestCase): @classmethod diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py index 887830f92b..1846fd8ba8 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py @@ -44,7 +44,7 @@ class ModuleStoreSettingsMigration(TestCase): "host": "localhost", "password": "password", "port": 27017, - "render_template": "edxmako.shortcuts.render_to_string", + "render_template": "common.djangoapps.edxmako.shortcuts.render_to_string", "user": "edxapp" }, "DOC_STORE_CONFIG": {}, @@ -100,7 +100,7 @@ class ModuleStoreSettingsMigration(TestCase): 'OPTIONS': { 'default_class': 'xmodule.hidden_module.HiddenDescriptor', 'fs_root': "fs_root", - 'render_template': 'edxmako.shortcuts.render_to_string', + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string', } }, { @@ -110,7 +110,7 @@ class ModuleStoreSettingsMigration(TestCase): 'OPTIONS': { 'default_class': 'xmodule.hidden_module.HiddenDescriptor', 'fs_root': "fs_root", - 'render_template': 'edxmako.shortcuts.render_to_string', + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string', } }, ] diff --git a/common/lib/xmodule/xmodule/tests/test_library_sourced_block.py b/common/lib/xmodule/xmodule/tests/test_library_sourced_block.py index 9a8f2b8d68..5445993068 100644 --- a/common/lib/xmodule/xmodule/tests/test_library_sourced_block.py +++ b/common/lib/xmodule/xmodule/tests/test_library_sourced_block.py @@ -4,7 +4,7 @@ Tests for Source from Library XBlock from xblockutils.resources import ResourceLoader from openedx.core.djangoapps.content_libraries.tests.base import ContentLibrariesRestApiTest -from student.roles import CourseInstructorRole +from common.djangoapps.student.roles import CourseInstructorRole from cms.lib.xblock.runtime import handler_url from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/common/lib/xmodule/xmodule/tests/test_library_tools.py b/common/lib/xmodule/xmodule/tests/test_library_tools.py index 472ebb1355..b8a9203022 100644 --- a/common/lib/xmodule/xmodule/tests/test_library_tools.py +++ b/common/lib/xmodule/xmodule/tests/test_library_tools.py @@ -7,7 +7,7 @@ from opaque_keys.edx.keys import UsageKey from openedx.core.djangoapps.content_libraries import api as library_api from openedx.core.djangoapps.content_libraries.tests.base import ContentLibrariesRestApiTest from openedx.core.djangoapps.xblock.api import load_block -from student.roles import CourseInstructorRole +from common.djangoapps.student.roles import CourseInstructorRole from xmodule.library_tools import LibraryToolsService from xmodule.modulestore.tests.factories import CourseFactory, LibraryFactory from xmodule.modulestore.tests.utils import MixedSplitTestCase diff --git a/common/lib/xmodule/xmodule/tests/test_sequence.py b/common/lib/xmodule/xmodule/tests/test_sequence.py index 46278f72a5..f866ed8556 100644 --- a/common/lib/xmodule/xmodule/tests/test_sequence.py +++ b/common/lib/xmodule/xmodule/tests/test_sequence.py @@ -17,7 +17,7 @@ from six.moves import range from web_fragments.fragment import Fragment from edx_toggles.toggles.testutils import override_waffle_flag -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.seq_module import TIMED_EXAM_GATING_WAFFLE_FLAG, SequenceModule from xmodule.tests import get_test_system from xmodule.tests.helpers import StubUserService diff --git a/common/templates/edxnotes_wrapper.html b/common/templates/edxnotes_wrapper.html index 9ead26e911..e47dc50916 100644 --- a/common/templates/edxnotes_wrapper.html +++ b/common/templates/edxnotes_wrapper.html @@ -4,7 +4,7 @@ <%! import json from django.utils.translation import ugettext as _ -from student.models import anonymous_id_for_user +from common.djangoapps.student.models import anonymous_id_for_user from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json %> diff --git a/import_shims/lms/course_action_state/__init__.py b/import_shims/lms/course_action_state/__init__.py new file mode 100644 index 0000000000..8b5980fa17 --- /dev/null +++ b/import_shims/lms/course_action_state/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state', 'common.djangoapps.course_action_state') + +from common.djangoapps.course_action_state import * diff --git a/import_shims/lms/course_action_state/managers.py b/import_shims/lms/course_action_state/managers.py new file mode 100644 index 0000000000..cd11c98f47 --- /dev/null +++ b/import_shims/lms/course_action_state/managers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.managers', 'common.djangoapps.course_action_state.managers') + +from common.djangoapps.course_action_state.managers import * diff --git a/import_shims/lms/course_action_state/models.py b/import_shims/lms/course_action_state/models.py new file mode 100644 index 0000000000..ee7e3c4ad0 --- /dev/null +++ b/import_shims/lms/course_action_state/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.models', 'common.djangoapps.course_action_state.models') + +from common.djangoapps.course_action_state.models import * diff --git a/import_shims/lms/course_action_state/tests/__init__.py b/import_shims/lms/course_action_state/tests/__init__.py new file mode 100644 index 0000000000..701aad3144 --- /dev/null +++ b/import_shims/lms/course_action_state/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.tests', 'common.djangoapps.course_action_state.tests') + +from common.djangoapps.course_action_state.tests import * diff --git a/import_shims/lms/course_action_state/tests/test_managers.py b/import_shims/lms/course_action_state/tests/test_managers.py new file mode 100644 index 0000000000..91c1a4c0b5 --- /dev/null +++ b/import_shims/lms/course_action_state/tests/test_managers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.tests.test_managers', 'common.djangoapps.course_action_state.tests.test_managers') + +from common.djangoapps.course_action_state.tests.test_managers import * diff --git a/import_shims/lms/course_action_state/tests/test_rerun_manager.py b/import_shims/lms/course_action_state/tests/test_rerun_manager.py new file mode 100644 index 0000000000..740708aa00 --- /dev/null +++ b/import_shims/lms/course_action_state/tests/test_rerun_manager.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.tests.test_rerun_manager', 'common.djangoapps.course_action_state.tests.test_rerun_manager') + +from common.djangoapps.course_action_state.tests.test_rerun_manager import * diff --git a/import_shims/lms/course_modes/__init__.py b/import_shims/lms/course_modes/__init__.py new file mode 100644 index 0000000000..f5c4a4ee4c --- /dev/null +++ b/import_shims/lms/course_modes/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes', 'common.djangoapps.course_modes') + +from common.djangoapps.course_modes import * diff --git a/import_shims/lms/course_modes/admin.py b/import_shims/lms/course_modes/admin.py new file mode 100644 index 0000000000..929ba70dc0 --- /dev/null +++ b/import_shims/lms/course_modes/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.admin', 'common.djangoapps.course_modes.admin') + +from common.djangoapps.course_modes.admin import * diff --git a/import_shims/lms/course_modes/api.py b/import_shims/lms/course_modes/api.py new file mode 100644 index 0000000000..74250a451c --- /dev/null +++ b/import_shims/lms/course_modes/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.api', 'common.djangoapps.course_modes.api') + +from common.djangoapps.course_modes.api import * diff --git a/import_shims/lms/course_modes/apps.py b/import_shims/lms/course_modes/apps.py new file mode 100644 index 0000000000..f2d7673d36 --- /dev/null +++ b/import_shims/lms/course_modes/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.apps', 'common.djangoapps.course_modes.apps') + +from common.djangoapps.course_modes.apps import * diff --git a/import_shims/lms/course_modes/helpers.py b/import_shims/lms/course_modes/helpers.py new file mode 100644 index 0000000000..0862592a3c --- /dev/null +++ b/import_shims/lms/course_modes/helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.helpers', 'common.djangoapps.course_modes.helpers') + +from common.djangoapps.course_modes.helpers import * diff --git a/import_shims/lms/course_modes/models.py b/import_shims/lms/course_modes/models.py new file mode 100644 index 0000000000..a5f733294c --- /dev/null +++ b/import_shims/lms/course_modes/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.models', 'common.djangoapps.course_modes.models') + +from common.djangoapps.course_modes.models import * diff --git a/import_shims/lms/course_modes/rest_api/__init__.py b/import_shims/lms/course_modes/rest_api/__init__.py new file mode 100644 index 0000000000..ff3fd85be3 --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api', 'common.djangoapps.course_modes.rest_api') + +from common.djangoapps.course_modes.rest_api import * diff --git a/import_shims/lms/course_modes/rest_api/serializers.py b/import_shims/lms/course_modes/rest_api/serializers.py new file mode 100644 index 0000000000..9996d6823b --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.serializers', 'common.djangoapps.course_modes.rest_api.serializers') + +from common.djangoapps.course_modes.rest_api.serializers import * diff --git a/import_shims/lms/course_modes/rest_api/urls.py b/import_shims/lms/course_modes/rest_api/urls.py new file mode 100644 index 0000000000..61912ad20c --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.urls', 'common.djangoapps.course_modes.rest_api.urls') + +from common.djangoapps.course_modes.rest_api.urls import * diff --git a/import_shims/lms/course_modes/rest_api/v1/__init__.py b/import_shims/lms/course_modes/rest_api/v1/__init__.py new file mode 100644 index 0000000000..626c496187 --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/v1/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1', 'common.djangoapps.course_modes.rest_api.v1') + +from common.djangoapps.course_modes.rest_api.v1 import * diff --git a/import_shims/lms/course_modes/rest_api/v1/tests/__init__.py b/import_shims/lms/course_modes/rest_api/v1/tests/__init__.py new file mode 100644 index 0000000000..ee1496ee9a --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/v1/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.tests', 'common.djangoapps.course_modes.rest_api.v1.tests') + +from common.djangoapps.course_modes.rest_api.v1.tests import * diff --git a/import_shims/lms/course_modes/rest_api/v1/tests/test_views.py b/import_shims/lms/course_modes/rest_api/v1/tests/test_views.py new file mode 100644 index 0000000000..a67d9e8599 --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/v1/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.tests.test_views', 'common.djangoapps.course_modes.rest_api.v1.tests.test_views') + +from common.djangoapps.course_modes.rest_api.v1.tests.test_views import * diff --git a/import_shims/lms/course_modes/rest_api/v1/urls.py b/import_shims/lms/course_modes/rest_api/v1/urls.py new file mode 100644 index 0000000000..840f2e7556 --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/v1/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.urls', 'common.djangoapps.course_modes.rest_api.v1.urls') + +from common.djangoapps.course_modes.rest_api.v1.urls import * diff --git a/import_shims/lms/course_modes/rest_api/v1/views.py b/import_shims/lms/course_modes/rest_api/v1/views.py new file mode 100644 index 0000000000..d470938c20 --- /dev/null +++ b/import_shims/lms/course_modes/rest_api/v1/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.views', 'common.djangoapps.course_modes.rest_api.v1.views') + +from common.djangoapps.course_modes.rest_api.v1.views import * diff --git a/import_shims/lms/course_modes/signals.py b/import_shims/lms/course_modes/signals.py new file mode 100644 index 0000000000..ce1857f3d8 --- /dev/null +++ b/import_shims/lms/course_modes/signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.signals', 'common.djangoapps.course_modes.signals') + +from common.djangoapps.course_modes.signals import * diff --git a/import_shims/lms/course_modes/tests/__init__.py b/import_shims/lms/course_modes/tests/__init__.py new file mode 100644 index 0000000000..7298d7bd70 --- /dev/null +++ b/import_shims/lms/course_modes/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests', 'common.djangoapps.course_modes.tests') + +from common.djangoapps.course_modes.tests import * diff --git a/import_shims/lms/course_modes/tests/factories.py b/import_shims/lms/course_modes/tests/factories.py new file mode 100644 index 0000000000..32bcb47fd9 --- /dev/null +++ b/import_shims/lms/course_modes/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.factories', 'common.djangoapps.course_modes.tests.factories') + +from common.djangoapps.course_modes.tests.factories import * diff --git a/import_shims/lms/course_modes/tests/test_admin.py b/import_shims/lms/course_modes/tests/test_admin.py new file mode 100644 index 0000000000..4e8f1c3481 --- /dev/null +++ b/import_shims/lms/course_modes/tests/test_admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_admin', 'common.djangoapps.course_modes.tests.test_admin') + +from common.djangoapps.course_modes.tests.test_admin import * diff --git a/import_shims/lms/course_modes/tests/test_models.py b/import_shims/lms/course_modes/tests/test_models.py new file mode 100644 index 0000000000..d2d30d40d0 --- /dev/null +++ b/import_shims/lms/course_modes/tests/test_models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_models', 'common.djangoapps.course_modes.tests.test_models') + +from common.djangoapps.course_modes.tests.test_models import * diff --git a/import_shims/lms/course_modes/tests/test_signals.py b/import_shims/lms/course_modes/tests/test_signals.py new file mode 100644 index 0000000000..fbda5cc65f --- /dev/null +++ b/import_shims/lms/course_modes/tests/test_signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_signals', 'common.djangoapps.course_modes.tests.test_signals') + +from common.djangoapps.course_modes.tests.test_signals import * diff --git a/import_shims/lms/course_modes/tests/test_views.py b/import_shims/lms/course_modes/tests/test_views.py new file mode 100644 index 0000000000..66909845fb --- /dev/null +++ b/import_shims/lms/course_modes/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_views', 'common.djangoapps.course_modes.tests.test_views') + +from common.djangoapps.course_modes.tests.test_views import * diff --git a/import_shims/lms/course_modes/urls.py b/import_shims/lms/course_modes/urls.py new file mode 100644 index 0000000000..8af9addfb3 --- /dev/null +++ b/import_shims/lms/course_modes/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.urls', 'common.djangoapps.course_modes.urls') + +from common.djangoapps.course_modes.urls import * diff --git a/import_shims/lms/course_modes/views.py b/import_shims/lms/course_modes/views.py new file mode 100644 index 0000000000..e1971cbd67 --- /dev/null +++ b/import_shims/lms/course_modes/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.views', 'common.djangoapps.course_modes.views') + +from common.djangoapps.course_modes.views import * diff --git a/import_shims/lms/database_fixups/__init__.py b/import_shims/lms/database_fixups/__init__.py new file mode 100644 index 0000000000..a43cf8ff09 --- /dev/null +++ b/import_shims/lms/database_fixups/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('database_fixups', 'common.djangoapps.database_fixups') + +from common.djangoapps.database_fixups import * diff --git a/import_shims/lms/edxmako/__init__.py b/import_shims/lms/edxmako/__init__.py new file mode 100644 index 0000000000..8946feafc0 --- /dev/null +++ b/import_shims/lms/edxmako/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako', 'common.djangoapps.edxmako') + +from common.djangoapps.edxmako import * diff --git a/import_shims/lms/edxmako/apps.py b/import_shims/lms/edxmako/apps.py new file mode 100644 index 0000000000..2ca90ecffa --- /dev/null +++ b/import_shims/lms/edxmako/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.apps', 'common.djangoapps.edxmako.apps') + +from common.djangoapps.edxmako.apps import * diff --git a/import_shims/lms/edxmako/backend.py b/import_shims/lms/edxmako/backend.py new file mode 100644 index 0000000000..0e2cf327c1 --- /dev/null +++ b/import_shims/lms/edxmako/backend.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.backend', 'common.djangoapps.edxmako.backend') + +from common.djangoapps.edxmako.backend import * diff --git a/import_shims/lms/edxmako/makoloader.py b/import_shims/lms/edxmako/makoloader.py new file mode 100644 index 0000000000..f94dff6239 --- /dev/null +++ b/import_shims/lms/edxmako/makoloader.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.makoloader', 'common.djangoapps.edxmako.makoloader') + +from common.djangoapps.edxmako.makoloader import * diff --git a/import_shims/lms/edxmako/paths.py b/import_shims/lms/edxmako/paths.py new file mode 100644 index 0000000000..34b539091c --- /dev/null +++ b/import_shims/lms/edxmako/paths.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.paths', 'common.djangoapps.edxmako.paths') + +from common.djangoapps.edxmako.paths import * diff --git a/import_shims/lms/edxmako/request_context.py b/import_shims/lms/edxmako/request_context.py new file mode 100644 index 0000000000..faf3c0b56d --- /dev/null +++ b/import_shims/lms/edxmako/request_context.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.request_context', 'common.djangoapps.edxmako.request_context') + +from common.djangoapps.edxmako.request_context import * diff --git a/import_shims/lms/edxmako/shortcuts.py b/import_shims/lms/edxmako/shortcuts.py new file mode 100644 index 0000000000..78198ced74 --- /dev/null +++ b/import_shims/lms/edxmako/shortcuts.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.shortcuts', 'common.djangoapps.edxmako.shortcuts') + +from common.djangoapps.edxmako.shortcuts import * diff --git a/import_shims/lms/edxmako/template.py b/import_shims/lms/edxmako/template.py new file mode 100644 index 0000000000..cf0592a314 --- /dev/null +++ b/import_shims/lms/edxmako/template.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.template', 'common.djangoapps.edxmako.template') + +from common.djangoapps.edxmako.template import * diff --git a/import_shims/lms/edxmako/tests.py b/import_shims/lms/edxmako/tests.py new file mode 100644 index 0000000000..5f82c23ee3 --- /dev/null +++ b/import_shims/lms/edxmako/tests.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.tests', 'common.djangoapps.edxmako.tests') + +from common.djangoapps.edxmako.tests import * diff --git a/import_shims/lms/entitlements/__init__.py b/import_shims/lms/entitlements/__init__.py new file mode 100644 index 0000000000..80e98d5ef6 --- /dev/null +++ b/import_shims/lms/entitlements/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements', 'common.djangoapps.entitlements') + +from common.djangoapps.entitlements import * diff --git a/import_shims/lms/entitlements/admin.py b/import_shims/lms/entitlements/admin.py new file mode 100644 index 0000000000..8e6bbd05a5 --- /dev/null +++ b/import_shims/lms/entitlements/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.admin', 'common.djangoapps.entitlements.admin') + +from common.djangoapps.entitlements.admin import * diff --git a/import_shims/lms/entitlements/api.py b/import_shims/lms/entitlements/api.py new file mode 100644 index 0000000000..e8e6a9585b --- /dev/null +++ b/import_shims/lms/entitlements/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.api', 'common.djangoapps.entitlements.api') + +from common.djangoapps.entitlements.api import * diff --git a/import_shims/lms/entitlements/apps.py b/import_shims/lms/entitlements/apps.py new file mode 100644 index 0000000000..fc5884bb1f --- /dev/null +++ b/import_shims/lms/entitlements/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.apps', 'common.djangoapps.entitlements.apps') + +from common.djangoapps.entitlements.apps import * diff --git a/import_shims/lms/entitlements/management/__init__.py b/import_shims/lms/entitlements/management/__init__.py new file mode 100644 index 0000000000..45bd12618d --- /dev/null +++ b/import_shims/lms/entitlements/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management', 'common.djangoapps.entitlements.management') + +from common.djangoapps.entitlements.management import * diff --git a/import_shims/lms/entitlements/management/commands/__init__.py b/import_shims/lms/entitlements/management/commands/__init__.py new file mode 100644 index 0000000000..13f52e735f --- /dev/null +++ b/import_shims/lms/entitlements/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands', 'common.djangoapps.entitlements.management.commands') + +from common.djangoapps.entitlements.management.commands import * diff --git a/import_shims/lms/entitlements/management/commands/expire_old_entitlements.py b/import_shims/lms/entitlements/management/commands/expire_old_entitlements.py new file mode 100644 index 0000000000..3bdfa7163b --- /dev/null +++ b/import_shims/lms/entitlements/management/commands/expire_old_entitlements.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.expire_old_entitlements', 'common.djangoapps.entitlements.management.commands.expire_old_entitlements') + +from common.djangoapps.entitlements.management.commands.expire_old_entitlements import * diff --git a/import_shims/lms/entitlements/management/commands/tests/__init__.py b/import_shims/lms/entitlements/management/commands/tests/__init__.py new file mode 100644 index 0000000000..70d804c7d5 --- /dev/null +++ b/import_shims/lms/entitlements/management/commands/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.tests', 'common.djangoapps.entitlements.management.commands.tests') + +from common.djangoapps.entitlements.management.commands.tests import * diff --git a/import_shims/lms/entitlements/management/commands/tests/test_expire_old_entitlements.py b/import_shims/lms/entitlements/management/commands/tests/test_expire_old_entitlements.py new file mode 100644 index 0000000000..5f736d44b1 --- /dev/null +++ b/import_shims/lms/entitlements/management/commands/tests/test_expire_old_entitlements.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.tests.test_expire_old_entitlements', 'common.djangoapps.entitlements.management.commands.tests.test_expire_old_entitlements') + +from common.djangoapps.entitlements.management.commands.tests.test_expire_old_entitlements import * diff --git a/import_shims/lms/entitlements/management/commands/update_entitlement_mode.py b/import_shims/lms/entitlements/management/commands/update_entitlement_mode.py new file mode 100644 index 0000000000..cc2df58af9 --- /dev/null +++ b/import_shims/lms/entitlements/management/commands/update_entitlement_mode.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.update_entitlement_mode', 'common.djangoapps.entitlements.management.commands.update_entitlement_mode') + +from common.djangoapps.entitlements.management.commands.update_entitlement_mode import * diff --git a/import_shims/lms/entitlements/models.py b/import_shims/lms/entitlements/models.py new file mode 100644 index 0000000000..bef6e0c52e --- /dev/null +++ b/import_shims/lms/entitlements/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.models', 'common.djangoapps.entitlements.models') + +from common.djangoapps.entitlements.models import * diff --git a/import_shims/lms/entitlements/rest_api/__init__.py b/import_shims/lms/entitlements/rest_api/__init__.py new file mode 100644 index 0000000000..08081a3573 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api', 'common.djangoapps.entitlements.rest_api') + +from common.djangoapps.entitlements.rest_api import * diff --git a/import_shims/lms/entitlements/rest_api/urls.py b/import_shims/lms/entitlements/rest_api/urls.py new file mode 100644 index 0000000000..9c377d18a5 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.urls', 'common.djangoapps.entitlements.rest_api.urls') + +from common.djangoapps.entitlements.rest_api.urls import * diff --git a/import_shims/lms/entitlements/rest_api/v1/__init__.py b/import_shims/lms/entitlements/rest_api/v1/__init__.py new file mode 100644 index 0000000000..7689d9ccbe --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1', 'common.djangoapps.entitlements.rest_api.v1') + +from common.djangoapps.entitlements.rest_api.v1 import * diff --git a/import_shims/lms/entitlements/rest_api/v1/filters.py b/import_shims/lms/entitlements/rest_api/v1/filters.py new file mode 100644 index 0000000000..fd4dbd708d --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/filters.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.filters', 'common.djangoapps.entitlements.rest_api.v1.filters') + +from common.djangoapps.entitlements.rest_api.v1.filters import * diff --git a/import_shims/lms/entitlements/rest_api/v1/permissions.py b/import_shims/lms/entitlements/rest_api/v1/permissions.py new file mode 100644 index 0000000000..13f5d5c635 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/permissions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.permissions', 'common.djangoapps.entitlements.rest_api.v1.permissions') + +from common.djangoapps.entitlements.rest_api.v1.permissions import * diff --git a/import_shims/lms/entitlements/rest_api/v1/serializers.py b/import_shims/lms/entitlements/rest_api/v1/serializers.py new file mode 100644 index 0000000000..ed28d10b37 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.serializers', 'common.djangoapps.entitlements.rest_api.v1.serializers') + +from common.djangoapps.entitlements.rest_api.v1.serializers import * diff --git a/import_shims/lms/entitlements/rest_api/v1/tests/__init__.py b/import_shims/lms/entitlements/rest_api/v1/tests/__init__.py new file mode 100644 index 0000000000..0e0c962370 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.tests', 'common.djangoapps.entitlements.rest_api.v1.tests') + +from common.djangoapps.entitlements.rest_api.v1.tests import * diff --git a/import_shims/lms/entitlements/rest_api/v1/tests/test_serializers.py b/import_shims/lms/entitlements/rest_api/v1/tests/test_serializers.py new file mode 100644 index 0000000000..7794996779 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/tests/test_serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.tests.test_serializers', 'common.djangoapps.entitlements.rest_api.v1.tests.test_serializers') + +from common.djangoapps.entitlements.rest_api.v1.tests.test_serializers import * diff --git a/import_shims/lms/entitlements/rest_api/v1/tests/test_views.py b/import_shims/lms/entitlements/rest_api/v1/tests/test_views.py new file mode 100644 index 0000000000..26cf1e48ff --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.tests.test_views', 'common.djangoapps.entitlements.rest_api.v1.tests.test_views') + +from common.djangoapps.entitlements.rest_api.v1.tests.test_views import * diff --git a/import_shims/lms/entitlements/rest_api/v1/urls.py b/import_shims/lms/entitlements/rest_api/v1/urls.py new file mode 100644 index 0000000000..6b58a24af6 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.urls', 'common.djangoapps.entitlements.rest_api.v1.urls') + +from common.djangoapps.entitlements.rest_api.v1.urls import * diff --git a/import_shims/lms/entitlements/rest_api/v1/views.py b/import_shims/lms/entitlements/rest_api/v1/views.py new file mode 100644 index 0000000000..36040ac279 --- /dev/null +++ b/import_shims/lms/entitlements/rest_api/v1/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.views', 'common.djangoapps.entitlements.rest_api.v1.views') + +from common.djangoapps.entitlements.rest_api.v1.views import * diff --git a/import_shims/lms/entitlements/signals.py b/import_shims/lms/entitlements/signals.py new file mode 100644 index 0000000000..23a5da7ca8 --- /dev/null +++ b/import_shims/lms/entitlements/signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.signals', 'common.djangoapps.entitlements.signals') + +from common.djangoapps.entitlements.signals import * diff --git a/import_shims/lms/entitlements/tasks.py b/import_shims/lms/entitlements/tasks.py new file mode 100644 index 0000000000..1a078a755e --- /dev/null +++ b/import_shims/lms/entitlements/tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tasks', 'common.djangoapps.entitlements.tasks') + +from common.djangoapps.entitlements.tasks import * diff --git a/import_shims/lms/entitlements/tests/__init__.py b/import_shims/lms/entitlements/tests/__init__.py new file mode 100644 index 0000000000..858d32fad4 --- /dev/null +++ b/import_shims/lms/entitlements/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests', 'common.djangoapps.entitlements.tests') + +from common.djangoapps.entitlements.tests import * diff --git a/import_shims/lms/entitlements/tests/factories.py b/import_shims/lms/entitlements/tests/factories.py new file mode 100644 index 0000000000..e57a7f6e29 --- /dev/null +++ b/import_shims/lms/entitlements/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.factories', 'common.djangoapps.entitlements.tests.factories') + +from common.djangoapps.entitlements.tests.factories import * diff --git a/import_shims/lms/entitlements/tests/test_models.py b/import_shims/lms/entitlements/tests/test_models.py new file mode 100644 index 0000000000..be74966814 --- /dev/null +++ b/import_shims/lms/entitlements/tests/test_models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.test_models', 'common.djangoapps.entitlements.tests.test_models') + +from common.djangoapps.entitlements.tests.test_models import * diff --git a/import_shims/lms/entitlements/tests/test_tasks.py b/import_shims/lms/entitlements/tests/test_tasks.py new file mode 100644 index 0000000000..97c1078c41 --- /dev/null +++ b/import_shims/lms/entitlements/tests/test_tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.test_tasks', 'common.djangoapps.entitlements.tests.test_tasks') + +from common.djangoapps.entitlements.tests.test_tasks import * diff --git a/import_shims/lms/entitlements/tests/test_utils.py b/import_shims/lms/entitlements/tests/test_utils.py new file mode 100644 index 0000000000..a241173b35 --- /dev/null +++ b/import_shims/lms/entitlements/tests/test_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.test_utils', 'common.djangoapps.entitlements.tests.test_utils') + +from common.djangoapps.entitlements.tests.test_utils import * diff --git a/import_shims/lms/entitlements/utils.py b/import_shims/lms/entitlements/utils.py new file mode 100644 index 0000000000..afb1aa3677 --- /dev/null +++ b/import_shims/lms/entitlements/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.utils', 'common.djangoapps.entitlements.utils') + +from common.djangoapps.entitlements.utils import * diff --git a/import_shims/lms/pipeline_mako/__init__.py b/import_shims/lms/pipeline_mako/__init__.py new file mode 100644 index 0000000000..ed1028e435 --- /dev/null +++ b/import_shims/lms/pipeline_mako/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako', 'common.djangoapps.pipeline_mako') + +from common.djangoapps.pipeline_mako import * diff --git a/import_shims/lms/pipeline_mako/helpers/__init__.py b/import_shims/lms/pipeline_mako/helpers/__init__.py new file mode 100644 index 0000000000..b780ffd340 --- /dev/null +++ b/import_shims/lms/pipeline_mako/helpers/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.helpers', 'common.djangoapps.pipeline_mako.helpers') + +from common.djangoapps.pipeline_mako.helpers import * diff --git a/import_shims/lms/pipeline_mako/helpers/studiofrontend.py b/import_shims/lms/pipeline_mako/helpers/studiofrontend.py new file mode 100644 index 0000000000..4bf4ce9184 --- /dev/null +++ b/import_shims/lms/pipeline_mako/helpers/studiofrontend.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.helpers.studiofrontend', 'common.djangoapps.pipeline_mako.helpers.studiofrontend') + +from common.djangoapps.pipeline_mako.helpers.studiofrontend import * diff --git a/import_shims/lms/pipeline_mako/tests/__init__.py b/import_shims/lms/pipeline_mako/tests/__init__.py new file mode 100644 index 0000000000..c235280da5 --- /dev/null +++ b/import_shims/lms/pipeline_mako/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.tests', 'common.djangoapps.pipeline_mako.tests') + +from common.djangoapps.pipeline_mako.tests import * diff --git a/import_shims/lms/pipeline_mako/tests/test_render.py b/import_shims/lms/pipeline_mako/tests/test_render.py new file mode 100644 index 0000000000..4951f52e81 --- /dev/null +++ b/import_shims/lms/pipeline_mako/tests/test_render.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.tests.test_render', 'common.djangoapps.pipeline_mako.tests.test_render') + +from common.djangoapps.pipeline_mako.tests.test_render import * diff --git a/import_shims/lms/pipeline_mako/tests/test_static_content.py b/import_shims/lms/pipeline_mako/tests/test_static_content.py new file mode 100644 index 0000000000..74a9116932 --- /dev/null +++ b/import_shims/lms/pipeline_mako/tests/test_static_content.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.tests.test_static_content', 'common.djangoapps.pipeline_mako.tests.test_static_content') + +from common.djangoapps.pipeline_mako.tests.test_static_content import * diff --git a/import_shims/lms/static_replace/__init__.py b/import_shims/lms/static_replace/__init__.py new file mode 100644 index 0000000000..6206589364 --- /dev/null +++ b/import_shims/lms/static_replace/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace', 'common.djangoapps.static_replace') + +from common.djangoapps.static_replace import * diff --git a/import_shims/lms/static_replace/admin.py b/import_shims/lms/static_replace/admin.py new file mode 100644 index 0000000000..0e80b27782 --- /dev/null +++ b/import_shims/lms/static_replace/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.admin', 'common.djangoapps.static_replace.admin') + +from common.djangoapps.static_replace.admin import * diff --git a/import_shims/lms/static_replace/management/__init__.py b/import_shims/lms/static_replace/management/__init__.py new file mode 100644 index 0000000000..bd3cd2e159 --- /dev/null +++ b/import_shims/lms/static_replace/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.management', 'common.djangoapps.static_replace.management') + +from common.djangoapps.static_replace.management import * diff --git a/import_shims/lms/static_replace/management/commands/__init__.py b/import_shims/lms/static_replace/management/commands/__init__.py new file mode 100644 index 0000000000..924ba91ec4 --- /dev/null +++ b/import_shims/lms/static_replace/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.management.commands', 'common.djangoapps.static_replace.management.commands') + +from common.djangoapps.static_replace.management.commands import * diff --git a/import_shims/lms/static_replace/management/commands/clear_collectstatic_cache.py b/import_shims/lms/static_replace/management/commands/clear_collectstatic_cache.py new file mode 100644 index 0000000000..f48e6c0541 --- /dev/null +++ b/import_shims/lms/static_replace/management/commands/clear_collectstatic_cache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.management.commands.clear_collectstatic_cache', 'common.djangoapps.static_replace.management.commands.clear_collectstatic_cache') + +from common.djangoapps.static_replace.management.commands.clear_collectstatic_cache import * diff --git a/import_shims/lms/static_replace/models.py b/import_shims/lms/static_replace/models.py new file mode 100644 index 0000000000..fd13639c7e --- /dev/null +++ b/import_shims/lms/static_replace/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.models', 'common.djangoapps.static_replace.models') + +from common.djangoapps.static_replace.models import * diff --git a/import_shims/lms/static_replace/test/__init__.py b/import_shims/lms/static_replace/test/__init__.py new file mode 100644 index 0000000000..a97f94831a --- /dev/null +++ b/import_shims/lms/static_replace/test/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.test', 'common.djangoapps.static_replace.test') + +from common.djangoapps.static_replace.test import * diff --git a/import_shims/lms/static_replace/test/test_static_replace.py b/import_shims/lms/static_replace/test/test_static_replace.py new file mode 100644 index 0000000000..70597a699a --- /dev/null +++ b/import_shims/lms/static_replace/test/test_static_replace.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.test.test_static_replace', 'common.djangoapps.static_replace.test.test_static_replace') + +from common.djangoapps.static_replace.test.test_static_replace import * diff --git a/import_shims/lms/status/__init__.py b/import_shims/lms/status/__init__.py new file mode 100644 index 0000000000..5a13d08f26 --- /dev/null +++ b/import_shims/lms/status/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status', 'common.djangoapps.status') + +from common.djangoapps.status import * diff --git a/import_shims/lms/status/models.py b/import_shims/lms/status/models.py new file mode 100644 index 0000000000..f5472b0bfb --- /dev/null +++ b/import_shims/lms/status/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status.models', 'common.djangoapps.status.models') + +from common.djangoapps.status.models import * diff --git a/import_shims/lms/status/status.py b/import_shims/lms/status/status.py new file mode 100644 index 0000000000..58ce46f399 --- /dev/null +++ b/import_shims/lms/status/status.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status.status', 'common.djangoapps.status.status') + +from common.djangoapps.status.status import * diff --git a/import_shims/lms/status/tests.py b/import_shims/lms/status/tests.py new file mode 100644 index 0000000000..2f1eddb757 --- /dev/null +++ b/import_shims/lms/status/tests.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status.tests', 'common.djangoapps.status.tests') + +from common.djangoapps.status.tests import * diff --git a/import_shims/lms/student/__init__.py b/import_shims/lms/student/__init__.py new file mode 100644 index 0000000000..7921410e6a --- /dev/null +++ b/import_shims/lms/student/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student', 'common.djangoapps.student') + +from common.djangoapps.student import * diff --git a/import_shims/lms/student/admin.py b/import_shims/lms/student/admin.py new file mode 100644 index 0000000000..e0e640ec69 --- /dev/null +++ b/import_shims/lms/student/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.admin', 'common.djangoapps.student.admin') + +from common.djangoapps.student.admin import * diff --git a/import_shims/lms/student/api.py b/import_shims/lms/student/api.py new file mode 100644 index 0000000000..3157baeb4d --- /dev/null +++ b/import_shims/lms/student/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.api', 'common.djangoapps.student.api') + +from common.djangoapps.student.api import * diff --git a/import_shims/lms/student/apps.py b/import_shims/lms/student/apps.py new file mode 100644 index 0000000000..54b77ea847 --- /dev/null +++ b/import_shims/lms/student/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.apps', 'common.djangoapps.student.apps') + +from common.djangoapps.student.apps import * diff --git a/import_shims/lms/student/auth.py b/import_shims/lms/student/auth.py new file mode 100644 index 0000000000..cac8c0d18a --- /dev/null +++ b/import_shims/lms/student/auth.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.auth', 'common.djangoapps.student.auth') + +from common.djangoapps.student.auth import * diff --git a/import_shims/lms/student/forms.py b/import_shims/lms/student/forms.py new file mode 100644 index 0000000000..720e7ea842 --- /dev/null +++ b/import_shims/lms/student/forms.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.forms', 'common.djangoapps.student.forms') + +from common.djangoapps.student.forms import * diff --git a/import_shims/lms/student/helpers.py b/import_shims/lms/student/helpers.py new file mode 100644 index 0000000000..7d448a557e --- /dev/null +++ b/import_shims/lms/student/helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.helpers', 'common.djangoapps.student.helpers') + +from common.djangoapps.student.helpers import * diff --git a/import_shims/lms/student/management/__init__.py b/import_shims/lms/student/management/__init__.py new file mode 100644 index 0000000000..3ac1769d0b --- /dev/null +++ b/import_shims/lms/student/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management', 'common.djangoapps.student.management') + +from common.djangoapps.student.management import * diff --git a/import_shims/lms/student/management/commands/__init__.py b/import_shims/lms/student/management/commands/__init__.py new file mode 100644 index 0000000000..69627fdcec --- /dev/null +++ b/import_shims/lms/student/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands', 'common.djangoapps.student.management.commands') + +from common.djangoapps.student.management.commands import * diff --git a/import_shims/lms/student/management/commands/_create_users.py b/import_shims/lms/student/management/commands/_create_users.py new file mode 100644 index 0000000000..63888425ee --- /dev/null +++ b/import_shims/lms/student/management/commands/_create_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands._create_users', 'common.djangoapps.student.management.commands._create_users') + +from common.djangoapps.student.management.commands._create_users import * diff --git a/import_shims/lms/student/management/commands/add_to_group.py b/import_shims/lms/student/management/commands/add_to_group.py new file mode 100644 index 0000000000..eb768f48a8 --- /dev/null +++ b/import_shims/lms/student/management/commands/add_to_group.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.add_to_group', 'common.djangoapps.student.management.commands.add_to_group') + +from common.djangoapps.student.management.commands.add_to_group import * diff --git a/import_shims/lms/student/management/commands/anonymized_id_mapping.py b/import_shims/lms/student/management/commands/anonymized_id_mapping.py new file mode 100644 index 0000000000..e1ace4626b --- /dev/null +++ b/import_shims/lms/student/management/commands/anonymized_id_mapping.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.anonymized_id_mapping', 'common.djangoapps.student.management.commands.anonymized_id_mapping') + +from common.djangoapps.student.management.commands.anonymized_id_mapping import * diff --git a/import_shims/lms/student/management/commands/assigngroups.py b/import_shims/lms/student/management/commands/assigngroups.py new file mode 100644 index 0000000000..cd5b213370 --- /dev/null +++ b/import_shims/lms/student/management/commands/assigngroups.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.assigngroups', 'common.djangoapps.student.management.commands.assigngroups') + +from common.djangoapps.student.management.commands.assigngroups import * diff --git a/import_shims/lms/student/management/commands/bulk_change_enrollment.py b/import_shims/lms/student/management/commands/bulk_change_enrollment.py new file mode 100644 index 0000000000..6204abf573 --- /dev/null +++ b/import_shims/lms/student/management/commands/bulk_change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_change_enrollment', 'common.djangoapps.student.management.commands.bulk_change_enrollment') + +from common.djangoapps.student.management.commands.bulk_change_enrollment import * diff --git a/import_shims/lms/student/management/commands/bulk_change_enrollment_csv.py b/import_shims/lms/student/management/commands/bulk_change_enrollment_csv.py new file mode 100644 index 0000000000..d4a2a90941 --- /dev/null +++ b/import_shims/lms/student/management/commands/bulk_change_enrollment_csv.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_change_enrollment_csv', 'common.djangoapps.student.management.commands.bulk_change_enrollment_csv') + +from common.djangoapps.student.management.commands.bulk_change_enrollment_csv import * diff --git a/import_shims/lms/student/management/commands/bulk_unenroll.py b/import_shims/lms/student/management/commands/bulk_unenroll.py new file mode 100644 index 0000000000..832a85d03b --- /dev/null +++ b/import_shims/lms/student/management/commands/bulk_unenroll.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_unenroll', 'common.djangoapps.student.management.commands.bulk_unenroll') + +from common.djangoapps.student.management.commands.bulk_unenroll import * diff --git a/import_shims/lms/student/management/commands/bulk_update_email.py b/import_shims/lms/student/management/commands/bulk_update_email.py new file mode 100644 index 0000000000..dd18a84c97 --- /dev/null +++ b/import_shims/lms/student/management/commands/bulk_update_email.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_update_email', 'common.djangoapps.student.management.commands.bulk_update_email') + +from common.djangoapps.student.management.commands.bulk_update_email import * diff --git a/import_shims/lms/student/management/commands/cert_restriction.py b/import_shims/lms/student/management/commands/cert_restriction.py new file mode 100644 index 0000000000..b42cf2b33d --- /dev/null +++ b/import_shims/lms/student/management/commands/cert_restriction.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.cert_restriction', 'common.djangoapps.student.management.commands.cert_restriction') + +from common.djangoapps.student.management.commands.cert_restriction import * diff --git a/import_shims/lms/student/management/commands/change_eligibility_deadline.py b/import_shims/lms/student/management/commands/change_eligibility_deadline.py new file mode 100644 index 0000000000..165f1918a9 --- /dev/null +++ b/import_shims/lms/student/management/commands/change_eligibility_deadline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.change_eligibility_deadline', 'common.djangoapps.student.management.commands.change_eligibility_deadline') + +from common.djangoapps.student.management.commands.change_eligibility_deadline import * diff --git a/import_shims/lms/student/management/commands/change_enrollment.py b/import_shims/lms/student/management/commands/change_enrollment.py new file mode 100644 index 0000000000..21022051c3 --- /dev/null +++ b/import_shims/lms/student/management/commands/change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.change_enrollment', 'common.djangoapps.student.management.commands.change_enrollment') + +from common.djangoapps.student.management.commands.change_enrollment import * diff --git a/import_shims/lms/student/management/commands/change_enterprise_user_username.py b/import_shims/lms/student/management/commands/change_enterprise_user_username.py new file mode 100644 index 0000000000..9d843a710f --- /dev/null +++ b/import_shims/lms/student/management/commands/change_enterprise_user_username.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.change_enterprise_user_username', 'common.djangoapps.student.management.commands.change_enterprise_user_username') + +from common.djangoapps.student.management.commands.change_enterprise_user_username import * diff --git a/import_shims/lms/student/management/commands/create_random_users.py b/import_shims/lms/student/management/commands/create_random_users.py new file mode 100644 index 0000000000..63b5b06ed9 --- /dev/null +++ b/import_shims/lms/student/management/commands/create_random_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.create_random_users', 'common.djangoapps.student.management.commands.create_random_users') + +from common.djangoapps.student.management.commands.create_random_users import * diff --git a/import_shims/lms/student/management/commands/create_test_users.py b/import_shims/lms/student/management/commands/create_test_users.py new file mode 100644 index 0000000000..60e92c12fb --- /dev/null +++ b/import_shims/lms/student/management/commands/create_test_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.create_test_users', 'common.djangoapps.student.management.commands.create_test_users') + +from common.djangoapps.student.management.commands.create_test_users import * diff --git a/import_shims/lms/student/management/commands/export_staff_users.py b/import_shims/lms/student/management/commands/export_staff_users.py new file mode 100644 index 0000000000..972ce7f4e0 --- /dev/null +++ b/import_shims/lms/student/management/commands/export_staff_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.export_staff_users', 'common.djangoapps.student.management.commands.export_staff_users') + +from common.djangoapps.student.management.commands.export_staff_users import * diff --git a/import_shims/lms/student/management/commands/manage_group.py b/import_shims/lms/student/management/commands/manage_group.py new file mode 100644 index 0000000000..44ebc7b31a --- /dev/null +++ b/import_shims/lms/student/management/commands/manage_group.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.manage_group', 'common.djangoapps.student.management.commands.manage_group') + +from common.djangoapps.student.management.commands.manage_group import * diff --git a/import_shims/lms/student/management/commands/manage_user.py b/import_shims/lms/student/management/commands/manage_user.py new file mode 100644 index 0000000000..5ac14853a0 --- /dev/null +++ b/import_shims/lms/student/management/commands/manage_user.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.manage_user', 'common.djangoapps.student.management.commands.manage_user') + +from common.djangoapps.student.management.commands.manage_user import * diff --git a/import_shims/lms/student/management/commands/populate_created_on_site_user_attribute.py b/import_shims/lms/student/management/commands/populate_created_on_site_user_attribute.py new file mode 100644 index 0000000000..cc717ada1f --- /dev/null +++ b/import_shims/lms/student/management/commands/populate_created_on_site_user_attribute.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.populate_created_on_site_user_attribute', 'common.djangoapps.student.management.commands.populate_created_on_site_user_attribute') + +from common.djangoapps.student.management.commands.populate_created_on_site_user_attribute import * diff --git a/import_shims/lms/student/management/commands/recover_account.py b/import_shims/lms/student/management/commands/recover_account.py new file mode 100644 index 0000000000..cf1245c0e8 --- /dev/null +++ b/import_shims/lms/student/management/commands/recover_account.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.recover_account', 'common.djangoapps.student.management.commands.recover_account') + +from common.djangoapps.student.management.commands.recover_account import * diff --git a/import_shims/lms/student/management/commands/set_staff.py b/import_shims/lms/student/management/commands/set_staff.py new file mode 100644 index 0000000000..c4c5061af2 --- /dev/null +++ b/import_shims/lms/student/management/commands/set_staff.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.set_staff', 'common.djangoapps.student.management.commands.set_staff') + +from common.djangoapps.student.management.commands.set_staff import * diff --git a/import_shims/lms/student/management/commands/set_superuser.py b/import_shims/lms/student/management/commands/set_superuser.py new file mode 100644 index 0000000000..8e0a97af8c --- /dev/null +++ b/import_shims/lms/student/management/commands/set_superuser.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.set_superuser', 'common.djangoapps.student.management.commands.set_superuser') + +from common.djangoapps.student.management.commands.set_superuser import * diff --git a/import_shims/lms/student/management/commands/transfer_students.py b/import_shims/lms/student/management/commands/transfer_students.py new file mode 100644 index 0000000000..c2bd84fc0d --- /dev/null +++ b/import_shims/lms/student/management/commands/transfer_students.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.transfer_students', 'common.djangoapps.student.management.commands.transfer_students') + +from common.djangoapps.student.management.commands.transfer_students import * diff --git a/import_shims/lms/student/management/tests/__init__.py b/import_shims/lms/student/management/tests/__init__.py new file mode 100644 index 0000000000..b35860319d --- /dev/null +++ b/import_shims/lms/student/management/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests', 'common.djangoapps.student.management.tests') + +from common.djangoapps.student.management.tests import * diff --git a/import_shims/lms/student/management/tests/test_bulk_change_enrollment.py b/import_shims/lms/student/management/tests/test_bulk_change_enrollment.py new file mode 100644 index 0000000000..b88a92bf1c --- /dev/null +++ b/import_shims/lms/student/management/tests/test_bulk_change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_bulk_change_enrollment', 'common.djangoapps.student.management.tests.test_bulk_change_enrollment') + +from common.djangoapps.student.management.tests.test_bulk_change_enrollment import * diff --git a/import_shims/lms/student/management/tests/test_bulk_change_enrollment_csv.py b/import_shims/lms/student/management/tests/test_bulk_change_enrollment_csv.py new file mode 100644 index 0000000000..fddfe4309b --- /dev/null +++ b/import_shims/lms/student/management/tests/test_bulk_change_enrollment_csv.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_bulk_change_enrollment_csv', 'common.djangoapps.student.management.tests.test_bulk_change_enrollment_csv') + +from common.djangoapps.student.management.tests.test_bulk_change_enrollment_csv import * diff --git a/import_shims/lms/student/management/tests/test_bulk_unenroll.py b/import_shims/lms/student/management/tests/test_bulk_unenroll.py new file mode 100644 index 0000000000..02d67e09bc --- /dev/null +++ b/import_shims/lms/student/management/tests/test_bulk_unenroll.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_bulk_unenroll', 'common.djangoapps.student.management.tests.test_bulk_unenroll') + +from common.djangoapps.student.management.tests.test_bulk_unenroll import * diff --git a/import_shims/lms/student/management/tests/test_change_eligibility_deadline.py b/import_shims/lms/student/management/tests/test_change_eligibility_deadline.py new file mode 100644 index 0000000000..1e472a8c84 --- /dev/null +++ b/import_shims/lms/student/management/tests/test_change_eligibility_deadline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_change_eligibility_deadline', 'common.djangoapps.student.management.tests.test_change_eligibility_deadline') + +from common.djangoapps.student.management.tests.test_change_eligibility_deadline import * diff --git a/import_shims/lms/student/management/tests/test_change_enrollment.py b/import_shims/lms/student/management/tests/test_change_enrollment.py new file mode 100644 index 0000000000..0b6f3a109c --- /dev/null +++ b/import_shims/lms/student/management/tests/test_change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_change_enrollment', 'common.djangoapps.student.management.tests.test_change_enrollment') + +from common.djangoapps.student.management.tests.test_change_enrollment import * diff --git a/import_shims/lms/student/management/tests/test_change_enterprise_user_username.py b/import_shims/lms/student/management/tests/test_change_enterprise_user_username.py new file mode 100644 index 0000000000..f9eadb7c83 --- /dev/null +++ b/import_shims/lms/student/management/tests/test_change_enterprise_user_username.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_change_enterprise_user_username', 'common.djangoapps.student.management.tests.test_change_enterprise_user_username') + +from common.djangoapps.student.management.tests.test_change_enterprise_user_username import * diff --git a/import_shims/lms/student/management/tests/test_create_random_users.py b/import_shims/lms/student/management/tests/test_create_random_users.py new file mode 100644 index 0000000000..264a03c94c --- /dev/null +++ b/import_shims/lms/student/management/tests/test_create_random_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_create_random_users', 'common.djangoapps.student.management.tests.test_create_random_users') + +from common.djangoapps.student.management.tests.test_create_random_users import * diff --git a/import_shims/lms/student/management/tests/test_create_test_users.py b/import_shims/lms/student/management/tests/test_create_test_users.py new file mode 100644 index 0000000000..89fc5fdac9 --- /dev/null +++ b/import_shims/lms/student/management/tests/test_create_test_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_create_test_users', 'common.djangoapps.student.management.tests.test_create_test_users') + +from common.djangoapps.student.management.tests.test_create_test_users import * diff --git a/import_shims/lms/student/management/tests/test_export_staff_users.py b/import_shims/lms/student/management/tests/test_export_staff_users.py new file mode 100644 index 0000000000..c3b21aa5cf --- /dev/null +++ b/import_shims/lms/student/management/tests/test_export_staff_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_export_staff_users', 'common.djangoapps.student.management.tests.test_export_staff_users') + +from common.djangoapps.student.management.tests.test_export_staff_users import * diff --git a/import_shims/lms/student/management/tests/test_manage_group.py b/import_shims/lms/student/management/tests/test_manage_group.py new file mode 100644 index 0000000000..f17224ffcf --- /dev/null +++ b/import_shims/lms/student/management/tests/test_manage_group.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_manage_group', 'common.djangoapps.student.management.tests.test_manage_group') + +from common.djangoapps.student.management.tests.test_manage_group import * diff --git a/import_shims/lms/student/management/tests/test_manage_user.py b/import_shims/lms/student/management/tests/test_manage_user.py new file mode 100644 index 0000000000..134fc54344 --- /dev/null +++ b/import_shims/lms/student/management/tests/test_manage_user.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_manage_user', 'common.djangoapps.student.management.tests.test_manage_user') + +from common.djangoapps.student.management.tests.test_manage_user import * diff --git a/import_shims/lms/student/management/tests/test_populate_created_on_site_user_attribute.py b/import_shims/lms/student/management/tests/test_populate_created_on_site_user_attribute.py new file mode 100644 index 0000000000..f5e73645d2 --- /dev/null +++ b/import_shims/lms/student/management/tests/test_populate_created_on_site_user_attribute.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_populate_created_on_site_user_attribute', 'common.djangoapps.student.management.tests.test_populate_created_on_site_user_attribute') + +from common.djangoapps.student.management.tests.test_populate_created_on_site_user_attribute import * diff --git a/import_shims/lms/student/management/tests/test_recover_account.py b/import_shims/lms/student/management/tests/test_recover_account.py new file mode 100644 index 0000000000..1a975f8646 --- /dev/null +++ b/import_shims/lms/student/management/tests/test_recover_account.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_recover_account', 'common.djangoapps.student.management.tests.test_recover_account') + +from common.djangoapps.student.management.tests.test_recover_account import * diff --git a/import_shims/lms/student/management/tests/test_transfer_students.py b/import_shims/lms/student/management/tests/test_transfer_students.py new file mode 100644 index 0000000000..5a6abb78b5 --- /dev/null +++ b/import_shims/lms/student/management/tests/test_transfer_students.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_transfer_students', 'common.djangoapps.student.management.tests.test_transfer_students') + +from common.djangoapps.student.management.tests.test_transfer_students import * diff --git a/import_shims/lms/student/message_types.py b/import_shims/lms/student/message_types.py new file mode 100644 index 0000000000..991505cce5 --- /dev/null +++ b/import_shims/lms/student/message_types.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.message_types', 'common.djangoapps.student.message_types') + +from common.djangoapps.student.message_types import * diff --git a/import_shims/lms/student/middleware.py b/import_shims/lms/student/middleware.py new file mode 100644 index 0000000000..32fd8e15cb --- /dev/null +++ b/import_shims/lms/student/middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.middleware', 'common.djangoapps.student.middleware') + +from common.djangoapps.student.middleware import * diff --git a/import_shims/lms/student/models.py b/import_shims/lms/student/models.py new file mode 100644 index 0000000000..ec6e1c90c7 --- /dev/null +++ b/import_shims/lms/student/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.models', 'common.djangoapps.student.models') + +from common.djangoapps.student.models import * diff --git a/import_shims/lms/student/models_api.py b/import_shims/lms/student/models_api.py new file mode 100644 index 0000000000..66285099be --- /dev/null +++ b/import_shims/lms/student/models_api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.models_api', 'common.djangoapps.student.models_api') + +from common.djangoapps.student.models_api import * diff --git a/import_shims/lms/student/role_helpers.py b/import_shims/lms/student/role_helpers.py new file mode 100644 index 0000000000..66b45f6014 --- /dev/null +++ b/import_shims/lms/student/role_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.role_helpers', 'common.djangoapps.student.role_helpers') + +from common.djangoapps.student.role_helpers import * diff --git a/import_shims/lms/student/roles.py b/import_shims/lms/student/roles.py new file mode 100644 index 0000000000..11a028503a --- /dev/null +++ b/import_shims/lms/student/roles.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.roles', 'common.djangoapps.student.roles') + +from common.djangoapps.student.roles import * diff --git a/import_shims/lms/student/signals/__init__.py b/import_shims/lms/student/signals/__init__.py new file mode 100644 index 0000000000..db8390d484 --- /dev/null +++ b/import_shims/lms/student/signals/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.signals', 'common.djangoapps.student.signals') + +from common.djangoapps.student.signals import * diff --git a/import_shims/lms/student/signals/receivers.py b/import_shims/lms/student/signals/receivers.py new file mode 100644 index 0000000000..4ae80fd70f --- /dev/null +++ b/import_shims/lms/student/signals/receivers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.signals.receivers', 'common.djangoapps.student.signals.receivers') + +from common.djangoapps.student.signals.receivers import * diff --git a/import_shims/lms/student/signals/signals.py b/import_shims/lms/student/signals/signals.py new file mode 100644 index 0000000000..77c538a8f8 --- /dev/null +++ b/import_shims/lms/student/signals/signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.signals.signals', 'common.djangoapps.student.signals.signals') + +from common.djangoapps.student.signals.signals import * diff --git a/import_shims/lms/student/tasks.py b/import_shims/lms/student/tasks.py new file mode 100644 index 0000000000..3fcadcd2cd --- /dev/null +++ b/import_shims/lms/student/tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tasks', 'common.djangoapps.student.tasks') + +from common.djangoapps.student.tasks import * diff --git a/import_shims/lms/student/tests/__init__.py b/import_shims/lms/student/tests/__init__.py new file mode 100644 index 0000000000..c2c2e86438 --- /dev/null +++ b/import_shims/lms/student/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests', 'common.djangoapps.student.tests') + +from common.djangoapps.student.tests import * diff --git a/import_shims/lms/student/tests/factories.py b/import_shims/lms/student/tests/factories.py new file mode 100644 index 0000000000..554f730097 --- /dev/null +++ b/import_shims/lms/student/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.factories', 'common.djangoapps.student.tests.factories') + +from common.djangoapps.student.tests.factories import * diff --git a/import_shims/lms/student/tests/test_activate_account.py b/import_shims/lms/student/tests/test_activate_account.py new file mode 100644 index 0000000000..11446e4743 --- /dev/null +++ b/import_shims/lms/student/tests/test_activate_account.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_activate_account', 'common.djangoapps.student.tests.test_activate_account') + +from common.djangoapps.student.tests.test_activate_account import * diff --git a/import_shims/lms/student/tests/test_admin_views.py b/import_shims/lms/student/tests/test_admin_views.py new file mode 100644 index 0000000000..ffa4ae4acc --- /dev/null +++ b/import_shims/lms/student/tests/test_admin_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_admin_views', 'common.djangoapps.student.tests.test_admin_views') + +from common.djangoapps.student.tests.test_admin_views import * diff --git a/import_shims/lms/student/tests/test_authz.py b/import_shims/lms/student/tests/test_authz.py new file mode 100644 index 0000000000..f296a087db --- /dev/null +++ b/import_shims/lms/student/tests/test_authz.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_authz', 'common.djangoapps.student.tests.test_authz') + +from common.djangoapps.student.tests.test_authz import * diff --git a/import_shims/lms/student/tests/test_bulk_email_settings.py b/import_shims/lms/student/tests/test_bulk_email_settings.py new file mode 100644 index 0000000000..07002a4204 --- /dev/null +++ b/import_shims/lms/student/tests/test_bulk_email_settings.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_bulk_email_settings', 'common.djangoapps.student.tests.test_bulk_email_settings') + +from common.djangoapps.student.tests.test_bulk_email_settings import * diff --git a/import_shims/lms/student/tests/test_certificates.py b/import_shims/lms/student/tests/test_certificates.py new file mode 100644 index 0000000000..7bf9fc5ef5 --- /dev/null +++ b/import_shims/lms/student/tests/test_certificates.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_certificates', 'common.djangoapps.student.tests.test_certificates') + +from common.djangoapps.student.tests.test_certificates import * diff --git a/import_shims/lms/student/tests/test_configuration_overrides.py b/import_shims/lms/student/tests/test_configuration_overrides.py new file mode 100644 index 0000000000..996cfe3010 --- /dev/null +++ b/import_shims/lms/student/tests/test_configuration_overrides.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_configuration_overrides', 'common.djangoapps.student.tests.test_configuration_overrides') + +from common.djangoapps.student.tests.test_configuration_overrides import * diff --git a/import_shims/lms/student/tests/test_course_listing.py b/import_shims/lms/student/tests/test_course_listing.py new file mode 100644 index 0000000000..82b050a967 --- /dev/null +++ b/import_shims/lms/student/tests/test_course_listing.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_course_listing', 'common.djangoapps.student.tests.test_course_listing') + +from common.djangoapps.student.tests.test_course_listing import * diff --git a/import_shims/lms/student/tests/test_credit.py b/import_shims/lms/student/tests/test_credit.py new file mode 100644 index 0000000000..8c1b30260d --- /dev/null +++ b/import_shims/lms/student/tests/test_credit.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_credit', 'common.djangoapps.student.tests.test_credit') + +from common.djangoapps.student.tests.test_credit import * diff --git a/import_shims/lms/student/tests/test_email.py b/import_shims/lms/student/tests/test_email.py new file mode 100644 index 0000000000..dec38af30d --- /dev/null +++ b/import_shims/lms/student/tests/test_email.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_email', 'common.djangoapps.student.tests.test_email') + +from common.djangoapps.student.tests.test_email import * diff --git a/import_shims/lms/student/tests/test_enrollment.py b/import_shims/lms/student/tests/test_enrollment.py new file mode 100644 index 0000000000..49200a6439 --- /dev/null +++ b/import_shims/lms/student/tests/test_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_enrollment', 'common.djangoapps.student.tests.test_enrollment') + +from common.djangoapps.student.tests.test_enrollment import * diff --git a/import_shims/lms/student/tests/test_events.py b/import_shims/lms/student/tests/test_events.py new file mode 100644 index 0000000000..e9a5f5e56c --- /dev/null +++ b/import_shims/lms/student/tests/test_events.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_events', 'common.djangoapps.student.tests.test_events') + +from common.djangoapps.student.tests.test_events import * diff --git a/import_shims/lms/student/tests/test_helpers.py b/import_shims/lms/student/tests/test_helpers.py new file mode 100644 index 0000000000..a8bd564796 --- /dev/null +++ b/import_shims/lms/student/tests/test_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_helpers', 'common.djangoapps.student.tests.test_helpers') + +from common.djangoapps.student.tests.test_helpers import * diff --git a/import_shims/lms/student/tests/test_linkedin.py b/import_shims/lms/student/tests/test_linkedin.py new file mode 100644 index 0000000000..8eea4d4bc6 --- /dev/null +++ b/import_shims/lms/student/tests/test_linkedin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_linkedin', 'common.djangoapps.student.tests.test_linkedin') + +from common.djangoapps.student.tests.test_linkedin import * diff --git a/import_shims/lms/student/tests/test_long_username_email.py b/import_shims/lms/student/tests/test_long_username_email.py new file mode 100644 index 0000000000..7a39f4b1a7 --- /dev/null +++ b/import_shims/lms/student/tests/test_long_username_email.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_long_username_email', 'common.djangoapps.student.tests.test_long_username_email') + +from common.djangoapps.student.tests.test_long_username_email import * diff --git a/import_shims/lms/student/tests/test_models.py b/import_shims/lms/student/tests/test_models.py new file mode 100644 index 0000000000..637d9b349e --- /dev/null +++ b/import_shims/lms/student/tests/test_models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_models', 'common.djangoapps.student.tests.test_models') + +from common.djangoapps.student.tests.test_models import * diff --git a/import_shims/lms/student/tests/test_parental_controls.py b/import_shims/lms/student/tests/test_parental_controls.py new file mode 100644 index 0000000000..62c35378a8 --- /dev/null +++ b/import_shims/lms/student/tests/test_parental_controls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_parental_controls', 'common.djangoapps.student.tests.test_parental_controls') + +from common.djangoapps.student.tests.test_parental_controls import * diff --git a/import_shims/lms/student/tests/test_password_policy.py b/import_shims/lms/student/tests/test_password_policy.py new file mode 100644 index 0000000000..d65baf1651 --- /dev/null +++ b/import_shims/lms/student/tests/test_password_policy.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_password_policy', 'common.djangoapps.student.tests.test_password_policy') + +from common.djangoapps.student.tests.test_password_policy import * diff --git a/import_shims/lms/student/tests/test_receivers.py b/import_shims/lms/student/tests/test_receivers.py new file mode 100644 index 0000000000..3cf2563810 --- /dev/null +++ b/import_shims/lms/student/tests/test_receivers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_receivers', 'common.djangoapps.student.tests.test_receivers') + +from common.djangoapps.student.tests.test_receivers import * diff --git a/import_shims/lms/student/tests/test_recent_enrollments.py b/import_shims/lms/student/tests/test_recent_enrollments.py new file mode 100644 index 0000000000..1e59dae51e --- /dev/null +++ b/import_shims/lms/student/tests/test_recent_enrollments.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_recent_enrollments', 'common.djangoapps.student.tests.test_recent_enrollments') + +from common.djangoapps.student.tests.test_recent_enrollments import * diff --git a/import_shims/lms/student/tests/test_refunds.py b/import_shims/lms/student/tests/test_refunds.py new file mode 100644 index 0000000000..ac2684d714 --- /dev/null +++ b/import_shims/lms/student/tests/test_refunds.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_refunds', 'common.djangoapps.student.tests.test_refunds') + +from common.djangoapps.student.tests.test_refunds import * diff --git a/import_shims/lms/student/tests/test_retirement.py b/import_shims/lms/student/tests/test_retirement.py new file mode 100644 index 0000000000..40e9e42460 --- /dev/null +++ b/import_shims/lms/student/tests/test_retirement.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_retirement', 'common.djangoapps.student.tests.test_retirement') + +from common.djangoapps.student.tests.test_retirement import * diff --git a/import_shims/lms/student/tests/test_roles.py b/import_shims/lms/student/tests/test_roles.py new file mode 100644 index 0000000000..02da10e034 --- /dev/null +++ b/import_shims/lms/student/tests/test_roles.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_roles', 'common.djangoapps.student.tests.test_roles') + +from common.djangoapps.student.tests.test_roles import * diff --git a/import_shims/lms/student/tests/test_tasks.py b/import_shims/lms/student/tests/test_tasks.py new file mode 100644 index 0000000000..ec3a26452f --- /dev/null +++ b/import_shims/lms/student/tests/test_tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_tasks', 'common.djangoapps.student.tests.test_tasks') + +from common.djangoapps.student.tests.test_tasks import * diff --git a/import_shims/lms/student/tests/test_user_profile_properties.py b/import_shims/lms/student/tests/test_user_profile_properties.py new file mode 100644 index 0000000000..868d0efa0f --- /dev/null +++ b/import_shims/lms/student/tests/test_user_profile_properties.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_user_profile_properties', 'common.djangoapps.student.tests.test_user_profile_properties') + +from common.djangoapps.student.tests.test_user_profile_properties import * diff --git a/import_shims/lms/student/tests/test_userstanding.py b/import_shims/lms/student/tests/test_userstanding.py new file mode 100644 index 0000000000..2eabd768f0 --- /dev/null +++ b/import_shims/lms/student/tests/test_userstanding.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_userstanding', 'common.djangoapps.student.tests.test_userstanding') + +from common.djangoapps.student.tests.test_userstanding import * diff --git a/import_shims/lms/student/tests/test_verification_status.py b/import_shims/lms/student/tests/test_verification_status.py new file mode 100644 index 0000000000..ba15fd119b --- /dev/null +++ b/import_shims/lms/student/tests/test_verification_status.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_verification_status', 'common.djangoapps.student.tests.test_verification_status') + +from common.djangoapps.student.tests.test_verification_status import * diff --git a/import_shims/lms/student/tests/test_views.py b/import_shims/lms/student/tests/test_views.py new file mode 100644 index 0000000000..44d4ef720b --- /dev/null +++ b/import_shims/lms/student/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_views', 'common.djangoapps.student.tests.test_views') + +from common.djangoapps.student.tests.test_views import * diff --git a/import_shims/lms/student/tests/tests.py b/import_shims/lms/student/tests/tests.py new file mode 100644 index 0000000000..11c6f9943f --- /dev/null +++ b/import_shims/lms/student/tests/tests.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.tests', 'common.djangoapps.student.tests.tests') + +from common.djangoapps.student.tests.tests import * diff --git a/import_shims/lms/student/text_me_the_app.py b/import_shims/lms/student/text_me_the_app.py new file mode 100644 index 0000000000..cf97b1f89c --- /dev/null +++ b/import_shims/lms/student/text_me_the_app.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.text_me_the_app', 'common.djangoapps.student.text_me_the_app') + +from common.djangoapps.student.text_me_the_app import * diff --git a/import_shims/lms/student/urls.py b/import_shims/lms/student/urls.py new file mode 100644 index 0000000000..d1c126d342 --- /dev/null +++ b/import_shims/lms/student/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.urls', 'common.djangoapps.student.urls') + +from common.djangoapps.student.urls import * diff --git a/import_shims/lms/student/views/__init__.py b/import_shims/lms/student/views/__init__.py new file mode 100644 index 0000000000..2d3c117990 --- /dev/null +++ b/import_shims/lms/student/views/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.views', 'common.djangoapps.student.views') + +from common.djangoapps.student.views import * diff --git a/import_shims/lms/student/views/dashboard.py b/import_shims/lms/student/views/dashboard.py new file mode 100644 index 0000000000..0467632cb3 --- /dev/null +++ b/import_shims/lms/student/views/dashboard.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.views.dashboard', 'common.djangoapps.student.views.dashboard') + +from common.djangoapps.student.views.dashboard import * diff --git a/import_shims/lms/student/views/management.py b/import_shims/lms/student/views/management.py new file mode 100644 index 0000000000..eacbe8f2ae --- /dev/null +++ b/import_shims/lms/student/views/management.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.views.management', 'common.djangoapps.student.views.management') + +from common.djangoapps.student.views.management import * diff --git a/import_shims/lms/terrain/__init__.py b/import_shims/lms/terrain/__init__.py new file mode 100644 index 0000000000..4a63a99b3d --- /dev/null +++ b/import_shims/lms/terrain/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain', 'common.djangoapps.terrain') + +from common.djangoapps.terrain import * diff --git a/import_shims/lms/terrain/stubs/__init__.py b/import_shims/lms/terrain/stubs/__init__.py new file mode 100644 index 0000000000..852fb4d5cf --- /dev/null +++ b/import_shims/lms/terrain/stubs/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs', 'common.djangoapps.terrain.stubs') + +from common.djangoapps.terrain.stubs import * diff --git a/import_shims/lms/terrain/stubs/catalog.py b/import_shims/lms/terrain/stubs/catalog.py new file mode 100644 index 0000000000..2619f93d53 --- /dev/null +++ b/import_shims/lms/terrain/stubs/catalog.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.catalog', 'common.djangoapps.terrain.stubs.catalog') + +from common.djangoapps.terrain.stubs.catalog import * diff --git a/import_shims/lms/terrain/stubs/comments.py b/import_shims/lms/terrain/stubs/comments.py new file mode 100644 index 0000000000..ebdb78821e --- /dev/null +++ b/import_shims/lms/terrain/stubs/comments.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.comments', 'common.djangoapps.terrain.stubs.comments') + +from common.djangoapps.terrain.stubs.comments import * diff --git a/import_shims/lms/terrain/stubs/ecommerce.py b/import_shims/lms/terrain/stubs/ecommerce.py new file mode 100644 index 0000000000..a56f7022b4 --- /dev/null +++ b/import_shims/lms/terrain/stubs/ecommerce.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.ecommerce', 'common.djangoapps.terrain.stubs.ecommerce') + +from common.djangoapps.terrain.stubs.ecommerce import * diff --git a/import_shims/lms/terrain/stubs/edxnotes.py b/import_shims/lms/terrain/stubs/edxnotes.py new file mode 100644 index 0000000000..55240506cf --- /dev/null +++ b/import_shims/lms/terrain/stubs/edxnotes.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.edxnotes', 'common.djangoapps.terrain.stubs.edxnotes') + +from common.djangoapps.terrain.stubs.edxnotes import * diff --git a/import_shims/lms/terrain/stubs/http.py b/import_shims/lms/terrain/stubs/http.py new file mode 100644 index 0000000000..d587bf0b9b --- /dev/null +++ b/import_shims/lms/terrain/stubs/http.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.http', 'common.djangoapps.terrain.stubs.http') + +from common.djangoapps.terrain.stubs.http import * diff --git a/import_shims/lms/terrain/stubs/lti.py b/import_shims/lms/terrain/stubs/lti.py new file mode 100644 index 0000000000..594fa9866b --- /dev/null +++ b/import_shims/lms/terrain/stubs/lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.lti', 'common.djangoapps.terrain.stubs.lti') + +from common.djangoapps.terrain.stubs.lti import * diff --git a/import_shims/lms/terrain/stubs/start.py b/import_shims/lms/terrain/stubs/start.py new file mode 100644 index 0000000000..21bee3437c --- /dev/null +++ b/import_shims/lms/terrain/stubs/start.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.start', 'common.djangoapps.terrain.stubs.start') + +from common.djangoapps.terrain.stubs.start import * diff --git a/import_shims/lms/terrain/stubs/tests/__init__.py b/import_shims/lms/terrain/stubs/tests/__init__.py new file mode 100644 index 0000000000..3528d5d4a5 --- /dev/null +++ b/import_shims/lms/terrain/stubs/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests', 'common.djangoapps.terrain.stubs.tests') + +from common.djangoapps.terrain.stubs.tests import * diff --git a/import_shims/lms/terrain/stubs/tests/test_edxnotes.py b/import_shims/lms/terrain/stubs/tests/test_edxnotes.py new file mode 100644 index 0000000000..fd21918635 --- /dev/null +++ b/import_shims/lms/terrain/stubs/tests/test_edxnotes.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_edxnotes', 'common.djangoapps.terrain.stubs.tests.test_edxnotes') + +from common.djangoapps.terrain.stubs.tests.test_edxnotes import * diff --git a/import_shims/lms/terrain/stubs/tests/test_http.py b/import_shims/lms/terrain/stubs/tests/test_http.py new file mode 100644 index 0000000000..8c8980f019 --- /dev/null +++ b/import_shims/lms/terrain/stubs/tests/test_http.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_http', 'common.djangoapps.terrain.stubs.tests.test_http') + +from common.djangoapps.terrain.stubs.tests.test_http import * diff --git a/import_shims/lms/terrain/stubs/tests/test_lti_stub.py b/import_shims/lms/terrain/stubs/tests/test_lti_stub.py new file mode 100644 index 0000000000..e718be3881 --- /dev/null +++ b/import_shims/lms/terrain/stubs/tests/test_lti_stub.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_lti_stub', 'common.djangoapps.terrain.stubs.tests.test_lti_stub') + +from common.djangoapps.terrain.stubs.tests.test_lti_stub import * diff --git a/import_shims/lms/terrain/stubs/tests/test_video.py b/import_shims/lms/terrain/stubs/tests/test_video.py new file mode 100644 index 0000000000..a2cd949a40 --- /dev/null +++ b/import_shims/lms/terrain/stubs/tests/test_video.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_video', 'common.djangoapps.terrain.stubs.tests.test_video') + +from common.djangoapps.terrain.stubs.tests.test_video import * diff --git a/import_shims/lms/terrain/stubs/tests/test_xqueue_stub.py b/import_shims/lms/terrain/stubs/tests/test_xqueue_stub.py new file mode 100644 index 0000000000..7adbabdb2b --- /dev/null +++ b/import_shims/lms/terrain/stubs/tests/test_xqueue_stub.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_xqueue_stub', 'common.djangoapps.terrain.stubs.tests.test_xqueue_stub') + +from common.djangoapps.terrain.stubs.tests.test_xqueue_stub import * diff --git a/import_shims/lms/terrain/stubs/tests/test_youtube_stub.py b/import_shims/lms/terrain/stubs/tests/test_youtube_stub.py new file mode 100644 index 0000000000..4e188c2376 --- /dev/null +++ b/import_shims/lms/terrain/stubs/tests/test_youtube_stub.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_youtube_stub', 'common.djangoapps.terrain.stubs.tests.test_youtube_stub') + +from common.djangoapps.terrain.stubs.tests.test_youtube_stub import * diff --git a/import_shims/lms/terrain/stubs/video_source.py b/import_shims/lms/terrain/stubs/video_source.py new file mode 100644 index 0000000000..798753615a --- /dev/null +++ b/import_shims/lms/terrain/stubs/video_source.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.video_source', 'common.djangoapps.terrain.stubs.video_source') + +from common.djangoapps.terrain.stubs.video_source import * diff --git a/import_shims/lms/terrain/stubs/xqueue.py b/import_shims/lms/terrain/stubs/xqueue.py new file mode 100644 index 0000000000..6ece16501f --- /dev/null +++ b/import_shims/lms/terrain/stubs/xqueue.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.xqueue', 'common.djangoapps.terrain.stubs.xqueue') + +from common.djangoapps.terrain.stubs.xqueue import * diff --git a/import_shims/lms/terrain/stubs/youtube.py b/import_shims/lms/terrain/stubs/youtube.py new file mode 100644 index 0000000000..a84da9ee22 --- /dev/null +++ b/import_shims/lms/terrain/stubs/youtube.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.youtube', 'common.djangoapps.terrain.stubs.youtube') + +from common.djangoapps.terrain.stubs.youtube import * diff --git a/import_shims/lms/third_party_auth/__init__.py b/import_shims/lms/third_party_auth/__init__.py new file mode 100644 index 0000000000..18c19d988a --- /dev/null +++ b/import_shims/lms/third_party_auth/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth', 'common.djangoapps.third_party_auth') + +from common.djangoapps.third_party_auth import * diff --git a/import_shims/lms/third_party_auth/admin.py b/import_shims/lms/third_party_auth/admin.py new file mode 100644 index 0000000000..2233cab3b5 --- /dev/null +++ b/import_shims/lms/third_party_auth/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.admin', 'common.djangoapps.third_party_auth.admin') + +from common.djangoapps.third_party_auth.admin import * diff --git a/import_shims/lms/third_party_auth/api/__init__.py b/import_shims/lms/third_party_auth/api/__init__.py new file mode 100644 index 0000000000..5a5a444324 --- /dev/null +++ b/import_shims/lms/third_party_auth/api/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api', 'common.djangoapps.third_party_auth.api') + +from common.djangoapps.third_party_auth.api import * diff --git a/import_shims/lms/third_party_auth/api/permissions.py b/import_shims/lms/third_party_auth/api/permissions.py new file mode 100644 index 0000000000..501ced05f3 --- /dev/null +++ b/import_shims/lms/third_party_auth/api/permissions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.permissions', 'common.djangoapps.third_party_auth.api.permissions') + +from common.djangoapps.third_party_auth.api.permissions import * diff --git a/import_shims/lms/third_party_auth/api/serializers.py b/import_shims/lms/third_party_auth/api/serializers.py new file mode 100644 index 0000000000..e70908c945 --- /dev/null +++ b/import_shims/lms/third_party_auth/api/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.serializers', 'common.djangoapps.third_party_auth.api.serializers') + +from common.djangoapps.third_party_auth.api.serializers import * diff --git a/import_shims/lms/third_party_auth/api/tests/__init__.py b/import_shims/lms/third_party_auth/api/tests/__init__.py new file mode 100644 index 0000000000..ef7e02f485 --- /dev/null +++ b/import_shims/lms/third_party_auth/api/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.tests', 'common.djangoapps.third_party_auth.api.tests') + +from common.djangoapps.third_party_auth.api.tests import * diff --git a/import_shims/lms/third_party_auth/api/tests/test_permissions.py b/import_shims/lms/third_party_auth/api/tests/test_permissions.py new file mode 100644 index 0000000000..df77e14f03 --- /dev/null +++ b/import_shims/lms/third_party_auth/api/tests/test_permissions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.tests.test_permissions', 'common.djangoapps.third_party_auth.api.tests.test_permissions') + +from common.djangoapps.third_party_auth.api.tests.test_permissions import * diff --git a/import_shims/lms/third_party_auth/api/tests/test_views.py b/import_shims/lms/third_party_auth/api/tests/test_views.py new file mode 100644 index 0000000000..4996711fa6 --- /dev/null +++ b/import_shims/lms/third_party_auth/api/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.tests.test_views', 'common.djangoapps.third_party_auth.api.tests.test_views') + +from common.djangoapps.third_party_auth.api.tests.test_views import * diff --git a/import_shims/lms/third_party_auth/api/urls.py b/import_shims/lms/third_party_auth/api/urls.py new file mode 100644 index 0000000000..0f02453a55 --- /dev/null +++ b/import_shims/lms/third_party_auth/api/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.urls', 'common.djangoapps.third_party_auth.api.urls') + +from common.djangoapps.third_party_auth.api.urls import * diff --git a/import_shims/lms/third_party_auth/api/utils.py b/import_shims/lms/third_party_auth/api/utils.py new file mode 100644 index 0000000000..1eabc8a86a --- /dev/null +++ b/import_shims/lms/third_party_auth/api/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.utils', 'common.djangoapps.third_party_auth.api.utils') + +from common.djangoapps.third_party_auth.api.utils import * diff --git a/import_shims/lms/third_party_auth/api/views.py b/import_shims/lms/third_party_auth/api/views.py new file mode 100644 index 0000000000..52b63ed5ad --- /dev/null +++ b/import_shims/lms/third_party_auth/api/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.views', 'common.djangoapps.third_party_auth.api.views') + +from common.djangoapps.third_party_auth.api.views import * diff --git a/import_shims/lms/third_party_auth/appleid.py b/import_shims/lms/third_party_auth/appleid.py new file mode 100644 index 0000000000..84956cfa5a --- /dev/null +++ b/import_shims/lms/third_party_auth/appleid.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.appleid', 'common.djangoapps.third_party_auth.appleid') + +from common.djangoapps.third_party_auth.appleid import * diff --git a/import_shims/lms/third_party_auth/apps.py b/import_shims/lms/third_party_auth/apps.py new file mode 100644 index 0000000000..22f79f231c --- /dev/null +++ b/import_shims/lms/third_party_auth/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.apps', 'common.djangoapps.third_party_auth.apps') + +from common.djangoapps.third_party_auth.apps import * diff --git a/import_shims/lms/third_party_auth/decorators.py b/import_shims/lms/third_party_auth/decorators.py new file mode 100644 index 0000000000..fc3872961e --- /dev/null +++ b/import_shims/lms/third_party_auth/decorators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.decorators', 'common.djangoapps.third_party_auth.decorators') + +from common.djangoapps.third_party_auth.decorators import * diff --git a/import_shims/lms/third_party_auth/dummy.py b/import_shims/lms/third_party_auth/dummy.py new file mode 100644 index 0000000000..97c9709669 --- /dev/null +++ b/import_shims/lms/third_party_auth/dummy.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.dummy', 'common.djangoapps.third_party_auth.dummy') + +from common.djangoapps.third_party_auth.dummy import * diff --git a/import_shims/lms/third_party_auth/exceptions.py b/import_shims/lms/third_party_auth/exceptions.py new file mode 100644 index 0000000000..55958ad7fc --- /dev/null +++ b/import_shims/lms/third_party_auth/exceptions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.exceptions', 'common.djangoapps.third_party_auth.exceptions') + +from common.djangoapps.third_party_auth.exceptions import * diff --git a/import_shims/lms/third_party_auth/identityserver3.py b/import_shims/lms/third_party_auth/identityserver3.py new file mode 100644 index 0000000000..379e9e2cdb --- /dev/null +++ b/import_shims/lms/third_party_auth/identityserver3.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.identityserver3', 'common.djangoapps.third_party_auth.identityserver3') + +from common.djangoapps.third_party_auth.identityserver3 import * diff --git a/import_shims/lms/third_party_auth/lti.py b/import_shims/lms/third_party_auth/lti.py new file mode 100644 index 0000000000..979ba20da5 --- /dev/null +++ b/import_shims/lms/third_party_auth/lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.lti', 'common.djangoapps.third_party_auth.lti') + +from common.djangoapps.third_party_auth.lti import * diff --git a/import_shims/lms/third_party_auth/management/__init__.py b/import_shims/lms/third_party_auth/management/__init__.py new file mode 100644 index 0000000000..18e1bc948d --- /dev/null +++ b/import_shims/lms/third_party_auth/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management', 'common.djangoapps.third_party_auth.management') + +from common.djangoapps.third_party_auth.management import * diff --git a/import_shims/lms/third_party_auth/management/commands/__init__.py b/import_shims/lms/third_party_auth/management/commands/__init__.py new file mode 100644 index 0000000000..98268c9250 --- /dev/null +++ b/import_shims/lms/third_party_auth/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands', 'common.djangoapps.third_party_auth.management.commands') + +from common.djangoapps.third_party_auth.management.commands import * diff --git a/import_shims/lms/third_party_auth/management/commands/remove_social_auth_users.py b/import_shims/lms/third_party_auth/management/commands/remove_social_auth_users.py new file mode 100644 index 0000000000..1bd3cc7bc7 --- /dev/null +++ b/import_shims/lms/third_party_auth/management/commands/remove_social_auth_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.remove_social_auth_users', 'common.djangoapps.third_party_auth.management.commands.remove_social_auth_users') + +from common.djangoapps.third_party_auth.management.commands.remove_social_auth_users import * diff --git a/import_shims/lms/third_party_auth/management/commands/saml.py b/import_shims/lms/third_party_auth/management/commands/saml.py new file mode 100644 index 0000000000..7aab3a9ca4 --- /dev/null +++ b/import_shims/lms/third_party_auth/management/commands/saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.saml', 'common.djangoapps.third_party_auth.management.commands.saml') + +from common.djangoapps.third_party_auth.management.commands.saml import * diff --git a/import_shims/lms/third_party_auth/management/commands/tests/__init__.py b/import_shims/lms/third_party_auth/management/commands/tests/__init__.py new file mode 100644 index 0000000000..a3cdc2be0e --- /dev/null +++ b/import_shims/lms/third_party_auth/management/commands/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.tests', 'common.djangoapps.third_party_auth.management.commands.tests') + +from common.djangoapps.third_party_auth.management.commands.tests import * diff --git a/import_shims/lms/third_party_auth/management/commands/tests/test_remove_social_auth_users.py b/import_shims/lms/third_party_auth/management/commands/tests/test_remove_social_auth_users.py new file mode 100644 index 0000000000..f86e17ea62 --- /dev/null +++ b/import_shims/lms/third_party_auth/management/commands/tests/test_remove_social_auth_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.tests.test_remove_social_auth_users', 'common.djangoapps.third_party_auth.management.commands.tests.test_remove_social_auth_users') + +from common.djangoapps.third_party_auth.management.commands.tests.test_remove_social_auth_users import * diff --git a/import_shims/lms/third_party_auth/management/commands/tests/test_saml.py b/import_shims/lms/third_party_auth/management/commands/tests/test_saml.py new file mode 100644 index 0000000000..e82cbb3be3 --- /dev/null +++ b/import_shims/lms/third_party_auth/management/commands/tests/test_saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.tests.test_saml', 'common.djangoapps.third_party_auth.management.commands.tests.test_saml') + +from common.djangoapps.third_party_auth.management.commands.tests.test_saml import * diff --git a/import_shims/lms/third_party_auth/middleware.py b/import_shims/lms/third_party_auth/middleware.py new file mode 100644 index 0000000000..f0eedcfd61 --- /dev/null +++ b/import_shims/lms/third_party_auth/middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.middleware', 'common.djangoapps.third_party_auth.middleware') + +from common.djangoapps.third_party_auth.middleware import * diff --git a/import_shims/lms/third_party_auth/models.py b/import_shims/lms/third_party_auth/models.py new file mode 100644 index 0000000000..0a6302c7e0 --- /dev/null +++ b/import_shims/lms/third_party_auth/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.models', 'common.djangoapps.third_party_auth.models') + +from common.djangoapps.third_party_auth.models import * diff --git a/import_shims/lms/third_party_auth/pipeline.py b/import_shims/lms/third_party_auth/pipeline.py new file mode 100644 index 0000000000..2ec9cab7ed --- /dev/null +++ b/import_shims/lms/third_party_auth/pipeline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.pipeline', 'common.djangoapps.third_party_auth.pipeline') + +from common.djangoapps.third_party_auth.pipeline import * diff --git a/import_shims/lms/third_party_auth/provider.py b/import_shims/lms/third_party_auth/provider.py new file mode 100644 index 0000000000..a68bf83471 --- /dev/null +++ b/import_shims/lms/third_party_auth/provider.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.provider', 'common.djangoapps.third_party_auth.provider') + +from common.djangoapps.third_party_auth.provider import * diff --git a/import_shims/lms/third_party_auth/saml.py b/import_shims/lms/third_party_auth/saml.py new file mode 100644 index 0000000000..358ef19b7e --- /dev/null +++ b/import_shims/lms/third_party_auth/saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml', 'common.djangoapps.third_party_auth.saml') + +from common.djangoapps.third_party_auth.saml import * diff --git a/import_shims/lms/third_party_auth/saml_configuration/__init__.py b/import_shims/lms/third_party_auth/saml_configuration/__init__.py new file mode 100644 index 0000000000..2286cc1963 --- /dev/null +++ b/import_shims/lms/third_party_auth/saml_configuration/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration', 'common.djangoapps.third_party_auth.saml_configuration') + +from common.djangoapps.third_party_auth.saml_configuration import * diff --git a/import_shims/lms/third_party_auth/saml_configuration/serializers.py b/import_shims/lms/third_party_auth/saml_configuration/serializers.py new file mode 100644 index 0000000000..1a753b64af --- /dev/null +++ b/import_shims/lms/third_party_auth/saml_configuration/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.serializers', 'common.djangoapps.third_party_auth.saml_configuration.serializers') + +from common.djangoapps.third_party_auth.saml_configuration.serializers import * diff --git a/import_shims/lms/third_party_auth/saml_configuration/tests/__init__.py b/import_shims/lms/third_party_auth/saml_configuration/tests/__init__.py new file mode 100644 index 0000000000..8633561cce --- /dev/null +++ b/import_shims/lms/third_party_auth/saml_configuration/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.tests', 'common.djangoapps.third_party_auth.saml_configuration.tests') + +from common.djangoapps.third_party_auth.saml_configuration.tests import * diff --git a/import_shims/lms/third_party_auth/saml_configuration/tests/test_saml_configuration.py b/import_shims/lms/third_party_auth/saml_configuration/tests/test_saml_configuration.py new file mode 100644 index 0000000000..0ea750287e --- /dev/null +++ b/import_shims/lms/third_party_auth/saml_configuration/tests/test_saml_configuration.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.tests.test_saml_configuration', 'common.djangoapps.third_party_auth.saml_configuration.tests.test_saml_configuration') + +from common.djangoapps.third_party_auth.saml_configuration.tests.test_saml_configuration import * diff --git a/import_shims/lms/third_party_auth/saml_configuration/urls.py b/import_shims/lms/third_party_auth/saml_configuration/urls.py new file mode 100644 index 0000000000..031d3ae318 --- /dev/null +++ b/import_shims/lms/third_party_auth/saml_configuration/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.urls', 'common.djangoapps.third_party_auth.saml_configuration.urls') + +from common.djangoapps.third_party_auth.saml_configuration.urls import * diff --git a/import_shims/lms/third_party_auth/saml_configuration/views.py b/import_shims/lms/third_party_auth/saml_configuration/views.py new file mode 100644 index 0000000000..89520150e3 --- /dev/null +++ b/import_shims/lms/third_party_auth/saml_configuration/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.views', 'common.djangoapps.third_party_auth.saml_configuration.views') + +from common.djangoapps.third_party_auth.saml_configuration.views import * diff --git a/import_shims/lms/third_party_auth/samlproviderconfig/__init__.py b/import_shims/lms/third_party_auth/samlproviderconfig/__init__.py new file mode 100644 index 0000000000..c297bff8f9 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderconfig/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig', 'common.djangoapps.third_party_auth.samlproviderconfig') + +from common.djangoapps.third_party_auth.samlproviderconfig import * diff --git a/import_shims/lms/third_party_auth/samlproviderconfig/serializers.py b/import_shims/lms/third_party_auth/samlproviderconfig/serializers.py new file mode 100644 index 0000000000..5fae240c85 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderconfig/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.serializers', 'common.djangoapps.third_party_auth.samlproviderconfig.serializers') + +from common.djangoapps.third_party_auth.samlproviderconfig.serializers import * diff --git a/import_shims/lms/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py b/import_shims/lms/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py new file mode 100644 index 0000000000..c3dc1adeef --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.tests.test_samlproviderconfig', 'common.djangoapps.third_party_auth.samlproviderconfig.tests.test_samlproviderconfig') + +from common.djangoapps.third_party_auth.samlproviderconfig.tests.test_samlproviderconfig import * diff --git a/import_shims/lms/third_party_auth/samlproviderconfig/urls.py b/import_shims/lms/third_party_auth/samlproviderconfig/urls.py new file mode 100644 index 0000000000..e1376df3dd --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderconfig/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.urls', 'common.djangoapps.third_party_auth.samlproviderconfig.urls') + +from common.djangoapps.third_party_auth.samlproviderconfig.urls import * diff --git a/import_shims/lms/third_party_auth/samlproviderconfig/views.py b/import_shims/lms/third_party_auth/samlproviderconfig/views.py new file mode 100644 index 0000000000..021f807ef7 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderconfig/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.views', 'common.djangoapps.third_party_auth.samlproviderconfig.views') + +from common.djangoapps.third_party_auth.samlproviderconfig.views import * diff --git a/import_shims/lms/third_party_auth/samlproviderdata/__init__.py b/import_shims/lms/third_party_auth/samlproviderdata/__init__.py new file mode 100644 index 0000000000..4393e67589 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderdata/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata', 'common.djangoapps.third_party_auth.samlproviderdata') + +from common.djangoapps.third_party_auth.samlproviderdata import * diff --git a/import_shims/lms/third_party_auth/samlproviderdata/serializers.py b/import_shims/lms/third_party_auth/samlproviderdata/serializers.py new file mode 100644 index 0000000000..2749bf8941 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderdata/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.serializers', 'common.djangoapps.third_party_auth.samlproviderdata.serializers') + +from common.djangoapps.third_party_auth.samlproviderdata.serializers import * diff --git a/import_shims/lms/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py b/import_shims/lms/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py new file mode 100644 index 0000000000..5ce225f158 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.tests.test_samlproviderdata', 'common.djangoapps.third_party_auth.samlproviderdata.tests.test_samlproviderdata') + +from common.djangoapps.third_party_auth.samlproviderdata.tests.test_samlproviderdata import * diff --git a/import_shims/lms/third_party_auth/samlproviderdata/urls.py b/import_shims/lms/third_party_auth/samlproviderdata/urls.py new file mode 100644 index 0000000000..558a980643 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderdata/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.urls', 'common.djangoapps.third_party_auth.samlproviderdata.urls') + +from common.djangoapps.third_party_auth.samlproviderdata.urls import * diff --git a/import_shims/lms/third_party_auth/samlproviderdata/views.py b/import_shims/lms/third_party_auth/samlproviderdata/views.py new file mode 100644 index 0000000000..8121174727 --- /dev/null +++ b/import_shims/lms/third_party_auth/samlproviderdata/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.views', 'common.djangoapps.third_party_auth.samlproviderdata.views') + +from common.djangoapps.third_party_auth.samlproviderdata.views import * diff --git a/import_shims/lms/third_party_auth/settings.py b/import_shims/lms/third_party_auth/settings.py new file mode 100644 index 0000000000..6701b7c179 --- /dev/null +++ b/import_shims/lms/third_party_auth/settings.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.settings', 'common.djangoapps.third_party_auth.settings') + +from common.djangoapps.third_party_auth.settings import * diff --git a/import_shims/lms/third_party_auth/strategy.py b/import_shims/lms/third_party_auth/strategy.py new file mode 100644 index 0000000000..df95f86f62 --- /dev/null +++ b/import_shims/lms/third_party_auth/strategy.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.strategy', 'common.djangoapps.third_party_auth.strategy') + +from common.djangoapps.third_party_auth.strategy import * diff --git a/import_shims/lms/third_party_auth/tasks.py b/import_shims/lms/third_party_auth/tasks.py new file mode 100644 index 0000000000..7220e2241e --- /dev/null +++ b/import_shims/lms/third_party_auth/tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tasks', 'common.djangoapps.third_party_auth.tasks') + +from common.djangoapps.third_party_auth.tasks import * diff --git a/import_shims/lms/third_party_auth/tests/__init__.py b/import_shims/lms/third_party_auth/tests/__init__.py new file mode 100644 index 0000000000..3a7bad8e5d --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests', 'common.djangoapps.third_party_auth.tests') + +from common.djangoapps.third_party_auth.tests import * diff --git a/import_shims/lms/third_party_auth/tests/data/__init__.py b/import_shims/lms/third_party_auth/tests/data/__init__.py new file mode 100644 index 0000000000..046acef654 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/data/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.data', 'common.djangoapps.third_party_auth.tests.data') + +from common.djangoapps.third_party_auth.tests.data import * diff --git a/import_shims/lms/third_party_auth/tests/data/saml_identity_provider_mock_data.py b/import_shims/lms/third_party_auth/tests/data/saml_identity_provider_mock_data.py new file mode 100644 index 0000000000..b3df5bac88 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/data/saml_identity_provider_mock_data.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.data.saml_identity_provider_mock_data', 'common.djangoapps.third_party_auth.tests.data.saml_identity_provider_mock_data') + +from common.djangoapps.third_party_auth.tests.data.saml_identity_provider_mock_data import * diff --git a/import_shims/lms/third_party_auth/tests/factories.py b/import_shims/lms/third_party_auth/tests/factories.py new file mode 100644 index 0000000000..0a51f06edf --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.factories', 'common.djangoapps.third_party_auth.tests.factories') + +from common.djangoapps.third_party_auth.tests.factories import * diff --git a/import_shims/lms/third_party_auth/tests/samlutils.py b/import_shims/lms/third_party_auth/tests/samlutils.py new file mode 100644 index 0000000000..e1985a09a6 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/samlutils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.samlutils', 'common.djangoapps.third_party_auth.tests.samlutils') + +from common.djangoapps.third_party_auth.tests.samlutils import * diff --git a/import_shims/lms/third_party_auth/tests/specs/__init__.py b/import_shims/lms/third_party_auth/tests/specs/__init__.py new file mode 100644 index 0000000000..fe43dd29ea --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs', 'common.djangoapps.third_party_auth.tests.specs') + +from common.djangoapps.third_party_auth.tests.specs import * diff --git a/import_shims/lms/third_party_auth/tests/specs/base.py b/import_shims/lms/third_party_auth/tests/specs/base.py new file mode 100644 index 0000000000..aa52e8b3c3 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/base.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.base', 'common.djangoapps.third_party_auth.tests.specs.base') + +from common.djangoapps.third_party_auth.tests.specs.base import * diff --git a/import_shims/lms/third_party_auth/tests/specs/test_azuread.py b/import_shims/lms/third_party_auth/tests/specs/test_azuread.py new file mode 100644 index 0000000000..3b088fcb69 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/test_azuread.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_azuread', 'common.djangoapps.third_party_auth.tests.specs.test_azuread') + +from common.djangoapps.third_party_auth.tests.specs.test_azuread import * diff --git a/import_shims/lms/third_party_auth/tests/specs/test_generic.py b/import_shims/lms/third_party_auth/tests/specs/test_generic.py new file mode 100644 index 0000000000..52c33c9838 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/test_generic.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_generic', 'common.djangoapps.third_party_auth.tests.specs.test_generic') + +from common.djangoapps.third_party_auth.tests.specs.test_generic import * diff --git a/import_shims/lms/third_party_auth/tests/specs/test_google.py b/import_shims/lms/third_party_auth/tests/specs/test_google.py new file mode 100644 index 0000000000..cf90e5378a --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/test_google.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_google', 'common.djangoapps.third_party_auth.tests.specs.test_google') + +from common.djangoapps.third_party_auth.tests.specs.test_google import * diff --git a/import_shims/lms/third_party_auth/tests/specs/test_linkedin.py b/import_shims/lms/third_party_auth/tests/specs/test_linkedin.py new file mode 100644 index 0000000000..cd9d11aee8 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/test_linkedin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_linkedin', 'common.djangoapps.third_party_auth.tests.specs.test_linkedin') + +from common.djangoapps.third_party_auth.tests.specs.test_linkedin import * diff --git a/import_shims/lms/third_party_auth/tests/specs/test_lti.py b/import_shims/lms/third_party_auth/tests/specs/test_lti.py new file mode 100644 index 0000000000..f2309a6801 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/test_lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_lti', 'common.djangoapps.third_party_auth.tests.specs.test_lti') + +from common.djangoapps.third_party_auth.tests.specs.test_lti import * diff --git a/import_shims/lms/third_party_auth/tests/specs/test_testshib.py b/import_shims/lms/third_party_auth/tests/specs/test_testshib.py new file mode 100644 index 0000000000..f45f518e7f --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/test_testshib.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_testshib', 'common.djangoapps.third_party_auth.tests.specs.test_testshib') + +from common.djangoapps.third_party_auth.tests.specs.test_testshib import * diff --git a/import_shims/lms/third_party_auth/tests/specs/test_twitter.py b/import_shims/lms/third_party_auth/tests/specs/test_twitter.py new file mode 100644 index 0000000000..421f50e7f2 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/specs/test_twitter.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_twitter', 'common.djangoapps.third_party_auth.tests.specs.test_twitter') + +from common.djangoapps.third_party_auth.tests.specs.test_twitter import * diff --git a/import_shims/lms/third_party_auth/tests/test_admin.py b/import_shims/lms/third_party_auth/tests/test_admin.py new file mode 100644 index 0000000000..968e52bc34 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_admin', 'common.djangoapps.third_party_auth.tests.test_admin') + +from common.djangoapps.third_party_auth.tests.test_admin import * diff --git a/import_shims/lms/third_party_auth/tests/test_decorators.py b/import_shims/lms/third_party_auth/tests/test_decorators.py new file mode 100644 index 0000000000..450f7e08ee --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_decorators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_decorators', 'common.djangoapps.third_party_auth.tests.test_decorators') + +from common.djangoapps.third_party_auth.tests.test_decorators import * diff --git a/import_shims/lms/third_party_auth/tests/test_identityserver3.py b/import_shims/lms/third_party_auth/tests/test_identityserver3.py new file mode 100644 index 0000000000..5351f21477 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_identityserver3.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_identityserver3', 'common.djangoapps.third_party_auth.tests.test_identityserver3') + +from common.djangoapps.third_party_auth.tests.test_identityserver3 import * diff --git a/import_shims/lms/third_party_auth/tests/test_lti.py b/import_shims/lms/third_party_auth/tests/test_lti.py new file mode 100644 index 0000000000..93c4d7decc --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_lti', 'common.djangoapps.third_party_auth.tests.test_lti') + +from common.djangoapps.third_party_auth.tests.test_lti import * diff --git a/import_shims/lms/third_party_auth/tests/test_middleware.py b/import_shims/lms/third_party_auth/tests/test_middleware.py new file mode 100644 index 0000000000..3cc825af63 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_middleware', 'common.djangoapps.third_party_auth.tests.test_middleware') + +from common.djangoapps.third_party_auth.tests.test_middleware import * diff --git a/import_shims/lms/third_party_auth/tests/test_pipeline.py b/import_shims/lms/third_party_auth/tests/test_pipeline.py new file mode 100644 index 0000000000..f2aefb6dfb --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_pipeline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_pipeline', 'common.djangoapps.third_party_auth.tests.test_pipeline') + +from common.djangoapps.third_party_auth.tests.test_pipeline import * diff --git a/import_shims/lms/third_party_auth/tests/test_pipeline_integration.py b/import_shims/lms/third_party_auth/tests/test_pipeline_integration.py new file mode 100644 index 0000000000..9c624d61a3 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_pipeline_integration.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_pipeline_integration', 'common.djangoapps.third_party_auth.tests.test_pipeline_integration') + +from common.djangoapps.third_party_auth.tests.test_pipeline_integration import * diff --git a/import_shims/lms/third_party_auth/tests/test_provider.py b/import_shims/lms/third_party_auth/tests/test_provider.py new file mode 100644 index 0000000000..a4db8d0f89 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_provider.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_provider', 'common.djangoapps.third_party_auth.tests.test_provider') + +from common.djangoapps.third_party_auth.tests.test_provider import * diff --git a/import_shims/lms/third_party_auth/tests/test_saml.py b/import_shims/lms/third_party_auth/tests/test_saml.py new file mode 100644 index 0000000000..9567ab38db --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_saml', 'common.djangoapps.third_party_auth.tests.test_saml') + +from common.djangoapps.third_party_auth.tests.test_saml import * diff --git a/import_shims/lms/third_party_auth/tests/test_settings.py b/import_shims/lms/third_party_auth/tests/test_settings.py new file mode 100644 index 0000000000..284a2a84e9 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_settings.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_settings', 'common.djangoapps.third_party_auth.tests.test_settings') + +from common.djangoapps.third_party_auth.tests.test_settings import * diff --git a/import_shims/lms/third_party_auth/tests/test_utils.py b/import_shims/lms/third_party_auth/tests/test_utils.py new file mode 100644 index 0000000000..0dc19c9a52 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_utils', 'common.djangoapps.third_party_auth.tests.test_utils') + +from common.djangoapps.third_party_auth.tests.test_utils import * diff --git a/import_shims/lms/third_party_auth/tests/test_views.py b/import_shims/lms/third_party_auth/tests/test_views.py new file mode 100644 index 0000000000..b638f83c12 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_views', 'common.djangoapps.third_party_auth.tests.test_views') + +from common.djangoapps.third_party_auth.tests.test_views import * diff --git a/import_shims/lms/third_party_auth/tests/testutil.py b/import_shims/lms/third_party_auth/tests/testutil.py new file mode 100644 index 0000000000..a047baef51 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/testutil.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.testutil', 'common.djangoapps.third_party_auth.tests.testutil') + +from common.djangoapps.third_party_auth.tests.testutil import * diff --git a/import_shims/lms/third_party_auth/tests/utils.py b/import_shims/lms/third_party_auth/tests/utils.py new file mode 100644 index 0000000000..083b728c32 --- /dev/null +++ b/import_shims/lms/third_party_auth/tests/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.utils', 'common.djangoapps.third_party_auth.tests.utils') + +from common.djangoapps.third_party_auth.tests.utils import * diff --git a/import_shims/lms/third_party_auth/urls.py b/import_shims/lms/third_party_auth/urls.py new file mode 100644 index 0000000000..1077a81183 --- /dev/null +++ b/import_shims/lms/third_party_auth/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.urls', 'common.djangoapps.third_party_auth.urls') + +from common.djangoapps.third_party_auth.urls import * diff --git a/import_shims/lms/third_party_auth/utils.py b/import_shims/lms/third_party_auth/utils.py new file mode 100644 index 0000000000..287d2d7891 --- /dev/null +++ b/import_shims/lms/third_party_auth/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.utils', 'common.djangoapps.third_party_auth.utils') + +from common.djangoapps.third_party_auth.utils import * diff --git a/import_shims/lms/third_party_auth/views.py b/import_shims/lms/third_party_auth/views.py new file mode 100644 index 0000000000..90b8f5ba86 --- /dev/null +++ b/import_shims/lms/third_party_auth/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.views', 'common.djangoapps.third_party_auth.views') + +from common.djangoapps.third_party_auth.views import * diff --git a/import_shims/lms/track/__init__.py b/import_shims/lms/track/__init__.py new file mode 100644 index 0000000000..89295ed9fe --- /dev/null +++ b/import_shims/lms/track/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track', 'common.djangoapps.track') + +from common.djangoapps.track import * diff --git a/import_shims/lms/track/backends/__init__.py b/import_shims/lms/track/backends/__init__.py new file mode 100644 index 0000000000..0396b32170 --- /dev/null +++ b/import_shims/lms/track/backends/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends', 'common.djangoapps.track.backends') + +from common.djangoapps.track.backends import * diff --git a/import_shims/lms/track/backends/logger.py b/import_shims/lms/track/backends/logger.py new file mode 100644 index 0000000000..45b81081e2 --- /dev/null +++ b/import_shims/lms/track/backends/logger.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.logger', 'common.djangoapps.track.backends.logger') + +from common.djangoapps.track.backends.logger import * diff --git a/import_shims/lms/track/backends/mongodb.py b/import_shims/lms/track/backends/mongodb.py new file mode 100644 index 0000000000..e89e2221dc --- /dev/null +++ b/import_shims/lms/track/backends/mongodb.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.mongodb', 'common.djangoapps.track.backends.mongodb') + +from common.djangoapps.track.backends.mongodb import * diff --git a/import_shims/lms/track/backends/tests/__init__.py b/import_shims/lms/track/backends/tests/__init__.py new file mode 100644 index 0000000000..da0df0db05 --- /dev/null +++ b/import_shims/lms/track/backends/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.tests', 'common.djangoapps.track.backends.tests') + +from common.djangoapps.track.backends.tests import * diff --git a/import_shims/lms/track/backends/tests/test_logger.py b/import_shims/lms/track/backends/tests/test_logger.py new file mode 100644 index 0000000000..fe33312f92 --- /dev/null +++ b/import_shims/lms/track/backends/tests/test_logger.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.tests.test_logger', 'common.djangoapps.track.backends.tests.test_logger') + +from common.djangoapps.track.backends.tests.test_logger import * diff --git a/import_shims/lms/track/backends/tests/test_mongodb.py b/import_shims/lms/track/backends/tests/test_mongodb.py new file mode 100644 index 0000000000..4a76d7a61d --- /dev/null +++ b/import_shims/lms/track/backends/tests/test_mongodb.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.tests.test_mongodb', 'common.djangoapps.track.backends.tests.test_mongodb') + +from common.djangoapps.track.backends.tests.test_mongodb import * diff --git a/import_shims/lms/track/contexts.py b/import_shims/lms/track/contexts.py new file mode 100644 index 0000000000..5658fb74e6 --- /dev/null +++ b/import_shims/lms/track/contexts.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.contexts', 'common.djangoapps.track.contexts') + +from common.djangoapps.track.contexts import * diff --git a/import_shims/lms/track/event_transaction_utils.py b/import_shims/lms/track/event_transaction_utils.py new file mode 100644 index 0000000000..4af8e2de49 --- /dev/null +++ b/import_shims/lms/track/event_transaction_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.event_transaction_utils', 'common.djangoapps.track.event_transaction_utils') + +from common.djangoapps.track.event_transaction_utils import * diff --git a/import_shims/lms/track/management/__init__.py b/import_shims/lms/track/management/__init__.py new file mode 100644 index 0000000000..c6749d0c92 --- /dev/null +++ b/import_shims/lms/track/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management', 'common.djangoapps.track.management') + +from common.djangoapps.track.management import * diff --git a/import_shims/lms/track/management/commands/__init__.py b/import_shims/lms/track/management/commands/__init__.py new file mode 100644 index 0000000000..61e6172f3e --- /dev/null +++ b/import_shims/lms/track/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.commands', 'common.djangoapps.track.management.commands') + +from common.djangoapps.track.management.commands import * diff --git a/import_shims/lms/track/management/commands/tracked_dummy_command.py b/import_shims/lms/track/management/commands/tracked_dummy_command.py new file mode 100644 index 0000000000..b2642844da --- /dev/null +++ b/import_shims/lms/track/management/commands/tracked_dummy_command.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.commands.tracked_dummy_command', 'common.djangoapps.track.management.commands.tracked_dummy_command') + +from common.djangoapps.track.management.commands.tracked_dummy_command import * diff --git a/import_shims/lms/track/management/tests/__init__.py b/import_shims/lms/track/management/tests/__init__.py new file mode 100644 index 0000000000..bd2cd69a18 --- /dev/null +++ b/import_shims/lms/track/management/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.tests', 'common.djangoapps.track.management.tests') + +from common.djangoapps.track.management.tests import * diff --git a/import_shims/lms/track/management/tests/test_tracked_command.py b/import_shims/lms/track/management/tests/test_tracked_command.py new file mode 100644 index 0000000000..f5bb381982 --- /dev/null +++ b/import_shims/lms/track/management/tests/test_tracked_command.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.tests.test_tracked_command', 'common.djangoapps.track.management.tests.test_tracked_command') + +from common.djangoapps.track.management.tests.test_tracked_command import * diff --git a/import_shims/lms/track/management/tracked_command.py b/import_shims/lms/track/management/tracked_command.py new file mode 100644 index 0000000000..6ed0440f37 --- /dev/null +++ b/import_shims/lms/track/management/tracked_command.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.tracked_command', 'common.djangoapps.track.management.tracked_command') + +from common.djangoapps.track.management.tracked_command import * diff --git a/import_shims/lms/track/middleware.py b/import_shims/lms/track/middleware.py new file mode 100644 index 0000000000..96cda2b33f --- /dev/null +++ b/import_shims/lms/track/middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.middleware', 'common.djangoapps.track.middleware') + +from common.djangoapps.track.middleware import * diff --git a/import_shims/lms/track/segment.py b/import_shims/lms/track/segment.py new file mode 100644 index 0000000000..78a62fb353 --- /dev/null +++ b/import_shims/lms/track/segment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.segment', 'common.djangoapps.track.segment') + +from common.djangoapps.track.segment import * diff --git a/import_shims/lms/track/shim.py b/import_shims/lms/track/shim.py new file mode 100644 index 0000000000..a2c8ace2ae --- /dev/null +++ b/import_shims/lms/track/shim.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.shim', 'common.djangoapps.track.shim') + +from common.djangoapps.track.shim import * diff --git a/import_shims/lms/track/tests/__init__.py b/import_shims/lms/track/tests/__init__.py new file mode 100644 index 0000000000..76a5191e6b --- /dev/null +++ b/import_shims/lms/track/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests', 'common.djangoapps.track.tests') + +from common.djangoapps.track.tests import * diff --git a/import_shims/lms/track/tests/test_contexts.py b/import_shims/lms/track/tests/test_contexts.py new file mode 100644 index 0000000000..24db8b9672 --- /dev/null +++ b/import_shims/lms/track/tests/test_contexts.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_contexts', 'common.djangoapps.track.tests.test_contexts') + +from common.djangoapps.track.tests.test_contexts import * diff --git a/import_shims/lms/track/tests/test_middleware.py b/import_shims/lms/track/tests/test_middleware.py new file mode 100644 index 0000000000..ff3972ca1f --- /dev/null +++ b/import_shims/lms/track/tests/test_middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_middleware', 'common.djangoapps.track.tests.test_middleware') + +from common.djangoapps.track.tests.test_middleware import * diff --git a/import_shims/lms/track/tests/test_segment.py b/import_shims/lms/track/tests/test_segment.py new file mode 100644 index 0000000000..ed0e3fec87 --- /dev/null +++ b/import_shims/lms/track/tests/test_segment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_segment', 'common.djangoapps.track.tests.test_segment') + +from common.djangoapps.track.tests.test_segment import * diff --git a/import_shims/lms/track/tests/test_shim.py b/import_shims/lms/track/tests/test_shim.py new file mode 100644 index 0000000000..8eeeec8593 --- /dev/null +++ b/import_shims/lms/track/tests/test_shim.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_shim', 'common.djangoapps.track.tests.test_shim') + +from common.djangoapps.track.tests.test_shim import * diff --git a/import_shims/lms/track/tests/test_tracker.py b/import_shims/lms/track/tests/test_tracker.py new file mode 100644 index 0000000000..7d136ed719 --- /dev/null +++ b/import_shims/lms/track/tests/test_tracker.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_tracker', 'common.djangoapps.track.tests.test_tracker') + +from common.djangoapps.track.tests.test_tracker import * diff --git a/import_shims/lms/track/tests/test_util.py b/import_shims/lms/track/tests/test_util.py new file mode 100644 index 0000000000..c3d02a143b --- /dev/null +++ b/import_shims/lms/track/tests/test_util.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_util', 'common.djangoapps.track.tests.test_util') + +from common.djangoapps.track.tests.test_util import * diff --git a/import_shims/lms/track/tracker.py b/import_shims/lms/track/tracker.py new file mode 100644 index 0000000000..78d3fa4ec2 --- /dev/null +++ b/import_shims/lms/track/tracker.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tracker', 'common.djangoapps.track.tracker') + +from common.djangoapps.track.tracker import * diff --git a/import_shims/lms/track/transformers.py b/import_shims/lms/track/transformers.py new file mode 100644 index 0000000000..aab2f7c868 --- /dev/null +++ b/import_shims/lms/track/transformers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.transformers', 'common.djangoapps.track.transformers') + +from common.djangoapps.track.transformers import * diff --git a/import_shims/lms/track/urls.py b/import_shims/lms/track/urls.py new file mode 100644 index 0000000000..8a4f828b00 --- /dev/null +++ b/import_shims/lms/track/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.urls', 'common.djangoapps.track.urls') + +from common.djangoapps.track.urls import * diff --git a/import_shims/lms/track/utils.py b/import_shims/lms/track/utils.py new file mode 100644 index 0000000000..51140ff94f --- /dev/null +++ b/import_shims/lms/track/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.utils', 'common.djangoapps.track.utils') + +from common.djangoapps.track.utils import * diff --git a/import_shims/lms/track/views/__init__.py b/import_shims/lms/track/views/__init__.py new file mode 100644 index 0000000000..8b4b5f047e --- /dev/null +++ b/import_shims/lms/track/views/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views', 'common.djangoapps.track.views') + +from common.djangoapps.track.views import * diff --git a/import_shims/lms/track/views/segmentio.py b/import_shims/lms/track/views/segmentio.py new file mode 100644 index 0000000000..7d2f455821 --- /dev/null +++ b/import_shims/lms/track/views/segmentio.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.segmentio', 'common.djangoapps.track.views.segmentio') + +from common.djangoapps.track.views.segmentio import * diff --git a/import_shims/lms/track/views/tests/__init__.py b/import_shims/lms/track/views/tests/__init__.py new file mode 100644 index 0000000000..a705bea8b5 --- /dev/null +++ b/import_shims/lms/track/views/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests', 'common.djangoapps.track.views.tests') + +from common.djangoapps.track.views.tests import * diff --git a/import_shims/lms/track/views/tests/base.py b/import_shims/lms/track/views/tests/base.py new file mode 100644 index 0000000000..f4c28ac66d --- /dev/null +++ b/import_shims/lms/track/views/tests/base.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests.base', 'common.djangoapps.track.views.tests.base') + +from common.djangoapps.track.views.tests.base import * diff --git a/import_shims/lms/track/views/tests/test_segmentio.py b/import_shims/lms/track/views/tests/test_segmentio.py new file mode 100644 index 0000000000..c143f50f3e --- /dev/null +++ b/import_shims/lms/track/views/tests/test_segmentio.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests.test_segmentio', 'common.djangoapps.track.views.tests.test_segmentio') + +from common.djangoapps.track.views.tests.test_segmentio import * diff --git a/import_shims/lms/track/views/tests/test_views.py b/import_shims/lms/track/views/tests/test_views.py new file mode 100644 index 0000000000..3bc1f69b4f --- /dev/null +++ b/import_shims/lms/track/views/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests.test_views', 'common.djangoapps.track.views.tests.test_views') + +from common.djangoapps.track.views.tests.test_views import * diff --git a/import_shims/lms/util/__init__.py b/import_shims/lms/util/__init__.py new file mode 100644 index 0000000000..0e570c1dbb --- /dev/null +++ b/import_shims/lms/util/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util', 'common.djangoapps.util') + +from common.djangoapps.util import * diff --git a/import_shims/lms/util/admin.py b/import_shims/lms/util/admin.py new file mode 100644 index 0000000000..0915817ceb --- /dev/null +++ b/import_shims/lms/util/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.admin', 'common.djangoapps.util.admin') + +from common.djangoapps.util.admin import * diff --git a/import_shims/lms/util/cache.py b/import_shims/lms/util/cache.py new file mode 100644 index 0000000000..93458850d4 --- /dev/null +++ b/import_shims/lms/util/cache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.cache', 'common.djangoapps.util.cache') + +from common.djangoapps.util.cache import * diff --git a/import_shims/lms/util/config_parse.py b/import_shims/lms/util/config_parse.py new file mode 100644 index 0000000000..9eb48285f0 --- /dev/null +++ b/import_shims/lms/util/config_parse.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.config_parse', 'common.djangoapps.util.config_parse') + +from common.djangoapps.util.config_parse import * diff --git a/import_shims/lms/util/course.py b/import_shims/lms/util/course.py new file mode 100644 index 0000000000..3461df4f98 --- /dev/null +++ b/import_shims/lms/util/course.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.course', 'common.djangoapps.util.course') + +from common.djangoapps.util.course import * diff --git a/import_shims/lms/util/date_utils.py b/import_shims/lms/util/date_utils.py new file mode 100644 index 0000000000..0620f66ca8 --- /dev/null +++ b/import_shims/lms/util/date_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.date_utils', 'common.djangoapps.util.date_utils') + +from common.djangoapps.util.date_utils import * diff --git a/import_shims/lms/util/db.py b/import_shims/lms/util/db.py new file mode 100644 index 0000000000..819290c606 --- /dev/null +++ b/import_shims/lms/util/db.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.db', 'common.djangoapps.util.db') + +from common.djangoapps.util.db import * diff --git a/import_shims/lms/util/disable_rate_limit.py b/import_shims/lms/util/disable_rate_limit.py new file mode 100644 index 0000000000..f5b0698a8b --- /dev/null +++ b/import_shims/lms/util/disable_rate_limit.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.disable_rate_limit', 'common.djangoapps.util.disable_rate_limit') + +from common.djangoapps.util.disable_rate_limit import * diff --git a/import_shims/lms/util/file.py b/import_shims/lms/util/file.py new file mode 100644 index 0000000000..e6d7cbabaf --- /dev/null +++ b/import_shims/lms/util/file.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.file', 'common.djangoapps.util.file') + +from common.djangoapps.util.file import * diff --git a/import_shims/lms/util/json_request.py b/import_shims/lms/util/json_request.py new file mode 100644 index 0000000000..c13138da3e --- /dev/null +++ b/import_shims/lms/util/json_request.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.json_request', 'common.djangoapps.util.json_request') + +from common.djangoapps.util.json_request import * diff --git a/import_shims/lms/util/keyword_substitution.py b/import_shims/lms/util/keyword_substitution.py new file mode 100644 index 0000000000..4e795e2758 --- /dev/null +++ b/import_shims/lms/util/keyword_substitution.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.keyword_substitution', 'common.djangoapps.util.keyword_substitution') + +from common.djangoapps.util.keyword_substitution import * diff --git a/import_shims/lms/util/memcache.py b/import_shims/lms/util/memcache.py new file mode 100644 index 0000000000..8032b59e56 --- /dev/null +++ b/import_shims/lms/util/memcache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.memcache', 'common.djangoapps.util.memcache') + +from common.djangoapps.util.memcache import * diff --git a/import_shims/lms/util/milestones_helpers.py b/import_shims/lms/util/milestones_helpers.py new file mode 100644 index 0000000000..41522c71c0 --- /dev/null +++ b/import_shims/lms/util/milestones_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.milestones_helpers', 'common.djangoapps.util.milestones_helpers') + +from common.djangoapps.util.milestones_helpers import * diff --git a/import_shims/lms/util/model_utils.py b/import_shims/lms/util/model_utils.py new file mode 100644 index 0000000000..75074f6cea --- /dev/null +++ b/import_shims/lms/util/model_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.model_utils', 'common.djangoapps.util.model_utils') + +from common.djangoapps.util.model_utils import * diff --git a/import_shims/lms/util/models.py b/import_shims/lms/util/models.py new file mode 100644 index 0000000000..b63b46d7c6 --- /dev/null +++ b/import_shims/lms/util/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.models', 'common.djangoapps.util.models') + +from common.djangoapps.util.models import * diff --git a/import_shims/lms/util/module_utils.py b/import_shims/lms/util/module_utils.py new file mode 100644 index 0000000000..450672740c --- /dev/null +++ b/import_shims/lms/util/module_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.module_utils', 'common.djangoapps.util.module_utils') + +from common.djangoapps.util.module_utils import * diff --git a/import_shims/lms/util/organizations_helpers.py b/import_shims/lms/util/organizations_helpers.py new file mode 100644 index 0000000000..d5583c578b --- /dev/null +++ b/import_shims/lms/util/organizations_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.organizations_helpers', 'common.djangoapps.util.organizations_helpers') + +from common.djangoapps.util.organizations_helpers import * diff --git a/import_shims/lms/util/password_policy_validators.py b/import_shims/lms/util/password_policy_validators.py new file mode 100644 index 0000000000..b44f93722b --- /dev/null +++ b/import_shims/lms/util/password_policy_validators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.password_policy_validators', 'common.djangoapps.util.password_policy_validators') + +from common.djangoapps.util.password_policy_validators import * diff --git a/import_shims/lms/util/query.py b/import_shims/lms/util/query.py new file mode 100644 index 0000000000..4163a7218e --- /dev/null +++ b/import_shims/lms/util/query.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.query', 'common.djangoapps.util.query') + +from common.djangoapps.util.query import * diff --git a/import_shims/lms/util/request_rate_limiter.py b/import_shims/lms/util/request_rate_limiter.py new file mode 100644 index 0000000000..3d7efb2a6a --- /dev/null +++ b/import_shims/lms/util/request_rate_limiter.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.request_rate_limiter', 'common.djangoapps.util.request_rate_limiter') + +from common.djangoapps.util.request_rate_limiter import * diff --git a/import_shims/lms/util/string_utils.py b/import_shims/lms/util/string_utils.py new file mode 100644 index 0000000000..7d0a5e5fe7 --- /dev/null +++ b/import_shims/lms/util/string_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.string_utils', 'common.djangoapps.util.string_utils') + +from common.djangoapps.util.string_utils import * diff --git a/import_shims/lms/util/testing.py b/import_shims/lms/util/testing.py new file mode 100644 index 0000000000..c2bb6bafd2 --- /dev/null +++ b/import_shims/lms/util/testing.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.testing', 'common.djangoapps.util.testing') + +from common.djangoapps.util.testing import * diff --git a/import_shims/lms/util/tests/__init__.py b/import_shims/lms/util/tests/__init__.py new file mode 100644 index 0000000000..0410eba60f --- /dev/null +++ b/import_shims/lms/util/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests', 'common.djangoapps.util.tests') + +from common.djangoapps.util.tests import * diff --git a/import_shims/lms/util/tests/mixins/__init__.py b/import_shims/lms/util/tests/mixins/__init__.py new file mode 100644 index 0000000000..7fcd05af8e --- /dev/null +++ b/import_shims/lms/util/tests/mixins/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.mixins', 'common.djangoapps.util.tests.mixins') + +from common.djangoapps.util.tests.mixins import * diff --git a/import_shims/lms/util/tests/mixins/discovery.py b/import_shims/lms/util/tests/mixins/discovery.py new file mode 100644 index 0000000000..7462689750 --- /dev/null +++ b/import_shims/lms/util/tests/mixins/discovery.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.mixins.discovery', 'common.djangoapps.util.tests.mixins.discovery') + +from common.djangoapps.util.tests.mixins.discovery import * diff --git a/import_shims/lms/util/tests/test_course.py b/import_shims/lms/util/tests/test_course.py new file mode 100644 index 0000000000..c37caf7efd --- /dev/null +++ b/import_shims/lms/util/tests/test_course.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_course', 'common.djangoapps.util.tests.test_course') + +from common.djangoapps.util.tests.test_course import * diff --git a/import_shims/lms/util/tests/test_date_utils.py b/import_shims/lms/util/tests/test_date_utils.py new file mode 100644 index 0000000000..9bd2a4809b --- /dev/null +++ b/import_shims/lms/util/tests/test_date_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_date_utils', 'common.djangoapps.util.tests.test_date_utils') + +from common.djangoapps.util.tests.test_date_utils import * diff --git a/import_shims/lms/util/tests/test_db.py b/import_shims/lms/util/tests/test_db.py new file mode 100644 index 0000000000..75ca4722fc --- /dev/null +++ b/import_shims/lms/util/tests/test_db.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_db', 'common.djangoapps.util.tests.test_db') + +from common.djangoapps.util.tests.test_db import * diff --git a/import_shims/lms/util/tests/test_disable_rate_limit.py b/import_shims/lms/util/tests/test_disable_rate_limit.py new file mode 100644 index 0000000000..4958acbf6e --- /dev/null +++ b/import_shims/lms/util/tests/test_disable_rate_limit.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_disable_rate_limit', 'common.djangoapps.util.tests.test_disable_rate_limit') + +from common.djangoapps.util.tests.test_disable_rate_limit import * diff --git a/import_shims/lms/util/tests/test_django_utils.py b/import_shims/lms/util/tests/test_django_utils.py new file mode 100644 index 0000000000..51c59adaa6 --- /dev/null +++ b/import_shims/lms/util/tests/test_django_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_django_utils', 'common.djangoapps.util.tests.test_django_utils') + +from common.djangoapps.util.tests.test_django_utils import * diff --git a/import_shims/lms/util/tests/test_file.py b/import_shims/lms/util/tests/test_file.py new file mode 100644 index 0000000000..cfb50432ad --- /dev/null +++ b/import_shims/lms/util/tests/test_file.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_file', 'common.djangoapps.util.tests.test_file') + +from common.djangoapps.util.tests.test_file import * diff --git a/import_shims/lms/util/tests/test_json_request.py b/import_shims/lms/util/tests/test_json_request.py new file mode 100644 index 0000000000..961ed414b0 --- /dev/null +++ b/import_shims/lms/util/tests/test_json_request.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_json_request', 'common.djangoapps.util.tests.test_json_request') + +from common.djangoapps.util.tests.test_json_request import * diff --git a/import_shims/lms/util/tests/test_keyword_sub_utils.py b/import_shims/lms/util/tests/test_keyword_sub_utils.py new file mode 100644 index 0000000000..5e8b652401 --- /dev/null +++ b/import_shims/lms/util/tests/test_keyword_sub_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_keyword_sub_utils', 'common.djangoapps.util.tests.test_keyword_sub_utils') + +from common.djangoapps.util.tests.test_keyword_sub_utils import * diff --git a/import_shims/lms/util/tests/test_memcache.py b/import_shims/lms/util/tests/test_memcache.py new file mode 100644 index 0000000000..6980f31a3a --- /dev/null +++ b/import_shims/lms/util/tests/test_memcache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_memcache', 'common.djangoapps.util.tests.test_memcache') + +from common.djangoapps.util.tests.test_memcache import * diff --git a/import_shims/lms/util/tests/test_milestones_helpers.py b/import_shims/lms/util/tests/test_milestones_helpers.py new file mode 100644 index 0000000000..2604974c84 --- /dev/null +++ b/import_shims/lms/util/tests/test_milestones_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_milestones_helpers', 'common.djangoapps.util.tests.test_milestones_helpers') + +from common.djangoapps.util.tests.test_milestones_helpers import * diff --git a/import_shims/lms/util/tests/test_organizations_helpers.py b/import_shims/lms/util/tests/test_organizations_helpers.py new file mode 100644 index 0000000000..7f2a2451f3 --- /dev/null +++ b/import_shims/lms/util/tests/test_organizations_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_organizations_helpers', 'common.djangoapps.util.tests.test_organizations_helpers') + +from common.djangoapps.util.tests.test_organizations_helpers import * diff --git a/import_shims/lms/util/tests/test_password_policy_validators.py b/import_shims/lms/util/tests/test_password_policy_validators.py new file mode 100644 index 0000000000..97ee0a875a --- /dev/null +++ b/import_shims/lms/util/tests/test_password_policy_validators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_password_policy_validators', 'common.djangoapps.util.tests.test_password_policy_validators') + +from common.djangoapps.util.tests.test_password_policy_validators import * diff --git a/import_shims/lms/util/tests/test_sandboxing.py b/import_shims/lms/util/tests/test_sandboxing.py new file mode 100644 index 0000000000..8e438686d9 --- /dev/null +++ b/import_shims/lms/util/tests/test_sandboxing.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_sandboxing', 'common.djangoapps.util.tests.test_sandboxing') + +from common.djangoapps.util.tests.test_sandboxing import * diff --git a/import_shims/lms/util/tests/test_string_utils.py b/import_shims/lms/util/tests/test_string_utils.py new file mode 100644 index 0000000000..8fb4d26ea5 --- /dev/null +++ b/import_shims/lms/util/tests/test_string_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_string_utils', 'common.djangoapps.util.tests.test_string_utils') + +from common.djangoapps.util.tests.test_string_utils import * diff --git a/import_shims/lms/util/url.py b/import_shims/lms/util/url.py new file mode 100644 index 0000000000..1fa8d8bc6c --- /dev/null +++ b/import_shims/lms/util/url.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.url', 'common.djangoapps.util.url') + +from common.djangoapps.util.url import * diff --git a/import_shims/lms/util/validate_on_save.py b/import_shims/lms/util/validate_on_save.py new file mode 100644 index 0000000000..8711134250 --- /dev/null +++ b/import_shims/lms/util/validate_on_save.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.validate_on_save', 'common.djangoapps.util.validate_on_save') + +from common.djangoapps.util.validate_on_save import * diff --git a/import_shims/lms/util/views.py b/import_shims/lms/util/views.py new file mode 100644 index 0000000000..37687efd35 --- /dev/null +++ b/import_shims/lms/util/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.views', 'common.djangoapps.util.views') + +from common.djangoapps.util.views import * diff --git a/import_shims/lms/xblock_django/__init__.py b/import_shims/lms/xblock_django/__init__.py new file mode 100644 index 0000000000..217298de7b --- /dev/null +++ b/import_shims/lms/xblock_django/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django', 'common.djangoapps.xblock_django') + +from common.djangoapps.xblock_django import * diff --git a/import_shims/lms/xblock_django/admin.py b/import_shims/lms/xblock_django/admin.py new file mode 100644 index 0000000000..b291576db7 --- /dev/null +++ b/import_shims/lms/xblock_django/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.admin', 'common.djangoapps.xblock_django.admin') + +from common.djangoapps.xblock_django.admin import * diff --git a/import_shims/lms/xblock_django/api.py b/import_shims/lms/xblock_django/api.py new file mode 100644 index 0000000000..67611a4804 --- /dev/null +++ b/import_shims/lms/xblock_django/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.api', 'common.djangoapps.xblock_django.api') + +from common.djangoapps.xblock_django.api import * diff --git a/import_shims/lms/xblock_django/management/__init__.py b/import_shims/lms/xblock_django/management/__init__.py new file mode 100644 index 0000000000..f6f453ef69 --- /dev/null +++ b/import_shims/lms/xblock_django/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.management', 'common.djangoapps.xblock_django.management') + +from common.djangoapps.xblock_django.management import * diff --git a/import_shims/lms/xblock_django/management/commands/__init__.py b/import_shims/lms/xblock_django/management/commands/__init__.py new file mode 100644 index 0000000000..5bddef3d4a --- /dev/null +++ b/import_shims/lms/xblock_django/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.management.commands', 'common.djangoapps.xblock_django.management.commands') + +from common.djangoapps.xblock_django.management.commands import * diff --git a/import_shims/lms/xblock_django/management/commands/ensure_indexes.py b/import_shims/lms/xblock_django/management/commands/ensure_indexes.py new file mode 100644 index 0000000000..daf51b8cb2 --- /dev/null +++ b/import_shims/lms/xblock_django/management/commands/ensure_indexes.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.management.commands.ensure_indexes', 'common.djangoapps.xblock_django.management.commands.ensure_indexes') + +from common.djangoapps.xblock_django.management.commands.ensure_indexes import * diff --git a/import_shims/lms/xblock_django/models.py b/import_shims/lms/xblock_django/models.py new file mode 100644 index 0000000000..b35811c2a3 --- /dev/null +++ b/import_shims/lms/xblock_django/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.models', 'common.djangoapps.xblock_django.models') + +from common.djangoapps.xblock_django.models import * diff --git a/import_shims/lms/xblock_django/tests/__init__.py b/import_shims/lms/xblock_django/tests/__init__.py new file mode 100644 index 0000000000..b4baccf440 --- /dev/null +++ b/import_shims/lms/xblock_django/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.tests', 'common.djangoapps.xblock_django.tests') + +from common.djangoapps.xblock_django.tests import * diff --git a/import_shims/lms/xblock_django/tests/test_api.py b/import_shims/lms/xblock_django/tests/test_api.py new file mode 100644 index 0000000000..3fe4338cb7 --- /dev/null +++ b/import_shims/lms/xblock_django/tests/test_api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.tests.test_api', 'common.djangoapps.xblock_django.tests.test_api') + +from common.djangoapps.xblock_django.tests.test_api import * diff --git a/import_shims/lms/xblock_django/tests/test_user_service.py b/import_shims/lms/xblock_django/tests/test_user_service.py new file mode 100644 index 0000000000..6bf70dd062 --- /dev/null +++ b/import_shims/lms/xblock_django/tests/test_user_service.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.tests.test_user_service', 'common.djangoapps.xblock_django.tests.test_user_service') + +from common.djangoapps.xblock_django.tests.test_user_service import * diff --git a/import_shims/lms/xblock_django/user_service.py b/import_shims/lms/xblock_django/user_service.py new file mode 100644 index 0000000000..1e237adb1b --- /dev/null +++ b/import_shims/lms/xblock_django/user_service.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.user_service', 'common.djangoapps.xblock_django.user_service') + +from common.djangoapps.xblock_django.user_service import * diff --git a/import_shims/studio/course_action_state/__init__.py b/import_shims/studio/course_action_state/__init__.py new file mode 100644 index 0000000000..8b5980fa17 --- /dev/null +++ b/import_shims/studio/course_action_state/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state', 'common.djangoapps.course_action_state') + +from common.djangoapps.course_action_state import * diff --git a/import_shims/studio/course_action_state/managers.py b/import_shims/studio/course_action_state/managers.py new file mode 100644 index 0000000000..cd11c98f47 --- /dev/null +++ b/import_shims/studio/course_action_state/managers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.managers', 'common.djangoapps.course_action_state.managers') + +from common.djangoapps.course_action_state.managers import * diff --git a/import_shims/studio/course_action_state/models.py b/import_shims/studio/course_action_state/models.py new file mode 100644 index 0000000000..ee7e3c4ad0 --- /dev/null +++ b/import_shims/studio/course_action_state/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.models', 'common.djangoapps.course_action_state.models') + +from common.djangoapps.course_action_state.models import * diff --git a/import_shims/studio/course_action_state/tests/__init__.py b/import_shims/studio/course_action_state/tests/__init__.py new file mode 100644 index 0000000000..701aad3144 --- /dev/null +++ b/import_shims/studio/course_action_state/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.tests', 'common.djangoapps.course_action_state.tests') + +from common.djangoapps.course_action_state.tests import * diff --git a/import_shims/studio/course_action_state/tests/test_managers.py b/import_shims/studio/course_action_state/tests/test_managers.py new file mode 100644 index 0000000000..91c1a4c0b5 --- /dev/null +++ b/import_shims/studio/course_action_state/tests/test_managers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.tests.test_managers', 'common.djangoapps.course_action_state.tests.test_managers') + +from common.djangoapps.course_action_state.tests.test_managers import * diff --git a/import_shims/studio/course_action_state/tests/test_rerun_manager.py b/import_shims/studio/course_action_state/tests/test_rerun_manager.py new file mode 100644 index 0000000000..740708aa00 --- /dev/null +++ b/import_shims/studio/course_action_state/tests/test_rerun_manager.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_action_state.tests.test_rerun_manager', 'common.djangoapps.course_action_state.tests.test_rerun_manager') + +from common.djangoapps.course_action_state.tests.test_rerun_manager import * diff --git a/import_shims/studio/course_modes/__init__.py b/import_shims/studio/course_modes/__init__.py new file mode 100644 index 0000000000..f5c4a4ee4c --- /dev/null +++ b/import_shims/studio/course_modes/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes', 'common.djangoapps.course_modes') + +from common.djangoapps.course_modes import * diff --git a/import_shims/studio/course_modes/admin.py b/import_shims/studio/course_modes/admin.py new file mode 100644 index 0000000000..929ba70dc0 --- /dev/null +++ b/import_shims/studio/course_modes/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.admin', 'common.djangoapps.course_modes.admin') + +from common.djangoapps.course_modes.admin import * diff --git a/import_shims/studio/course_modes/api.py b/import_shims/studio/course_modes/api.py new file mode 100644 index 0000000000..74250a451c --- /dev/null +++ b/import_shims/studio/course_modes/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.api', 'common.djangoapps.course_modes.api') + +from common.djangoapps.course_modes.api import * diff --git a/import_shims/studio/course_modes/apps.py b/import_shims/studio/course_modes/apps.py new file mode 100644 index 0000000000..f2d7673d36 --- /dev/null +++ b/import_shims/studio/course_modes/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.apps', 'common.djangoapps.course_modes.apps') + +from common.djangoapps.course_modes.apps import * diff --git a/import_shims/studio/course_modes/helpers.py b/import_shims/studio/course_modes/helpers.py new file mode 100644 index 0000000000..0862592a3c --- /dev/null +++ b/import_shims/studio/course_modes/helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.helpers', 'common.djangoapps.course_modes.helpers') + +from common.djangoapps.course_modes.helpers import * diff --git a/import_shims/studio/course_modes/models.py b/import_shims/studio/course_modes/models.py new file mode 100644 index 0000000000..a5f733294c --- /dev/null +++ b/import_shims/studio/course_modes/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.models', 'common.djangoapps.course_modes.models') + +from common.djangoapps.course_modes.models import * diff --git a/import_shims/studio/course_modes/rest_api/__init__.py b/import_shims/studio/course_modes/rest_api/__init__.py new file mode 100644 index 0000000000..ff3fd85be3 --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api', 'common.djangoapps.course_modes.rest_api') + +from common.djangoapps.course_modes.rest_api import * diff --git a/import_shims/studio/course_modes/rest_api/serializers.py b/import_shims/studio/course_modes/rest_api/serializers.py new file mode 100644 index 0000000000..9996d6823b --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.serializers', 'common.djangoapps.course_modes.rest_api.serializers') + +from common.djangoapps.course_modes.rest_api.serializers import * diff --git a/import_shims/studio/course_modes/rest_api/urls.py b/import_shims/studio/course_modes/rest_api/urls.py new file mode 100644 index 0000000000..61912ad20c --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.urls', 'common.djangoapps.course_modes.rest_api.urls') + +from common.djangoapps.course_modes.rest_api.urls import * diff --git a/import_shims/studio/course_modes/rest_api/v1/__init__.py b/import_shims/studio/course_modes/rest_api/v1/__init__.py new file mode 100644 index 0000000000..626c496187 --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/v1/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1', 'common.djangoapps.course_modes.rest_api.v1') + +from common.djangoapps.course_modes.rest_api.v1 import * diff --git a/import_shims/studio/course_modes/rest_api/v1/tests/__init__.py b/import_shims/studio/course_modes/rest_api/v1/tests/__init__.py new file mode 100644 index 0000000000..ee1496ee9a --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/v1/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.tests', 'common.djangoapps.course_modes.rest_api.v1.tests') + +from common.djangoapps.course_modes.rest_api.v1.tests import * diff --git a/import_shims/studio/course_modes/rest_api/v1/tests/test_views.py b/import_shims/studio/course_modes/rest_api/v1/tests/test_views.py new file mode 100644 index 0000000000..a67d9e8599 --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/v1/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.tests.test_views', 'common.djangoapps.course_modes.rest_api.v1.tests.test_views') + +from common.djangoapps.course_modes.rest_api.v1.tests.test_views import * diff --git a/import_shims/studio/course_modes/rest_api/v1/urls.py b/import_shims/studio/course_modes/rest_api/v1/urls.py new file mode 100644 index 0000000000..840f2e7556 --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/v1/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.urls', 'common.djangoapps.course_modes.rest_api.v1.urls') + +from common.djangoapps.course_modes.rest_api.v1.urls import * diff --git a/import_shims/studio/course_modes/rest_api/v1/views.py b/import_shims/studio/course_modes/rest_api/v1/views.py new file mode 100644 index 0000000000..d470938c20 --- /dev/null +++ b/import_shims/studio/course_modes/rest_api/v1/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.rest_api.v1.views', 'common.djangoapps.course_modes.rest_api.v1.views') + +from common.djangoapps.course_modes.rest_api.v1.views import * diff --git a/import_shims/studio/course_modes/signals.py b/import_shims/studio/course_modes/signals.py new file mode 100644 index 0000000000..ce1857f3d8 --- /dev/null +++ b/import_shims/studio/course_modes/signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.signals', 'common.djangoapps.course_modes.signals') + +from common.djangoapps.course_modes.signals import * diff --git a/import_shims/studio/course_modes/tests/__init__.py b/import_shims/studio/course_modes/tests/__init__.py new file mode 100644 index 0000000000..7298d7bd70 --- /dev/null +++ b/import_shims/studio/course_modes/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests', 'common.djangoapps.course_modes.tests') + +from common.djangoapps.course_modes.tests import * diff --git a/import_shims/studio/course_modes/tests/factories.py b/import_shims/studio/course_modes/tests/factories.py new file mode 100644 index 0000000000..32bcb47fd9 --- /dev/null +++ b/import_shims/studio/course_modes/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.factories', 'common.djangoapps.course_modes.tests.factories') + +from common.djangoapps.course_modes.tests.factories import * diff --git a/import_shims/studio/course_modes/tests/test_admin.py b/import_shims/studio/course_modes/tests/test_admin.py new file mode 100644 index 0000000000..4e8f1c3481 --- /dev/null +++ b/import_shims/studio/course_modes/tests/test_admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_admin', 'common.djangoapps.course_modes.tests.test_admin') + +from common.djangoapps.course_modes.tests.test_admin import * diff --git a/import_shims/studio/course_modes/tests/test_models.py b/import_shims/studio/course_modes/tests/test_models.py new file mode 100644 index 0000000000..d2d30d40d0 --- /dev/null +++ b/import_shims/studio/course_modes/tests/test_models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_models', 'common.djangoapps.course_modes.tests.test_models') + +from common.djangoapps.course_modes.tests.test_models import * diff --git a/import_shims/studio/course_modes/tests/test_signals.py b/import_shims/studio/course_modes/tests/test_signals.py new file mode 100644 index 0000000000..fbda5cc65f --- /dev/null +++ b/import_shims/studio/course_modes/tests/test_signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_signals', 'common.djangoapps.course_modes.tests.test_signals') + +from common.djangoapps.course_modes.tests.test_signals import * diff --git a/import_shims/studio/course_modes/tests/test_views.py b/import_shims/studio/course_modes/tests/test_views.py new file mode 100644 index 0000000000..66909845fb --- /dev/null +++ b/import_shims/studio/course_modes/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.tests.test_views', 'common.djangoapps.course_modes.tests.test_views') + +from common.djangoapps.course_modes.tests.test_views import * diff --git a/import_shims/studio/course_modes/urls.py b/import_shims/studio/course_modes/urls.py new file mode 100644 index 0000000000..8af9addfb3 --- /dev/null +++ b/import_shims/studio/course_modes/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.urls', 'common.djangoapps.course_modes.urls') + +from common.djangoapps.course_modes.urls import * diff --git a/import_shims/studio/course_modes/views.py b/import_shims/studio/course_modes/views.py new file mode 100644 index 0000000000..e1971cbd67 --- /dev/null +++ b/import_shims/studio/course_modes/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('course_modes.views', 'common.djangoapps.course_modes.views') + +from common.djangoapps.course_modes.views import * diff --git a/import_shims/studio/database_fixups/__init__.py b/import_shims/studio/database_fixups/__init__.py new file mode 100644 index 0000000000..a43cf8ff09 --- /dev/null +++ b/import_shims/studio/database_fixups/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('database_fixups', 'common.djangoapps.database_fixups') + +from common.djangoapps.database_fixups import * diff --git a/import_shims/studio/edxmako/__init__.py b/import_shims/studio/edxmako/__init__.py new file mode 100644 index 0000000000..8946feafc0 --- /dev/null +++ b/import_shims/studio/edxmako/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako', 'common.djangoapps.edxmako') + +from common.djangoapps.edxmako import * diff --git a/import_shims/studio/edxmako/apps.py b/import_shims/studio/edxmako/apps.py new file mode 100644 index 0000000000..2ca90ecffa --- /dev/null +++ b/import_shims/studio/edxmako/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.apps', 'common.djangoapps.edxmako.apps') + +from common.djangoapps.edxmako.apps import * diff --git a/import_shims/studio/edxmako/backend.py b/import_shims/studio/edxmako/backend.py new file mode 100644 index 0000000000..0e2cf327c1 --- /dev/null +++ b/import_shims/studio/edxmako/backend.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.backend', 'common.djangoapps.edxmako.backend') + +from common.djangoapps.edxmako.backend import * diff --git a/import_shims/studio/edxmako/makoloader.py b/import_shims/studio/edxmako/makoloader.py new file mode 100644 index 0000000000..f94dff6239 --- /dev/null +++ b/import_shims/studio/edxmako/makoloader.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.makoloader', 'common.djangoapps.edxmako.makoloader') + +from common.djangoapps.edxmako.makoloader import * diff --git a/import_shims/studio/edxmako/paths.py b/import_shims/studio/edxmako/paths.py new file mode 100644 index 0000000000..34b539091c --- /dev/null +++ b/import_shims/studio/edxmako/paths.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.paths', 'common.djangoapps.edxmako.paths') + +from common.djangoapps.edxmako.paths import * diff --git a/import_shims/studio/edxmako/request_context.py b/import_shims/studio/edxmako/request_context.py new file mode 100644 index 0000000000..faf3c0b56d --- /dev/null +++ b/import_shims/studio/edxmako/request_context.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.request_context', 'common.djangoapps.edxmako.request_context') + +from common.djangoapps.edxmako.request_context import * diff --git a/import_shims/studio/edxmako/shortcuts.py b/import_shims/studio/edxmako/shortcuts.py new file mode 100644 index 0000000000..78198ced74 --- /dev/null +++ b/import_shims/studio/edxmako/shortcuts.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.shortcuts', 'common.djangoapps.edxmako.shortcuts') + +from common.djangoapps.edxmako.shortcuts import * diff --git a/import_shims/studio/edxmako/template.py b/import_shims/studio/edxmako/template.py new file mode 100644 index 0000000000..cf0592a314 --- /dev/null +++ b/import_shims/studio/edxmako/template.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.template', 'common.djangoapps.edxmako.template') + +from common.djangoapps.edxmako.template import * diff --git a/import_shims/studio/edxmako/tests.py b/import_shims/studio/edxmako/tests.py new file mode 100644 index 0000000000..5f82c23ee3 --- /dev/null +++ b/import_shims/studio/edxmako/tests.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('edxmako.tests', 'common.djangoapps.edxmako.tests') + +from common.djangoapps.edxmako.tests import * diff --git a/import_shims/studio/entitlements/__init__.py b/import_shims/studio/entitlements/__init__.py new file mode 100644 index 0000000000..80e98d5ef6 --- /dev/null +++ b/import_shims/studio/entitlements/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements', 'common.djangoapps.entitlements') + +from common.djangoapps.entitlements import * diff --git a/import_shims/studio/entitlements/admin.py b/import_shims/studio/entitlements/admin.py new file mode 100644 index 0000000000..8e6bbd05a5 --- /dev/null +++ b/import_shims/studio/entitlements/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.admin', 'common.djangoapps.entitlements.admin') + +from common.djangoapps.entitlements.admin import * diff --git a/import_shims/studio/entitlements/api.py b/import_shims/studio/entitlements/api.py new file mode 100644 index 0000000000..e8e6a9585b --- /dev/null +++ b/import_shims/studio/entitlements/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.api', 'common.djangoapps.entitlements.api') + +from common.djangoapps.entitlements.api import * diff --git a/import_shims/studio/entitlements/apps.py b/import_shims/studio/entitlements/apps.py new file mode 100644 index 0000000000..fc5884bb1f --- /dev/null +++ b/import_shims/studio/entitlements/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.apps', 'common.djangoapps.entitlements.apps') + +from common.djangoapps.entitlements.apps import * diff --git a/import_shims/studio/entitlements/management/__init__.py b/import_shims/studio/entitlements/management/__init__.py new file mode 100644 index 0000000000..45bd12618d --- /dev/null +++ b/import_shims/studio/entitlements/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management', 'common.djangoapps.entitlements.management') + +from common.djangoapps.entitlements.management import * diff --git a/import_shims/studio/entitlements/management/commands/__init__.py b/import_shims/studio/entitlements/management/commands/__init__.py new file mode 100644 index 0000000000..13f52e735f --- /dev/null +++ b/import_shims/studio/entitlements/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands', 'common.djangoapps.entitlements.management.commands') + +from common.djangoapps.entitlements.management.commands import * diff --git a/import_shims/studio/entitlements/management/commands/expire_old_entitlements.py b/import_shims/studio/entitlements/management/commands/expire_old_entitlements.py new file mode 100644 index 0000000000..3bdfa7163b --- /dev/null +++ b/import_shims/studio/entitlements/management/commands/expire_old_entitlements.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.expire_old_entitlements', 'common.djangoapps.entitlements.management.commands.expire_old_entitlements') + +from common.djangoapps.entitlements.management.commands.expire_old_entitlements import * diff --git a/import_shims/studio/entitlements/management/commands/tests/__init__.py b/import_shims/studio/entitlements/management/commands/tests/__init__.py new file mode 100644 index 0000000000..70d804c7d5 --- /dev/null +++ b/import_shims/studio/entitlements/management/commands/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.tests', 'common.djangoapps.entitlements.management.commands.tests') + +from common.djangoapps.entitlements.management.commands.tests import * diff --git a/import_shims/studio/entitlements/management/commands/tests/test_expire_old_entitlements.py b/import_shims/studio/entitlements/management/commands/tests/test_expire_old_entitlements.py new file mode 100644 index 0000000000..5f736d44b1 --- /dev/null +++ b/import_shims/studio/entitlements/management/commands/tests/test_expire_old_entitlements.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.tests.test_expire_old_entitlements', 'common.djangoapps.entitlements.management.commands.tests.test_expire_old_entitlements') + +from common.djangoapps.entitlements.management.commands.tests.test_expire_old_entitlements import * diff --git a/import_shims/studio/entitlements/management/commands/update_entitlement_mode.py b/import_shims/studio/entitlements/management/commands/update_entitlement_mode.py new file mode 100644 index 0000000000..cc2df58af9 --- /dev/null +++ b/import_shims/studio/entitlements/management/commands/update_entitlement_mode.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.management.commands.update_entitlement_mode', 'common.djangoapps.entitlements.management.commands.update_entitlement_mode') + +from common.djangoapps.entitlements.management.commands.update_entitlement_mode import * diff --git a/import_shims/studio/entitlements/models.py b/import_shims/studio/entitlements/models.py new file mode 100644 index 0000000000..bef6e0c52e --- /dev/null +++ b/import_shims/studio/entitlements/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.models', 'common.djangoapps.entitlements.models') + +from common.djangoapps.entitlements.models import * diff --git a/import_shims/studio/entitlements/rest_api/__init__.py b/import_shims/studio/entitlements/rest_api/__init__.py new file mode 100644 index 0000000000..08081a3573 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api', 'common.djangoapps.entitlements.rest_api') + +from common.djangoapps.entitlements.rest_api import * diff --git a/import_shims/studio/entitlements/rest_api/urls.py b/import_shims/studio/entitlements/rest_api/urls.py new file mode 100644 index 0000000000..9c377d18a5 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.urls', 'common.djangoapps.entitlements.rest_api.urls') + +from common.djangoapps.entitlements.rest_api.urls import * diff --git a/import_shims/studio/entitlements/rest_api/v1/__init__.py b/import_shims/studio/entitlements/rest_api/v1/__init__.py new file mode 100644 index 0000000000..7689d9ccbe --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1', 'common.djangoapps.entitlements.rest_api.v1') + +from common.djangoapps.entitlements.rest_api.v1 import * diff --git a/import_shims/studio/entitlements/rest_api/v1/filters.py b/import_shims/studio/entitlements/rest_api/v1/filters.py new file mode 100644 index 0000000000..fd4dbd708d --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/filters.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.filters', 'common.djangoapps.entitlements.rest_api.v1.filters') + +from common.djangoapps.entitlements.rest_api.v1.filters import * diff --git a/import_shims/studio/entitlements/rest_api/v1/permissions.py b/import_shims/studio/entitlements/rest_api/v1/permissions.py new file mode 100644 index 0000000000..13f5d5c635 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/permissions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.permissions', 'common.djangoapps.entitlements.rest_api.v1.permissions') + +from common.djangoapps.entitlements.rest_api.v1.permissions import * diff --git a/import_shims/studio/entitlements/rest_api/v1/serializers.py b/import_shims/studio/entitlements/rest_api/v1/serializers.py new file mode 100644 index 0000000000..ed28d10b37 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.serializers', 'common.djangoapps.entitlements.rest_api.v1.serializers') + +from common.djangoapps.entitlements.rest_api.v1.serializers import * diff --git a/import_shims/studio/entitlements/rest_api/v1/tests/__init__.py b/import_shims/studio/entitlements/rest_api/v1/tests/__init__.py new file mode 100644 index 0000000000..0e0c962370 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.tests', 'common.djangoapps.entitlements.rest_api.v1.tests') + +from common.djangoapps.entitlements.rest_api.v1.tests import * diff --git a/import_shims/studio/entitlements/rest_api/v1/tests/test_serializers.py b/import_shims/studio/entitlements/rest_api/v1/tests/test_serializers.py new file mode 100644 index 0000000000..7794996779 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/tests/test_serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.tests.test_serializers', 'common.djangoapps.entitlements.rest_api.v1.tests.test_serializers') + +from common.djangoapps.entitlements.rest_api.v1.tests.test_serializers import * diff --git a/import_shims/studio/entitlements/rest_api/v1/tests/test_views.py b/import_shims/studio/entitlements/rest_api/v1/tests/test_views.py new file mode 100644 index 0000000000..26cf1e48ff --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.tests.test_views', 'common.djangoapps.entitlements.rest_api.v1.tests.test_views') + +from common.djangoapps.entitlements.rest_api.v1.tests.test_views import * diff --git a/import_shims/studio/entitlements/rest_api/v1/urls.py b/import_shims/studio/entitlements/rest_api/v1/urls.py new file mode 100644 index 0000000000..6b58a24af6 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.urls', 'common.djangoapps.entitlements.rest_api.v1.urls') + +from common.djangoapps.entitlements.rest_api.v1.urls import * diff --git a/import_shims/studio/entitlements/rest_api/v1/views.py b/import_shims/studio/entitlements/rest_api/v1/views.py new file mode 100644 index 0000000000..36040ac279 --- /dev/null +++ b/import_shims/studio/entitlements/rest_api/v1/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.rest_api.v1.views', 'common.djangoapps.entitlements.rest_api.v1.views') + +from common.djangoapps.entitlements.rest_api.v1.views import * diff --git a/import_shims/studio/entitlements/signals.py b/import_shims/studio/entitlements/signals.py new file mode 100644 index 0000000000..23a5da7ca8 --- /dev/null +++ b/import_shims/studio/entitlements/signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.signals', 'common.djangoapps.entitlements.signals') + +from common.djangoapps.entitlements.signals import * diff --git a/import_shims/studio/entitlements/tasks.py b/import_shims/studio/entitlements/tasks.py new file mode 100644 index 0000000000..1a078a755e --- /dev/null +++ b/import_shims/studio/entitlements/tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tasks', 'common.djangoapps.entitlements.tasks') + +from common.djangoapps.entitlements.tasks import * diff --git a/import_shims/studio/entitlements/tests/__init__.py b/import_shims/studio/entitlements/tests/__init__.py new file mode 100644 index 0000000000..858d32fad4 --- /dev/null +++ b/import_shims/studio/entitlements/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests', 'common.djangoapps.entitlements.tests') + +from common.djangoapps.entitlements.tests import * diff --git a/import_shims/studio/entitlements/tests/factories.py b/import_shims/studio/entitlements/tests/factories.py new file mode 100644 index 0000000000..e57a7f6e29 --- /dev/null +++ b/import_shims/studio/entitlements/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.factories', 'common.djangoapps.entitlements.tests.factories') + +from common.djangoapps.entitlements.tests.factories import * diff --git a/import_shims/studio/entitlements/tests/test_models.py b/import_shims/studio/entitlements/tests/test_models.py new file mode 100644 index 0000000000..be74966814 --- /dev/null +++ b/import_shims/studio/entitlements/tests/test_models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.test_models', 'common.djangoapps.entitlements.tests.test_models') + +from common.djangoapps.entitlements.tests.test_models import * diff --git a/import_shims/studio/entitlements/tests/test_tasks.py b/import_shims/studio/entitlements/tests/test_tasks.py new file mode 100644 index 0000000000..97c1078c41 --- /dev/null +++ b/import_shims/studio/entitlements/tests/test_tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.test_tasks', 'common.djangoapps.entitlements.tests.test_tasks') + +from common.djangoapps.entitlements.tests.test_tasks import * diff --git a/import_shims/studio/entitlements/tests/test_utils.py b/import_shims/studio/entitlements/tests/test_utils.py new file mode 100644 index 0000000000..a241173b35 --- /dev/null +++ b/import_shims/studio/entitlements/tests/test_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.tests.test_utils', 'common.djangoapps.entitlements.tests.test_utils') + +from common.djangoapps.entitlements.tests.test_utils import * diff --git a/import_shims/studio/entitlements/utils.py b/import_shims/studio/entitlements/utils.py new file mode 100644 index 0000000000..afb1aa3677 --- /dev/null +++ b/import_shims/studio/entitlements/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('entitlements.utils', 'common.djangoapps.entitlements.utils') + +from common.djangoapps.entitlements.utils import * diff --git a/import_shims/studio/pipeline_mako/__init__.py b/import_shims/studio/pipeline_mako/__init__.py new file mode 100644 index 0000000000..ed1028e435 --- /dev/null +++ b/import_shims/studio/pipeline_mako/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako', 'common.djangoapps.pipeline_mako') + +from common.djangoapps.pipeline_mako import * diff --git a/import_shims/studio/pipeline_mako/helpers/__init__.py b/import_shims/studio/pipeline_mako/helpers/__init__.py new file mode 100644 index 0000000000..b780ffd340 --- /dev/null +++ b/import_shims/studio/pipeline_mako/helpers/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.helpers', 'common.djangoapps.pipeline_mako.helpers') + +from common.djangoapps.pipeline_mako.helpers import * diff --git a/import_shims/studio/pipeline_mako/helpers/studiofrontend.py b/import_shims/studio/pipeline_mako/helpers/studiofrontend.py new file mode 100644 index 0000000000..4bf4ce9184 --- /dev/null +++ b/import_shims/studio/pipeline_mako/helpers/studiofrontend.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.helpers.studiofrontend', 'common.djangoapps.pipeline_mako.helpers.studiofrontend') + +from common.djangoapps.pipeline_mako.helpers.studiofrontend import * diff --git a/import_shims/studio/pipeline_mako/tests/__init__.py b/import_shims/studio/pipeline_mako/tests/__init__.py new file mode 100644 index 0000000000..c235280da5 --- /dev/null +++ b/import_shims/studio/pipeline_mako/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.tests', 'common.djangoapps.pipeline_mako.tests') + +from common.djangoapps.pipeline_mako.tests import * diff --git a/import_shims/studio/pipeline_mako/tests/test_render.py b/import_shims/studio/pipeline_mako/tests/test_render.py new file mode 100644 index 0000000000..4951f52e81 --- /dev/null +++ b/import_shims/studio/pipeline_mako/tests/test_render.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.tests.test_render', 'common.djangoapps.pipeline_mako.tests.test_render') + +from common.djangoapps.pipeline_mako.tests.test_render import * diff --git a/import_shims/studio/pipeline_mako/tests/test_static_content.py b/import_shims/studio/pipeline_mako/tests/test_static_content.py new file mode 100644 index 0000000000..74a9116932 --- /dev/null +++ b/import_shims/studio/pipeline_mako/tests/test_static_content.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('pipeline_mako.tests.test_static_content', 'common.djangoapps.pipeline_mako.tests.test_static_content') + +from common.djangoapps.pipeline_mako.tests.test_static_content import * diff --git a/import_shims/studio/static_replace/__init__.py b/import_shims/studio/static_replace/__init__.py new file mode 100644 index 0000000000..6206589364 --- /dev/null +++ b/import_shims/studio/static_replace/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace', 'common.djangoapps.static_replace') + +from common.djangoapps.static_replace import * diff --git a/import_shims/studio/static_replace/admin.py b/import_shims/studio/static_replace/admin.py new file mode 100644 index 0000000000..0e80b27782 --- /dev/null +++ b/import_shims/studio/static_replace/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.admin', 'common.djangoapps.static_replace.admin') + +from common.djangoapps.static_replace.admin import * diff --git a/import_shims/studio/static_replace/management/__init__.py b/import_shims/studio/static_replace/management/__init__.py new file mode 100644 index 0000000000..bd3cd2e159 --- /dev/null +++ b/import_shims/studio/static_replace/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.management', 'common.djangoapps.static_replace.management') + +from common.djangoapps.static_replace.management import * diff --git a/import_shims/studio/static_replace/management/commands/__init__.py b/import_shims/studio/static_replace/management/commands/__init__.py new file mode 100644 index 0000000000..924ba91ec4 --- /dev/null +++ b/import_shims/studio/static_replace/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.management.commands', 'common.djangoapps.static_replace.management.commands') + +from common.djangoapps.static_replace.management.commands import * diff --git a/import_shims/studio/static_replace/management/commands/clear_collectstatic_cache.py b/import_shims/studio/static_replace/management/commands/clear_collectstatic_cache.py new file mode 100644 index 0000000000..f48e6c0541 --- /dev/null +++ b/import_shims/studio/static_replace/management/commands/clear_collectstatic_cache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.management.commands.clear_collectstatic_cache', 'common.djangoapps.static_replace.management.commands.clear_collectstatic_cache') + +from common.djangoapps.static_replace.management.commands.clear_collectstatic_cache import * diff --git a/import_shims/studio/static_replace/models.py b/import_shims/studio/static_replace/models.py new file mode 100644 index 0000000000..fd13639c7e --- /dev/null +++ b/import_shims/studio/static_replace/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.models', 'common.djangoapps.static_replace.models') + +from common.djangoapps.static_replace.models import * diff --git a/import_shims/studio/static_replace/test/__init__.py b/import_shims/studio/static_replace/test/__init__.py new file mode 100644 index 0000000000..a97f94831a --- /dev/null +++ b/import_shims/studio/static_replace/test/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.test', 'common.djangoapps.static_replace.test') + +from common.djangoapps.static_replace.test import * diff --git a/import_shims/studio/static_replace/test/test_static_replace.py b/import_shims/studio/static_replace/test/test_static_replace.py new file mode 100644 index 0000000000..70597a699a --- /dev/null +++ b/import_shims/studio/static_replace/test/test_static_replace.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('static_replace.test.test_static_replace', 'common.djangoapps.static_replace.test.test_static_replace') + +from common.djangoapps.static_replace.test.test_static_replace import * diff --git a/import_shims/studio/status/__init__.py b/import_shims/studio/status/__init__.py new file mode 100644 index 0000000000..5a13d08f26 --- /dev/null +++ b/import_shims/studio/status/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status', 'common.djangoapps.status') + +from common.djangoapps.status import * diff --git a/import_shims/studio/status/models.py b/import_shims/studio/status/models.py new file mode 100644 index 0000000000..f5472b0bfb --- /dev/null +++ b/import_shims/studio/status/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status.models', 'common.djangoapps.status.models') + +from common.djangoapps.status.models import * diff --git a/import_shims/studio/status/status.py b/import_shims/studio/status/status.py new file mode 100644 index 0000000000..58ce46f399 --- /dev/null +++ b/import_shims/studio/status/status.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status.status', 'common.djangoapps.status.status') + +from common.djangoapps.status.status import * diff --git a/import_shims/studio/status/tests.py b/import_shims/studio/status/tests.py new file mode 100644 index 0000000000..2f1eddb757 --- /dev/null +++ b/import_shims/studio/status/tests.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('status.tests', 'common.djangoapps.status.tests') + +from common.djangoapps.status.tests import * diff --git a/import_shims/studio/student/__init__.py b/import_shims/studio/student/__init__.py new file mode 100644 index 0000000000..7921410e6a --- /dev/null +++ b/import_shims/studio/student/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student', 'common.djangoapps.student') + +from common.djangoapps.student import * diff --git a/import_shims/studio/student/admin.py b/import_shims/studio/student/admin.py new file mode 100644 index 0000000000..e0e640ec69 --- /dev/null +++ b/import_shims/studio/student/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.admin', 'common.djangoapps.student.admin') + +from common.djangoapps.student.admin import * diff --git a/import_shims/studio/student/api.py b/import_shims/studio/student/api.py new file mode 100644 index 0000000000..3157baeb4d --- /dev/null +++ b/import_shims/studio/student/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.api', 'common.djangoapps.student.api') + +from common.djangoapps.student.api import * diff --git a/import_shims/studio/student/apps.py b/import_shims/studio/student/apps.py new file mode 100644 index 0000000000..54b77ea847 --- /dev/null +++ b/import_shims/studio/student/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.apps', 'common.djangoapps.student.apps') + +from common.djangoapps.student.apps import * diff --git a/import_shims/studio/student/auth.py b/import_shims/studio/student/auth.py new file mode 100644 index 0000000000..cac8c0d18a --- /dev/null +++ b/import_shims/studio/student/auth.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.auth', 'common.djangoapps.student.auth') + +from common.djangoapps.student.auth import * diff --git a/import_shims/studio/student/forms.py b/import_shims/studio/student/forms.py new file mode 100644 index 0000000000..720e7ea842 --- /dev/null +++ b/import_shims/studio/student/forms.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.forms', 'common.djangoapps.student.forms') + +from common.djangoapps.student.forms import * diff --git a/import_shims/studio/student/helpers.py b/import_shims/studio/student/helpers.py new file mode 100644 index 0000000000..7d448a557e --- /dev/null +++ b/import_shims/studio/student/helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.helpers', 'common.djangoapps.student.helpers') + +from common.djangoapps.student.helpers import * diff --git a/import_shims/studio/student/management/__init__.py b/import_shims/studio/student/management/__init__.py new file mode 100644 index 0000000000..3ac1769d0b --- /dev/null +++ b/import_shims/studio/student/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management', 'common.djangoapps.student.management') + +from common.djangoapps.student.management import * diff --git a/import_shims/studio/student/management/commands/__init__.py b/import_shims/studio/student/management/commands/__init__.py new file mode 100644 index 0000000000..69627fdcec --- /dev/null +++ b/import_shims/studio/student/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands', 'common.djangoapps.student.management.commands') + +from common.djangoapps.student.management.commands import * diff --git a/import_shims/studio/student/management/commands/_create_users.py b/import_shims/studio/student/management/commands/_create_users.py new file mode 100644 index 0000000000..63888425ee --- /dev/null +++ b/import_shims/studio/student/management/commands/_create_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands._create_users', 'common.djangoapps.student.management.commands._create_users') + +from common.djangoapps.student.management.commands._create_users import * diff --git a/import_shims/studio/student/management/commands/add_to_group.py b/import_shims/studio/student/management/commands/add_to_group.py new file mode 100644 index 0000000000..eb768f48a8 --- /dev/null +++ b/import_shims/studio/student/management/commands/add_to_group.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.add_to_group', 'common.djangoapps.student.management.commands.add_to_group') + +from common.djangoapps.student.management.commands.add_to_group import * diff --git a/import_shims/studio/student/management/commands/anonymized_id_mapping.py b/import_shims/studio/student/management/commands/anonymized_id_mapping.py new file mode 100644 index 0000000000..e1ace4626b --- /dev/null +++ b/import_shims/studio/student/management/commands/anonymized_id_mapping.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.anonymized_id_mapping', 'common.djangoapps.student.management.commands.anonymized_id_mapping') + +from common.djangoapps.student.management.commands.anonymized_id_mapping import * diff --git a/import_shims/studio/student/management/commands/assigngroups.py b/import_shims/studio/student/management/commands/assigngroups.py new file mode 100644 index 0000000000..cd5b213370 --- /dev/null +++ b/import_shims/studio/student/management/commands/assigngroups.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.assigngroups', 'common.djangoapps.student.management.commands.assigngroups') + +from common.djangoapps.student.management.commands.assigngroups import * diff --git a/import_shims/studio/student/management/commands/bulk_change_enrollment.py b/import_shims/studio/student/management/commands/bulk_change_enrollment.py new file mode 100644 index 0000000000..6204abf573 --- /dev/null +++ b/import_shims/studio/student/management/commands/bulk_change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_change_enrollment', 'common.djangoapps.student.management.commands.bulk_change_enrollment') + +from common.djangoapps.student.management.commands.bulk_change_enrollment import * diff --git a/import_shims/studio/student/management/commands/bulk_change_enrollment_csv.py b/import_shims/studio/student/management/commands/bulk_change_enrollment_csv.py new file mode 100644 index 0000000000..d4a2a90941 --- /dev/null +++ b/import_shims/studio/student/management/commands/bulk_change_enrollment_csv.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_change_enrollment_csv', 'common.djangoapps.student.management.commands.bulk_change_enrollment_csv') + +from common.djangoapps.student.management.commands.bulk_change_enrollment_csv import * diff --git a/import_shims/studio/student/management/commands/bulk_unenroll.py b/import_shims/studio/student/management/commands/bulk_unenroll.py new file mode 100644 index 0000000000..832a85d03b --- /dev/null +++ b/import_shims/studio/student/management/commands/bulk_unenroll.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_unenroll', 'common.djangoapps.student.management.commands.bulk_unenroll') + +from common.djangoapps.student.management.commands.bulk_unenroll import * diff --git a/import_shims/studio/student/management/commands/bulk_update_email.py b/import_shims/studio/student/management/commands/bulk_update_email.py new file mode 100644 index 0000000000..dd18a84c97 --- /dev/null +++ b/import_shims/studio/student/management/commands/bulk_update_email.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.bulk_update_email', 'common.djangoapps.student.management.commands.bulk_update_email') + +from common.djangoapps.student.management.commands.bulk_update_email import * diff --git a/import_shims/studio/student/management/commands/cert_restriction.py b/import_shims/studio/student/management/commands/cert_restriction.py new file mode 100644 index 0000000000..b42cf2b33d --- /dev/null +++ b/import_shims/studio/student/management/commands/cert_restriction.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.cert_restriction', 'common.djangoapps.student.management.commands.cert_restriction') + +from common.djangoapps.student.management.commands.cert_restriction import * diff --git a/import_shims/studio/student/management/commands/change_eligibility_deadline.py b/import_shims/studio/student/management/commands/change_eligibility_deadline.py new file mode 100644 index 0000000000..165f1918a9 --- /dev/null +++ b/import_shims/studio/student/management/commands/change_eligibility_deadline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.change_eligibility_deadline', 'common.djangoapps.student.management.commands.change_eligibility_deadline') + +from common.djangoapps.student.management.commands.change_eligibility_deadline import * diff --git a/import_shims/studio/student/management/commands/change_enrollment.py b/import_shims/studio/student/management/commands/change_enrollment.py new file mode 100644 index 0000000000..21022051c3 --- /dev/null +++ b/import_shims/studio/student/management/commands/change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.change_enrollment', 'common.djangoapps.student.management.commands.change_enrollment') + +from common.djangoapps.student.management.commands.change_enrollment import * diff --git a/import_shims/studio/student/management/commands/change_enterprise_user_username.py b/import_shims/studio/student/management/commands/change_enterprise_user_username.py new file mode 100644 index 0000000000..9d843a710f --- /dev/null +++ b/import_shims/studio/student/management/commands/change_enterprise_user_username.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.change_enterprise_user_username', 'common.djangoapps.student.management.commands.change_enterprise_user_username') + +from common.djangoapps.student.management.commands.change_enterprise_user_username import * diff --git a/import_shims/studio/student/management/commands/create_random_users.py b/import_shims/studio/student/management/commands/create_random_users.py new file mode 100644 index 0000000000..63b5b06ed9 --- /dev/null +++ b/import_shims/studio/student/management/commands/create_random_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.create_random_users', 'common.djangoapps.student.management.commands.create_random_users') + +from common.djangoapps.student.management.commands.create_random_users import * diff --git a/import_shims/studio/student/management/commands/create_test_users.py b/import_shims/studio/student/management/commands/create_test_users.py new file mode 100644 index 0000000000..60e92c12fb --- /dev/null +++ b/import_shims/studio/student/management/commands/create_test_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.create_test_users', 'common.djangoapps.student.management.commands.create_test_users') + +from common.djangoapps.student.management.commands.create_test_users import * diff --git a/import_shims/studio/student/management/commands/export_staff_users.py b/import_shims/studio/student/management/commands/export_staff_users.py new file mode 100644 index 0000000000..972ce7f4e0 --- /dev/null +++ b/import_shims/studio/student/management/commands/export_staff_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.export_staff_users', 'common.djangoapps.student.management.commands.export_staff_users') + +from common.djangoapps.student.management.commands.export_staff_users import * diff --git a/import_shims/studio/student/management/commands/manage_group.py b/import_shims/studio/student/management/commands/manage_group.py new file mode 100644 index 0000000000..44ebc7b31a --- /dev/null +++ b/import_shims/studio/student/management/commands/manage_group.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.manage_group', 'common.djangoapps.student.management.commands.manage_group') + +from common.djangoapps.student.management.commands.manage_group import * diff --git a/import_shims/studio/student/management/commands/manage_user.py b/import_shims/studio/student/management/commands/manage_user.py new file mode 100644 index 0000000000..5ac14853a0 --- /dev/null +++ b/import_shims/studio/student/management/commands/manage_user.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.manage_user', 'common.djangoapps.student.management.commands.manage_user') + +from common.djangoapps.student.management.commands.manage_user import * diff --git a/import_shims/studio/student/management/commands/populate_created_on_site_user_attribute.py b/import_shims/studio/student/management/commands/populate_created_on_site_user_attribute.py new file mode 100644 index 0000000000..cc717ada1f --- /dev/null +++ b/import_shims/studio/student/management/commands/populate_created_on_site_user_attribute.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.populate_created_on_site_user_attribute', 'common.djangoapps.student.management.commands.populate_created_on_site_user_attribute') + +from common.djangoapps.student.management.commands.populate_created_on_site_user_attribute import * diff --git a/import_shims/studio/student/management/commands/recover_account.py b/import_shims/studio/student/management/commands/recover_account.py new file mode 100644 index 0000000000..cf1245c0e8 --- /dev/null +++ b/import_shims/studio/student/management/commands/recover_account.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.recover_account', 'common.djangoapps.student.management.commands.recover_account') + +from common.djangoapps.student.management.commands.recover_account import * diff --git a/import_shims/studio/student/management/commands/set_staff.py b/import_shims/studio/student/management/commands/set_staff.py new file mode 100644 index 0000000000..c4c5061af2 --- /dev/null +++ b/import_shims/studio/student/management/commands/set_staff.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.set_staff', 'common.djangoapps.student.management.commands.set_staff') + +from common.djangoapps.student.management.commands.set_staff import * diff --git a/import_shims/studio/student/management/commands/set_superuser.py b/import_shims/studio/student/management/commands/set_superuser.py new file mode 100644 index 0000000000..8e0a97af8c --- /dev/null +++ b/import_shims/studio/student/management/commands/set_superuser.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.set_superuser', 'common.djangoapps.student.management.commands.set_superuser') + +from common.djangoapps.student.management.commands.set_superuser import * diff --git a/import_shims/studio/student/management/commands/transfer_students.py b/import_shims/studio/student/management/commands/transfer_students.py new file mode 100644 index 0000000000..c2bd84fc0d --- /dev/null +++ b/import_shims/studio/student/management/commands/transfer_students.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.commands.transfer_students', 'common.djangoapps.student.management.commands.transfer_students') + +from common.djangoapps.student.management.commands.transfer_students import * diff --git a/import_shims/studio/student/management/tests/__init__.py b/import_shims/studio/student/management/tests/__init__.py new file mode 100644 index 0000000000..b35860319d --- /dev/null +++ b/import_shims/studio/student/management/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests', 'common.djangoapps.student.management.tests') + +from common.djangoapps.student.management.tests import * diff --git a/import_shims/studio/student/management/tests/test_bulk_change_enrollment.py b/import_shims/studio/student/management/tests/test_bulk_change_enrollment.py new file mode 100644 index 0000000000..b88a92bf1c --- /dev/null +++ b/import_shims/studio/student/management/tests/test_bulk_change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_bulk_change_enrollment', 'common.djangoapps.student.management.tests.test_bulk_change_enrollment') + +from common.djangoapps.student.management.tests.test_bulk_change_enrollment import * diff --git a/import_shims/studio/student/management/tests/test_bulk_change_enrollment_csv.py b/import_shims/studio/student/management/tests/test_bulk_change_enrollment_csv.py new file mode 100644 index 0000000000..fddfe4309b --- /dev/null +++ b/import_shims/studio/student/management/tests/test_bulk_change_enrollment_csv.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_bulk_change_enrollment_csv', 'common.djangoapps.student.management.tests.test_bulk_change_enrollment_csv') + +from common.djangoapps.student.management.tests.test_bulk_change_enrollment_csv import * diff --git a/import_shims/studio/student/management/tests/test_bulk_unenroll.py b/import_shims/studio/student/management/tests/test_bulk_unenroll.py new file mode 100644 index 0000000000..02d67e09bc --- /dev/null +++ b/import_shims/studio/student/management/tests/test_bulk_unenroll.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_bulk_unenroll', 'common.djangoapps.student.management.tests.test_bulk_unenroll') + +from common.djangoapps.student.management.tests.test_bulk_unenroll import * diff --git a/import_shims/studio/student/management/tests/test_change_eligibility_deadline.py b/import_shims/studio/student/management/tests/test_change_eligibility_deadline.py new file mode 100644 index 0000000000..1e472a8c84 --- /dev/null +++ b/import_shims/studio/student/management/tests/test_change_eligibility_deadline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_change_eligibility_deadline', 'common.djangoapps.student.management.tests.test_change_eligibility_deadline') + +from common.djangoapps.student.management.tests.test_change_eligibility_deadline import * diff --git a/import_shims/studio/student/management/tests/test_change_enrollment.py b/import_shims/studio/student/management/tests/test_change_enrollment.py new file mode 100644 index 0000000000..0b6f3a109c --- /dev/null +++ b/import_shims/studio/student/management/tests/test_change_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_change_enrollment', 'common.djangoapps.student.management.tests.test_change_enrollment') + +from common.djangoapps.student.management.tests.test_change_enrollment import * diff --git a/import_shims/studio/student/management/tests/test_change_enterprise_user_username.py b/import_shims/studio/student/management/tests/test_change_enterprise_user_username.py new file mode 100644 index 0000000000..f9eadb7c83 --- /dev/null +++ b/import_shims/studio/student/management/tests/test_change_enterprise_user_username.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_change_enterprise_user_username', 'common.djangoapps.student.management.tests.test_change_enterprise_user_username') + +from common.djangoapps.student.management.tests.test_change_enterprise_user_username import * diff --git a/import_shims/studio/student/management/tests/test_create_random_users.py b/import_shims/studio/student/management/tests/test_create_random_users.py new file mode 100644 index 0000000000..264a03c94c --- /dev/null +++ b/import_shims/studio/student/management/tests/test_create_random_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_create_random_users', 'common.djangoapps.student.management.tests.test_create_random_users') + +from common.djangoapps.student.management.tests.test_create_random_users import * diff --git a/import_shims/studio/student/management/tests/test_create_test_users.py b/import_shims/studio/student/management/tests/test_create_test_users.py new file mode 100644 index 0000000000..89fc5fdac9 --- /dev/null +++ b/import_shims/studio/student/management/tests/test_create_test_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_create_test_users', 'common.djangoapps.student.management.tests.test_create_test_users') + +from common.djangoapps.student.management.tests.test_create_test_users import * diff --git a/import_shims/studio/student/management/tests/test_export_staff_users.py b/import_shims/studio/student/management/tests/test_export_staff_users.py new file mode 100644 index 0000000000..c3b21aa5cf --- /dev/null +++ b/import_shims/studio/student/management/tests/test_export_staff_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_export_staff_users', 'common.djangoapps.student.management.tests.test_export_staff_users') + +from common.djangoapps.student.management.tests.test_export_staff_users import * diff --git a/import_shims/studio/student/management/tests/test_manage_group.py b/import_shims/studio/student/management/tests/test_manage_group.py new file mode 100644 index 0000000000..f17224ffcf --- /dev/null +++ b/import_shims/studio/student/management/tests/test_manage_group.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_manage_group', 'common.djangoapps.student.management.tests.test_manage_group') + +from common.djangoapps.student.management.tests.test_manage_group import * diff --git a/import_shims/studio/student/management/tests/test_manage_user.py b/import_shims/studio/student/management/tests/test_manage_user.py new file mode 100644 index 0000000000..134fc54344 --- /dev/null +++ b/import_shims/studio/student/management/tests/test_manage_user.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_manage_user', 'common.djangoapps.student.management.tests.test_manage_user') + +from common.djangoapps.student.management.tests.test_manage_user import * diff --git a/import_shims/studio/student/management/tests/test_populate_created_on_site_user_attribute.py b/import_shims/studio/student/management/tests/test_populate_created_on_site_user_attribute.py new file mode 100644 index 0000000000..f5e73645d2 --- /dev/null +++ b/import_shims/studio/student/management/tests/test_populate_created_on_site_user_attribute.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_populate_created_on_site_user_attribute', 'common.djangoapps.student.management.tests.test_populate_created_on_site_user_attribute') + +from common.djangoapps.student.management.tests.test_populate_created_on_site_user_attribute import * diff --git a/import_shims/studio/student/management/tests/test_recover_account.py b/import_shims/studio/student/management/tests/test_recover_account.py new file mode 100644 index 0000000000..1a975f8646 --- /dev/null +++ b/import_shims/studio/student/management/tests/test_recover_account.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_recover_account', 'common.djangoapps.student.management.tests.test_recover_account') + +from common.djangoapps.student.management.tests.test_recover_account import * diff --git a/import_shims/studio/student/management/tests/test_transfer_students.py b/import_shims/studio/student/management/tests/test_transfer_students.py new file mode 100644 index 0000000000..5a6abb78b5 --- /dev/null +++ b/import_shims/studio/student/management/tests/test_transfer_students.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.management.tests.test_transfer_students', 'common.djangoapps.student.management.tests.test_transfer_students') + +from common.djangoapps.student.management.tests.test_transfer_students import * diff --git a/import_shims/studio/student/message_types.py b/import_shims/studio/student/message_types.py new file mode 100644 index 0000000000..991505cce5 --- /dev/null +++ b/import_shims/studio/student/message_types.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.message_types', 'common.djangoapps.student.message_types') + +from common.djangoapps.student.message_types import * diff --git a/import_shims/studio/student/middleware.py b/import_shims/studio/student/middleware.py new file mode 100644 index 0000000000..32fd8e15cb --- /dev/null +++ b/import_shims/studio/student/middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.middleware', 'common.djangoapps.student.middleware') + +from common.djangoapps.student.middleware import * diff --git a/import_shims/studio/student/models.py b/import_shims/studio/student/models.py new file mode 100644 index 0000000000..ec6e1c90c7 --- /dev/null +++ b/import_shims/studio/student/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.models', 'common.djangoapps.student.models') + +from common.djangoapps.student.models import * diff --git a/import_shims/studio/student/models_api.py b/import_shims/studio/student/models_api.py new file mode 100644 index 0000000000..66285099be --- /dev/null +++ b/import_shims/studio/student/models_api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.models_api', 'common.djangoapps.student.models_api') + +from common.djangoapps.student.models_api import * diff --git a/import_shims/studio/student/role_helpers.py b/import_shims/studio/student/role_helpers.py new file mode 100644 index 0000000000..66b45f6014 --- /dev/null +++ b/import_shims/studio/student/role_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.role_helpers', 'common.djangoapps.student.role_helpers') + +from common.djangoapps.student.role_helpers import * diff --git a/import_shims/studio/student/roles.py b/import_shims/studio/student/roles.py new file mode 100644 index 0000000000..11a028503a --- /dev/null +++ b/import_shims/studio/student/roles.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.roles', 'common.djangoapps.student.roles') + +from common.djangoapps.student.roles import * diff --git a/import_shims/studio/student/signals/__init__.py b/import_shims/studio/student/signals/__init__.py new file mode 100644 index 0000000000..db8390d484 --- /dev/null +++ b/import_shims/studio/student/signals/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.signals', 'common.djangoapps.student.signals') + +from common.djangoapps.student.signals import * diff --git a/import_shims/studio/student/signals/receivers.py b/import_shims/studio/student/signals/receivers.py new file mode 100644 index 0000000000..4ae80fd70f --- /dev/null +++ b/import_shims/studio/student/signals/receivers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.signals.receivers', 'common.djangoapps.student.signals.receivers') + +from common.djangoapps.student.signals.receivers import * diff --git a/import_shims/studio/student/signals/signals.py b/import_shims/studio/student/signals/signals.py new file mode 100644 index 0000000000..77c538a8f8 --- /dev/null +++ b/import_shims/studio/student/signals/signals.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.signals.signals', 'common.djangoapps.student.signals.signals') + +from common.djangoapps.student.signals.signals import * diff --git a/import_shims/studio/student/tasks.py b/import_shims/studio/student/tasks.py new file mode 100644 index 0000000000..3fcadcd2cd --- /dev/null +++ b/import_shims/studio/student/tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tasks', 'common.djangoapps.student.tasks') + +from common.djangoapps.student.tasks import * diff --git a/import_shims/studio/student/tests/__init__.py b/import_shims/studio/student/tests/__init__.py new file mode 100644 index 0000000000..c2c2e86438 --- /dev/null +++ b/import_shims/studio/student/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests', 'common.djangoapps.student.tests') + +from common.djangoapps.student.tests import * diff --git a/import_shims/studio/student/tests/factories.py b/import_shims/studio/student/tests/factories.py new file mode 100644 index 0000000000..554f730097 --- /dev/null +++ b/import_shims/studio/student/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.factories', 'common.djangoapps.student.tests.factories') + +from common.djangoapps.student.tests.factories import * diff --git a/import_shims/studio/student/tests/test_activate_account.py b/import_shims/studio/student/tests/test_activate_account.py new file mode 100644 index 0000000000..11446e4743 --- /dev/null +++ b/import_shims/studio/student/tests/test_activate_account.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_activate_account', 'common.djangoapps.student.tests.test_activate_account') + +from common.djangoapps.student.tests.test_activate_account import * diff --git a/import_shims/studio/student/tests/test_admin_views.py b/import_shims/studio/student/tests/test_admin_views.py new file mode 100644 index 0000000000..ffa4ae4acc --- /dev/null +++ b/import_shims/studio/student/tests/test_admin_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_admin_views', 'common.djangoapps.student.tests.test_admin_views') + +from common.djangoapps.student.tests.test_admin_views import * diff --git a/import_shims/studio/student/tests/test_authz.py b/import_shims/studio/student/tests/test_authz.py new file mode 100644 index 0000000000..f296a087db --- /dev/null +++ b/import_shims/studio/student/tests/test_authz.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_authz', 'common.djangoapps.student.tests.test_authz') + +from common.djangoapps.student.tests.test_authz import * diff --git a/import_shims/studio/student/tests/test_bulk_email_settings.py b/import_shims/studio/student/tests/test_bulk_email_settings.py new file mode 100644 index 0000000000..07002a4204 --- /dev/null +++ b/import_shims/studio/student/tests/test_bulk_email_settings.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_bulk_email_settings', 'common.djangoapps.student.tests.test_bulk_email_settings') + +from common.djangoapps.student.tests.test_bulk_email_settings import * diff --git a/import_shims/studio/student/tests/test_certificates.py b/import_shims/studio/student/tests/test_certificates.py new file mode 100644 index 0000000000..7bf9fc5ef5 --- /dev/null +++ b/import_shims/studio/student/tests/test_certificates.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_certificates', 'common.djangoapps.student.tests.test_certificates') + +from common.djangoapps.student.tests.test_certificates import * diff --git a/import_shims/studio/student/tests/test_configuration_overrides.py b/import_shims/studio/student/tests/test_configuration_overrides.py new file mode 100644 index 0000000000..996cfe3010 --- /dev/null +++ b/import_shims/studio/student/tests/test_configuration_overrides.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_configuration_overrides', 'common.djangoapps.student.tests.test_configuration_overrides') + +from common.djangoapps.student.tests.test_configuration_overrides import * diff --git a/import_shims/studio/student/tests/test_course_listing.py b/import_shims/studio/student/tests/test_course_listing.py new file mode 100644 index 0000000000..82b050a967 --- /dev/null +++ b/import_shims/studio/student/tests/test_course_listing.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_course_listing', 'common.djangoapps.student.tests.test_course_listing') + +from common.djangoapps.student.tests.test_course_listing import * diff --git a/import_shims/studio/student/tests/test_credit.py b/import_shims/studio/student/tests/test_credit.py new file mode 100644 index 0000000000..8c1b30260d --- /dev/null +++ b/import_shims/studio/student/tests/test_credit.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_credit', 'common.djangoapps.student.tests.test_credit') + +from common.djangoapps.student.tests.test_credit import * diff --git a/import_shims/studio/student/tests/test_email.py b/import_shims/studio/student/tests/test_email.py new file mode 100644 index 0000000000..dec38af30d --- /dev/null +++ b/import_shims/studio/student/tests/test_email.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_email', 'common.djangoapps.student.tests.test_email') + +from common.djangoapps.student.tests.test_email import * diff --git a/import_shims/studio/student/tests/test_enrollment.py b/import_shims/studio/student/tests/test_enrollment.py new file mode 100644 index 0000000000..49200a6439 --- /dev/null +++ b/import_shims/studio/student/tests/test_enrollment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_enrollment', 'common.djangoapps.student.tests.test_enrollment') + +from common.djangoapps.student.tests.test_enrollment import * diff --git a/import_shims/studio/student/tests/test_events.py b/import_shims/studio/student/tests/test_events.py new file mode 100644 index 0000000000..e9a5f5e56c --- /dev/null +++ b/import_shims/studio/student/tests/test_events.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_events', 'common.djangoapps.student.tests.test_events') + +from common.djangoapps.student.tests.test_events import * diff --git a/import_shims/studio/student/tests/test_helpers.py b/import_shims/studio/student/tests/test_helpers.py new file mode 100644 index 0000000000..a8bd564796 --- /dev/null +++ b/import_shims/studio/student/tests/test_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_helpers', 'common.djangoapps.student.tests.test_helpers') + +from common.djangoapps.student.tests.test_helpers import * diff --git a/import_shims/studio/student/tests/test_linkedin.py b/import_shims/studio/student/tests/test_linkedin.py new file mode 100644 index 0000000000..8eea4d4bc6 --- /dev/null +++ b/import_shims/studio/student/tests/test_linkedin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_linkedin', 'common.djangoapps.student.tests.test_linkedin') + +from common.djangoapps.student.tests.test_linkedin import * diff --git a/import_shims/studio/student/tests/test_long_username_email.py b/import_shims/studio/student/tests/test_long_username_email.py new file mode 100644 index 0000000000..7a39f4b1a7 --- /dev/null +++ b/import_shims/studio/student/tests/test_long_username_email.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_long_username_email', 'common.djangoapps.student.tests.test_long_username_email') + +from common.djangoapps.student.tests.test_long_username_email import * diff --git a/import_shims/studio/student/tests/test_models.py b/import_shims/studio/student/tests/test_models.py new file mode 100644 index 0000000000..637d9b349e --- /dev/null +++ b/import_shims/studio/student/tests/test_models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_models', 'common.djangoapps.student.tests.test_models') + +from common.djangoapps.student.tests.test_models import * diff --git a/import_shims/studio/student/tests/test_parental_controls.py b/import_shims/studio/student/tests/test_parental_controls.py new file mode 100644 index 0000000000..62c35378a8 --- /dev/null +++ b/import_shims/studio/student/tests/test_parental_controls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_parental_controls', 'common.djangoapps.student.tests.test_parental_controls') + +from common.djangoapps.student.tests.test_parental_controls import * diff --git a/import_shims/studio/student/tests/test_password_policy.py b/import_shims/studio/student/tests/test_password_policy.py new file mode 100644 index 0000000000..d65baf1651 --- /dev/null +++ b/import_shims/studio/student/tests/test_password_policy.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_password_policy', 'common.djangoapps.student.tests.test_password_policy') + +from common.djangoapps.student.tests.test_password_policy import * diff --git a/import_shims/studio/student/tests/test_receivers.py b/import_shims/studio/student/tests/test_receivers.py new file mode 100644 index 0000000000..3cf2563810 --- /dev/null +++ b/import_shims/studio/student/tests/test_receivers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_receivers', 'common.djangoapps.student.tests.test_receivers') + +from common.djangoapps.student.tests.test_receivers import * diff --git a/import_shims/studio/student/tests/test_recent_enrollments.py b/import_shims/studio/student/tests/test_recent_enrollments.py new file mode 100644 index 0000000000..1e59dae51e --- /dev/null +++ b/import_shims/studio/student/tests/test_recent_enrollments.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_recent_enrollments', 'common.djangoapps.student.tests.test_recent_enrollments') + +from common.djangoapps.student.tests.test_recent_enrollments import * diff --git a/import_shims/studio/student/tests/test_refunds.py b/import_shims/studio/student/tests/test_refunds.py new file mode 100644 index 0000000000..ac2684d714 --- /dev/null +++ b/import_shims/studio/student/tests/test_refunds.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_refunds', 'common.djangoapps.student.tests.test_refunds') + +from common.djangoapps.student.tests.test_refunds import * diff --git a/import_shims/studio/student/tests/test_retirement.py b/import_shims/studio/student/tests/test_retirement.py new file mode 100644 index 0000000000..40e9e42460 --- /dev/null +++ b/import_shims/studio/student/tests/test_retirement.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_retirement', 'common.djangoapps.student.tests.test_retirement') + +from common.djangoapps.student.tests.test_retirement import * diff --git a/import_shims/studio/student/tests/test_roles.py b/import_shims/studio/student/tests/test_roles.py new file mode 100644 index 0000000000..02da10e034 --- /dev/null +++ b/import_shims/studio/student/tests/test_roles.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_roles', 'common.djangoapps.student.tests.test_roles') + +from common.djangoapps.student.tests.test_roles import * diff --git a/import_shims/studio/student/tests/test_tasks.py b/import_shims/studio/student/tests/test_tasks.py new file mode 100644 index 0000000000..ec3a26452f --- /dev/null +++ b/import_shims/studio/student/tests/test_tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_tasks', 'common.djangoapps.student.tests.test_tasks') + +from common.djangoapps.student.tests.test_tasks import * diff --git a/import_shims/studio/student/tests/test_user_profile_properties.py b/import_shims/studio/student/tests/test_user_profile_properties.py new file mode 100644 index 0000000000..868d0efa0f --- /dev/null +++ b/import_shims/studio/student/tests/test_user_profile_properties.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_user_profile_properties', 'common.djangoapps.student.tests.test_user_profile_properties') + +from common.djangoapps.student.tests.test_user_profile_properties import * diff --git a/import_shims/studio/student/tests/test_userstanding.py b/import_shims/studio/student/tests/test_userstanding.py new file mode 100644 index 0000000000..2eabd768f0 --- /dev/null +++ b/import_shims/studio/student/tests/test_userstanding.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_userstanding', 'common.djangoapps.student.tests.test_userstanding') + +from common.djangoapps.student.tests.test_userstanding import * diff --git a/import_shims/studio/student/tests/test_verification_status.py b/import_shims/studio/student/tests/test_verification_status.py new file mode 100644 index 0000000000..ba15fd119b --- /dev/null +++ b/import_shims/studio/student/tests/test_verification_status.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_verification_status', 'common.djangoapps.student.tests.test_verification_status') + +from common.djangoapps.student.tests.test_verification_status import * diff --git a/import_shims/studio/student/tests/test_views.py b/import_shims/studio/student/tests/test_views.py new file mode 100644 index 0000000000..44d4ef720b --- /dev/null +++ b/import_shims/studio/student/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.test_views', 'common.djangoapps.student.tests.test_views') + +from common.djangoapps.student.tests.test_views import * diff --git a/import_shims/studio/student/tests/tests.py b/import_shims/studio/student/tests/tests.py new file mode 100644 index 0000000000..11c6f9943f --- /dev/null +++ b/import_shims/studio/student/tests/tests.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.tests.tests', 'common.djangoapps.student.tests.tests') + +from common.djangoapps.student.tests.tests import * diff --git a/import_shims/studio/student/text_me_the_app.py b/import_shims/studio/student/text_me_the_app.py new file mode 100644 index 0000000000..cf97b1f89c --- /dev/null +++ b/import_shims/studio/student/text_me_the_app.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.text_me_the_app', 'common.djangoapps.student.text_me_the_app') + +from common.djangoapps.student.text_me_the_app import * diff --git a/import_shims/studio/student/urls.py b/import_shims/studio/student/urls.py new file mode 100644 index 0000000000..d1c126d342 --- /dev/null +++ b/import_shims/studio/student/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.urls', 'common.djangoapps.student.urls') + +from common.djangoapps.student.urls import * diff --git a/import_shims/studio/student/views/__init__.py b/import_shims/studio/student/views/__init__.py new file mode 100644 index 0000000000..2d3c117990 --- /dev/null +++ b/import_shims/studio/student/views/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.views', 'common.djangoapps.student.views') + +from common.djangoapps.student.views import * diff --git a/import_shims/studio/student/views/dashboard.py b/import_shims/studio/student/views/dashboard.py new file mode 100644 index 0000000000..0467632cb3 --- /dev/null +++ b/import_shims/studio/student/views/dashboard.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.views.dashboard', 'common.djangoapps.student.views.dashboard') + +from common.djangoapps.student.views.dashboard import * diff --git a/import_shims/studio/student/views/management.py b/import_shims/studio/student/views/management.py new file mode 100644 index 0000000000..eacbe8f2ae --- /dev/null +++ b/import_shims/studio/student/views/management.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('student.views.management', 'common.djangoapps.student.views.management') + +from common.djangoapps.student.views.management import * diff --git a/import_shims/studio/terrain/__init__.py b/import_shims/studio/terrain/__init__.py new file mode 100644 index 0000000000..4a63a99b3d --- /dev/null +++ b/import_shims/studio/terrain/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain', 'common.djangoapps.terrain') + +from common.djangoapps.terrain import * diff --git a/import_shims/studio/terrain/stubs/__init__.py b/import_shims/studio/terrain/stubs/__init__.py new file mode 100644 index 0000000000..852fb4d5cf --- /dev/null +++ b/import_shims/studio/terrain/stubs/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs', 'common.djangoapps.terrain.stubs') + +from common.djangoapps.terrain.stubs import * diff --git a/import_shims/studio/terrain/stubs/catalog.py b/import_shims/studio/terrain/stubs/catalog.py new file mode 100644 index 0000000000..2619f93d53 --- /dev/null +++ b/import_shims/studio/terrain/stubs/catalog.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.catalog', 'common.djangoapps.terrain.stubs.catalog') + +from common.djangoapps.terrain.stubs.catalog import * diff --git a/import_shims/studio/terrain/stubs/comments.py b/import_shims/studio/terrain/stubs/comments.py new file mode 100644 index 0000000000..ebdb78821e --- /dev/null +++ b/import_shims/studio/terrain/stubs/comments.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.comments', 'common.djangoapps.terrain.stubs.comments') + +from common.djangoapps.terrain.stubs.comments import * diff --git a/import_shims/studio/terrain/stubs/ecommerce.py b/import_shims/studio/terrain/stubs/ecommerce.py new file mode 100644 index 0000000000..a56f7022b4 --- /dev/null +++ b/import_shims/studio/terrain/stubs/ecommerce.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.ecommerce', 'common.djangoapps.terrain.stubs.ecommerce') + +from common.djangoapps.terrain.stubs.ecommerce import * diff --git a/import_shims/studio/terrain/stubs/edxnotes.py b/import_shims/studio/terrain/stubs/edxnotes.py new file mode 100644 index 0000000000..55240506cf --- /dev/null +++ b/import_shims/studio/terrain/stubs/edxnotes.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.edxnotes', 'common.djangoapps.terrain.stubs.edxnotes') + +from common.djangoapps.terrain.stubs.edxnotes import * diff --git a/import_shims/studio/terrain/stubs/http.py b/import_shims/studio/terrain/stubs/http.py new file mode 100644 index 0000000000..d587bf0b9b --- /dev/null +++ b/import_shims/studio/terrain/stubs/http.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.http', 'common.djangoapps.terrain.stubs.http') + +from common.djangoapps.terrain.stubs.http import * diff --git a/import_shims/studio/terrain/stubs/lti.py b/import_shims/studio/terrain/stubs/lti.py new file mode 100644 index 0000000000..594fa9866b --- /dev/null +++ b/import_shims/studio/terrain/stubs/lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.lti', 'common.djangoapps.terrain.stubs.lti') + +from common.djangoapps.terrain.stubs.lti import * diff --git a/import_shims/studio/terrain/stubs/start.py b/import_shims/studio/terrain/stubs/start.py new file mode 100644 index 0000000000..21bee3437c --- /dev/null +++ b/import_shims/studio/terrain/stubs/start.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.start', 'common.djangoapps.terrain.stubs.start') + +from common.djangoapps.terrain.stubs.start import * diff --git a/import_shims/studio/terrain/stubs/tests/__init__.py b/import_shims/studio/terrain/stubs/tests/__init__.py new file mode 100644 index 0000000000..3528d5d4a5 --- /dev/null +++ b/import_shims/studio/terrain/stubs/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests', 'common.djangoapps.terrain.stubs.tests') + +from common.djangoapps.terrain.stubs.tests import * diff --git a/import_shims/studio/terrain/stubs/tests/test_edxnotes.py b/import_shims/studio/terrain/stubs/tests/test_edxnotes.py new file mode 100644 index 0000000000..fd21918635 --- /dev/null +++ b/import_shims/studio/terrain/stubs/tests/test_edxnotes.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_edxnotes', 'common.djangoapps.terrain.stubs.tests.test_edxnotes') + +from common.djangoapps.terrain.stubs.tests.test_edxnotes import * diff --git a/import_shims/studio/terrain/stubs/tests/test_http.py b/import_shims/studio/terrain/stubs/tests/test_http.py new file mode 100644 index 0000000000..8c8980f019 --- /dev/null +++ b/import_shims/studio/terrain/stubs/tests/test_http.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_http', 'common.djangoapps.terrain.stubs.tests.test_http') + +from common.djangoapps.terrain.stubs.tests.test_http import * diff --git a/import_shims/studio/terrain/stubs/tests/test_lti_stub.py b/import_shims/studio/terrain/stubs/tests/test_lti_stub.py new file mode 100644 index 0000000000..e718be3881 --- /dev/null +++ b/import_shims/studio/terrain/stubs/tests/test_lti_stub.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_lti_stub', 'common.djangoapps.terrain.stubs.tests.test_lti_stub') + +from common.djangoapps.terrain.stubs.tests.test_lti_stub import * diff --git a/import_shims/studio/terrain/stubs/tests/test_video.py b/import_shims/studio/terrain/stubs/tests/test_video.py new file mode 100644 index 0000000000..a2cd949a40 --- /dev/null +++ b/import_shims/studio/terrain/stubs/tests/test_video.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_video', 'common.djangoapps.terrain.stubs.tests.test_video') + +from common.djangoapps.terrain.stubs.tests.test_video import * diff --git a/import_shims/studio/terrain/stubs/tests/test_xqueue_stub.py b/import_shims/studio/terrain/stubs/tests/test_xqueue_stub.py new file mode 100644 index 0000000000..7adbabdb2b --- /dev/null +++ b/import_shims/studio/terrain/stubs/tests/test_xqueue_stub.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_xqueue_stub', 'common.djangoapps.terrain.stubs.tests.test_xqueue_stub') + +from common.djangoapps.terrain.stubs.tests.test_xqueue_stub import * diff --git a/import_shims/studio/terrain/stubs/tests/test_youtube_stub.py b/import_shims/studio/terrain/stubs/tests/test_youtube_stub.py new file mode 100644 index 0000000000..4e188c2376 --- /dev/null +++ b/import_shims/studio/terrain/stubs/tests/test_youtube_stub.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.tests.test_youtube_stub', 'common.djangoapps.terrain.stubs.tests.test_youtube_stub') + +from common.djangoapps.terrain.stubs.tests.test_youtube_stub import * diff --git a/import_shims/studio/terrain/stubs/video_source.py b/import_shims/studio/terrain/stubs/video_source.py new file mode 100644 index 0000000000..798753615a --- /dev/null +++ b/import_shims/studio/terrain/stubs/video_source.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.video_source', 'common.djangoapps.terrain.stubs.video_source') + +from common.djangoapps.terrain.stubs.video_source import * diff --git a/import_shims/studio/terrain/stubs/xqueue.py b/import_shims/studio/terrain/stubs/xqueue.py new file mode 100644 index 0000000000..6ece16501f --- /dev/null +++ b/import_shims/studio/terrain/stubs/xqueue.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.xqueue', 'common.djangoapps.terrain.stubs.xqueue') + +from common.djangoapps.terrain.stubs.xqueue import * diff --git a/import_shims/studio/terrain/stubs/youtube.py b/import_shims/studio/terrain/stubs/youtube.py new file mode 100644 index 0000000000..a84da9ee22 --- /dev/null +++ b/import_shims/studio/terrain/stubs/youtube.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('terrain.stubs.youtube', 'common.djangoapps.terrain.stubs.youtube') + +from common.djangoapps.terrain.stubs.youtube import * diff --git a/import_shims/studio/third_party_auth/__init__.py b/import_shims/studio/third_party_auth/__init__.py new file mode 100644 index 0000000000..18c19d988a --- /dev/null +++ b/import_shims/studio/third_party_auth/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth', 'common.djangoapps.third_party_auth') + +from common.djangoapps.third_party_auth import * diff --git a/import_shims/studio/third_party_auth/admin.py b/import_shims/studio/third_party_auth/admin.py new file mode 100644 index 0000000000..2233cab3b5 --- /dev/null +++ b/import_shims/studio/third_party_auth/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.admin', 'common.djangoapps.third_party_auth.admin') + +from common.djangoapps.third_party_auth.admin import * diff --git a/import_shims/studio/third_party_auth/api/__init__.py b/import_shims/studio/third_party_auth/api/__init__.py new file mode 100644 index 0000000000..5a5a444324 --- /dev/null +++ b/import_shims/studio/third_party_auth/api/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api', 'common.djangoapps.third_party_auth.api') + +from common.djangoapps.third_party_auth.api import * diff --git a/import_shims/studio/third_party_auth/api/permissions.py b/import_shims/studio/third_party_auth/api/permissions.py new file mode 100644 index 0000000000..501ced05f3 --- /dev/null +++ b/import_shims/studio/third_party_auth/api/permissions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.permissions', 'common.djangoapps.third_party_auth.api.permissions') + +from common.djangoapps.third_party_auth.api.permissions import * diff --git a/import_shims/studio/third_party_auth/api/serializers.py b/import_shims/studio/third_party_auth/api/serializers.py new file mode 100644 index 0000000000..e70908c945 --- /dev/null +++ b/import_shims/studio/third_party_auth/api/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.serializers', 'common.djangoapps.third_party_auth.api.serializers') + +from common.djangoapps.third_party_auth.api.serializers import * diff --git a/import_shims/studio/third_party_auth/api/tests/__init__.py b/import_shims/studio/third_party_auth/api/tests/__init__.py new file mode 100644 index 0000000000..ef7e02f485 --- /dev/null +++ b/import_shims/studio/third_party_auth/api/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.tests', 'common.djangoapps.third_party_auth.api.tests') + +from common.djangoapps.third_party_auth.api.tests import * diff --git a/import_shims/studio/third_party_auth/api/tests/test_permissions.py b/import_shims/studio/third_party_auth/api/tests/test_permissions.py new file mode 100644 index 0000000000..df77e14f03 --- /dev/null +++ b/import_shims/studio/third_party_auth/api/tests/test_permissions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.tests.test_permissions', 'common.djangoapps.third_party_auth.api.tests.test_permissions') + +from common.djangoapps.third_party_auth.api.tests.test_permissions import * diff --git a/import_shims/studio/third_party_auth/api/tests/test_views.py b/import_shims/studio/third_party_auth/api/tests/test_views.py new file mode 100644 index 0000000000..4996711fa6 --- /dev/null +++ b/import_shims/studio/third_party_auth/api/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.tests.test_views', 'common.djangoapps.third_party_auth.api.tests.test_views') + +from common.djangoapps.third_party_auth.api.tests.test_views import * diff --git a/import_shims/studio/third_party_auth/api/urls.py b/import_shims/studio/third_party_auth/api/urls.py new file mode 100644 index 0000000000..0f02453a55 --- /dev/null +++ b/import_shims/studio/third_party_auth/api/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.urls', 'common.djangoapps.third_party_auth.api.urls') + +from common.djangoapps.third_party_auth.api.urls import * diff --git a/import_shims/studio/third_party_auth/api/utils.py b/import_shims/studio/third_party_auth/api/utils.py new file mode 100644 index 0000000000..1eabc8a86a --- /dev/null +++ b/import_shims/studio/third_party_auth/api/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.utils', 'common.djangoapps.third_party_auth.api.utils') + +from common.djangoapps.third_party_auth.api.utils import * diff --git a/import_shims/studio/third_party_auth/api/views.py b/import_shims/studio/third_party_auth/api/views.py new file mode 100644 index 0000000000..52b63ed5ad --- /dev/null +++ b/import_shims/studio/third_party_auth/api/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.api.views', 'common.djangoapps.third_party_auth.api.views') + +from common.djangoapps.third_party_auth.api.views import * diff --git a/import_shims/studio/third_party_auth/appleid.py b/import_shims/studio/third_party_auth/appleid.py new file mode 100644 index 0000000000..84956cfa5a --- /dev/null +++ b/import_shims/studio/third_party_auth/appleid.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.appleid', 'common.djangoapps.third_party_auth.appleid') + +from common.djangoapps.third_party_auth.appleid import * diff --git a/import_shims/studio/third_party_auth/apps.py b/import_shims/studio/third_party_auth/apps.py new file mode 100644 index 0000000000..22f79f231c --- /dev/null +++ b/import_shims/studio/third_party_auth/apps.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.apps', 'common.djangoapps.third_party_auth.apps') + +from common.djangoapps.third_party_auth.apps import * diff --git a/import_shims/studio/third_party_auth/decorators.py b/import_shims/studio/third_party_auth/decorators.py new file mode 100644 index 0000000000..fc3872961e --- /dev/null +++ b/import_shims/studio/third_party_auth/decorators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.decorators', 'common.djangoapps.third_party_auth.decorators') + +from common.djangoapps.third_party_auth.decorators import * diff --git a/import_shims/studio/third_party_auth/dummy.py b/import_shims/studio/third_party_auth/dummy.py new file mode 100644 index 0000000000..97c9709669 --- /dev/null +++ b/import_shims/studio/third_party_auth/dummy.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.dummy', 'common.djangoapps.third_party_auth.dummy') + +from common.djangoapps.third_party_auth.dummy import * diff --git a/import_shims/studio/third_party_auth/exceptions.py b/import_shims/studio/third_party_auth/exceptions.py new file mode 100644 index 0000000000..55958ad7fc --- /dev/null +++ b/import_shims/studio/third_party_auth/exceptions.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.exceptions', 'common.djangoapps.third_party_auth.exceptions') + +from common.djangoapps.third_party_auth.exceptions import * diff --git a/import_shims/studio/third_party_auth/identityserver3.py b/import_shims/studio/third_party_auth/identityserver3.py new file mode 100644 index 0000000000..379e9e2cdb --- /dev/null +++ b/import_shims/studio/third_party_auth/identityserver3.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.identityserver3', 'common.djangoapps.third_party_auth.identityserver3') + +from common.djangoapps.third_party_auth.identityserver3 import * diff --git a/import_shims/studio/third_party_auth/lti.py b/import_shims/studio/third_party_auth/lti.py new file mode 100644 index 0000000000..979ba20da5 --- /dev/null +++ b/import_shims/studio/third_party_auth/lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.lti', 'common.djangoapps.third_party_auth.lti') + +from common.djangoapps.third_party_auth.lti import * diff --git a/import_shims/studio/third_party_auth/management/__init__.py b/import_shims/studio/third_party_auth/management/__init__.py new file mode 100644 index 0000000000..18e1bc948d --- /dev/null +++ b/import_shims/studio/third_party_auth/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management', 'common.djangoapps.third_party_auth.management') + +from common.djangoapps.third_party_auth.management import * diff --git a/import_shims/studio/third_party_auth/management/commands/__init__.py b/import_shims/studio/third_party_auth/management/commands/__init__.py new file mode 100644 index 0000000000..98268c9250 --- /dev/null +++ b/import_shims/studio/third_party_auth/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands', 'common.djangoapps.third_party_auth.management.commands') + +from common.djangoapps.third_party_auth.management.commands import * diff --git a/import_shims/studio/third_party_auth/management/commands/remove_social_auth_users.py b/import_shims/studio/third_party_auth/management/commands/remove_social_auth_users.py new file mode 100644 index 0000000000..1bd3cc7bc7 --- /dev/null +++ b/import_shims/studio/third_party_auth/management/commands/remove_social_auth_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.remove_social_auth_users', 'common.djangoapps.third_party_auth.management.commands.remove_social_auth_users') + +from common.djangoapps.third_party_auth.management.commands.remove_social_auth_users import * diff --git a/import_shims/studio/third_party_auth/management/commands/saml.py b/import_shims/studio/third_party_auth/management/commands/saml.py new file mode 100644 index 0000000000..7aab3a9ca4 --- /dev/null +++ b/import_shims/studio/third_party_auth/management/commands/saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.saml', 'common.djangoapps.third_party_auth.management.commands.saml') + +from common.djangoapps.third_party_auth.management.commands.saml import * diff --git a/import_shims/studio/third_party_auth/management/commands/tests/__init__.py b/import_shims/studio/third_party_auth/management/commands/tests/__init__.py new file mode 100644 index 0000000000..a3cdc2be0e --- /dev/null +++ b/import_shims/studio/third_party_auth/management/commands/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.tests', 'common.djangoapps.third_party_auth.management.commands.tests') + +from common.djangoapps.third_party_auth.management.commands.tests import * diff --git a/import_shims/studio/third_party_auth/management/commands/tests/test_remove_social_auth_users.py b/import_shims/studio/third_party_auth/management/commands/tests/test_remove_social_auth_users.py new file mode 100644 index 0000000000..f86e17ea62 --- /dev/null +++ b/import_shims/studio/third_party_auth/management/commands/tests/test_remove_social_auth_users.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.tests.test_remove_social_auth_users', 'common.djangoapps.third_party_auth.management.commands.tests.test_remove_social_auth_users') + +from common.djangoapps.third_party_auth.management.commands.tests.test_remove_social_auth_users import * diff --git a/import_shims/studio/third_party_auth/management/commands/tests/test_saml.py b/import_shims/studio/third_party_auth/management/commands/tests/test_saml.py new file mode 100644 index 0000000000..e82cbb3be3 --- /dev/null +++ b/import_shims/studio/third_party_auth/management/commands/tests/test_saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.management.commands.tests.test_saml', 'common.djangoapps.third_party_auth.management.commands.tests.test_saml') + +from common.djangoapps.third_party_auth.management.commands.tests.test_saml import * diff --git a/import_shims/studio/third_party_auth/middleware.py b/import_shims/studio/third_party_auth/middleware.py new file mode 100644 index 0000000000..f0eedcfd61 --- /dev/null +++ b/import_shims/studio/third_party_auth/middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.middleware', 'common.djangoapps.third_party_auth.middleware') + +from common.djangoapps.third_party_auth.middleware import * diff --git a/import_shims/studio/third_party_auth/models.py b/import_shims/studio/third_party_auth/models.py new file mode 100644 index 0000000000..0a6302c7e0 --- /dev/null +++ b/import_shims/studio/third_party_auth/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.models', 'common.djangoapps.third_party_auth.models') + +from common.djangoapps.third_party_auth.models import * diff --git a/import_shims/studio/third_party_auth/pipeline.py b/import_shims/studio/third_party_auth/pipeline.py new file mode 100644 index 0000000000..2ec9cab7ed --- /dev/null +++ b/import_shims/studio/third_party_auth/pipeline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.pipeline', 'common.djangoapps.third_party_auth.pipeline') + +from common.djangoapps.third_party_auth.pipeline import * diff --git a/import_shims/studio/third_party_auth/provider.py b/import_shims/studio/third_party_auth/provider.py new file mode 100644 index 0000000000..a68bf83471 --- /dev/null +++ b/import_shims/studio/third_party_auth/provider.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.provider', 'common.djangoapps.third_party_auth.provider') + +from common.djangoapps.third_party_auth.provider import * diff --git a/import_shims/studio/third_party_auth/saml.py b/import_shims/studio/third_party_auth/saml.py new file mode 100644 index 0000000000..358ef19b7e --- /dev/null +++ b/import_shims/studio/third_party_auth/saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml', 'common.djangoapps.third_party_auth.saml') + +from common.djangoapps.third_party_auth.saml import * diff --git a/import_shims/studio/third_party_auth/saml_configuration/__init__.py b/import_shims/studio/third_party_auth/saml_configuration/__init__.py new file mode 100644 index 0000000000..2286cc1963 --- /dev/null +++ b/import_shims/studio/third_party_auth/saml_configuration/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration', 'common.djangoapps.third_party_auth.saml_configuration') + +from common.djangoapps.third_party_auth.saml_configuration import * diff --git a/import_shims/studio/third_party_auth/saml_configuration/serializers.py b/import_shims/studio/third_party_auth/saml_configuration/serializers.py new file mode 100644 index 0000000000..1a753b64af --- /dev/null +++ b/import_shims/studio/third_party_auth/saml_configuration/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.serializers', 'common.djangoapps.third_party_auth.saml_configuration.serializers') + +from common.djangoapps.third_party_auth.saml_configuration.serializers import * diff --git a/import_shims/studio/third_party_auth/saml_configuration/tests/__init__.py b/import_shims/studio/third_party_auth/saml_configuration/tests/__init__.py new file mode 100644 index 0000000000..8633561cce --- /dev/null +++ b/import_shims/studio/third_party_auth/saml_configuration/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.tests', 'common.djangoapps.third_party_auth.saml_configuration.tests') + +from common.djangoapps.third_party_auth.saml_configuration.tests import * diff --git a/import_shims/studio/third_party_auth/saml_configuration/tests/test_saml_configuration.py b/import_shims/studio/third_party_auth/saml_configuration/tests/test_saml_configuration.py new file mode 100644 index 0000000000..0ea750287e --- /dev/null +++ b/import_shims/studio/third_party_auth/saml_configuration/tests/test_saml_configuration.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.tests.test_saml_configuration', 'common.djangoapps.third_party_auth.saml_configuration.tests.test_saml_configuration') + +from common.djangoapps.third_party_auth.saml_configuration.tests.test_saml_configuration import * diff --git a/import_shims/studio/third_party_auth/saml_configuration/urls.py b/import_shims/studio/third_party_auth/saml_configuration/urls.py new file mode 100644 index 0000000000..031d3ae318 --- /dev/null +++ b/import_shims/studio/third_party_auth/saml_configuration/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.urls', 'common.djangoapps.third_party_auth.saml_configuration.urls') + +from common.djangoapps.third_party_auth.saml_configuration.urls import * diff --git a/import_shims/studio/third_party_auth/saml_configuration/views.py b/import_shims/studio/third_party_auth/saml_configuration/views.py new file mode 100644 index 0000000000..89520150e3 --- /dev/null +++ b/import_shims/studio/third_party_auth/saml_configuration/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.saml_configuration.views', 'common.djangoapps.third_party_auth.saml_configuration.views') + +from common.djangoapps.third_party_auth.saml_configuration.views import * diff --git a/import_shims/studio/third_party_auth/samlproviderconfig/__init__.py b/import_shims/studio/third_party_auth/samlproviderconfig/__init__.py new file mode 100644 index 0000000000..c297bff8f9 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderconfig/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig', 'common.djangoapps.third_party_auth.samlproviderconfig') + +from common.djangoapps.third_party_auth.samlproviderconfig import * diff --git a/import_shims/studio/third_party_auth/samlproviderconfig/serializers.py b/import_shims/studio/third_party_auth/samlproviderconfig/serializers.py new file mode 100644 index 0000000000..5fae240c85 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderconfig/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.serializers', 'common.djangoapps.third_party_auth.samlproviderconfig.serializers') + +from common.djangoapps.third_party_auth.samlproviderconfig.serializers import * diff --git a/import_shims/studio/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py b/import_shims/studio/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py new file mode 100644 index 0000000000..c3dc1adeef --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.tests.test_samlproviderconfig', 'common.djangoapps.third_party_auth.samlproviderconfig.tests.test_samlproviderconfig') + +from common.djangoapps.third_party_auth.samlproviderconfig.tests.test_samlproviderconfig import * diff --git a/import_shims/studio/third_party_auth/samlproviderconfig/urls.py b/import_shims/studio/third_party_auth/samlproviderconfig/urls.py new file mode 100644 index 0000000000..e1376df3dd --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderconfig/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.urls', 'common.djangoapps.third_party_auth.samlproviderconfig.urls') + +from common.djangoapps.third_party_auth.samlproviderconfig.urls import * diff --git a/import_shims/studio/third_party_auth/samlproviderconfig/views.py b/import_shims/studio/third_party_auth/samlproviderconfig/views.py new file mode 100644 index 0000000000..021f807ef7 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderconfig/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderconfig.views', 'common.djangoapps.third_party_auth.samlproviderconfig.views') + +from common.djangoapps.third_party_auth.samlproviderconfig.views import * diff --git a/import_shims/studio/third_party_auth/samlproviderdata/__init__.py b/import_shims/studio/third_party_auth/samlproviderdata/__init__.py new file mode 100644 index 0000000000..4393e67589 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderdata/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata', 'common.djangoapps.third_party_auth.samlproviderdata') + +from common.djangoapps.third_party_auth.samlproviderdata import * diff --git a/import_shims/studio/third_party_auth/samlproviderdata/serializers.py b/import_shims/studio/third_party_auth/samlproviderdata/serializers.py new file mode 100644 index 0000000000..2749bf8941 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderdata/serializers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.serializers', 'common.djangoapps.third_party_auth.samlproviderdata.serializers') + +from common.djangoapps.third_party_auth.samlproviderdata.serializers import * diff --git a/import_shims/studio/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py b/import_shims/studio/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py new file mode 100644 index 0000000000..5ce225f158 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.tests.test_samlproviderdata', 'common.djangoapps.third_party_auth.samlproviderdata.tests.test_samlproviderdata') + +from common.djangoapps.third_party_auth.samlproviderdata.tests.test_samlproviderdata import * diff --git a/import_shims/studio/third_party_auth/samlproviderdata/urls.py b/import_shims/studio/third_party_auth/samlproviderdata/urls.py new file mode 100644 index 0000000000..558a980643 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderdata/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.urls', 'common.djangoapps.third_party_auth.samlproviderdata.urls') + +from common.djangoapps.third_party_auth.samlproviderdata.urls import * diff --git a/import_shims/studio/third_party_auth/samlproviderdata/views.py b/import_shims/studio/third_party_auth/samlproviderdata/views.py new file mode 100644 index 0000000000..8121174727 --- /dev/null +++ b/import_shims/studio/third_party_auth/samlproviderdata/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.samlproviderdata.views', 'common.djangoapps.third_party_auth.samlproviderdata.views') + +from common.djangoapps.third_party_auth.samlproviderdata.views import * diff --git a/import_shims/studio/third_party_auth/settings.py b/import_shims/studio/third_party_auth/settings.py new file mode 100644 index 0000000000..6701b7c179 --- /dev/null +++ b/import_shims/studio/third_party_auth/settings.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.settings', 'common.djangoapps.third_party_auth.settings') + +from common.djangoapps.third_party_auth.settings import * diff --git a/import_shims/studio/third_party_auth/strategy.py b/import_shims/studio/third_party_auth/strategy.py new file mode 100644 index 0000000000..df95f86f62 --- /dev/null +++ b/import_shims/studio/third_party_auth/strategy.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.strategy', 'common.djangoapps.third_party_auth.strategy') + +from common.djangoapps.third_party_auth.strategy import * diff --git a/import_shims/studio/third_party_auth/tasks.py b/import_shims/studio/third_party_auth/tasks.py new file mode 100644 index 0000000000..7220e2241e --- /dev/null +++ b/import_shims/studio/third_party_auth/tasks.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tasks', 'common.djangoapps.third_party_auth.tasks') + +from common.djangoapps.third_party_auth.tasks import * diff --git a/import_shims/studio/third_party_auth/tests/__init__.py b/import_shims/studio/third_party_auth/tests/__init__.py new file mode 100644 index 0000000000..3a7bad8e5d --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests', 'common.djangoapps.third_party_auth.tests') + +from common.djangoapps.third_party_auth.tests import * diff --git a/import_shims/studio/third_party_auth/tests/data/__init__.py b/import_shims/studio/third_party_auth/tests/data/__init__.py new file mode 100644 index 0000000000..046acef654 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/data/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.data', 'common.djangoapps.third_party_auth.tests.data') + +from common.djangoapps.third_party_auth.tests.data import * diff --git a/import_shims/studio/third_party_auth/tests/data/saml_identity_provider_mock_data.py b/import_shims/studio/third_party_auth/tests/data/saml_identity_provider_mock_data.py new file mode 100644 index 0000000000..b3df5bac88 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/data/saml_identity_provider_mock_data.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.data.saml_identity_provider_mock_data', 'common.djangoapps.third_party_auth.tests.data.saml_identity_provider_mock_data') + +from common.djangoapps.third_party_auth.tests.data.saml_identity_provider_mock_data import * diff --git a/import_shims/studio/third_party_auth/tests/factories.py b/import_shims/studio/third_party_auth/tests/factories.py new file mode 100644 index 0000000000..0a51f06edf --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/factories.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.factories', 'common.djangoapps.third_party_auth.tests.factories') + +from common.djangoapps.third_party_auth.tests.factories import * diff --git a/import_shims/studio/third_party_auth/tests/samlutils.py b/import_shims/studio/third_party_auth/tests/samlutils.py new file mode 100644 index 0000000000..e1985a09a6 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/samlutils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.samlutils', 'common.djangoapps.third_party_auth.tests.samlutils') + +from common.djangoapps.third_party_auth.tests.samlutils import * diff --git a/import_shims/studio/third_party_auth/tests/specs/__init__.py b/import_shims/studio/third_party_auth/tests/specs/__init__.py new file mode 100644 index 0000000000..fe43dd29ea --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs', 'common.djangoapps.third_party_auth.tests.specs') + +from common.djangoapps.third_party_auth.tests.specs import * diff --git a/import_shims/studio/third_party_auth/tests/specs/base.py b/import_shims/studio/third_party_auth/tests/specs/base.py new file mode 100644 index 0000000000..aa52e8b3c3 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/base.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.base', 'common.djangoapps.third_party_auth.tests.specs.base') + +from common.djangoapps.third_party_auth.tests.specs.base import * diff --git a/import_shims/studio/third_party_auth/tests/specs/test_azuread.py b/import_shims/studio/third_party_auth/tests/specs/test_azuread.py new file mode 100644 index 0000000000..3b088fcb69 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/test_azuread.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_azuread', 'common.djangoapps.third_party_auth.tests.specs.test_azuread') + +from common.djangoapps.third_party_auth.tests.specs.test_azuread import * diff --git a/import_shims/studio/third_party_auth/tests/specs/test_generic.py b/import_shims/studio/third_party_auth/tests/specs/test_generic.py new file mode 100644 index 0000000000..52c33c9838 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/test_generic.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_generic', 'common.djangoapps.third_party_auth.tests.specs.test_generic') + +from common.djangoapps.third_party_auth.tests.specs.test_generic import * diff --git a/import_shims/studio/third_party_auth/tests/specs/test_google.py b/import_shims/studio/third_party_auth/tests/specs/test_google.py new file mode 100644 index 0000000000..cf90e5378a --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/test_google.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_google', 'common.djangoapps.third_party_auth.tests.specs.test_google') + +from common.djangoapps.third_party_auth.tests.specs.test_google import * diff --git a/import_shims/studio/third_party_auth/tests/specs/test_linkedin.py b/import_shims/studio/third_party_auth/tests/specs/test_linkedin.py new file mode 100644 index 0000000000..cd9d11aee8 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/test_linkedin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_linkedin', 'common.djangoapps.third_party_auth.tests.specs.test_linkedin') + +from common.djangoapps.third_party_auth.tests.specs.test_linkedin import * diff --git a/import_shims/studio/third_party_auth/tests/specs/test_lti.py b/import_shims/studio/third_party_auth/tests/specs/test_lti.py new file mode 100644 index 0000000000..f2309a6801 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/test_lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_lti', 'common.djangoapps.third_party_auth.tests.specs.test_lti') + +from common.djangoapps.third_party_auth.tests.specs.test_lti import * diff --git a/import_shims/studio/third_party_auth/tests/specs/test_testshib.py b/import_shims/studio/third_party_auth/tests/specs/test_testshib.py new file mode 100644 index 0000000000..f45f518e7f --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/test_testshib.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_testshib', 'common.djangoapps.third_party_auth.tests.specs.test_testshib') + +from common.djangoapps.third_party_auth.tests.specs.test_testshib import * diff --git a/import_shims/studio/third_party_auth/tests/specs/test_twitter.py b/import_shims/studio/third_party_auth/tests/specs/test_twitter.py new file mode 100644 index 0000000000..421f50e7f2 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/specs/test_twitter.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.specs.test_twitter', 'common.djangoapps.third_party_auth.tests.specs.test_twitter') + +from common.djangoapps.third_party_auth.tests.specs.test_twitter import * diff --git a/import_shims/studio/third_party_auth/tests/test_admin.py b/import_shims/studio/third_party_auth/tests/test_admin.py new file mode 100644 index 0000000000..968e52bc34 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_admin', 'common.djangoapps.third_party_auth.tests.test_admin') + +from common.djangoapps.third_party_auth.tests.test_admin import * diff --git a/import_shims/studio/third_party_auth/tests/test_decorators.py b/import_shims/studio/third_party_auth/tests/test_decorators.py new file mode 100644 index 0000000000..450f7e08ee --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_decorators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_decorators', 'common.djangoapps.third_party_auth.tests.test_decorators') + +from common.djangoapps.third_party_auth.tests.test_decorators import * diff --git a/import_shims/studio/third_party_auth/tests/test_identityserver3.py b/import_shims/studio/third_party_auth/tests/test_identityserver3.py new file mode 100644 index 0000000000..5351f21477 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_identityserver3.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_identityserver3', 'common.djangoapps.third_party_auth.tests.test_identityserver3') + +from common.djangoapps.third_party_auth.tests.test_identityserver3 import * diff --git a/import_shims/studio/third_party_auth/tests/test_lti.py b/import_shims/studio/third_party_auth/tests/test_lti.py new file mode 100644 index 0000000000..93c4d7decc --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_lti.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_lti', 'common.djangoapps.third_party_auth.tests.test_lti') + +from common.djangoapps.third_party_auth.tests.test_lti import * diff --git a/import_shims/studio/third_party_auth/tests/test_middleware.py b/import_shims/studio/third_party_auth/tests/test_middleware.py new file mode 100644 index 0000000000..3cc825af63 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_middleware', 'common.djangoapps.third_party_auth.tests.test_middleware') + +from common.djangoapps.third_party_auth.tests.test_middleware import * diff --git a/import_shims/studio/third_party_auth/tests/test_pipeline.py b/import_shims/studio/third_party_auth/tests/test_pipeline.py new file mode 100644 index 0000000000..f2aefb6dfb --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_pipeline.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_pipeline', 'common.djangoapps.third_party_auth.tests.test_pipeline') + +from common.djangoapps.third_party_auth.tests.test_pipeline import * diff --git a/import_shims/studio/third_party_auth/tests/test_pipeline_integration.py b/import_shims/studio/third_party_auth/tests/test_pipeline_integration.py new file mode 100644 index 0000000000..9c624d61a3 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_pipeline_integration.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_pipeline_integration', 'common.djangoapps.third_party_auth.tests.test_pipeline_integration') + +from common.djangoapps.third_party_auth.tests.test_pipeline_integration import * diff --git a/import_shims/studio/third_party_auth/tests/test_provider.py b/import_shims/studio/third_party_auth/tests/test_provider.py new file mode 100644 index 0000000000..a4db8d0f89 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_provider.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_provider', 'common.djangoapps.third_party_auth.tests.test_provider') + +from common.djangoapps.third_party_auth.tests.test_provider import * diff --git a/import_shims/studio/third_party_auth/tests/test_saml.py b/import_shims/studio/third_party_auth/tests/test_saml.py new file mode 100644 index 0000000000..9567ab38db --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_saml.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_saml', 'common.djangoapps.third_party_auth.tests.test_saml') + +from common.djangoapps.third_party_auth.tests.test_saml import * diff --git a/import_shims/studio/third_party_auth/tests/test_settings.py b/import_shims/studio/third_party_auth/tests/test_settings.py new file mode 100644 index 0000000000..284a2a84e9 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_settings.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_settings', 'common.djangoapps.third_party_auth.tests.test_settings') + +from common.djangoapps.third_party_auth.tests.test_settings import * diff --git a/import_shims/studio/third_party_auth/tests/test_utils.py b/import_shims/studio/third_party_auth/tests/test_utils.py new file mode 100644 index 0000000000..0dc19c9a52 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_utils', 'common.djangoapps.third_party_auth.tests.test_utils') + +from common.djangoapps.third_party_auth.tests.test_utils import * diff --git a/import_shims/studio/third_party_auth/tests/test_views.py b/import_shims/studio/third_party_auth/tests/test_views.py new file mode 100644 index 0000000000..b638f83c12 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.test_views', 'common.djangoapps.third_party_auth.tests.test_views') + +from common.djangoapps.third_party_auth.tests.test_views import * diff --git a/import_shims/studio/third_party_auth/tests/testutil.py b/import_shims/studio/third_party_auth/tests/testutil.py new file mode 100644 index 0000000000..a047baef51 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/testutil.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.testutil', 'common.djangoapps.third_party_auth.tests.testutil') + +from common.djangoapps.third_party_auth.tests.testutil import * diff --git a/import_shims/studio/third_party_auth/tests/utils.py b/import_shims/studio/third_party_auth/tests/utils.py new file mode 100644 index 0000000000..083b728c32 --- /dev/null +++ b/import_shims/studio/third_party_auth/tests/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.tests.utils', 'common.djangoapps.third_party_auth.tests.utils') + +from common.djangoapps.third_party_auth.tests.utils import * diff --git a/import_shims/studio/third_party_auth/urls.py b/import_shims/studio/third_party_auth/urls.py new file mode 100644 index 0000000000..1077a81183 --- /dev/null +++ b/import_shims/studio/third_party_auth/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.urls', 'common.djangoapps.third_party_auth.urls') + +from common.djangoapps.third_party_auth.urls import * diff --git a/import_shims/studio/third_party_auth/utils.py b/import_shims/studio/third_party_auth/utils.py new file mode 100644 index 0000000000..287d2d7891 --- /dev/null +++ b/import_shims/studio/third_party_auth/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.utils', 'common.djangoapps.third_party_auth.utils') + +from common.djangoapps.third_party_auth.utils import * diff --git a/import_shims/studio/third_party_auth/views.py b/import_shims/studio/third_party_auth/views.py new file mode 100644 index 0000000000..90b8f5ba86 --- /dev/null +++ b/import_shims/studio/third_party_auth/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('third_party_auth.views', 'common.djangoapps.third_party_auth.views') + +from common.djangoapps.third_party_auth.views import * diff --git a/import_shims/studio/track/__init__.py b/import_shims/studio/track/__init__.py new file mode 100644 index 0000000000..89295ed9fe --- /dev/null +++ b/import_shims/studio/track/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track', 'common.djangoapps.track') + +from common.djangoapps.track import * diff --git a/import_shims/studio/track/backends/__init__.py b/import_shims/studio/track/backends/__init__.py new file mode 100644 index 0000000000..0396b32170 --- /dev/null +++ b/import_shims/studio/track/backends/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends', 'common.djangoapps.track.backends') + +from common.djangoapps.track.backends import * diff --git a/import_shims/studio/track/backends/logger.py b/import_shims/studio/track/backends/logger.py new file mode 100644 index 0000000000..45b81081e2 --- /dev/null +++ b/import_shims/studio/track/backends/logger.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.logger', 'common.djangoapps.track.backends.logger') + +from common.djangoapps.track.backends.logger import * diff --git a/import_shims/studio/track/backends/mongodb.py b/import_shims/studio/track/backends/mongodb.py new file mode 100644 index 0000000000..e89e2221dc --- /dev/null +++ b/import_shims/studio/track/backends/mongodb.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.mongodb', 'common.djangoapps.track.backends.mongodb') + +from common.djangoapps.track.backends.mongodb import * diff --git a/import_shims/studio/track/backends/tests/__init__.py b/import_shims/studio/track/backends/tests/__init__.py new file mode 100644 index 0000000000..da0df0db05 --- /dev/null +++ b/import_shims/studio/track/backends/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.tests', 'common.djangoapps.track.backends.tests') + +from common.djangoapps.track.backends.tests import * diff --git a/import_shims/studio/track/backends/tests/test_logger.py b/import_shims/studio/track/backends/tests/test_logger.py new file mode 100644 index 0000000000..fe33312f92 --- /dev/null +++ b/import_shims/studio/track/backends/tests/test_logger.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.tests.test_logger', 'common.djangoapps.track.backends.tests.test_logger') + +from common.djangoapps.track.backends.tests.test_logger import * diff --git a/import_shims/studio/track/backends/tests/test_mongodb.py b/import_shims/studio/track/backends/tests/test_mongodb.py new file mode 100644 index 0000000000..4a76d7a61d --- /dev/null +++ b/import_shims/studio/track/backends/tests/test_mongodb.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.backends.tests.test_mongodb', 'common.djangoapps.track.backends.tests.test_mongodb') + +from common.djangoapps.track.backends.tests.test_mongodb import * diff --git a/import_shims/studio/track/contexts.py b/import_shims/studio/track/contexts.py new file mode 100644 index 0000000000..5658fb74e6 --- /dev/null +++ b/import_shims/studio/track/contexts.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.contexts', 'common.djangoapps.track.contexts') + +from common.djangoapps.track.contexts import * diff --git a/import_shims/studio/track/event_transaction_utils.py b/import_shims/studio/track/event_transaction_utils.py new file mode 100644 index 0000000000..4af8e2de49 --- /dev/null +++ b/import_shims/studio/track/event_transaction_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.event_transaction_utils', 'common.djangoapps.track.event_transaction_utils') + +from common.djangoapps.track.event_transaction_utils import * diff --git a/import_shims/studio/track/management/__init__.py b/import_shims/studio/track/management/__init__.py new file mode 100644 index 0000000000..c6749d0c92 --- /dev/null +++ b/import_shims/studio/track/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management', 'common.djangoapps.track.management') + +from common.djangoapps.track.management import * diff --git a/import_shims/studio/track/management/commands/__init__.py b/import_shims/studio/track/management/commands/__init__.py new file mode 100644 index 0000000000..61e6172f3e --- /dev/null +++ b/import_shims/studio/track/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.commands', 'common.djangoapps.track.management.commands') + +from common.djangoapps.track.management.commands import * diff --git a/import_shims/studio/track/management/commands/tracked_dummy_command.py b/import_shims/studio/track/management/commands/tracked_dummy_command.py new file mode 100644 index 0000000000..b2642844da --- /dev/null +++ b/import_shims/studio/track/management/commands/tracked_dummy_command.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.commands.tracked_dummy_command', 'common.djangoapps.track.management.commands.tracked_dummy_command') + +from common.djangoapps.track.management.commands.tracked_dummy_command import * diff --git a/import_shims/studio/track/management/tests/__init__.py b/import_shims/studio/track/management/tests/__init__.py new file mode 100644 index 0000000000..bd2cd69a18 --- /dev/null +++ b/import_shims/studio/track/management/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.tests', 'common.djangoapps.track.management.tests') + +from common.djangoapps.track.management.tests import * diff --git a/import_shims/studio/track/management/tests/test_tracked_command.py b/import_shims/studio/track/management/tests/test_tracked_command.py new file mode 100644 index 0000000000..f5bb381982 --- /dev/null +++ b/import_shims/studio/track/management/tests/test_tracked_command.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.tests.test_tracked_command', 'common.djangoapps.track.management.tests.test_tracked_command') + +from common.djangoapps.track.management.tests.test_tracked_command import * diff --git a/import_shims/studio/track/management/tracked_command.py b/import_shims/studio/track/management/tracked_command.py new file mode 100644 index 0000000000..6ed0440f37 --- /dev/null +++ b/import_shims/studio/track/management/tracked_command.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.management.tracked_command', 'common.djangoapps.track.management.tracked_command') + +from common.djangoapps.track.management.tracked_command import * diff --git a/import_shims/studio/track/middleware.py b/import_shims/studio/track/middleware.py new file mode 100644 index 0000000000..96cda2b33f --- /dev/null +++ b/import_shims/studio/track/middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.middleware', 'common.djangoapps.track.middleware') + +from common.djangoapps.track.middleware import * diff --git a/import_shims/studio/track/segment.py b/import_shims/studio/track/segment.py new file mode 100644 index 0000000000..78a62fb353 --- /dev/null +++ b/import_shims/studio/track/segment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.segment', 'common.djangoapps.track.segment') + +from common.djangoapps.track.segment import * diff --git a/import_shims/studio/track/shim.py b/import_shims/studio/track/shim.py new file mode 100644 index 0000000000..a2c8ace2ae --- /dev/null +++ b/import_shims/studio/track/shim.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.shim', 'common.djangoapps.track.shim') + +from common.djangoapps.track.shim import * diff --git a/import_shims/studio/track/tests/__init__.py b/import_shims/studio/track/tests/__init__.py new file mode 100644 index 0000000000..76a5191e6b --- /dev/null +++ b/import_shims/studio/track/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests', 'common.djangoapps.track.tests') + +from common.djangoapps.track.tests import * diff --git a/import_shims/studio/track/tests/test_contexts.py b/import_shims/studio/track/tests/test_contexts.py new file mode 100644 index 0000000000..24db8b9672 --- /dev/null +++ b/import_shims/studio/track/tests/test_contexts.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_contexts', 'common.djangoapps.track.tests.test_contexts') + +from common.djangoapps.track.tests.test_contexts import * diff --git a/import_shims/studio/track/tests/test_middleware.py b/import_shims/studio/track/tests/test_middleware.py new file mode 100644 index 0000000000..ff3972ca1f --- /dev/null +++ b/import_shims/studio/track/tests/test_middleware.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_middleware', 'common.djangoapps.track.tests.test_middleware') + +from common.djangoapps.track.tests.test_middleware import * diff --git a/import_shims/studio/track/tests/test_segment.py b/import_shims/studio/track/tests/test_segment.py new file mode 100644 index 0000000000..ed0e3fec87 --- /dev/null +++ b/import_shims/studio/track/tests/test_segment.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_segment', 'common.djangoapps.track.tests.test_segment') + +from common.djangoapps.track.tests.test_segment import * diff --git a/import_shims/studio/track/tests/test_shim.py b/import_shims/studio/track/tests/test_shim.py new file mode 100644 index 0000000000..8eeeec8593 --- /dev/null +++ b/import_shims/studio/track/tests/test_shim.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_shim', 'common.djangoapps.track.tests.test_shim') + +from common.djangoapps.track.tests.test_shim import * diff --git a/import_shims/studio/track/tests/test_tracker.py b/import_shims/studio/track/tests/test_tracker.py new file mode 100644 index 0000000000..7d136ed719 --- /dev/null +++ b/import_shims/studio/track/tests/test_tracker.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_tracker', 'common.djangoapps.track.tests.test_tracker') + +from common.djangoapps.track.tests.test_tracker import * diff --git a/import_shims/studio/track/tests/test_util.py b/import_shims/studio/track/tests/test_util.py new file mode 100644 index 0000000000..c3d02a143b --- /dev/null +++ b/import_shims/studio/track/tests/test_util.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tests.test_util', 'common.djangoapps.track.tests.test_util') + +from common.djangoapps.track.tests.test_util import * diff --git a/import_shims/studio/track/tracker.py b/import_shims/studio/track/tracker.py new file mode 100644 index 0000000000..78d3fa4ec2 --- /dev/null +++ b/import_shims/studio/track/tracker.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.tracker', 'common.djangoapps.track.tracker') + +from common.djangoapps.track.tracker import * diff --git a/import_shims/studio/track/transformers.py b/import_shims/studio/track/transformers.py new file mode 100644 index 0000000000..aab2f7c868 --- /dev/null +++ b/import_shims/studio/track/transformers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.transformers', 'common.djangoapps.track.transformers') + +from common.djangoapps.track.transformers import * diff --git a/import_shims/studio/track/urls.py b/import_shims/studio/track/urls.py new file mode 100644 index 0000000000..8a4f828b00 --- /dev/null +++ b/import_shims/studio/track/urls.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.urls', 'common.djangoapps.track.urls') + +from common.djangoapps.track.urls import * diff --git a/import_shims/studio/track/utils.py b/import_shims/studio/track/utils.py new file mode 100644 index 0000000000..51140ff94f --- /dev/null +++ b/import_shims/studio/track/utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.utils', 'common.djangoapps.track.utils') + +from common.djangoapps.track.utils import * diff --git a/import_shims/studio/track/views/__init__.py b/import_shims/studio/track/views/__init__.py new file mode 100644 index 0000000000..8b4b5f047e --- /dev/null +++ b/import_shims/studio/track/views/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views', 'common.djangoapps.track.views') + +from common.djangoapps.track.views import * diff --git a/import_shims/studio/track/views/segmentio.py b/import_shims/studio/track/views/segmentio.py new file mode 100644 index 0000000000..7d2f455821 --- /dev/null +++ b/import_shims/studio/track/views/segmentio.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.segmentio', 'common.djangoapps.track.views.segmentio') + +from common.djangoapps.track.views.segmentio import * diff --git a/import_shims/studio/track/views/tests/__init__.py b/import_shims/studio/track/views/tests/__init__.py new file mode 100644 index 0000000000..a705bea8b5 --- /dev/null +++ b/import_shims/studio/track/views/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests', 'common.djangoapps.track.views.tests') + +from common.djangoapps.track.views.tests import * diff --git a/import_shims/studio/track/views/tests/base.py b/import_shims/studio/track/views/tests/base.py new file mode 100644 index 0000000000..f4c28ac66d --- /dev/null +++ b/import_shims/studio/track/views/tests/base.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests.base', 'common.djangoapps.track.views.tests.base') + +from common.djangoapps.track.views.tests.base import * diff --git a/import_shims/studio/track/views/tests/test_segmentio.py b/import_shims/studio/track/views/tests/test_segmentio.py new file mode 100644 index 0000000000..c143f50f3e --- /dev/null +++ b/import_shims/studio/track/views/tests/test_segmentio.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests.test_segmentio', 'common.djangoapps.track.views.tests.test_segmentio') + +from common.djangoapps.track.views.tests.test_segmentio import * diff --git a/import_shims/studio/track/views/tests/test_views.py b/import_shims/studio/track/views/tests/test_views.py new file mode 100644 index 0000000000..3bc1f69b4f --- /dev/null +++ b/import_shims/studio/track/views/tests/test_views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('track.views.tests.test_views', 'common.djangoapps.track.views.tests.test_views') + +from common.djangoapps.track.views.tests.test_views import * diff --git a/import_shims/studio/util/__init__.py b/import_shims/studio/util/__init__.py new file mode 100644 index 0000000000..0e570c1dbb --- /dev/null +++ b/import_shims/studio/util/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util', 'common.djangoapps.util') + +from common.djangoapps.util import * diff --git a/import_shims/studio/util/admin.py b/import_shims/studio/util/admin.py new file mode 100644 index 0000000000..0915817ceb --- /dev/null +++ b/import_shims/studio/util/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.admin', 'common.djangoapps.util.admin') + +from common.djangoapps.util.admin import * diff --git a/import_shims/studio/util/cache.py b/import_shims/studio/util/cache.py new file mode 100644 index 0000000000..93458850d4 --- /dev/null +++ b/import_shims/studio/util/cache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.cache', 'common.djangoapps.util.cache') + +from common.djangoapps.util.cache import * diff --git a/import_shims/studio/util/config_parse.py b/import_shims/studio/util/config_parse.py new file mode 100644 index 0000000000..9eb48285f0 --- /dev/null +++ b/import_shims/studio/util/config_parse.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.config_parse', 'common.djangoapps.util.config_parse') + +from common.djangoapps.util.config_parse import * diff --git a/import_shims/studio/util/course.py b/import_shims/studio/util/course.py new file mode 100644 index 0000000000..3461df4f98 --- /dev/null +++ b/import_shims/studio/util/course.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.course', 'common.djangoapps.util.course') + +from common.djangoapps.util.course import * diff --git a/import_shims/studio/util/date_utils.py b/import_shims/studio/util/date_utils.py new file mode 100644 index 0000000000..0620f66ca8 --- /dev/null +++ b/import_shims/studio/util/date_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.date_utils', 'common.djangoapps.util.date_utils') + +from common.djangoapps.util.date_utils import * diff --git a/import_shims/studio/util/db.py b/import_shims/studio/util/db.py new file mode 100644 index 0000000000..819290c606 --- /dev/null +++ b/import_shims/studio/util/db.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.db', 'common.djangoapps.util.db') + +from common.djangoapps.util.db import * diff --git a/import_shims/studio/util/disable_rate_limit.py b/import_shims/studio/util/disable_rate_limit.py new file mode 100644 index 0000000000..f5b0698a8b --- /dev/null +++ b/import_shims/studio/util/disable_rate_limit.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.disable_rate_limit', 'common.djangoapps.util.disable_rate_limit') + +from common.djangoapps.util.disable_rate_limit import * diff --git a/import_shims/studio/util/file.py b/import_shims/studio/util/file.py new file mode 100644 index 0000000000..e6d7cbabaf --- /dev/null +++ b/import_shims/studio/util/file.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.file', 'common.djangoapps.util.file') + +from common.djangoapps.util.file import * diff --git a/import_shims/studio/util/json_request.py b/import_shims/studio/util/json_request.py new file mode 100644 index 0000000000..c13138da3e --- /dev/null +++ b/import_shims/studio/util/json_request.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.json_request', 'common.djangoapps.util.json_request') + +from common.djangoapps.util.json_request import * diff --git a/import_shims/studio/util/keyword_substitution.py b/import_shims/studio/util/keyword_substitution.py new file mode 100644 index 0000000000..4e795e2758 --- /dev/null +++ b/import_shims/studio/util/keyword_substitution.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.keyword_substitution', 'common.djangoapps.util.keyword_substitution') + +from common.djangoapps.util.keyword_substitution import * diff --git a/import_shims/studio/util/memcache.py b/import_shims/studio/util/memcache.py new file mode 100644 index 0000000000..8032b59e56 --- /dev/null +++ b/import_shims/studio/util/memcache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.memcache', 'common.djangoapps.util.memcache') + +from common.djangoapps.util.memcache import * diff --git a/import_shims/studio/util/milestones_helpers.py b/import_shims/studio/util/milestones_helpers.py new file mode 100644 index 0000000000..41522c71c0 --- /dev/null +++ b/import_shims/studio/util/milestones_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.milestones_helpers', 'common.djangoapps.util.milestones_helpers') + +from common.djangoapps.util.milestones_helpers import * diff --git a/import_shims/studio/util/model_utils.py b/import_shims/studio/util/model_utils.py new file mode 100644 index 0000000000..75074f6cea --- /dev/null +++ b/import_shims/studio/util/model_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.model_utils', 'common.djangoapps.util.model_utils') + +from common.djangoapps.util.model_utils import * diff --git a/import_shims/studio/util/models.py b/import_shims/studio/util/models.py new file mode 100644 index 0000000000..b63b46d7c6 --- /dev/null +++ b/import_shims/studio/util/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.models', 'common.djangoapps.util.models') + +from common.djangoapps.util.models import * diff --git a/import_shims/studio/util/module_utils.py b/import_shims/studio/util/module_utils.py new file mode 100644 index 0000000000..450672740c --- /dev/null +++ b/import_shims/studio/util/module_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.module_utils', 'common.djangoapps.util.module_utils') + +from common.djangoapps.util.module_utils import * diff --git a/import_shims/studio/util/organizations_helpers.py b/import_shims/studio/util/organizations_helpers.py new file mode 100644 index 0000000000..d5583c578b --- /dev/null +++ b/import_shims/studio/util/organizations_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.organizations_helpers', 'common.djangoapps.util.organizations_helpers') + +from common.djangoapps.util.organizations_helpers import * diff --git a/import_shims/studio/util/password_policy_validators.py b/import_shims/studio/util/password_policy_validators.py new file mode 100644 index 0000000000..b44f93722b --- /dev/null +++ b/import_shims/studio/util/password_policy_validators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.password_policy_validators', 'common.djangoapps.util.password_policy_validators') + +from common.djangoapps.util.password_policy_validators import * diff --git a/import_shims/studio/util/query.py b/import_shims/studio/util/query.py new file mode 100644 index 0000000000..4163a7218e --- /dev/null +++ b/import_shims/studio/util/query.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.query', 'common.djangoapps.util.query') + +from common.djangoapps.util.query import * diff --git a/import_shims/studio/util/request_rate_limiter.py b/import_shims/studio/util/request_rate_limiter.py new file mode 100644 index 0000000000..3d7efb2a6a --- /dev/null +++ b/import_shims/studio/util/request_rate_limiter.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.request_rate_limiter', 'common.djangoapps.util.request_rate_limiter') + +from common.djangoapps.util.request_rate_limiter import * diff --git a/import_shims/studio/util/string_utils.py b/import_shims/studio/util/string_utils.py new file mode 100644 index 0000000000..7d0a5e5fe7 --- /dev/null +++ b/import_shims/studio/util/string_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.string_utils', 'common.djangoapps.util.string_utils') + +from common.djangoapps.util.string_utils import * diff --git a/import_shims/studio/util/testing.py b/import_shims/studio/util/testing.py new file mode 100644 index 0000000000..c2bb6bafd2 --- /dev/null +++ b/import_shims/studio/util/testing.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.testing', 'common.djangoapps.util.testing') + +from common.djangoapps.util.testing import * diff --git a/import_shims/studio/util/tests/__init__.py b/import_shims/studio/util/tests/__init__.py new file mode 100644 index 0000000000..0410eba60f --- /dev/null +++ b/import_shims/studio/util/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests', 'common.djangoapps.util.tests') + +from common.djangoapps.util.tests import * diff --git a/import_shims/studio/util/tests/mixins/__init__.py b/import_shims/studio/util/tests/mixins/__init__.py new file mode 100644 index 0000000000..7fcd05af8e --- /dev/null +++ b/import_shims/studio/util/tests/mixins/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.mixins', 'common.djangoapps.util.tests.mixins') + +from common.djangoapps.util.tests.mixins import * diff --git a/import_shims/studio/util/tests/mixins/discovery.py b/import_shims/studio/util/tests/mixins/discovery.py new file mode 100644 index 0000000000..7462689750 --- /dev/null +++ b/import_shims/studio/util/tests/mixins/discovery.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.mixins.discovery', 'common.djangoapps.util.tests.mixins.discovery') + +from common.djangoapps.util.tests.mixins.discovery import * diff --git a/import_shims/studio/util/tests/test_course.py b/import_shims/studio/util/tests/test_course.py new file mode 100644 index 0000000000..c37caf7efd --- /dev/null +++ b/import_shims/studio/util/tests/test_course.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_course', 'common.djangoapps.util.tests.test_course') + +from common.djangoapps.util.tests.test_course import * diff --git a/import_shims/studio/util/tests/test_date_utils.py b/import_shims/studio/util/tests/test_date_utils.py new file mode 100644 index 0000000000..9bd2a4809b --- /dev/null +++ b/import_shims/studio/util/tests/test_date_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_date_utils', 'common.djangoapps.util.tests.test_date_utils') + +from common.djangoapps.util.tests.test_date_utils import * diff --git a/import_shims/studio/util/tests/test_db.py b/import_shims/studio/util/tests/test_db.py new file mode 100644 index 0000000000..75ca4722fc --- /dev/null +++ b/import_shims/studio/util/tests/test_db.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_db', 'common.djangoapps.util.tests.test_db') + +from common.djangoapps.util.tests.test_db import * diff --git a/import_shims/studio/util/tests/test_disable_rate_limit.py b/import_shims/studio/util/tests/test_disable_rate_limit.py new file mode 100644 index 0000000000..4958acbf6e --- /dev/null +++ b/import_shims/studio/util/tests/test_disable_rate_limit.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_disable_rate_limit', 'common.djangoapps.util.tests.test_disable_rate_limit') + +from common.djangoapps.util.tests.test_disable_rate_limit import * diff --git a/import_shims/studio/util/tests/test_django_utils.py b/import_shims/studio/util/tests/test_django_utils.py new file mode 100644 index 0000000000..51c59adaa6 --- /dev/null +++ b/import_shims/studio/util/tests/test_django_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_django_utils', 'common.djangoapps.util.tests.test_django_utils') + +from common.djangoapps.util.tests.test_django_utils import * diff --git a/import_shims/studio/util/tests/test_file.py b/import_shims/studio/util/tests/test_file.py new file mode 100644 index 0000000000..cfb50432ad --- /dev/null +++ b/import_shims/studio/util/tests/test_file.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_file', 'common.djangoapps.util.tests.test_file') + +from common.djangoapps.util.tests.test_file import * diff --git a/import_shims/studio/util/tests/test_json_request.py b/import_shims/studio/util/tests/test_json_request.py new file mode 100644 index 0000000000..961ed414b0 --- /dev/null +++ b/import_shims/studio/util/tests/test_json_request.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_json_request', 'common.djangoapps.util.tests.test_json_request') + +from common.djangoapps.util.tests.test_json_request import * diff --git a/import_shims/studio/util/tests/test_keyword_sub_utils.py b/import_shims/studio/util/tests/test_keyword_sub_utils.py new file mode 100644 index 0000000000..5e8b652401 --- /dev/null +++ b/import_shims/studio/util/tests/test_keyword_sub_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_keyword_sub_utils', 'common.djangoapps.util.tests.test_keyword_sub_utils') + +from common.djangoapps.util.tests.test_keyword_sub_utils import * diff --git a/import_shims/studio/util/tests/test_memcache.py b/import_shims/studio/util/tests/test_memcache.py new file mode 100644 index 0000000000..6980f31a3a --- /dev/null +++ b/import_shims/studio/util/tests/test_memcache.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_memcache', 'common.djangoapps.util.tests.test_memcache') + +from common.djangoapps.util.tests.test_memcache import * diff --git a/import_shims/studio/util/tests/test_milestones_helpers.py b/import_shims/studio/util/tests/test_milestones_helpers.py new file mode 100644 index 0000000000..2604974c84 --- /dev/null +++ b/import_shims/studio/util/tests/test_milestones_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_milestones_helpers', 'common.djangoapps.util.tests.test_milestones_helpers') + +from common.djangoapps.util.tests.test_milestones_helpers import * diff --git a/import_shims/studio/util/tests/test_organizations_helpers.py b/import_shims/studio/util/tests/test_organizations_helpers.py new file mode 100644 index 0000000000..7f2a2451f3 --- /dev/null +++ b/import_shims/studio/util/tests/test_organizations_helpers.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_organizations_helpers', 'common.djangoapps.util.tests.test_organizations_helpers') + +from common.djangoapps.util.tests.test_organizations_helpers import * diff --git a/import_shims/studio/util/tests/test_password_policy_validators.py b/import_shims/studio/util/tests/test_password_policy_validators.py new file mode 100644 index 0000000000..97ee0a875a --- /dev/null +++ b/import_shims/studio/util/tests/test_password_policy_validators.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_password_policy_validators', 'common.djangoapps.util.tests.test_password_policy_validators') + +from common.djangoapps.util.tests.test_password_policy_validators import * diff --git a/import_shims/studio/util/tests/test_sandboxing.py b/import_shims/studio/util/tests/test_sandboxing.py new file mode 100644 index 0000000000..8e438686d9 --- /dev/null +++ b/import_shims/studio/util/tests/test_sandboxing.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_sandboxing', 'common.djangoapps.util.tests.test_sandboxing') + +from common.djangoapps.util.tests.test_sandboxing import * diff --git a/import_shims/studio/util/tests/test_string_utils.py b/import_shims/studio/util/tests/test_string_utils.py new file mode 100644 index 0000000000..8fb4d26ea5 --- /dev/null +++ b/import_shims/studio/util/tests/test_string_utils.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.tests.test_string_utils', 'common.djangoapps.util.tests.test_string_utils') + +from common.djangoapps.util.tests.test_string_utils import * diff --git a/import_shims/studio/util/url.py b/import_shims/studio/util/url.py new file mode 100644 index 0000000000..1fa8d8bc6c --- /dev/null +++ b/import_shims/studio/util/url.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.url', 'common.djangoapps.util.url') + +from common.djangoapps.util.url import * diff --git a/import_shims/studio/util/validate_on_save.py b/import_shims/studio/util/validate_on_save.py new file mode 100644 index 0000000000..8711134250 --- /dev/null +++ b/import_shims/studio/util/validate_on_save.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.validate_on_save', 'common.djangoapps.util.validate_on_save') + +from common.djangoapps.util.validate_on_save import * diff --git a/import_shims/studio/util/views.py b/import_shims/studio/util/views.py new file mode 100644 index 0000000000..37687efd35 --- /dev/null +++ b/import_shims/studio/util/views.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('util.views', 'common.djangoapps.util.views') + +from common.djangoapps.util.views import * diff --git a/import_shims/studio/xblock_django/__init__.py b/import_shims/studio/xblock_django/__init__.py new file mode 100644 index 0000000000..217298de7b --- /dev/null +++ b/import_shims/studio/xblock_django/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django', 'common.djangoapps.xblock_django') + +from common.djangoapps.xblock_django import * diff --git a/import_shims/studio/xblock_django/admin.py b/import_shims/studio/xblock_django/admin.py new file mode 100644 index 0000000000..b291576db7 --- /dev/null +++ b/import_shims/studio/xblock_django/admin.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.admin', 'common.djangoapps.xblock_django.admin') + +from common.djangoapps.xblock_django.admin import * diff --git a/import_shims/studio/xblock_django/api.py b/import_shims/studio/xblock_django/api.py new file mode 100644 index 0000000000..67611a4804 --- /dev/null +++ b/import_shims/studio/xblock_django/api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.api', 'common.djangoapps.xblock_django.api') + +from common.djangoapps.xblock_django.api import * diff --git a/import_shims/studio/xblock_django/management/__init__.py b/import_shims/studio/xblock_django/management/__init__.py new file mode 100644 index 0000000000..f6f453ef69 --- /dev/null +++ b/import_shims/studio/xblock_django/management/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.management', 'common.djangoapps.xblock_django.management') + +from common.djangoapps.xblock_django.management import * diff --git a/import_shims/studio/xblock_django/management/commands/__init__.py b/import_shims/studio/xblock_django/management/commands/__init__.py new file mode 100644 index 0000000000..5bddef3d4a --- /dev/null +++ b/import_shims/studio/xblock_django/management/commands/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.management.commands', 'common.djangoapps.xblock_django.management.commands') + +from common.djangoapps.xblock_django.management.commands import * diff --git a/import_shims/studio/xblock_django/management/commands/ensure_indexes.py b/import_shims/studio/xblock_django/management/commands/ensure_indexes.py new file mode 100644 index 0000000000..daf51b8cb2 --- /dev/null +++ b/import_shims/studio/xblock_django/management/commands/ensure_indexes.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.management.commands.ensure_indexes', 'common.djangoapps.xblock_django.management.commands.ensure_indexes') + +from common.djangoapps.xblock_django.management.commands.ensure_indexes import * diff --git a/import_shims/studio/xblock_django/models.py b/import_shims/studio/xblock_django/models.py new file mode 100644 index 0000000000..b35811c2a3 --- /dev/null +++ b/import_shims/studio/xblock_django/models.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.models', 'common.djangoapps.xblock_django.models') + +from common.djangoapps.xblock_django.models import * diff --git a/import_shims/studio/xblock_django/tests/__init__.py b/import_shims/studio/xblock_django/tests/__init__.py new file mode 100644 index 0000000000..b4baccf440 --- /dev/null +++ b/import_shims/studio/xblock_django/tests/__init__.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.tests', 'common.djangoapps.xblock_django.tests') + +from common.djangoapps.xblock_django.tests import * diff --git a/import_shims/studio/xblock_django/tests/test_api.py b/import_shims/studio/xblock_django/tests/test_api.py new file mode 100644 index 0000000000..3fe4338cb7 --- /dev/null +++ b/import_shims/studio/xblock_django/tests/test_api.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.tests.test_api', 'common.djangoapps.xblock_django.tests.test_api') + +from common.djangoapps.xblock_django.tests.test_api import * diff --git a/import_shims/studio/xblock_django/tests/test_user_service.py b/import_shims/studio/xblock_django/tests/test_user_service.py new file mode 100644 index 0000000000..6bf70dd062 --- /dev/null +++ b/import_shims/studio/xblock_django/tests/test_user_service.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.tests.test_user_service', 'common.djangoapps.xblock_django.tests.test_user_service') + +from common.djangoapps.xblock_django.tests.test_user_service import * diff --git a/import_shims/studio/xblock_django/user_service.py b/import_shims/studio/xblock_django/user_service.py new file mode 100644 index 0000000000..1e237adb1b --- /dev/null +++ b/import_shims/studio/xblock_django/user_service.py @@ -0,0 +1,5 @@ +from import_shims.warn import warn_deprecated_import + +warn_deprecated_import('xblock_django.user_service', 'common.djangoapps.xblock_django.user_service') + +from common.djangoapps.xblock_django.user_service import * diff --git a/lms/devstack.yml b/lms/devstack.yml index f0b8b5e083..974c5e1539 100644 --- a/lms/devstack.yml +++ b/lms/devstack.yml @@ -24,10 +24,10 @@ AUDIT_CERT_CUTOFF_DATE: null AUTH_DOCUMENTATION_URL: http://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html AUTH_PASSWORD_VALIDATORS: - NAME: django.contrib.auth.password_validation.UserAttributeSimilarityValidator -- NAME: util.password_policy_validators.MinimumLengthValidator +- NAME: common.djangoapps.util.password_policy_validators.MinimumLengthValidator OPTIONS: min_length: 2 -- NAME: util.password_policy_validators.MaximumLengthValidator +- NAME: common.djangoapps.util.password_policy_validators.MaximumLengthValidator OPTIONS: max_length: 75 AWS_ACCESS_KEY_ID: null @@ -54,47 +54,47 @@ BULK_EMAIL_ROUTING_KEY_SMALL_JOBS: edx.lms.core.default CACHES: celery: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: celery LOCATION: - edx.devstack.memcached:11211 TIMEOUT: '7200' configuration: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 1001c6274ca4 LOCATION: - edx.devstack.memcached:11211 course_structure_cache: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: course_structure LOCATION: - edx.devstack.memcached:11211 TIMEOUT: '7200' default: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: default LOCATION: - edx.devstack.memcached:11211 VERSION: '1' general: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: general LOCATION: - edx.devstack.memcached:11211 mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: mongo_metadata_inheritance LOCATION: - edx.devstack.memcached:11211 TIMEOUT: 300 staticfiles: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 1001c6274ca4_general LOCATION: - edx.devstack.memcached:11211 diff --git a/lms/djangoapps/badges/api/tests.py b/lms/djangoapps/badges/api/tests.py index fbec7ed546..71492b7341 100644 --- a/lms/djangoapps/badges/api/tests.py +++ b/lms/djangoapps/badges/api/tests.py @@ -11,8 +11,8 @@ from six.moves import range from lms.djangoapps.badges.tests.factories import BadgeAssertionFactory, BadgeClassFactory, RandomBadgeClassFactory from openedx.core.lib.api.test_utils import ApiTestCase -from student.tests.factories import UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/badges/backends/tests/test_badgr_backend.py b/lms/djangoapps/badges/backends/tests/test_badgr_backend.py index 9019679b66..563eb8293e 100644 --- a/lms/djangoapps/badges/backends/tests/test_badgr_backend.py +++ b/lms/djangoapps/badges/backends/tests/test_badgr_backend.py @@ -16,8 +16,8 @@ from lms.djangoapps.badges.backends.badgr import BadgrBackend from lms.djangoapps.badges.models import BadgeAssertion from lms.djangoapps.badges.tests.factories import BadgeClassFactory from openedx.core.lib.tests.assertions.events import assert_event_matches -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from track.tests import EventTrackingTestCase +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.track.tests import EventTrackingTestCase from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/badges/events/course_complete.py b/lms/djangoapps/badges/events/course_complete.py index 85fcda289e..b5e8b5b432 100644 --- a/lms/djangoapps/badges/events/course_complete.py +++ b/lms/djangoapps/badges/events/course_complete.py @@ -85,7 +85,7 @@ def get_completion_badge(course_id, user): Given a course key and a user, find the user's enrollment mode and get the Course Completion badge. """ - from student.models import CourseEnrollment + from common.djangoapps.student.models import CourseEnrollment badge_classes = CourseEnrollment.objects.filter( user=user, course_id=course_id ).order_by('-is_active') diff --git a/lms/djangoapps/badges/events/tests/test_course_complete.py b/lms/djangoapps/badges/events/tests/test_course_complete.py index 406e753302..70d78da97d 100644 --- a/lms/djangoapps/badges/events/tests/test_course_complete.py +++ b/lms/djangoapps/badges/events/tests/test_course_complete.py @@ -6,7 +6,7 @@ from uuid import uuid4 from lms.djangoapps.badges.events import course_complete from lms.djangoapps.certificates.models import GeneratedCertificate -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/badges/events/tests/test_course_meta.py b/lms/djangoapps/badges/events/tests/test_course_meta.py index 0ccd3058e0..9b73829e73 100644 --- a/lms/djangoapps/badges/events/tests/test_course_meta.py +++ b/lms/djangoapps/badges/events/tests/test_course_meta.py @@ -12,8 +12,8 @@ from mock import patch from lms.djangoapps.badges.tests.factories import CourseEventBadgesConfigurationFactory, RandomBadgeClassFactory from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/badges/handlers.py b/lms/djangoapps/badges/handlers.py index f871f61d1a..4af4c58adb 100644 --- a/lms/djangoapps/badges/handlers.py +++ b/lms/djangoapps/badges/handlers.py @@ -7,8 +7,8 @@ from django.dispatch import receiver from lms.djangoapps.badges.events.course_meta import award_enrollment_badge from lms.djangoapps.badges.utils import badges_enabled -from student.models import EnrollStatusChange -from student.signals import ENROLL_STATUS_CHANGE +from common.djangoapps.student.models import EnrollStatusChange +from common.djangoapps.student.signals import ENROLL_STATUS_CHANGE @receiver(ENROLL_STATUS_CHANGE) diff --git a/lms/djangoapps/badges/tests/factories.py b/lms/djangoapps/badges/tests/factories.py index cd70fd8cec..b7f13d0f7c 100644 --- a/lms/djangoapps/badges/tests/factories.py +++ b/lms/djangoapps/badges/tests/factories.py @@ -11,7 +11,7 @@ from factory import DjangoModelFactory from factory.django import ImageField from lms.djangoapps.badges.models import BadgeAssertion, BadgeClass, CourseCompleteImageConfiguration, CourseEventBadgesConfiguration -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory def generate_dummy_image(_unused): diff --git a/lms/djangoapps/badges/tests/test_models.py b/lms/djangoapps/badges/tests/test_models.py index a4520a3d66..ec9cfa61dd 100644 --- a/lms/djangoapps/badges/tests/test_models.py +++ b/lms/djangoapps/badges/tests/test_models.py @@ -22,7 +22,7 @@ from lms.djangoapps.badges.models import ( ) from lms.djangoapps.badges.tests.factories import BadgeAssertionFactory, BadgeClassFactory, RandomBadgeClassFactory from lms.djangoapps.certificates.tests.test_models import TEST_DATA_ROOT -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/branding/api.py b/lms/djangoapps/branding/api.py index e1e0793f62..e532240dfe 100644 --- a/lms/djangoapps/branding/api.py +++ b/lms/djangoapps/branding/api.py @@ -24,7 +24,7 @@ from django.utils.translation import ugettext as _ from six.moves.urllib.parse import urljoin from lms.djangoapps.branding.models import BrandingApiConfig -from edxmako.shortcuts import marketing_link +from common.djangoapps.edxmako.shortcuts import marketing_link from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers log = logging.getLogger("edx.footer") diff --git a/lms/djangoapps/branding/tests/test_page.py b/lms/djangoapps/branding/tests/test_page.py index d9c39edb51..a02de89797 100644 --- a/lms/djangoapps/branding/tests/test_page.py +++ b/lms/djangoapps/branding/tests/test_page.py @@ -18,9 +18,9 @@ from pytz import UTC from lms.djangoapps.branding.views import index from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin -from util.milestones_helpers import set_prerequisite_courses +from common.djangoapps.util.milestones_helpers import set_prerequisite_courses from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -190,7 +190,7 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): ) self.factory = RequestFactory() - @patch('student.views.management.render_to_response', RENDER_MOCK) + @patch('common.djangoapps.student.views.management.render_to_response', RENDER_MOCK) @patch('lms.djangoapps.courseware.views.views.render_to_response', RENDER_MOCK) @patch.dict('django.conf.settings.FEATURES', {'ENABLE_COURSE_DISCOVERY': False}) def test_course_discovery_off(self): @@ -214,7 +214,7 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): # make sure we have the special css class on the section self.assertContains(response, '
    ') self.assertContains(response, '
    ', '', '') - @patch('student.models.cc.User.from_django_user') + @patch('common.djangoapps.student.models.cc.User.from_django_user') def test_forum_discussion_xss_prevent(self, malicious_code, mock_user, mock_req): """ Test that XSS attack is prevented @@ -1670,8 +1670,8 @@ class ForumDiscussionXSSTestCase(ForumsEnableMixin, UrlResetMixin, ModuleStoreTe self.assertNotContains(resp, malicious_code) @ddt.data('">', '', '') - @patch('student.models.cc.User.from_django_user') - @patch('student.models.cc.User.active_threads') + @patch('common.djangoapps.student.models.cc.User.from_django_user') + @patch('common.djangoapps.student.models.cc.User.active_threads') def test_forum_user_profile_xss_prevent(self, malicious_code, mock_threads, mock_from_django_user, mock_request): """ Test that XSS attack is prevented diff --git a/lms/djangoapps/discussion/views.py b/lms/djangoapps/discussion/views.py index ffe9166589..f28488e78a 100644 --- a/lms/djangoapps/discussion/views.py +++ b/lms/djangoapps/discussion/views.py @@ -57,8 +57,8 @@ from openedx.core.djangoapps.django_comment_common.utils import ( ) from openedx.core.djangoapps.plugin_api.views import EdxFragmentView from openedx.features.course_duration_limits.access import generate_course_expired_fragment -from student.models import CourseEnrollment -from util.json_request import JsonResponse, expect_json +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.json_request import JsonResponse, expect_json from xmodule.modulestore.django import modulestore log = logging.getLogger("edx.discussions") diff --git a/lms/djangoapps/edxnotes/decorators.py b/lms/djangoapps/edxnotes/decorators.py index 0fab13d329..277ac8ca05 100644 --- a/lms/djangoapps/edxnotes/decorators.py +++ b/lms/djangoapps/edxnotes/decorators.py @@ -8,7 +8,7 @@ import json import six from django.conf import settings -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string def edxnotes(cls): diff --git a/lms/djangoapps/edxnotes/helpers.py b/lms/djangoapps/edxnotes/helpers.py index beee9f368f..c6dec5e647 100644 --- a/lms/djangoapps/edxnotes/helpers.py +++ b/lms/djangoapps/edxnotes/helpers.py @@ -28,8 +28,8 @@ from lms.djangoapps.edxnotes.plugins import EdxNotesTab from lms.lib.utils import get_parent_unit from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user from openedx.core.djangolib.markup import Text -from student.models import anonymous_id_for_user -from util.date_utils import get_default_time_display +from common.djangoapps.student.models import anonymous_id_for_user +from common.djangoapps.util.date_utils import get_default_time_display from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/lms/djangoapps/edxnotes/tests.py b/lms/djangoapps/edxnotes/tests.py index d83faf288e..f9074b633d 100644 --- a/lms/djangoapps/edxnotes/tests.py +++ b/lms/djangoapps/edxnotes/tests.py @@ -25,7 +25,7 @@ from oauth2_provider.models import Application from lms.djangoapps.courseware.model_data import FieldDataCache from lms.djangoapps.courseware.module_render import get_module_for_descriptor from lms.djangoapps.courseware.tabs import get_course_tab_list -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from . import helpers from .decorators import edxnotes from .exceptions import EdxNotesParseError, EdxNotesServiceUnavailable @@ -33,7 +33,7 @@ from .plugins import EdxNotesTab from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFactory from openedx.core.djangoapps.user_api.models import RetirementState, UserRetirementStatus -from student.tests.factories import CourseEnrollmentFactory, SuperuserFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, SuperuserFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/edxnotes/views.py b/lms/djangoapps/edxnotes/views.py index 5123c84235..012503e873 100644 --- a/lms/djangoapps/edxnotes/views.py +++ b/lms/djangoapps/edxnotes/views.py @@ -21,7 +21,7 @@ from six import text_type from lms.djangoapps.courseware.courses import get_course_with_access from lms.djangoapps.courseware.model_data import FieldDataCache from lms.djangoapps.courseware.module_render import get_module_for_descriptor -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.edxnotes.exceptions import EdxNotesParseError, EdxNotesServiceUnavailable from lms.djangoapps.edxnotes.helpers import ( DEFAULT_PAGE, @@ -35,7 +35,7 @@ from lms.djangoapps.edxnotes.helpers import ( ) from openedx.core.djangoapps.user_api.accounts.permissions import CanRetireUser from openedx.core.djangoapps.user_api.models import RetirementStateError, UserRetirementStatus -from util.json_request import JsonResponse, JsonResponseBadRequest +from common.djangoapps.util.json_request import JsonResponse, JsonResponseBadRequest log = logging.getLogger(__name__) diff --git a/lms/djangoapps/email_marketing/signals.py b/lms/djangoapps/email_marketing/signals.py index 82b8655394..0625919a13 100644 --- a/lms/djangoapps/email_marketing/signals.py +++ b/lms/djangoapps/email_marketing/signals.py @@ -14,8 +14,8 @@ from django.dispatch import receiver from sailthru.sailthru_error import SailthruClientError from six import text_type -import third_party_auth -from course_modes.models import CourseMode +from common.djangoapps import third_party_auth +from common.djangoapps.course_modes.models import CourseMode from edx_toggles.toggles import WaffleSwitchNamespace from lms.djangoapps.email_marketing.tasks import ( get_email_cookies_via_sailthru, @@ -26,8 +26,8 @@ from lms.djangoapps.email_marketing.tasks import ( from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangoapps.user_authn.cookies import CREATE_LOGON_COOKIE from openedx.core.djangoapps.user_authn.views.register import REGISTER_USER -from student.signals import SAILTHRU_AUDIT_PURCHASE -from util.model_utils import USER_FIELD_CHANGED +from common.djangoapps.student.signals import SAILTHRU_AUDIT_PURCHASE +from common.djangoapps.util.model_utils import USER_FIELD_CHANGED from .models import EmailMarketingConfiguration diff --git a/lms/djangoapps/email_marketing/tests/test_signals.py b/lms/djangoapps/email_marketing/tests/test_signals.py index d21c2d0e94..4e604d3c46 100644 --- a/lms/djangoapps/email_marketing/tests/test_signals.py +++ b/lms/djangoapps/email_marketing/tests/test_signals.py @@ -30,9 +30,9 @@ from lms.djangoapps.email_marketing.tasks import ( update_user_email ) from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY -from student.models import Registration -from student.tests.factories import CourseEnrollmentFactory, UserFactory, UserProfileFactory -from util.json_request import JsonResponse +from common.djangoapps.student.models import Registration +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory, UserProfileFactory +from common.djangoapps.util.json_request import JsonResponse from ..models import EmailMarketingConfiguration from ..signals import ( diff --git a/lms/djangoapps/experiments/factories.py b/lms/djangoapps/experiments/factories.py index 68ef58ccd3..8a472a2877 100644 --- a/lms/djangoapps/experiments/factories.py +++ b/lms/djangoapps/experiments/factories.py @@ -7,7 +7,7 @@ import factory import factory.fuzzy from lms.djangoapps.experiments.models import ExperimentData, ExperimentKeyValue -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class ExperimentDataFactory(factory.DjangoModelFactory): diff --git a/lms/djangoapps/experiments/flags.py b/lms/djangoapps/experiments/flags.py index 81052d9cb6..645be72362 100644 --- a/lms/djangoapps/experiments/flags.py +++ b/lms/djangoapps/experiments/flags.py @@ -13,7 +13,7 @@ from edx_django_utils.cache import RequestCache from lms.djangoapps.experiments.stable_bucketing import stable_bucketing_hash_group from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag -from track import segment +from common.djangoapps.track import segment log = logging.getLogger(__name__) @@ -88,7 +88,7 @@ class ExperimentWaffleFlag(CourseWaffleFlag): def _is_enrollment_inside_date_bounds(self, experiment_values, user, course_key): """ Returns True if the user's enrollment (if any) is valid for the configured experiment date range """ - from student.models import CourseEnrollment + from common.djangoapps.student.models import CourseEnrollment enrollment_start = experiment_values.get('enrollment_start') enrollment_end = experiment_values.get('enrollment_end') diff --git a/lms/djangoapps/experiments/tests/test_flags.py b/lms/djangoapps/experiments/tests/test_flags.py index 1b9ee6d6f8..0540a65c8a 100644 --- a/lms/djangoapps/experiments/tests/test_flags.py +++ b/lms/djangoapps/experiments/tests/test_flags.py @@ -18,7 +18,7 @@ from lms.djangoapps.experiments.flags import ExperimentWaffleFlag from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag from openedx.core.djangoapps.waffle_utils.models import WaffleFlagCourseOverrideModel -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/lms/djangoapps/experiments/tests/test_utils.py b/lms/djangoapps/experiments/tests/test_utils.py index f347975423..9459b263e4 100644 --- a/lms/djangoapps/experiments/tests/test_utils.py +++ b/lms/djangoapps/experiments/tests/test_utils.py @@ -17,7 +17,7 @@ from lms.djangoapps.experiments.utils import ( get_unenrolled_courses, is_enrolled_in_course_run ) -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/experiments/tests/test_views.py b/lms/djangoapps/experiments/tests/test_views.py index e5945dd5aa..101369e8ac 100644 --- a/lms/djangoapps/experiments/tests/test_views.py +++ b/lms/djangoapps/experiments/tests/test_views.py @@ -21,7 +21,7 @@ from rest_framework.test import APITestCase from lms.djangoapps.experiments.factories import ExperimentDataFactory, ExperimentKeyValueFactory from lms.djangoapps.experiments.models import ExperimentData, ExperimentKeyValue from lms.djangoapps.experiments.serializers import ExperimentDataSerializer -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/experiments/tests/test_views_custom.py b/lms/djangoapps/experiments/tests/test_views_custom.py index 597f8b9991..c83bc77d75 100644 --- a/lms/djangoapps/experiments/tests/test_views_custom.py +++ b/lms/djangoapps/experiments/tests/test_views_custom.py @@ -11,12 +11,12 @@ from django.urls import reverse from django.utils.timezone import now from rest_framework.test import APITestCase -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.course_blocks.transformers.tests.helpers import ModuleStoreTestCase from lms.djangoapps.experiments.views_custom import MOBILE_UPSELL_FLAG -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.factories import CourseFactory CROSS_DOMAIN_REFERER = 'https://ecommerce.edx.org' diff --git a/lms/djangoapps/experiments/utils.py b/lms/djangoapps/experiments/utils.py index b38f49cfdd..a18a51fd51 100644 --- a/lms/djangoapps/experiments/utils.py +++ b/lms/djangoapps/experiments/utils.py @@ -11,9 +11,9 @@ from django.utils.timezone import now from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode, format_course_price, get_cosmetic_verified_display_price +from common.djangoapps.course_modes.models import format_course_price, get_cosmetic_verified_display_price, CourseMode from edx_toggles.toggles import WaffleFlag, WaffleFlagNamespace -from entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.models import CourseEntitlement from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.courseware.access import has_staff_access_to_preview_mode from lms.djangoapps.courseware.utils import can_show_verified_upgrade, verified_upgrade_deadline_link @@ -21,7 +21,7 @@ from openedx.core.djangoapps.catalog.utils import get_programs from openedx.core.djangoapps.django_comment_common.models import Role from openedx.core.djangoapps.schedules.models import Schedule from openedx.features.course_duration_limits.access import get_user_course_duration, get_user_course_expiration_date -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.partitions.partitions_service import get_all_partitions_for_course, get_user_partition_groups # Import this for backwards compatibility (so that anyone importing this function from here doesn't break) diff --git a/lms/djangoapps/experiments/views.py b/lms/djangoapps/experiments/views.py index caa6eacb0f..3d26c0d806 100644 --- a/lms/djangoapps/experiments/views.py +++ b/lms/djangoapps/experiments/views.py @@ -14,14 +14,14 @@ from opaque_keys.edx.keys import CourseKey from rest_framework import permissions, viewsets from rest_framework.response import Response from rest_framework.views import APIView -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse from lms.djangoapps.experiments import filters, serializers from lms.djangoapps.experiments.models import ExperimentData, ExperimentKeyValue from lms.djangoapps.experiments.permissions import IsStaffOrOwner, IsStaffOrReadOnly, IsStaffOrReadOnlyForSelf from lms.djangoapps.experiments.utils import get_experiment_user_metadata_context from openedx.core.djangoapps.cors_csrf.authentication import SessionAuthenticationCrossDomainCsrf -from student.models import get_user_by_username_or_email +from common.djangoapps.student.models import get_user_by_username_or_email User = get_user_model() # pylint: disable=invalid-name diff --git a/lms/djangoapps/experiments/views_custom.py b/lms/djangoapps/experiments/views_custom.py index 50c9a104eb..a1ba0d21ec 100644 --- a/lms/djangoapps/experiments/views_custom.py +++ b/lms/djangoapps/experiments/views_custom.py @@ -15,7 +15,7 @@ from opaque_keys.edx.keys import CourseKey from rest_framework.response import Response from rest_framework.views import APIView -from course_modes.models import get_cosmetic_verified_display_price +from common.djangoapps.course_modes.models import get_cosmetic_verified_display_price from edx_toggles.toggles import WaffleFlag, WaffleFlagNamespace from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.courseware.utils import can_show_verified_upgrade @@ -25,8 +25,8 @@ from openedx.core.djangoapps.cors_csrf.decorators import ensure_csrf_cookie_cros from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser from openedx.core.lib.api.permissions import ApiKeyHeaderPermissionIsAuthenticated from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin -from student.models import CourseEnrollment -from track import segment +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.track import segment # .. toggle_name: experiments.mobile_upsell_rev934 # .. toggle_implementation: WaffleFlag diff --git a/lms/djangoapps/gating/api.py b/lms/djangoapps/gating/api.py index 9ee405f5fa..a8d2d89891 100644 --- a/lms/djangoapps/gating/api.py +++ b/lms/djangoapps/gating/api.py @@ -10,7 +10,7 @@ from opaque_keys.edx.keys import UsageKey from lms.djangoapps.courseware.entrance_exams import get_entrance_exam_content from openedx.core.lib.gating import api as gating_api -from util import milestones_helpers +from common.djangoapps.util import milestones_helpers from openedx.core.toggles import ENTRANCE_EXAMS log = logging.getLogger(__name__) diff --git a/lms/djangoapps/gating/tests/test_integration.py b/lms/djangoapps/gating/tests/test_integration.py index f98b89ba2d..99d86e282d 100644 --- a/lms/djangoapps/gating/tests/test_integration.py +++ b/lms/djangoapps/gating/tests/test_integration.py @@ -16,7 +16,7 @@ from lms.djangoapps.grades.api import CourseGradeFactory from lms.djangoapps.grades.tests.utils import answer_problem from openedx.core.djangolib.testing.utils import get_mock_request from openedx.core.lib.gating import api as gating_api -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/gating/tests/test_signals.py b/lms/djangoapps/gating/tests/test_signals.py index 42c99fe5d6..bb773a4aaf 100644 --- a/lms/djangoapps/gating/tests/test_signals.py +++ b/lms/djangoapps/gating/tests/test_signals.py @@ -6,7 +6,7 @@ Unit tests for gating.signals module from mock import Mock, patch from lms.djangoapps.gating.signals import evaluate_subsection_gated_milestones -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/grades/api.py b/lms/djangoapps/grades/api.py index 3c2de86d1d..f8ef149e48 100644 --- a/lms/djangoapps/grades/api.py +++ b/lms/djangoapps/grades/api.py @@ -27,7 +27,7 @@ from lms.djangoapps.grades.subsection_grade_factory import SubsectionGradeFactor from lms.djangoapps.grades.tasks import compute_all_grades_for_course as task_compute_all_grades_for_course from lms.djangoapps.grades.util_services import GradesUtilService from lms.djangoapps.utils import _get_key -from track.event_transaction_utils import create_new_event_transaction_id, set_event_transaction_type +from common.djangoapps.track.event_transaction_utils import create_new_event_transaction_id, set_event_transaction_type def graded_subsections_for_course_id(course_id): diff --git a/lms/djangoapps/grades/events.py b/lms/djangoapps/grades/events.py index 6f55ab177c..e4eb672965 100644 --- a/lms/djangoapps/grades/events.py +++ b/lms/djangoapps/grades/events.py @@ -7,8 +7,8 @@ import six from crum import get_current_user from eventtracking import tracker -from track import contexts -from track.event_transaction_utils import ( +from common.djangoapps.track import contexts +from common.djangoapps.track.event_transaction_utils import ( create_new_event_transaction_id, get_event_transaction_id, get_event_transaction_type, diff --git a/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py b/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py index f08a05b3f7..3a2bc8de73 100644 --- a/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py +++ b/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py @@ -16,9 +16,9 @@ from lms.djangoapps.courseware.models import StudentModule from lms.djangoapps.grades.constants import ScoreDatabaseTableEnum from lms.djangoapps.grades.events import PROBLEM_SUBMITTED_EVENT_TYPE from lms.djangoapps.grades.tasks import recalculate_subsection_grade_v3 -from student.models import user_by_anonymous_id -from track.event_transaction_utils import create_new_event_transaction_id, set_event_transaction_type -from util.date_utils import to_timestamp +from common.djangoapps.student.models import user_by_anonymous_id +from common.djangoapps.track.event_transaction_utils import create_new_event_transaction_id, set_event_transaction_type +from common.djangoapps.util.date_utils import to_timestamp log = logging.getLogger(__name__) diff --git a/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py b/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py index 12e86c09d1..7ca5fb9dad 100644 --- a/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py +++ b/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py @@ -14,7 +14,7 @@ from mock import ANY, patch from lms.djangoapps.grades.config.models import ComputeGradesSetting from lms.djangoapps.grades.management.commands import compute_grades -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py b/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py index c50e2bbac6..fd3a60ee0b 100644 --- a/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py +++ b/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py @@ -9,7 +9,7 @@ import mock from lms.djangoapps.grades.management.commands import recalculate_learner_grades from lms.djangoapps.grades.tests.test_tasks import HasCourseWithProblemsMixin -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py b/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py index 7d4a56aca8..9ff5b72f7a 100644 --- a/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py +++ b/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py @@ -15,8 +15,8 @@ from pytz import utc from lms.djangoapps.grades.constants import ScoreDatabaseTableEnum from lms.djangoapps.grades.management.commands import recalculate_subsection_grades from lms.djangoapps.grades.tests.test_tasks import HasCourseWithProblemsMixin -from track.event_transaction_utils import get_event_transaction_id -from util.date_utils import to_timestamp +from common.djangoapps.track.event_transaction_utils import get_event_transaction_id +from common.djangoapps.util.date_utils import to_timestamp from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase DATE_FORMAT = u"%Y-%m-%d %H:%M" diff --git a/lms/djangoapps/grades/rest_api/v1/gradebook_views.py b/lms/djangoapps/grades/rest_api/v1/gradebook_views.py index 05b97cacd5..c94098844e 100644 --- a/lms/djangoapps/grades/rest_api/v1/gradebook_views.py +++ b/lms/djangoapps/grades/rest_api/v1/gradebook_views.py @@ -58,16 +58,16 @@ from openedx.core.lib.api.view_utils import ( view_auth_classes ) from openedx.core.lib.cache_utils import request_cached -from student.auth import has_course_author_access -from student.models import CourseEnrollment -from student.roles import BulkRoleCache -from track.event_transaction_utils import ( +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import BulkRoleCache +from common.djangoapps.track.event_transaction_utils import ( create_new_event_transaction_id, get_event_transaction_id, get_event_transaction_type, set_event_transaction_type ) -from util.date_utils import to_timestamp +from common.djangoapps.util.date_utils import to_timestamp from xmodule.modulestore.django import modulestore from xmodule.util.misc import get_default_short_labeler diff --git a/lms/djangoapps/grades/rest_api/v1/tests/mixins.py b/lms/djangoapps/grades/rest_api/v1/tests/mixins.py index 695737e2c7..f0967fa510 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/mixins.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/mixins.py @@ -11,7 +11,7 @@ from six.moves import range from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory from lms.djangoapps.program_enrollments.tests.factories import ProgramEnrollmentFactory, ProgramCourseEnrollmentFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py b/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py index 14b46691df..d1cfe7e025 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py @@ -17,7 +17,7 @@ from rest_framework import status from rest_framework.test import APITestCase from six import text_type -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from lms.djangoapps.courseware.tests.factories import InstructorFactory, StaffFactory @@ -37,7 +37,7 @@ from lms.djangoapps.grades.rest_api.v1.views import CourseEnrollmentPagination from lms.djangoapps.grades.subsection_grade import ReadSubsectionGrade from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.course_groups.tests.helpers import CohortFactory -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py b/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py index 0fab8487ba..4e75b3cb3b 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py @@ -13,7 +13,7 @@ from pytz import UTC from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFactory, AccessTokenFactory from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory, StaffFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/rest_api/v1/tests/test_views.py b/lms/djangoapps/grades/rest_api/v1/tests/test_views.py index 9c89bf4d94..d6de94533b 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/test_views.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/test_views.py @@ -15,7 +15,7 @@ from rest_framework.test import APITestCase from lms.djangoapps.grades.rest_api.v1.tests.mixins import GradeViewTestMixin from lms.djangoapps.grades.rest_api.v1.views import CourseGradesView from openedx.core.djangoapps.user_authn.tests.utils import AuthAndScopesTestMixin -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/lms/djangoapps/grades/rest_api/v1/utils.py b/lms/djangoapps/grades/rest_api/v1/utils.py index 4c2fd9af50..bdf9bba1a1 100644 --- a/lms/djangoapps/grades/rest_api/v1/utils.py +++ b/lms/djangoapps/grades/rest_api/v1/utils.py @@ -14,8 +14,8 @@ from rest_framework.response import Response from lms.djangoapps.grades.course_grade_factory import CourseGradeFactory from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin -from student.models import CourseEnrollment -from util.query import use_read_replica_if_available +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.query import use_read_replica_if_available USER_MODEL = get_user_model() diff --git a/lms/djangoapps/grades/signals/handlers.py b/lms/djangoapps/grades/signals/handlers.py index 887f0f5022..b56f69f911 100644 --- a/lms/djangoapps/grades/signals/handlers.py +++ b/lms/djangoapps/grades/signals/handlers.py @@ -15,10 +15,10 @@ from xblock.scorable import ScorableXBlockMixin, Score from lms.djangoapps.courseware.model_data import get_score, set_score from openedx.core.djangoapps.course_groups.signals.signals import COHORT_MEMBERSHIP_UPDATED from openedx.core.lib.grade_utils import is_score_higher_or_equal -from student.models import user_by_anonymous_id -from student.signals import ENROLLMENT_TRACK_UPDATED -from track.event_transaction_utils import get_event_transaction_id, get_event_transaction_type -from util.date_utils import to_timestamp +from common.djangoapps.student.models import user_by_anonymous_id +from common.djangoapps.student.signals import ENROLLMENT_TRACK_UPDATED +from common.djangoapps.track.event_transaction_utils import get_event_transaction_id, get_event_transaction_type +from common.djangoapps.util.date_utils import to_timestamp from .. import events from ..constants import ScoreDatabaseTableEnum diff --git a/lms/djangoapps/grades/subsection_grade_factory.py b/lms/djangoapps/grades/subsection_grade_factory.py index 50e82cad28..35b6047c2f 100644 --- a/lms/djangoapps/grades/subsection_grade_factory.py +++ b/lms/djangoapps/grades/subsection_grade_factory.py @@ -14,7 +14,7 @@ from lms.djangoapps.grades.config import assume_zero_if_absent, should_persist_g from lms.djangoapps.grades.models import PersistentSubsectionGrade from lms.djangoapps.grades.scores import possibly_scored from openedx.core.lib.grade_utils import is_score_higher_or_equal -from student.models import anonymous_id_for_user +from common.djangoapps.student.models import anonymous_id_for_user from .course_data import CourseData from .subsection_grade import CreateSubsectionGrade, ReadSubsectionGrade, ZeroSubsectionGrade diff --git a/lms/djangoapps/grades/tasks.py b/lms/djangoapps/grades/tasks.py index cbd517f9c1..a2dafd3e6e 100644 --- a/lms/djangoapps/grades/tasks.py +++ b/lms/djangoapps/grades/tasks.py @@ -21,9 +21,9 @@ from lms.djangoapps.courseware.model_data import get_score from lms.djangoapps.course_blocks.api import get_course_blocks from lms.djangoapps.grades.config.models import ComputeGradesSetting from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment -from track.event_transaction_utils import set_event_transaction_id, set_event_transaction_type -from util.date_utils import from_timestamp +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.track.event_transaction_utils import set_event_transaction_id, set_event_transaction_type +from common.djangoapps.util.date_utils import from_timestamp from xmodule.modulestore.django import modulestore from .config.waffle import DISABLE_REGRADE_ON_POLICY_CHANGE, waffle diff --git a/lms/djangoapps/grades/tests/base.py b/lms/djangoapps/grades/tests/base.py index 17146e1cc6..2e362b3c66 100644 --- a/lms/djangoapps/grades/tests/base.py +++ b/lms/djangoapps/grades/tests/base.py @@ -8,8 +8,8 @@ from crum import set_current_request from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.course_blocks.api import get_course_blocks from openedx.core.djangolib.testing.utils import get_mock_request -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/tests/integration/test_access.py b/lms/djangoapps/grades/tests/integration/test_access.py index b426b37d10..e966671a3d 100644 --- a/lms/djangoapps/grades/tests/integration/test_access.py +++ b/lms/djangoapps/grades/tests/integration/test_access.py @@ -9,8 +9,8 @@ from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.courseware.tests.test_submitting_problems import ProblemSubmissionTestMixin from lms.djangoapps.course_blocks.api import get_course_blocks from openedx.core.djangolib.testing.utils import get_mock_request -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/lms/djangoapps/grades/tests/integration/test_events.py b/lms/djangoapps/grades/tests/integration/test_events.py index fdcc3069eb..f6f488e0e7 100644 --- a/lms/djangoapps/grades/tests/integration/test_events.py +++ b/lms/djangoapps/grades/tests/integration/test_events.py @@ -13,8 +13,8 @@ from lms.djangoapps.courseware.tests.test_submitting_problems import ProblemSubm from lms.djangoapps.instructor.enrollment import reset_student_attempts from lms.djangoapps.instructor_task.api import submit_rescore_problem_for_student from openedx.core.djangolib.testing.utils import get_mock_request -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/tests/integration/test_problems.py b/lms/djangoapps/grades/tests/integration/test_problems.py index ae1815b092..675ee26d54 100644 --- a/lms/djangoapps/grades/tests/integration/test_problems.py +++ b/lms/djangoapps/grades/tests/integration/test_problems.py @@ -10,8 +10,8 @@ from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.courseware.tests.test_submitting_problems import ProblemSubmissionTestMixin from lms.djangoapps.course_blocks.api import get_course_blocks from openedx.core.djangolib.testing.utils import get_mock_request -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.graders import ProblemScore from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase diff --git a/lms/djangoapps/grades/tests/test_api.py b/lms/djangoapps/grades/tests/test_api.py index 6a97ef9496..681d022e42 100644 --- a/lms/djangoapps/grades/tests/test_api.py +++ b/lms/djangoapps/grades/tests/test_api.py @@ -9,7 +9,7 @@ from lms.djangoapps.grades.models import ( PersistentSubsectionGrade, PersistentSubsectionGradeOverride, ) -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/tests/test_course_data.py b/lms/djangoapps/grades/tests/test_course_data.py index bf6c08e73f..b305a6cc2f 100644 --- a/lms/djangoapps/grades/tests/test_course_data.py +++ b/lms/djangoapps/grades/tests/test_course_data.py @@ -8,7 +8,7 @@ from mock import patch from lms.djangoapps.course_blocks.api import get_course_blocks from openedx.core.djangoapps.content.block_structure.api import get_course_in_cache -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/grades/tests/test_course_grade.py b/lms/djangoapps/grades/tests/test_course_grade.py index bf8fd188af..3b867ca75e 100644 --- a/lms/djangoapps/grades/tests/test_course_grade.py +++ b/lms/djangoapps/grades/tests/test_course_grade.py @@ -6,8 +6,8 @@ from mock import patch from edx_toggles.toggles.testutils import override_waffle_switch from openedx.core.djangolib.testing.utils import get_mock_request -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/tests/test_course_grade_factory.py b/lms/djangoapps/grades/tests/test_course_grade_factory.py index 4ced0b961a..c410729a0a 100644 --- a/lms/djangoapps/grades/tests/test_course_grade_factory.py +++ b/lms/djangoapps/grades/tests/test_course_grade_factory.py @@ -13,7 +13,7 @@ from edx_toggles.toggles.testutils import override_waffle_switch from lms.djangoapps.courseware.access import has_access from lms.djangoapps.grades.config.tests.utils import persistent_grades_feature_flags from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/grades/tests/test_models.py b/lms/djangoapps/grades/tests/test_models.py index 2a071f6ba5..44fc05ffee 100644 --- a/lms/djangoapps/grades/tests/test_models.py +++ b/lms/djangoapps/grades/tests/test_models.py @@ -30,8 +30,8 @@ from lms.djangoapps.grades.models import ( PersistentSubsectionGradeOverride, VisibleBlocks ) -from student.tests.factories import UserFactory -from track.event_transaction_utils import get_event_transaction_id, get_event_transaction_type +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.track.event_transaction_utils import get_event_transaction_id, get_event_transaction_type class BlockRecordListTestCase(TestCase): diff --git a/lms/djangoapps/grades/tests/test_services.py b/lms/djangoapps/grades/tests/test_services.py index 5da2fea458..99c934412d 100644 --- a/lms/djangoapps/grades/tests/test_services.py +++ b/lms/djangoapps/grades/tests/test_services.py @@ -17,7 +17,7 @@ from lms.djangoapps.grades.models import ( PersistentSubsectionGradeOverride ) from lms.djangoapps.grades.services import GradesService -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/grades/tests/test_signals.py b/lms/djangoapps/grades/tests/test_signals.py index 3474c85a42..a434dc24af 100644 --- a/lms/djangoapps/grades/tests/test_signals.py +++ b/lms/djangoapps/grades/tests/test_signals.py @@ -12,7 +12,7 @@ from django.test import TestCase from mock import MagicMock, patch from submissions.models import score_reset, score_set -from util.date_utils import to_timestamp +from common.djangoapps.util.date_utils import to_timestamp from ..constants import ScoreDatabaseTableEnum from ..signals.handlers import ( diff --git a/lms/djangoapps/grades/tests/test_subsection_grade_factory.py b/lms/djangoapps/grades/tests/test_subsection_grade_factory.py index 6e94df6741..c3390b716a 100644 --- a/lms/djangoapps/grades/tests/test_subsection_grade_factory.py +++ b/lms/djangoapps/grades/tests/test_subsection_grade_factory.py @@ -9,7 +9,7 @@ from mock import patch from lms.djangoapps.courseware.tests.test_submitting_problems import ProblemSubmissionTestMixin from lms.djangoapps.grades.config.tests.utils import persistent_grades_feature_flags -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..constants import GradeOverrideFeatureEnum from ..models import PersistentSubsectionGrade, PersistentSubsectionGradeOverride diff --git a/lms/djangoapps/grades/tests/test_tasks.py b/lms/djangoapps/grades/tests/test_tasks.py index 50b7dd087d..13e95d2288 100644 --- a/lms/djangoapps/grades/tests/test_tasks.py +++ b/lms/djangoapps/grades/tests/test_tasks.py @@ -34,10 +34,10 @@ from lms.djangoapps.grades.tasks import ( recalculate_subsection_grade_v3 ) from openedx.core.djangoapps.content.block_structure.exceptions import BlockStructureNotFound -from student.models import CourseEnrollment, anonymous_id_for_user -from student.tests.factories import UserFactory -from track.event_transaction_utils import create_new_event_transaction_id, get_event_transaction_id -from util.date_utils import to_timestamp +from common.djangoapps.student.models import CourseEnrollment, anonymous_id_for_user +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.track.event_transaction_utils import create_new_event_transaction_id, get_event_transaction_id +from common.djangoapps.util.date_utils import to_timestamp from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/grades/tests/test_transformer.py b/lms/djangoapps/grades/tests/test_transformer.py index 4e3180f155..a3c38d7e05 100644 --- a/lms/djangoapps/grades/tests/test_transformer.py +++ b/lms/djangoapps/grades/tests/test_transformer.py @@ -15,7 +15,7 @@ from six.moves import range from lms.djangoapps.course_blocks.api import get_course_blocks from lms.djangoapps.course_blocks.transformers.tests.helpers import CourseStructureTestCase from openedx.core.djangoapps.content.block_structure.api import clear_course_from_cache -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/lms/djangoapps/instructor/access.py b/lms/djangoapps/instructor/access.py index fbb431b401..5ea7bde8b6 100644 --- a/lms/djangoapps/instructor/access.py +++ b/lms/djangoapps/instructor/access.py @@ -14,7 +14,7 @@ import logging from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params from openedx.core.djangoapps.django_comment_common.models import Role -from student.roles import ( +from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseCcxCoachRole, CourseDataResearcherRole, CourseInstructorRole, CourseStaffRole ) diff --git a/lms/djangoapps/instructor/enrollment.py b/lms/djangoapps/instructor/enrollment.py index 74a821236f..d36049f1a2 100644 --- a/lms/djangoapps/instructor/enrollment.py +++ b/lms/djangoapps/instructor/enrollment.py @@ -24,7 +24,7 @@ from six import text_type from submissions import api as sub_api # installed from the edx-submissions repository from submissions.models import score_set -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.models import StudentModule from lms.djangoapps.grades.api import constants as grades_constants from lms.djangoapps.grades.api import disconnect_submissions_signal_receiver @@ -43,8 +43,8 @@ from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_api.models import UserPreference from openedx.core.djangolib.markup import Text -from student.models import CourseEnrollment, CourseEnrollmentAllowed, anonymous_id_for_user, is_email_retired -from track.event_transaction_utils import ( +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed, anonymous_id_for_user, is_email_retired +from common.djangoapps.track.event_transaction_utils import ( create_new_event_transaction_id, get_event_transaction_id, set_event_transaction_type diff --git a/lms/djangoapps/instructor/services.py b/lms/djangoapps/instructor/services.py index 4e611cacd3..22e19aff6a 100644 --- a/lms/djangoapps/instructor/services.py +++ b/lms/djangoapps/instructor/services.py @@ -14,8 +14,8 @@ import lms.djangoapps.instructor.enrollment as enrollment from lms.djangoapps.courseware.models import StudentModule from lms.djangoapps.commerce.utils import create_zendesk_ticket from lms.djangoapps.instructor.views.tools import get_student_from_identifier -from student import auth -from student.roles import CourseStaffRole +from common.djangoapps.student import auth +from common.djangoapps.student.roles import CourseStaffRole from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/lms/djangoapps/instructor/tests/test_access.py b/lms/djangoapps/instructor/tests/test_access.py index c5ed16a1b8..12b49c5900 100644 --- a/lms/djangoapps/instructor/tests/test_access.py +++ b/lms/djangoapps/instructor/tests/test_access.py @@ -9,8 +9,8 @@ from six.moves import range from lms.djangoapps.instructor.access import allow_access, list_with_level, revoke_access, update_forum_role from openedx.core.djangoapps.ace_common.tests.mixins import EmailTemplateTagMixin from openedx.core.djangoapps.django_comment_common.models import FORUM_ROLE_MODERATOR, Role -from student.roles import CourseBetaTesterRole, CourseCcxCoachRole, CourseStaffRole -from student.tests.factories import UserFactory +from common.djangoapps.student.roles import CourseBetaTesterRole, CourseCcxCoachRole, CourseStaffRole +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 118c6de830..4bb6c61379 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -34,8 +34,8 @@ from six.moves import range, zip from testfixtures import LogCapture from lms.djangoapps.bulk_email.models import BulkEmailFlag, CourseEmail, CourseEmailTemplate -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.certificates.api import generate_user_certificates from lms.djangoapps.certificates.models import CertificateStatuses @@ -72,7 +72,7 @@ from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.core.lib.teams_config import TeamsConfig from openedx.core.lib.xblock_utils import grade_histogram from openedx.features.course_experience import RELATIVE_DATES_FLAG -from student.models import ( +from common.djangoapps.student.models import ( ALLOWEDTOENROLL_TO_ENROLLED, ALLOWEDTOENROLL_TO_UNENROLLED, ENROLLED_TO_ENROLLED, @@ -87,14 +87,14 @@ from student.models import ( get_retired_email_by_email, get_retired_username_by_username ) -from student.roles import ( +from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseDataResearcherRole, CourseFinanceAdminRole, CourseInstructorRole, CourseSalesAdminRole ) -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.fields import Date from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase diff --git a/lms/djangoapps/instructor/tests/test_api_email_localization.py b/lms/djangoapps/instructor/tests/test_api_email_localization.py index 1c2a72cdb3..473878dcdf 100644 --- a/lms/djangoapps/instructor/tests/test_api_email_localization.py +++ b/lms/djangoapps/instructor/tests/test_api_email_localization.py @@ -12,8 +12,8 @@ from six import text_type from lms.djangoapps.courseware.tests.factories import InstructorFactory from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangoapps.user_api.preferences.api import delete_user_preference, set_user_preference -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/instructor/tests/test_certificates.py b/lms/djangoapps/instructor/tests/test_certificates.py index 0597f1cd12..36600486fa 100644 --- a/lms/djangoapps/instructor/tests/test_certificates.py +++ b/lms/djangoapps/instructor/tests/test_certificates.py @@ -18,7 +18,7 @@ from django.test.utils import override_settings from django.urls import reverse from capa.xqueue_interface import XQueueInterface -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory, InstructorFactory, UserFactory from lms.djangoapps.certificates import api as certs_api from lms.djangoapps.certificates.models import ( @@ -36,7 +36,7 @@ from lms.djangoapps.certificates.tests.factories import ( from lms.djangoapps.grades.tests.utils import mock_passing_grade from lms.djangoapps.verify_student.services import IDVerificationService from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/instructor/tests/test_email.py b/lms/djangoapps/instructor/tests/test_email.py index bb70ad370f..72fc6bb525 100644 --- a/lms/djangoapps/instructor/tests/test_email.py +++ b/lms/djangoapps/instructor/tests/test_email.py @@ -12,7 +12,7 @@ from six import text_type from lms.djangoapps.bulk_email.api import is_bulk_email_enabled_for_course, is_bulk_email_feature_enabled from lms.djangoapps.bulk_email.models import BulkEmailFlag, CourseAuthorization -from student.tests.factories import AdminFactory +from common.djangoapps.student.tests.factories import AdminFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/instructor/tests/test_enrollment.py b/lms/djangoapps/instructor/tests/test_enrollment.py index cfe5ee09e2..bae4f632cf 100644 --- a/lms/djangoapps/instructor/tests/test_enrollment.py +++ b/lms/djangoapps/instructor/tests/test_enrollment.py @@ -38,9 +38,9 @@ from lms.djangoapps.teams.models import CourseTeamMembership from lms.djangoapps.teams.tests.factories import CourseTeamFactory from openedx.core.djangoapps.ace_common.tests.mixins import EmailTemplateTagMixin from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, get_mock_request -from student.models import CourseEnrollment, CourseEnrollmentAllowed, anonymous_id_for_user -from student.roles import CourseCcxCoachRole -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed, anonymous_id_for_user +from common.djangoapps.student.roles import CourseCcxCoachRole +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/instructor/tests/test_proctoring.py b/lms/djangoapps/instructor/tests/test_proctoring.py index b78ef1ee6a..84b37612b5 100644 --- a/lms/djangoapps/instructor/tests/test_proctoring.py +++ b/lms/djangoapps/instructor/tests/test_proctoring.py @@ -11,8 +11,8 @@ from six import text_type from edx_proctoring.api import create_exam from edx_proctoring.backends.tests.test_backend import TestBackendProvider -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import AdminFactory +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import AdminFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/instructor/tests/test_services.py b/lms/djangoapps/instructor/tests/test_services.py index 368acba6e0..c83b81c0c5 100644 --- a/lms/djangoapps/instructor/tests/test_services.py +++ b/lms/djangoapps/instructor/tests/test_services.py @@ -12,8 +12,8 @@ from lms.djangoapps.courseware.models import StudentModule from lms.djangoapps.instructor.access import allow_access from lms.djangoapps.instructor.services import InstructorService from lms.djangoapps.instructor.tests.test_tools import msk_from_problem_urlname -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py index 02175fe987..00ae66ae21 100644 --- a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py +++ b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py @@ -10,7 +10,7 @@ from six.moves import range from capa.tests.response_xml_factory import StringResponseXMLFactory from lms.djangoapps.courseware.tests.factories import StudentModuleFactory from lms.djangoapps.grades.api import task_compute_all_grades_for_course -from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/instructor/tests/test_tools.py b/lms/djangoapps/instructor/tests/test_tools.py index 9febba7ccc..5c653fae22 100644 --- a/lms/djangoapps/instructor/tests/test_tools.py +++ b/lms/djangoapps/instructor/tests/test_tools.py @@ -19,7 +19,7 @@ from edx_when.api import set_dates_for_course from edx_when.field_data import DateLookupFieldData from openedx.core.djangoapps.course_date_signals import handlers from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.fields import Date from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/instructor/tests/utils.py b/lms/djangoapps/instructor/tests/utils.py index 2a65e8509e..87ca8297aa 100644 --- a/lms/djangoapps/instructor/tests/utils.py +++ b/lms/djangoapps/instructor/tests/utils.py @@ -10,7 +10,7 @@ import random import six from pytz import UTC -from util.date_utils import get_default_time_display +from common.djangoapps.util.date_utils import get_default_time_display class FakeInfo(object): diff --git a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py index 19fe30496f..77873d8833 100644 --- a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py +++ b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py @@ -19,9 +19,9 @@ from six import text_type from six.moves import range from common.test.utils import XssTestMixin -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from edx_toggles.toggles.testutils import override_waffle_flag -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.courseware.tabs import get_course_tab_list from lms.djangoapps.courseware.tests.factories import StaffFactory, StudentModuleFactory, UserFactory from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase @@ -29,9 +29,9 @@ from lms.djangoapps.grades.config.waffle import WRITABLE_GRADEBOOK, waffle_flags from lms.djangoapps.instructor.toggles import DATA_DOWNLOAD_V2 from lms.djangoapps.instructor.views.gradebook_api import calculate_page_info from openedx.core.djangoapps.site_configuration.models import SiteConfiguration -from student.models import CourseEnrollment -from student.roles import CourseFinanceAdminRole -from student.tests.factories import AdminFactory, CourseAccessRoleFactory, CourseEnrollmentFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseFinanceAdminRole +from common.djangoapps.student.tests.factories import AdminFactory, CourseAccessRoleFactory, CourseEnrollmentFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, check_mongo_calls diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 1dd932e10c..0c2b227af7 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -48,7 +48,7 @@ from lms.djangoapps.instructor_analytics import csvs as instructor_analytics_csv from lms.djangoapps.instructor_analytics import distributions as instructor_analytics_distributions from lms.djangoapps.bulk_email.api import is_bulk_email_feature_enabled from lms.djangoapps.bulk_email.models import CourseEmail -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates import api as certs_api from lms.djangoapps.certificates.models import ( CertificateInvalidation, @@ -94,8 +94,8 @@ from openedx.core.djangoapps.user_api.preferences.api import get_user_preference from openedx.core.djangolib.markup import HTML, Text from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin -from student import auth -from student.models import ( +from common.djangoapps.student import auth +from common.djangoapps.student.models import ( ALLOWEDTOENROLL_TO_ENROLLED, ALLOWEDTOENROLL_TO_UNENROLLED, DEFAULT_TRANSITION_STATE, @@ -115,15 +115,15 @@ from student.models import ( is_email_retired, unique_id_for_user ) -from student.roles import CourseFinanceAdminRole, CourseSalesAdminRole -from util.file import ( +from common.djangoapps.student.roles import CourseFinanceAdminRole, CourseSalesAdminRole +from common.djangoapps.util.file import ( FileValidationException, UniversalNewlineIterator, course_and_time_based_filename_generator, store_uploaded_file ) -from util.json_request import JsonResponse, JsonResponseBadRequest -from util.views import require_global_staff +from common.djangoapps.util.json_request import JsonResponse, JsonResponseBadRequest +from common.djangoapps.util.views import require_global_staff from xmodule.modulestore.django import modulestore from .. import permissions diff --git a/lms/djangoapps/instructor/views/gradebook_api.py b/lms/djangoapps/instructor/views/gradebook_api.py index ca8a4f0293..9a20ecdcbe 100644 --- a/lms/djangoapps/instructor/views/gradebook_api.py +++ b/lms/djangoapps/instructor/views/gradebook_api.py @@ -13,7 +13,7 @@ from django.views.decorators.cache import cache_control from opaque_keys.edx.keys import CourseKey from lms.djangoapps.courseware.courses import get_course_with_access -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.grades.api import CourseGradeFactory from lms.djangoapps.instructor.views.api import require_course_permission from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 5ad8e05315..5e3ad50821 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -30,8 +30,8 @@ from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from lms.djangoapps.bulk_email.api import is_bulk_email_feature_enabled -from course_modes.models import CourseMode, CourseModesArchive -from edxmako.shortcuts import render_to_response +from common.djangoapps.course_modes.models import CourseMode, CourseModesArchive +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.certificates import api as certs_api from lms.djangoapps.certificates.models import ( CertificateGenerationConfiguration, @@ -53,12 +53,12 @@ from openedx.core.djangoapps.verified_track_content.models import VerifiedTrackC from openedx.core.djangolib.markup import HTML, Text from openedx.core.lib.url_utils import quote_slashes from openedx.core.lib.xblock_utils import wrap_xblock -from student.models import CourseEnrollment -from student.roles import ( +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import ( CourseFinanceAdminRole, CourseInstructorRole, CourseSalesAdminRole, CourseStaffRole ) -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse from xmodule.html_module import HtmlBlock from xmodule.modulestore.django import modulestore from xmodule.tabs import CourseTab diff --git a/lms/djangoapps/instructor/views/instructor_task_helpers.py b/lms/djangoapps/instructor/views/instructor_task_helpers.py index 177e310d74..e7eb12d234 100644 --- a/lms/djangoapps/instructor/views/instructor_task_helpers.py +++ b/lms/djangoapps/instructor/views/instructor_task_helpers.py @@ -13,7 +13,7 @@ from django.utils.translation import ungettext from lms.djangoapps.bulk_email.models import CourseEmail from lms.djangoapps.instructor_task.views import get_task_completion_info -from util.date_utils import get_default_time_display +from common.djangoapps.util.date_utils import get_default_time_display log = logging.getLogger(__name__) diff --git a/lms/djangoapps/instructor/views/tools.py b/lms/djangoapps/instructor/views/tools.py index 7cbc0987f5..562cfa03d3 100644 --- a/lms/djangoapps/instructor/views/tools.py +++ b/lms/djangoapps/instructor/views/tools.py @@ -18,7 +18,7 @@ from six import string_types, text_type from six.moves import zip from openedx.core.djangoapps.schedules.models import Schedule -from student.models import get_user_by_username_or_email, CourseEnrollment +from common.djangoapps.student.models import get_user_by_username_or_email, CourseEnrollment class DashboardError(Exception): diff --git a/lms/djangoapps/instructor_analytics/basic.py b/lms/djangoapps/instructor_analytics/basic.py index 6d9c9a1725..e600d72208 100644 --- a/lms/djangoapps/instructor_analytics/basic.py +++ b/lms/djangoapps/instructor_analytics/basic.py @@ -27,7 +27,7 @@ from lms.djangoapps.grades.api import context as grades_context from lms.djangoapps.verify_student.services import IDVerificationService from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangolib.markup import HTML, Text -from student.models import CourseEnrollment, CourseEnrollmentAllowed +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed log = logging.getLogger(__name__) diff --git a/lms/djangoapps/instructor_analytics/distributions.py b/lms/djangoapps/instructor_analytics/distributions.py index f2a847a14d..5d7c633e06 100644 --- a/lms/djangoapps/instructor_analytics/distributions.py +++ b/lms/djangoapps/instructor_analytics/distributions.py @@ -24,7 +24,7 @@ The distribution in a course for gender might look like: from django.db.models import Count -from student.models import CourseEnrollment, UserProfile +from common.djangoapps.student.models import CourseEnrollment, UserProfile # choices with a restricted domain, e.g. level_of_education _EASY_CHOICE_FEATURES = ('gender', 'level_of_education') diff --git a/lms/djangoapps/instructor_analytics/tests/test_basic.py b/lms/djangoapps/instructor_analytics/tests/test_basic.py index b4023cc8cc..363ff20d0e 100644 --- a/lms/djangoapps/instructor_analytics/tests/test_basic.py +++ b/lms/djangoapps/instructor_analytics/tests/test_basic.py @@ -18,8 +18,8 @@ from opaque_keys.edx.locator import UsageKey from six import text_type from six.moves import range, zip -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.tests.factories import InstructorFactory from lms.djangoapps.instructor_analytics.basic import ( AVAILABLE_FEATURES, @@ -35,9 +35,9 @@ from lms.djangoapps.instructor_analytics.basic import ( list_problem_responses, ) from openedx.core.djangoapps.course_groups.tests.helpers import CohortFactory -from student.models import CourseEnrollment, CourseEnrollmentAllowed -from student.roles import CourseSalesAdminRole -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed +from common.djangoapps.student.roles import CourseSalesAdminRole +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -194,7 +194,7 @@ class TestAnalyticsBasic(ModuleStoreTestCase): self.assertIn(userreport['verification_status'], ["N/A"]) # make sure that the user report respects whatever value # is returned by verification and enrollment code - with patch("student.models.CourseEnrollment.enrollment_mode_for_user") as enrollment_patch: + with patch("common.djangoapps.student.models.CourseEnrollment.enrollment_mode_for_user") as enrollment_patch: with patch( "lms.djangoapps.verify_student.services.IDVerificationService.verification_status_for_user" ) as verify_patch: diff --git a/lms/djangoapps/instructor_analytics/tests/test_distributions.py b/lms/djangoapps/instructor_analytics/tests/test_distributions.py index beb55083a4..dc96edc541 100644 --- a/lms/djangoapps/instructor_analytics/tests/test_distributions.py +++ b/lms/djangoapps/instructor_analytics/tests/test_distributions.py @@ -7,8 +7,8 @@ from opaque_keys.edx.locator import CourseLocator from six.moves import range from lms.djangoapps.instructor_analytics.distributions import AVAILABLE_PROFILE_FEATURES, profile_distribution -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory class TestAnalyticsDistributions(TestCase): diff --git a/lms/djangoapps/instructor_task/api.py b/lms/djangoapps/instructor_task/api.py index 2533d5c745..d5ca3b7b26 100644 --- a/lms/djangoapps/instructor_task/api.py +++ b/lms/djangoapps/instructor_task/api.py @@ -43,7 +43,7 @@ from lms.djangoapps.instructor_task.tasks import ( reset_problem_attempts, send_bulk_course_email ) -from util import milestones_helpers +from common.djangoapps.util import milestones_helpers from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/instructor_task/api_helper.py b/lms/djangoapps/instructor_task/api_helper.py index 0b46c5ad7f..16c7dd00c9 100644 --- a/lms/djangoapps/instructor_task/api_helper.py +++ b/lms/djangoapps/instructor_task/api_helper.py @@ -20,7 +20,7 @@ from six import text_type from lms.djangoapps.courseware.courses import get_problems_in_section from lms.djangoapps.courseware.module_render import get_xqueue_callback_url_prefix from lms.djangoapps.instructor_task.models import PROGRESS, InstructorTask -from util.db import outer_atomic +from common.djangoapps.util.db import outer_atomic from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/lms/djangoapps/instructor_task/subtasks.py b/lms/djangoapps/instructor_task/subtasks.py index 0d1024dd06..26ab42fc74 100644 --- a/lms/djangoapps/instructor_task/subtasks.py +++ b/lms/djangoapps/instructor_task/subtasks.py @@ -18,7 +18,7 @@ from django.db import DatabaseError, transaction from django.utils.encoding import python_2_unicode_compatible from six.moves import range, zip -from util.db import outer_atomic +from common.djangoapps.util.db import outer_atomic from .exceptions import DuplicateTaskException from .models import PROGRESS, QUEUING, InstructorTask diff --git a/lms/djangoapps/instructor_task/tasks_helper/certs.py b/lms/djangoapps/instructor_task/tasks_helper/certs.py index 047beacf6a..04250be8f9 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/certs.py +++ b/lms/djangoapps/instructor_task/tasks_helper/certs.py @@ -10,7 +10,7 @@ from django.db.models import Q from lms.djangoapps.certificates.api import generate_user_certificates from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.django import modulestore from .runner import TaskProgress diff --git a/lms/djangoapps/instructor_task/tasks_helper/enrollments.py b/lms/djangoapps/instructor_task/tasks_helper/enrollments.py index c22db99a8f..3b2b8c9588 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/enrollments.py +++ b/lms/djangoapps/instructor_task/tasks_helper/enrollments.py @@ -12,13 +12,13 @@ from django.utils.translation import ugettext as _ from pytz import UTC from six import StringIO -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from lms.djangoapps.courseware.courses import get_course_by_id from lms.djangoapps.instructor_analytics.basic import enrolled_students_features, list_may_enroll from lms.djangoapps.instructor_analytics.csvs import format_dictlist from lms.djangoapps.instructor_task.models import ReportStore -from student.models import CourseAccessRole, CourseEnrollment -from util.file import course_filename_prefix_generator +from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment +from common.djangoapps.util.file import course_filename_prefix_generator from .runner import TaskProgress from .utils import tracker_emit, upload_csv_to_report_store diff --git a/lms/djangoapps/instructor_task/tasks_helper/grades.py b/lms/djangoapps/instructor_task/tasks_helper/grades.py index dadb72844f..911b64a702 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/grades.py +++ b/lms/djangoapps/instructor_task/tasks_helper/grades.py @@ -19,7 +19,7 @@ from pytz import UTC from six import text_type from six.moves import zip, zip_longest -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateWhitelist, GeneratedCertificate, certificate_info_for_user from lms.djangoapps.courseware.courses import get_course_by_id from lms.djangoapps.courseware.user_state_client import DjangoXBlockUserStateClient @@ -41,8 +41,8 @@ from openedx.core.djangoapps.content.block_structure.api import get_course_in_ca from openedx.core.djangoapps.course_groups.cohorts import bulk_cache_cohorts, get_cohort, is_course_cohorted from openedx.core.djangoapps.user_api.course_tag.api import BulkCourseTags from openedx.core.lib.cache_utils import get_cache -from student.models import CourseEnrollment -from student.roles import BulkRoleCache +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import BulkRoleCache from xmodule.modulestore.django import modulestore from xmodule.partitions.partitions_service import PartitionService from xmodule.split_test_module import get_split_user_partitions diff --git a/lms/djangoapps/instructor_task/tasks_helper/misc.py b/lms/djangoapps/instructor_task/tasks_helper/misc.py index b0b4729c22..b8e0fa5592 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/misc.py +++ b/lms/djangoapps/instructor_task/tasks_helper/misc.py @@ -29,7 +29,7 @@ from lms.djangoapps.instructor_analytics.csvs import format_dictlist from openedx.core.djangoapps.course_groups.cohorts import add_user_to_cohort from openedx.core.djangoapps.course_groups.models import CourseUserGroup from lms.djangoapps.survey.models import SurveyAnswer -from util.file import UniversalNewlineIterator +from common.djangoapps.util.file import UniversalNewlineIterator from .runner import TaskProgress from .utils import ( diff --git a/lms/djangoapps/instructor_task/tasks_helper/module_state.py b/lms/djangoapps/instructor_task/tasks_helper/module_state.py index 5e8d3d9473..65a6998f96 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/module_state.py +++ b/lms/djangoapps/instructor_task/tasks_helper/module_state.py @@ -19,10 +19,10 @@ from lms.djangoapps.courseware.model_data import DjangoKeyValueStore, FieldDataC from lms.djangoapps.courseware.models import StudentModule from lms.djangoapps.courseware.module_render import get_module_for_descriptor_internal from lms.djangoapps.grades.api import events as grades_events -from student.models import get_user_by_username_or_email -from track.event_transaction_utils import create_new_event_transaction_id, set_event_transaction_type -from track.views import task_track -from util.db import outer_atomic +from common.djangoapps.student.models import get_user_by_username_or_email +from common.djangoapps.track.event_transaction_utils import create_new_event_transaction_id, set_event_transaction_type +from common.djangoapps.track.views import task_track +from common.djangoapps.util.db import outer_atomic from xmodule.modulestore.django import modulestore from ..exceptions import UpdateProblemModuleStateError diff --git a/lms/djangoapps/instructor_task/tasks_helper/runner.py b/lms/djangoapps/instructor_task/tasks_helper/runner.py index 1724e44a7d..d1bd5c62eb 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/runner.py +++ b/lms/djangoapps/instructor_task/tasks_helper/runner.py @@ -11,7 +11,7 @@ from celery import current_task from django.db import reset_queries from lms.djangoapps.instructor_task.models import PROGRESS, InstructorTask -from util.db import outer_atomic +from common.djangoapps.util.db import outer_atomic TASK_LOG = logging.getLogger('edx.celery.task') diff --git a/lms/djangoapps/instructor_task/tasks_helper/utils.py b/lms/djangoapps/instructor_task/tasks_helper/utils.py index 8a9afdb1ee..07de2e8e91 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/utils.py +++ b/lms/djangoapps/instructor_task/tasks_helper/utils.py @@ -6,7 +6,7 @@ Utility methods for instructor tasks from eventtracking import tracker from lms.djangoapps.instructor_task.models import ReportStore -from util.file import course_filename_prefix_generator +from common.djangoapps.util.file import course_filename_prefix_generator REPORT_REQUESTED_EVENT_NAME = u'edx.instructor.report.requested' diff --git a/lms/djangoapps/instructor_task/tests/factories.py b/lms/djangoapps/instructor_task/tests/factories.py index f68ec11d16..47dbefdf59 100644 --- a/lms/djangoapps/instructor_task/tests/factories.py +++ b/lms/djangoapps/instructor_task/tests/factories.py @@ -11,7 +11,7 @@ from factory.django import DjangoModelFactory from opaque_keys.edx.locator import CourseLocator from lms.djangoapps.instructor_task.models import InstructorTask -from student.tests.factories import UserFactory as StudentUserFactory +from common.djangoapps.student.tests.factories import UserFactory as StudentUserFactory class InstructorTaskFactory(DjangoModelFactory): diff --git a/lms/djangoapps/instructor_task/tests/test_base.py b/lms/djangoapps/instructor_task/tests/test_base.py index 9e5776c9d2..be41f14fea 100644 --- a/lms/djangoapps/instructor_task/tests/test_base.py +++ b/lms/djangoapps/instructor_task/tests/test_base.py @@ -30,7 +30,7 @@ from lms.djangoapps.instructor_task.tests.factories import InstructorTaskFactory from lms.djangoapps.instructor_task.views import instructor_task_status from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.core.lib.url_utils import quote_slashes -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/instructor_task/tests/test_subtasks.py b/lms/djangoapps/instructor_task/tests/test_subtasks.py index e78f7cabe0..fc6fd4ef24 100644 --- a/lms/djangoapps/instructor_task/tests/test_subtasks.py +++ b/lms/djangoapps/instructor_task/tests/test_subtasks.py @@ -11,7 +11,7 @@ from six.moves import range from lms.djangoapps.instructor_task.subtasks import queue_subtasks_for_query from lms.djangoapps.instructor_task.tests.factories import InstructorTaskFactory from lms.djangoapps.instructor_task.tests.test_base import InstructorTaskCourseTestCase -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class TestSubtasks(InstructorTaskCourseTestCase): diff --git a/lms/djangoapps/instructor_task/tests/test_tasks.py b/lms/djangoapps/instructor_task/tests/test_tasks.py index 2f9a90630b..5fd342708a 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks.py @@ -17,7 +17,7 @@ from mock import MagicMock, Mock, patch from opaque_keys.edx.keys import i4xEncoder from six.moves import range -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.models import StudentModule from lms.djangoapps.courseware.tests.factories import StudentModuleFactory from lms.djangoapps.instructor_task.exceptions import UpdateProblemModuleStateError diff --git a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py index 4ebb770940..e2d2d5a47f 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py @@ -33,8 +33,8 @@ from waffle.testutils import override_switch import openedx.core.djangoapps.user_api.course_tag.api as course_tag_api from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.models import StudentModule from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from lms.djangoapps.certificates.tests.factories import CertificateWhitelistFactory, GeneratedCertificateFactory @@ -75,8 +75,8 @@ from openedx.core.djangoapps.credit.tests.factories import CreditCourseFactory from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme from openedx.core.djangoapps.util.testing import ContentGroupTestCase, TestConditionalContent from openedx.core.lib.teams_config import TeamsConfig -from student.models import ALLOWEDTOENROLL_TO_ENROLLED, CourseEnrollment, CourseEnrollmentAllowed, ManualEnrollmentAudit -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import ALLOWEDTOENROLL_TO_ENROLLED, CourseEnrollment, CourseEnrollmentAllowed, ManualEnrollmentAudit +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from lms.djangoapps.survey.models import SurveyAnswer, SurveyForm from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/lms/djangoapps/learner_dashboard/tests/test_programs.py b/lms/djangoapps/learner_dashboard/tests/test_programs.py index 2d27052c01..8af51b1749 100644 --- a/lms/djangoapps/learner_dashboard/tests/test_programs.py +++ b/lms/djangoapps/learner_dashboard/tests/test_programs.py @@ -27,7 +27,7 @@ from openedx.core.djangoapps.catalog.tests.factories import ( from openedx.core.djangoapps.catalog.tests.mixins import CatalogIntegrationMixin from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory as ModuleStoreCourseFactory diff --git a/lms/djangoapps/learner_dashboard/views.py b/lms/djangoapps/learner_dashboard/views.py index e77f970c08..db6c6724e8 100644 --- a/lms/djangoapps/learner_dashboard/views.py +++ b/lms/djangoapps/learner_dashboard/views.py @@ -4,7 +4,7 @@ from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_GET -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.learner_dashboard.programs import ProgramDetailsFragmentView, ProgramsFragmentView from openedx.core.djangoapps.programs.models import ProgramsApiConfig diff --git a/lms/djangoapps/lms_xblock/test/test_runtime.py b/lms/djangoapps/lms_xblock/test/test_runtime.py index f08b191939..a24078cb56 100644 --- a/lms/djangoapps/lms_xblock/test/test_runtime.py +++ b/lms/djangoapps/lms_xblock/test/test_runtime.py @@ -16,7 +16,7 @@ from xblock.fields import ScopeIds from lms.djangoapps.badges.tests.factories import BadgeClassFactory from lms.djangoapps.badges.tests.test_models import get_image from lms.djangoapps.lms_xblock.runtime import LmsModuleSystem -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import ModuleI18nService from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py b/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py index 70514373d9..18bbfbfbbc 100644 --- a/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py +++ b/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py @@ -10,7 +10,7 @@ from opaque_keys.edx.keys import CourseKey, UsageKey from lms.djangoapps.lti_provider.management.commands import resend_lti_scores from lms.djangoapps.lti_provider.models import GradedAssignment, LtiConsumer, OutcomeService -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.utils import TEST_DATA_DIR from xmodule.modulestore.xml_importer import import_course_from_xml diff --git a/lms/djangoapps/lti_provider/tests/test_outcomes.py b/lms/djangoapps/lti_provider/tests/test_outcomes.py index c31ffe36c2..cc0f4cac55 100644 --- a/lms/djangoapps/lti_provider/tests/test_outcomes.py +++ b/lms/djangoapps/lti_provider/tests/test_outcomes.py @@ -10,7 +10,7 @@ from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator import lms.djangoapps.lti_provider.outcomes as outcomes from lms.djangoapps.lti_provider.models import GradedAssignment, LtiConsumer, OutcomeService -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, check_mongo_calls diff --git a/lms/djangoapps/lti_provider/tests/test_tasks.py b/lms/djangoapps/lti_provider/tests/test_tasks.py index 8c98248257..6fc387d2fa 100644 --- a/lms/djangoapps/lti_provider/tests/test_tasks.py +++ b/lms/djangoapps/lti_provider/tests/test_tasks.py @@ -11,7 +11,7 @@ from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator import lms.djangoapps.lti_provider.tasks as tasks from lms.djangoapps.lti_provider.models import GradedAssignment, LtiConsumer, OutcomeService -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class BaseOutcomeTest(TestCase): diff --git a/lms/djangoapps/lti_provider/tests/test_users.py b/lms/djangoapps/lti_provider/tests/test_users.py index 90401f2b28..0b083434a5 100644 --- a/lms/djangoapps/lti_provider/tests/test_users.py +++ b/lms/djangoapps/lti_provider/tests/test_users.py @@ -14,7 +14,7 @@ from six.moves import range from .. import users from ..models import LtiConsumer, LtiUser -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class UserManagementHelperTest(TestCase): diff --git a/lms/djangoapps/lti_provider/tests/test_views.py b/lms/djangoapps/lti_provider/tests/test_views.py index 942d913b04..5192bfaf6f 100644 --- a/lms/djangoapps/lti_provider/tests/test_views.py +++ b/lms/djangoapps/lti_provider/tests/test_views.py @@ -12,7 +12,7 @@ from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator from lms.djangoapps.courseware.testutils import RenderXBlockTestMixin from lms.djangoapps.lti_provider import models, views -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase LTI_DEFAULT_PARAMS = { diff --git a/lms/djangoapps/lti_provider/users.py b/lms/djangoapps/lti_provider/users.py index 73979f0e28..3ff26f99a6 100644 --- a/lms/djangoapps/lti_provider/users.py +++ b/lms/djangoapps/lti_provider/users.py @@ -16,7 +16,7 @@ from django.db import IntegrityError, transaction from six.moves import range from lms.djangoapps.lti_provider.models import LtiUser -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile def authenticate_lti_user(request, lti_user_id, lti_consumer): diff --git a/lms/djangoapps/lti_provider/views.py b/lms/djangoapps/lti_provider/views.py index f24bcfe503..cc10a368b7 100644 --- a/lms/djangoapps/lti_provider/views.py +++ b/lms/djangoapps/lti_provider/views.py @@ -17,7 +17,7 @@ from lms.djangoapps.lti_provider.outcomes import store_outcome_parameters from lms.djangoapps.lti_provider.signature_validator import SignatureValidator from lms.djangoapps.lti_provider.users import authenticate_lti_user from openedx.core.lib.url_utils import unquote_slashes -from util.views import add_p3p_header +from common.djangoapps.util.views import add_p3p_header log = logging.getLogger("edx.lti_provider") diff --git a/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py b/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py index 02d73c1c28..3157ad62c9 100644 --- a/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py +++ b/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py @@ -16,7 +16,7 @@ from django.core.management.base import BaseCommand from mailsnake import MailSnake from opaque_keys.edx.keys import CourseKey -from student.models import UserProfile, unique_id_for_user +from common.djangoapps.student.models import UserProfile, unique_id_for_user BATCH_SIZE = 15000 # If you try to subscribe with too many users at once diff --git a/lms/djangoapps/mobile_api/course_info/views.py b/lms/djangoapps/mobile_api/course_info/views.py index 9f1fb4364c..835099a75d 100644 --- a/lms/djangoapps/mobile_api/course_info/views.py +++ b/lms/djangoapps/mobile_api/course_info/views.py @@ -8,7 +8,7 @@ from rest_framework.response import Response from lms.djangoapps.courseware.courses import get_course_info_section_module from openedx.core.lib.xblock_utils import get_course_update_items -from static_replace import make_static_urls_absolute +from common.djangoapps.static_replace import make_static_urls_absolute from ..decorators import mobile_course_access, mobile_view diff --git a/lms/djangoapps/mobile_api/tests/test_milestones.py b/lms/djangoapps/mobile_api/tests/test_milestones.py index 8e305672e3..afd582cfd9 100644 --- a/lms/djangoapps/mobile_api/tests/test_milestones.py +++ b/lms/djangoapps/mobile_api/tests/test_milestones.py @@ -11,7 +11,7 @@ from mock import patch from lms.djangoapps.courseware.access_response import MilestoneAccessError from lms.djangoapps.courseware.tests.test_entrance_exam import add_entrance_exam_milestone, answer_entrance_exam_problem from openedx.core.djangolib.testing.utils import get_mock_request -from util.milestones_helpers import add_prerequisite_course, fulfill_course_milestone +from common.djangoapps.util.milestones_helpers import add_prerequisite_course, fulfill_course_milestone from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/mobile_api/testutils.py b/lms/djangoapps/mobile_api/testutils.py index 0e8734a476..f344e5b3a2 100644 --- a/lms/djangoapps/mobile_api/testutils.py +++ b/lms/djangoapps/mobile_api/testutils.py @@ -29,8 +29,8 @@ from lms.djangoapps.courseware.tests.factories import UserFactory from lms.djangoapps.mobile_api.models import IgnoreMobileAvailableFlagConfig from lms.djangoapps.mobile_api.tests.test_milestones import MobileAPIMilestonesMixin from lms.djangoapps.mobile_api.utils import API_V1 -from student import auth -from student.models import CourseEnrollment +from common.djangoapps.student import auth +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/mobile_api/users/serializers.py b/lms/djangoapps/mobile_api/users/serializers.py index 94a152b6da..d8e0f8226c 100644 --- a/lms/djangoapps/mobile_api/users/serializers.py +++ b/lms/djangoapps/mobile_api/users/serializers.py @@ -10,8 +10,8 @@ from rest_framework.reverse import reverse from lms.djangoapps.courseware.access import has_access from lms.djangoapps.certificates.api import certificate_downloadable_status from openedx.features.course_duration_limits.access import get_user_course_expiration_date -from student.models import CourseEnrollment, User -from util.course import get_encoded_course_sharing_utm_params, get_link_for_about_page +from common.djangoapps.student.models import CourseEnrollment, User +from common.djangoapps.util.course import get_encoded_course_sharing_utm_params, get_link_for_about_page class CourseOverviewField(serializers.RelatedField): diff --git a/lms/djangoapps/mobile_api/users/tests.py b/lms/djangoapps/mobile_api/users/tests.py index 03af0f2545..5430aa1ef5 100644 --- a/lms/djangoapps/mobile_api/users/tests.py +++ b/lms/djangoapps/mobile_api/users/tests.py @@ -19,7 +19,7 @@ from mock import patch from six.moves import range from six.moves.urllib.parse import parse_qs -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.access_response import MilestoneAccessError, StartDateError, VisibilityError from lms.djangoapps.certificates.api import generate_user_certificates from lms.djangoapps.certificates.models import CertificateStatuses @@ -36,10 +36,10 @@ from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory from openedx.core.lib.courses import course_image_url from openedx.features.course_duration_limits.models import CourseDurationLimitConfig from openedx.features.course_experience.tests.views.helpers import add_course_mode -from student.models import CourseEnrollment -from student.tests.factories import CourseEnrollmentFactory -from util.milestones_helpers import set_prerequisite_courses -from util.testing import UrlResetMixin +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.util.milestones_helpers import set_prerequisite_courses +from common.djangoapps.util.testing import UrlResetMixin from xmodule.course_module import DEFAULT_START_DATE from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/mobile_api/users/views.py b/lms/djangoapps/mobile_api/users/views.py index 4ff60cab46..96bea4ec66 100644 --- a/lms/djangoapps/mobile_api/users/views.py +++ b/lms/djangoapps/mobile_api/users/views.py @@ -26,7 +26,7 @@ from lms.djangoapps.courseware.views.index import save_positions_recursively_up from lms.djangoapps.courseware.access_utils import ACCESS_GRANTED from lms.djangoapps.mobile_api.utils import API_V05, API_V1 from openedx.features.course_duration_limits.access import check_course_expired -from student.models import CourseEnrollment, User +from common.djangoapps.student.models import CourseEnrollment, User from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/lms/djangoapps/program_enrollments/api/grades.py b/lms/djangoapps/program_enrollments/api/grades.py index fb3292d42b..00b931bf79 100644 --- a/lms/djangoapps/program_enrollments/api/grades.py +++ b/lms/djangoapps/program_enrollments/api/grades.py @@ -11,7 +11,7 @@ import logging from six import text_type from lms.djangoapps.grades.api import CourseGradeFactory, clear_prefetched_course_grades, prefetch_course_grades -from util.query import read_replica_or_default +from common.djangoapps.util.query import read_replica_or_default from .reading import fetch_program_course_enrollments diff --git a/lms/djangoapps/program_enrollments/api/linking.py b/lms/djangoapps/program_enrollments/api/linking.py index cc17988c63..fd3fdd6feb 100644 --- a/lms/djangoapps/program_enrollments/api/linking.py +++ b/lms/djangoapps/program_enrollments/api/linking.py @@ -12,9 +12,9 @@ import logging from django.contrib.auth import get_user_model from django.db import IntegrityError, transaction -from course_modes.models import CourseMode -from student.api import get_access_role_by_role_name -from student.models import CourseEnrollmentException +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.student.api import get_access_role_by_role_name +from common.djangoapps.student.models import CourseEnrollmentException from .reading import fetch_program_enrollments from .writing import enroll_in_masters_track diff --git a/lms/djangoapps/program_enrollments/api/reading.py b/lms/djangoapps/program_enrollments/api/reading.py index c443c03730..43c61e222f 100644 --- a/lms/djangoapps/program_enrollments/api/reading.py +++ b/lms/djangoapps/program_enrollments/api/reading.py @@ -10,8 +10,8 @@ from organizations.models import Organization from social_django.models import UserSocialAuth from openedx.core.djangoapps.catalog.utils import get_programs -from student.roles import CourseStaffRole -from third_party_auth.models import SAMLProviderConfig +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.third_party_auth.models import SAMLProviderConfig from ..constants import ProgramCourseEnrollmentRoles from ..exceptions import ( diff --git a/lms/djangoapps/program_enrollments/api/tests/test_linking.py b/lms/djangoapps/program_enrollments/api/tests/test_linking.py index c71d692e02..543139c8c8 100644 --- a/lms/djangoapps/program_enrollments/api/tests/test_linking.py +++ b/lms/djangoapps/program_enrollments/api/tests/test_linking.py @@ -17,9 +17,9 @@ from lms.djangoapps.program_enrollments.tests.factories import ( ProgramEnrollmentFactory ) from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.api import get_course_access_role -from student.roles import CourseStaffRole -from student.tests.factories import CourseAccessRoleFactory, UserFactory +from common.djangoapps.student.api import get_course_access_role +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseAccessRoleFactory, UserFactory from ..linking import ( NO_LMS_USER_TEMPLATE, diff --git a/lms/djangoapps/program_enrollments/api/tests/test_reading.py b/lms/djangoapps/program_enrollments/api/tests/test_reading.py index a5dcf74fc4..606f3b1568 100644 --- a/lms/djangoapps/program_enrollments/api/tests/test_reading.py +++ b/lms/djangoapps/program_enrollments/api/tests/test_reading.py @@ -13,7 +13,7 @@ from opaque_keys.edx.keys import CourseKey from organizations.tests.factories import OrganizationFactory from social_django.models import UserSocialAuth -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.program_enrollments.constants import ProgramCourseEnrollmentStatuses as PCEStatuses from lms.djangoapps.program_enrollments.constants import ProgramEnrollmentStatuses as PEStatuses from lms.djangoapps.program_enrollments.exceptions import ( @@ -33,9 +33,9 @@ from openedx.core.djangoapps.catalog.tests.factories import OrganizationFactory from openedx.core.djangoapps.catalog.tests.factories import ProgramFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from third_party_auth.tests.factories import SAMLProviderConfigFactory +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.third_party_auth.tests.factories import SAMLProviderConfigFactory from ..reading import ( fetch_program_course_enrollments, diff --git a/lms/djangoapps/program_enrollments/api/tests/test_writing.py b/lms/djangoapps/program_enrollments/api/tests/test_writing.py index c71bd259cf..80841ae978 100644 --- a/lms/djangoapps/program_enrollments/api/tests/test_writing.py +++ b/lms/djangoapps/program_enrollments/api/tests/test_writing.py @@ -16,7 +16,7 @@ from django.core.cache import cache from opaque_keys.edx.keys import CourseKey from organizations.tests.factories import OrganizationFactory -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.program_enrollments.constants import ProgramCourseEnrollmentRoles from lms.djangoapps.program_enrollments.constants import ProgramCourseOperationStatuses as CourseStatuses from lms.djangoapps.program_enrollments.constants import ProgramEnrollmentStatuses as PEStatuses @@ -32,9 +32,9 @@ from openedx.core.djangoapps.catalog.tests.factories import OrganizationFactory from openedx.core.djangoapps.catalog.tests.factories import ProgramFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from third_party_auth.tests.factories import SAMLProviderConfigFactory +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.third_party_auth.tests.factories import SAMLProviderConfigFactory from ..writing import write_program_course_enrollments, write_program_enrollments diff --git a/lms/djangoapps/program_enrollments/api/writing.py b/lms/djangoapps/program_enrollments/api/writing.py index e138a69e24..a0f4c17b76 100644 --- a/lms/djangoapps/program_enrollments/api/writing.py +++ b/lms/djangoapps/program_enrollments/api/writing.py @@ -10,10 +10,10 @@ import logging from simple_history.utils import bulk_create_with_history -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment, NonExistentCourseError -from student.roles import CourseStaffRole +from common.djangoapps.student.models import CourseEnrollment, NonExistentCourseError +from common.djangoapps.student.roles import CourseStaffRole from ..constants import ProgramCourseEnrollmentRoles, ProgramCourseEnrollmentStatuses from ..constants import ProgramCourseOperationStatuses as ProgramCourseOpStatuses diff --git a/lms/djangoapps/program_enrollments/constants.py b/lms/djangoapps/program_enrollments/constants.py index 5857f576db..e3595faf58 100644 --- a/lms/djangoapps/program_enrollments/constants.py +++ b/lms/djangoapps/program_enrollments/constants.py @@ -2,7 +2,7 @@ Constants used throughout the program_enrollments app and exposed to other in-process apps through api.py. """ -from student.roles import CourseStaffRole +from common.djangoapps.student.roles import CourseStaffRole class ProgramEnrollmentStatuses(object): diff --git a/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py b/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py index fa71747871..0bd26226d7 100644 --- a/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py +++ b/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py @@ -14,7 +14,7 @@ from django.db import transaction from six.moves import input from lms.djangoapps.program_enrollments.models import ProgramEnrollment -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment log = logging.getLogger(__name__) diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py b/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py index b426d9d79e..f7164df247 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py @@ -11,7 +11,7 @@ from social_django.models import UserSocialAuth from lms.djangoapps.program_enrollments.management.commands import migrate_saml_uids from lms.djangoapps.program_enrollments.management.commands.tests.utils import UserSocialAuthFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory _COMMAND_PATH = 'lms.djangoapps.program_enrollments.management.commands.migrate_saml_uids' diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py b/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py index 00d7e30a7e..7ba683a6b4 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py @@ -15,8 +15,8 @@ from six import StringIO from lms.djangoapps.program_enrollments.management.commands import reset_enrollment_data from lms.djangoapps.program_enrollments.models import ProgramCourseEnrollment, ProgramEnrollment from lms.djangoapps.program_enrollments.tests.factories import ProgramCourseEnrollmentFactory, ProgramEnrollmentFactory -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory class TestResetEnrollmentData(TestCase): diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/utils.py b/lms/djangoapps/program_enrollments/management/commands/tests/utils.py index 8ea752f184..1de02c032e 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/utils.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/utils.py @@ -6,7 +6,7 @@ from factory import LazyAttributeSequence, SubFactory from factory.django import DjangoModelFactory from social_django.models import UserSocialAuth -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class UserSocialAuthFactory(DjangoModelFactory): diff --git a/lms/djangoapps/program_enrollments/models.py b/lms/djangoapps/program_enrollments/models.py index dadb1bfae4..c990c08431 100644 --- a/lms/djangoapps/program_enrollments/models.py +++ b/lms/djangoapps/program_enrollments/models.py @@ -13,7 +13,7 @@ from opaque_keys.edx.django.models import CourseKeyField from simple_history.models import HistoricalRecords from user_util import user_util -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from .constants import ProgramCourseEnrollmentRoles, ProgramCourseEnrollmentStatuses, ProgramEnrollmentStatuses diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py b/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py index 2081b7a845..0c02ff3ea8 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py @@ -25,7 +25,7 @@ from six.moves import range, zip from social_django.models import UserSocialAuth from lms.djangoapps.bulk_email.models import BulkEmailFlag, Optout -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateStatuses from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory, InstructorFactory @@ -50,10 +50,10 @@ from openedx.core.djangoapps.catalog.tests.factories import ( from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangolib.testing.utils import CacheIsolationMixin -from student.models import CourseEnrollment -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from third_party_auth.tests.factories import SAMLProviderConfigFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.third_party_auth.tests.factories import SAMLProviderConfigFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory as ModulestoreCourseFactory from xmodule.modulestore.tests.factories import ItemFactory diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/utils.py b/lms/djangoapps/program_enrollments/rest_api/v1/utils.py index 828e1b1a31..f5c7f5cdae 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/utils.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/utils.py @@ -12,7 +12,7 @@ from pytz import UTC from rest_framework import status from rest_framework.pagination import CursorPagination -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.bulk_email.api import get_emails_enabled from lms.djangoapps.certificates.api import get_certificates_for_user_by_course_keys from lms.djangoapps.course_api.api import get_course_run_url, get_due_dates @@ -20,8 +20,8 @@ from lms.djangoapps.program_enrollments.api import fetch_program_enrollments from lms.djangoapps.program_enrollments.constants import ProgramEnrollmentStatuses from openedx.core.djangoapps.catalog.utils import course_run_keys_for_program, get_programs, is_course_run_in_program from openedx.core.lib.api.view_utils import verify_course_exists -from student.helpers import get_resume_urls_for_enrollments -from student.models import CourseEnrollment +from common.djangoapps.student.helpers import get_resume_urls_for_enrollments +from common.djangoapps.student.models import CourseEnrollment from .constants import CourseRunProgressStatuses diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/views.py b/lms/djangoapps/program_enrollments/rest_api/v1/views.py index 05a25affec..7eb80b1d7c 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/views.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/views.py @@ -43,8 +43,8 @@ from openedx.core.djangoapps.catalog.utils import ( ) from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin, PaginatedAPIView -from student.roles import CourseInstructorRole, CourseStaffRole, UserBasedRole -from util.query import read_replica_or_default +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole, UserBasedRole +from common.djangoapps.util.query import read_replica_or_default from .constants import ENABLE_ENROLLMENT_RESET_FLAG, MAX_ENROLLMENT_RECORDS from .serializers import ( diff --git a/lms/djangoapps/program_enrollments/signals.py b/lms/djangoapps/program_enrollments/signals.py index cd64c8278c..45ed4e6f07 100644 --- a/lms/djangoapps/program_enrollments/signals.py +++ b/lms/djangoapps/program_enrollments/signals.py @@ -11,7 +11,7 @@ from social_django.models import UserSocialAuth from openedx.core.djangoapps.catalog.utils import get_programs from openedx.core.djangoapps.user_api.accounts.signals import USER_RETIRE_LMS_MISC -from third_party_auth.models import SAMLProviderConfig +from common.djangoapps.third_party_auth.models import SAMLProviderConfig from .api import fetch_program_enrollments_by_student, link_program_enrollment_to_lms_user from .models import ProgramEnrollment diff --git a/lms/djangoapps/program_enrollments/tests/factories.py b/lms/djangoapps/program_enrollments/tests/factories.py index 1fef90518f..2089df1737 100644 --- a/lms/djangoapps/program_enrollments/tests/factories.py +++ b/lms/djangoapps/program_enrollments/tests/factories.py @@ -10,7 +10,7 @@ from factory.django import DjangoModelFactory from opaque_keys.edx.keys import CourseKey from lms.djangoapps.program_enrollments import models -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory class ProgramEnrollmentFactory(DjangoModelFactory): diff --git a/lms/djangoapps/program_enrollments/tests/test_models.py b/lms/djangoapps/program_enrollments/tests/test_models.py index 972de646f6..e3dff71ee6 100644 --- a/lms/djangoapps/program_enrollments/tests/test_models.py +++ b/lms/djangoapps/program_enrollments/tests/test_models.py @@ -11,9 +11,9 @@ from django.test import TestCase from edx_django_utils.cache import RequestCache from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from ..constants import ProgramCourseEnrollmentRoles from ..models import ProgramEnrollment diff --git a/lms/djangoapps/program_enrollments/tests/test_signals.py b/lms/djangoapps/program_enrollments/tests/test_signals.py index 7f07687f0d..20686ee219 100644 --- a/lms/djangoapps/program_enrollments/tests/test_signals.py +++ b/lms/djangoapps/program_enrollments/tests/test_signals.py @@ -12,7 +12,7 @@ from organizations.tests.factories import OrganizationFactory from social_django.models import UserSocialAuth from testfixtures import LogCapture -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.program_enrollments.signals import _listen_for_lms_retire, logger from lms.djangoapps.program_enrollments.tests.factories import ProgramCourseEnrollmentFactory, ProgramEnrollmentFactory from openedx.core.djangoapps.catalog.cache import PROGRAM_CACHE_KEY_TPL @@ -22,10 +22,10 @@ from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.models import CourseEnrollmentException -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from third_party_auth.models import SAMLProviderConfig -from third_party_auth.tests.factories import SAMLProviderConfigFactory +from common.djangoapps.student.models import CourseEnrollmentException +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.third_party_auth.models import SAMLProviderConfig +from common.djangoapps.third_party_auth.tests.factories import SAMLProviderConfigFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase @@ -370,7 +370,7 @@ class SocialAuthEnrollmentCompletionSignalTest(CacheIsolationTestCase): program_enrollment = self._create_waiting_program_enrollment() self._create_waiting_course_enrollments(program_enrollment) - with mock.patch('student.models.CourseEnrollment.enroll') as enrollMock: + with mock.patch('common.djangoapps.student.models.CourseEnrollment.enroll') as enrollMock: enrollMock.side_effect = CourseEnrollmentException('something has gone wrong') with pytest.raises(CourseEnrollmentException): UserSocialAuth.objects.create( diff --git a/lms/djangoapps/program_enrollments/tests/test_tasks.py b/lms/djangoapps/program_enrollments/tests/test_tasks.py index 644c6a5747..3f849e297e 100644 --- a/lms/djangoapps/program_enrollments/tests/test_tasks.py +++ b/lms/djangoapps/program_enrollments/tests/test_tasks.py @@ -12,12 +12,12 @@ from freezegun import freeze_time from opaque_keys.edx.keys import CourseKey from testfixtures import LogCapture -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.program_enrollments.models import ProgramCourseEnrollment, ProgramEnrollment from lms.djangoapps.program_enrollments.tasks import expire_waiting_enrollments, log from lms.djangoapps.program_enrollments.tests.factories import ProgramCourseEnrollmentFactory, ProgramEnrollmentFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory class ExpireWaitingEnrollmentsTest(TestCase): diff --git a/lms/djangoapps/static_template_view/views.py b/lms/djangoapps/static_template_view/views.py index d9ff099b5c..76d317d1e9 100644 --- a/lms/djangoapps/static_template_view/views.py +++ b/lms/djangoapps/static_template_view/views.py @@ -16,10 +16,10 @@ from django.utils.safestring import mark_safe from django.views.decorators.csrf import ensure_csrf_cookie from mako.exceptions import TopLevelLookupException -from edxmako.shortcuts import render_to_response, render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_response, render_to_string from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from util.cache import cache_if_anonymous -from util.views import fix_crum_request +from common.djangoapps.util.cache import cache_if_anonymous +from common.djangoapps.util.views import fix_crum_request valid_templates = [] diff --git a/lms/djangoapps/staticbook/tests.py b/lms/djangoapps/staticbook/tests.py index a7ba2ce764..91ed05e3b2 100644 --- a/lms/djangoapps/staticbook/tests.py +++ b/lms/djangoapps/staticbook/tests.py @@ -10,7 +10,7 @@ import requests from django.urls import NoReverseMatch, reverse from six import text_type -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/staticbook/views.py b/lms/djangoapps/staticbook/views.py index 22ccf609cc..8d0d9a40cd 100644 --- a/lms/djangoapps/staticbook/views.py +++ b/lms/djangoapps/staticbook/views.py @@ -10,8 +10,8 @@ from opaque_keys.edx.keys import CourseKey from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.courses import get_course_with_access -from edxmako.shortcuts import render_to_response -from static_replace import replace_static_urls +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.static_replace import replace_static_urls @login_required diff --git a/lms/djangoapps/support/serializers.py b/lms/djangoapps/support/serializers.py index 6247c9e538..840df93a36 100644 --- a/lms/djangoapps/support/serializers.py +++ b/lms/djangoapps/support/serializers.py @@ -7,7 +7,7 @@ from django.urls import reverse from rest_framework import serializers -from student.models import CourseEnrollment, ManualEnrollmentAudit +from common.djangoapps.student.models import CourseEnrollment, ManualEnrollmentAudit from lms.djangoapps.program_enrollments.models import ( ProgramEnrollment, ProgramCourseEnrollment, diff --git a/lms/djangoapps/support/tests/test_views.py b/lms/djangoapps/support/tests/test_views.py index c0b00543fd..20812ddd13 100644 --- a/lms/djangoapps/support/tests/test_views.py +++ b/lms/djangoapps/support/tests/test_views.py @@ -22,17 +22,17 @@ from pytz import UTC from social_django.models import UserSocialAuth from common.test.utils import disable_signal -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.program_enrollments.tests.factories import ProgramCourseEnrollmentFactory, ProgramEnrollmentFactory from lms.djangoapps.support.serializers import ProgramEnrollmentSerializer from lms.djangoapps.verify_student.models import VerificationDeadline from lms.djangoapps.verify_student.services import IDVerificationService from lms.djangoapps.verify_student.tests.factories import SSOVerificationFactory -from student.models import ENROLLED_TO_ENROLLED, CourseEnrollment, CourseEnrollmentAttribute, ManualEnrollmentAudit -from student.roles import GlobalStaff, SupportStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from third_party_auth.tests.factories import SAMLProviderConfigFactory +from common.djangoapps.student.models import ENROLLED_TO_ENROLLED, CourseEnrollment, CourseEnrollmentAttribute, ManualEnrollmentAudit +from common.djangoapps.student.roles import GlobalStaff, SupportStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.third_party_auth.tests.factories import SAMLProviderConfigFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/support/views/certificate.py b/lms/djangoapps/support/views/certificate.py index 8a7b20946b..6019551b5e 100644 --- a/lms/djangoapps/support/views/certificate.py +++ b/lms/djangoapps/support/views/certificate.py @@ -7,7 +7,7 @@ from django.utils.decorators import method_decorator from django.views.generic import View from six.moves.urllib.parse import quote_plus, unquote -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.support.decorators import require_support_permission diff --git a/lms/djangoapps/support/views/contact_us.py b/lms/djangoapps/support/views/contact_us.py index 7a63d3f3b8..8401546df8 100644 --- a/lms/djangoapps/support/views/contact_us.py +++ b/lms/djangoapps/support/views/contact_us.py @@ -7,10 +7,10 @@ from django.conf import settings from django.http import Http404 from django.views.generic import View -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.features.enterprise_support import api as enterprise_api -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class ContactUsView(View): diff --git a/lms/djangoapps/support/views/course_entitlements.py b/lms/djangoapps/support/views/course_entitlements.py index fef11fdc77..50063d1dbf 100644 --- a/lms/djangoapps/support/views/course_entitlements.py +++ b/lms/djangoapps/support/views/course_entitlements.py @@ -6,8 +6,8 @@ Support tool for changing and granting course entitlements from django.utils.decorators import method_decorator from django.views.generic import View -from edxmako.shortcuts import render_to_response -from entitlements.models import CourseEntitlementSupportDetail +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.entitlements.models import CourseEntitlementSupportDetail from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.support.decorators import require_support_permission diff --git a/lms/djangoapps/support/views/enrollments.py b/lms/djangoapps/support/views/enrollments.py index 7240cf2658..b505af2655 100644 --- a/lms/djangoapps/support/views/enrollments.py +++ b/lms/djangoapps/support/views/enrollments.py @@ -16,8 +16,8 @@ from opaque_keys.edx.keys import CourseKey from rest_framework.generics import GenericAPIView from six import text_type -from course_modes.models import CourseMode -from edxmako.shortcuts import render_to_response +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.support.decorators import require_support_permission from lms.djangoapps.support.serializers import ManualEnrollmentSerializer from lms.djangoapps.verify_student.models import VerificationDeadline @@ -25,8 +25,8 @@ from openedx.core.djangoapps.credit.email_utils import get_credit_provider_attri from openedx.core.djangoapps.enrollments.api import get_enrollments, update_enrollment from openedx.core.djangoapps.enrollments.errors import CourseModeNotFoundError from openedx.core.djangoapps.enrollments.serializers import ModeSerializer -from student.models import ENROLLED_TO_ENROLLED, CourseEnrollment, CourseEnrollmentAttribute, ManualEnrollmentAudit -from util.json_request import JsonResponse +from common.djangoapps.student.models import ENROLLED_TO_ENROLLED, CourseEnrollment, CourseEnrollmentAttribute, ManualEnrollmentAudit +from common.djangoapps.util.json_request import JsonResponse class EnrollmentSupportView(View): diff --git a/lms/djangoapps/support/views/feature_based_enrollments.py b/lms/djangoapps/support/views/feature_based_enrollments.py index d6511a82e9..a5b56ff339 100644 --- a/lms/djangoapps/support/views/feature_based_enrollments.py +++ b/lms/djangoapps/support/views/feature_based_enrollments.py @@ -9,7 +9,7 @@ from django.views.generic import View from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.support.decorators import require_support_permission from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.features.content_type_gating.models import ContentTypeGatingConfig diff --git a/lms/djangoapps/support/views/index.py b/lms/djangoapps/support/views/index.py index ef81f1d58c..3f949746d0 100644 --- a/lms/djangoapps/support/views/index.py +++ b/lms/djangoapps/support/views/index.py @@ -6,7 +6,7 @@ Index view for the support app. from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.support.decorators import require_support_permission SUPPORT_INDEX_URLS = [ diff --git a/lms/djangoapps/support/views/manage_user.py b/lms/djangoapps/support/views/manage_user.py index ecf618e62e..df332fc331 100644 --- a/lms/djangoapps/support/views/manage_user.py +++ b/lms/djangoapps/support/views/manage_user.py @@ -11,12 +11,12 @@ from django.utils.translation import ugettext as _ from django.views.generic import View from rest_framework.generics import GenericAPIView -from student.models import UserPasswordToggleHistory -from edxmako.shortcuts import render_to_response +from common.djangoapps.student.models import UserPasswordToggleHistory +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.support.decorators import require_support_permission from openedx.core.djangoapps.user_api.accounts.serializers import AccountUserSerializer from openedx.core.djangoapps.user_authn.utils import generate_password -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse class ManageUserSupportView(View): diff --git a/lms/djangoapps/support/views/program_enrollments.py b/lms/djangoapps/support/views/program_enrollments.py index 13424eedf4..80d2c83359 100644 --- a/lms/djangoapps/support/views/program_enrollments.py +++ b/lms/djangoapps/support/views/program_enrollments.py @@ -12,7 +12,7 @@ from django.utils.decorators import method_decorator from django.views.generic import View from social_django.models import UserSocialAuth -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.program_enrollments.api import ( fetch_program_enrollments_by_student, get_users_by_external_keys_and_org_key, @@ -29,7 +29,7 @@ from lms.djangoapps.support.serializers import ( serialize_user_info ) from lms.djangoapps.verify_student.services import IDVerificationService -from third_party_auth.models import SAMLProviderConfig +from common.djangoapps.third_party_auth.models import SAMLProviderConfig TEMPLATE_PATH = 'support/link_program_enrollments.html' DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S' diff --git a/lms/djangoapps/support/views/sso_records.py b/lms/djangoapps/support/views/sso_records.py index 6c6313af48..32e620be2c 100644 --- a/lms/djangoapps/support/views/sso_records.py +++ b/lms/djangoapps/support/views/sso_records.py @@ -6,7 +6,7 @@ from social_django.models import UserSocialAuth from lms.djangoapps.support.decorators import require_support_permission from lms.djangoapps.support.serializers import serialize_sso_records -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse class SsoView(GenericAPIView): diff --git a/lms/djangoapps/survey/models.py b/lms/djangoapps/survey/models.py index 9dfa57a15b..4fb87ebac5 100644 --- a/lms/djangoapps/survey/models.py +++ b/lms/djangoapps/survey/models.py @@ -14,7 +14,7 @@ from model_utils.models import TimeStampedModel from opaque_keys.edx.django.models import CourseKeyField from openedx.core.djangolib.markup import HTML -from student.models import User +from common.djangoapps.student.models import User from lms.djangoapps.survey.exceptions import SurveyFormNameAlreadyExists, SurveyFormNotFound log = logging.getLogger("edx.survey") diff --git a/lms/djangoapps/survey/tests/factories.py b/lms/djangoapps/survey/tests/factories.py index 0966a40ec5..ff73e3b1e6 100644 --- a/lms/djangoapps/survey/tests/factories.py +++ b/lms/djangoapps/survey/tests/factories.py @@ -1,6 +1,6 @@ import factory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.survey.models import SurveyAnswer, SurveyForm diff --git a/lms/djangoapps/survey/tests/test_signals.py b/lms/djangoapps/survey/tests/test_signals.py index 3e3ac1bb33..5d0021d468 100644 --- a/lms/djangoapps/survey/tests/test_signals.py +++ b/lms/djangoapps/survey/tests/test_signals.py @@ -5,7 +5,7 @@ Test signal handlers for the survey app from lms.djangoapps.survey.signals import _listen_for_lms_retire from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.survey.models import SurveyAnswer from lms.djangoapps.survey.tests.factories import SurveyAnswerFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/survey/tests/test_views.py b/lms/djangoapps/survey/tests/test_views.py index 9918e25e3c..dd928d92ee 100644 --- a/lms/djangoapps/survey/tests/test_views.py +++ b/lms/djangoapps/survey/tests/test_views.py @@ -10,7 +10,7 @@ import six from django.test.client import Client from django.urls import reverse -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.survey.models import SurveyAnswer, SurveyForm from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/survey/views.py b/lms/djangoapps/survey/views.py index 68c37312bc..779a05ed78 100644 --- a/lms/djangoapps/survey/views.py +++ b/lms/djangoapps/survey/views.py @@ -14,7 +14,7 @@ from django.utils.html import escape from django.views.decorators.http import require_POST from opaque_keys.edx.keys import CourseKey -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from lms.djangoapps.survey.models import SurveyForm diff --git a/lms/djangoapps/teams/api.py b/lms/djangoapps/teams/api.py index 80d263e068..143f3548a6 100644 --- a/lms/djangoapps/teams/api.py +++ b/lms/djangoapps/teams/api.py @@ -10,13 +10,13 @@ from django.db.models import Count, Q from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.courses import has_access from lms.djangoapps.discussion.django_comment_client.utils import has_discussion_privileges from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership from openedx.core.lib.teams_config import TeamsetType -from student.models import CourseEnrollment, anonymous_id_for_user -from student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.models import CourseEnrollment, anonymous_id_for_user +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole from xmodule.modulestore.django import modulestore logger = logging.getLogger(__name__) diff --git a/lms/djangoapps/teams/csv.py b/lms/djangoapps/teams/csv.py index c23f7ddb2e..f3690f0bbb 100644 --- a/lms/djangoapps/teams/csv.py +++ b/lms/djangoapps/teams/csv.py @@ -16,7 +16,7 @@ from lms.djangoapps.teams.api import ( ) from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership from lms.djangoapps.program_enrollments.models import ProgramCourseEnrollment, ProgramEnrollment -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from .utils import emit_team_event diff --git a/lms/djangoapps/teams/migrations/0001_initial.py b/lms/djangoapps/teams/migrations/0001_initial.py index 1b206d0bd0..1fdc9a60cf 100644 --- a/lms/djangoapps/teams/migrations/0001_initial.py +++ b/lms/djangoapps/teams/migrations/0001_initial.py @@ -6,7 +6,7 @@ from django.conf import settings from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField -import student.models +from common.djangoapps.student import models as student_models class Migration(migrations.Migration): @@ -28,7 +28,7 @@ class Migration(migrations.Migration): ('date_created', models.DateTimeField(auto_now_add=True)), ('description', models.CharField(max_length=300)), ('country', django_countries.fields.CountryField(blank=True, max_length=2)), - ('language', student.models.LanguageField(blank=True, help_text='Optional language the team uses as ISO 639-1 code.', max_length=16, choices=[['aa', 'Afar'], ['ab', 'Abkhazian'], ['af', 'Afrikaans'], ['ak', 'Akan'], ['sq', 'Albanian'], ['am', 'Amharic'], ['ar', 'Arabic'], ['an', 'Aragonese'], ['hy', 'Armenian'], ['as', 'Assamese'], ['av', 'Avaric'], ['ae', 'Avestan'], ['ay', 'Aymara'], ['az', 'Azerbaijani'], ['ba', 'Bashkir'], ['bm', 'Bambara'], ['eu', 'Basque'], ['be', 'Belarusian'], ['bn', 'Bengali'], ['bh', 'Bihari languages'], ['bi', 'Bislama'], ['bs', 'Bosnian'], ['br', 'Breton'], ['bg', 'Bulgarian'], ['my', 'Burmese'], ['ca', 'Catalan'], ['ch', 'Chamorro'], ['ce', 'Chechen'], ['zh', 'Chinese'], ['zh_HANS', 'Simplified Chinese'], ['zh_HANT', 'Traditional Chinese'], ['cu', 'Church Slavic'], ['cv', 'Chuvash'], ['kw', 'Cornish'], ['co', 'Corsican'], ['cr', 'Cree'], ['cs', 'Czech'], ['da', 'Danish'], ['dv', 'Divehi'], ['nl', 'Dutch'], ['dz', 'Dzongkha'], ['en', 'English'], ['eo', 'Esperanto'], ['et', 'Estonian'], ['ee', 'Ewe'], ['fo', 'Faroese'], ['fj', 'Fijian'], ['fi', 'Finnish'], ['fr', 'French'], ['fy', 'Western Frisian'], ['ff', 'Fulah'], ['ka', 'Georgian'], ['de', 'German'], ['gd', 'Gaelic'], ['ga', 'Irish'], ['gl', 'Galician'], ['gv', 'Manx'], ['el', 'Greek'], ['gn', 'Guarani'], ['gu', 'Gujarati'], ['ht', 'Haitian'], ['ha', 'Hausa'], ['he', 'Hebrew'], ['hz', 'Herero'], ['hi', 'Hindi'], ['ho', 'Hiri Motu'], ['hr', 'Croatian'], ['hu', 'Hungarian'], ['ig', 'Igbo'], ['is', 'Icelandic'], ['io', 'Ido'], ['ii', 'Sichuan Yi'], ['iu', 'Inuktitut'], ['ie', 'Interlingue'], ['ia', 'Interlingua'], ['id', 'Indonesian'], ['ik', 'Inupiaq'], ['it', 'Italian'], ['jv', 'Javanese'], ['ja', 'Japanese'], ['kl', 'Kalaallisut'], ['kn', 'Kannada'], ['ks', 'Kashmiri'], ['kr', 'Kanuri'], ['kk', 'Kazakh'], ['km', 'Central Khmer'], ['ki', 'Kikuyu'], ['rw', 'Kinyarwanda'], ['ky', 'Kirghiz'], ['kv', 'Komi'], ['kg', 'Kongo'], ['ko', 'Korean'], ['kj', 'Kuanyama'], ['ku', 'Kurdish'], ['lo', 'Lao'], ['la', 'Latin'], ['lv', 'Latvian'], ['li', 'Limburgan'], ['ln', 'Lingala'], ['lt', 'Lithuanian'], ['lb', 'Luxembourgish'], ['lu', 'Luba-Katanga'], ['lg', 'Ganda'], ['mk', 'Macedonian'], ['mh', 'Marshallese'], ['ml', 'Malayalam'], ['mi', 'Maori'], ['mr', 'Marathi'], ['ms', 'Malay'], ['mg', 'Malagasy'], ['mt', 'Maltese'], ['mn', 'Mongolian'], ['na', 'Nauru'], ['nv', 'Navajo'], ['nr', 'Ndebele, South'], ['nd', 'Ndebele, North'], ['ng', 'Ndonga'], ['ne', 'Nepali'], ['nn', 'Norwegian Nynorsk'], ['nb', 'Bokm\xe5l, Norwegian'], ['no', 'Norwegian'], ['ny', 'Chichewa'], ['oc', 'Occitan'], ['oj', 'Ojibwa'], ['or', 'Oriya'], ['om', 'Oromo'], ['os', 'Ossetian'], ['pa', 'Panjabi'], ['fa', 'Persian'], ['pi', 'Pali'], ['pl', 'Polish'], ['pt', 'Portuguese'], ['ps', 'Pushto'], ['qu', 'Quechua'], ['rm', 'Romansh'], ['ro', 'Romanian'], ['rn', 'Rundi'], ['ru', 'Russian'], ['sg', 'Sango'], ['sa', 'Sanskrit'], ['si', 'Sinhala'], ['sk', 'Slovak'], ['sl', 'Slovenian'], ['se', 'Northern Sami'], ['sm', 'Samoan'], ['sn', 'Shona'], ['sd', 'Sindhi'], ['so', 'Somali'], ['st', 'Sotho, Southern'], ['es', 'Spanish'], ['sc', 'Sardinian'], ['sr', 'Serbian'], ['ss', 'Swati'], ['su', 'Sundanese'], ['sw', 'Swahili'], ['sv', 'Swedish'], ['ty', 'Tahitian'], ['ta', 'Tamil'], ['tt', 'Tatar'], ['te', 'Telugu'], ['tg', 'Tajik'], ['tl', 'Tagalog'], ['th', 'Thai'], ['bo', 'Tibetan'], ['ti', 'Tigrinya'], ['to', 'Tonga (Tonga Islands)'], ['tn', 'Tswana'], ['ts', 'Tsonga'], ['tk', 'Turkmen'], ['tr', 'Turkish'], ['tw', 'Twi'], ['ug', 'Uighur'], ['uk', 'Ukrainian'], ['ur', 'Urdu'], ['uz', 'Uzbek'], ['ve', 'Venda'], ['vi', 'Vietnamese'], ['vo', 'Volap\xfck'], ['cy', 'Welsh'], ['wa', 'Walloon'], ['wo', 'Wolof'], ['xh', 'Xhosa'], ['yi', 'Yiddish'], ['yo', 'Yoruba'], ['za', 'Zhuang'], ['zu', 'Zulu']])), + ('language', student_models.LanguageField(blank=True, help_text='Optional language the team uses as ISO 639-1 code.', max_length=16, choices=[['aa', 'Afar'], ['ab', 'Abkhazian'], ['af', 'Afrikaans'], ['ak', 'Akan'], ['sq', 'Albanian'], ['am', 'Amharic'], ['ar', 'Arabic'], ['an', 'Aragonese'], ['hy', 'Armenian'], ['as', 'Assamese'], ['av', 'Avaric'], ['ae', 'Avestan'], ['ay', 'Aymara'], ['az', 'Azerbaijani'], ['ba', 'Bashkir'], ['bm', 'Bambara'], ['eu', 'Basque'], ['be', 'Belarusian'], ['bn', 'Bengali'], ['bh', 'Bihari languages'], ['bi', 'Bislama'], ['bs', 'Bosnian'], ['br', 'Breton'], ['bg', 'Bulgarian'], ['my', 'Burmese'], ['ca', 'Catalan'], ['ch', 'Chamorro'], ['ce', 'Chechen'], ['zh', 'Chinese'], ['zh_HANS', 'Simplified Chinese'], ['zh_HANT', 'Traditional Chinese'], ['cu', 'Church Slavic'], ['cv', 'Chuvash'], ['kw', 'Cornish'], ['co', 'Corsican'], ['cr', 'Cree'], ['cs', 'Czech'], ['da', 'Danish'], ['dv', 'Divehi'], ['nl', 'Dutch'], ['dz', 'Dzongkha'], ['en', 'English'], ['eo', 'Esperanto'], ['et', 'Estonian'], ['ee', 'Ewe'], ['fo', 'Faroese'], ['fj', 'Fijian'], ['fi', 'Finnish'], ['fr', 'French'], ['fy', 'Western Frisian'], ['ff', 'Fulah'], ['ka', 'Georgian'], ['de', 'German'], ['gd', 'Gaelic'], ['ga', 'Irish'], ['gl', 'Galician'], ['gv', 'Manx'], ['el', 'Greek'], ['gn', 'Guarani'], ['gu', 'Gujarati'], ['ht', 'Haitian'], ['ha', 'Hausa'], ['he', 'Hebrew'], ['hz', 'Herero'], ['hi', 'Hindi'], ['ho', 'Hiri Motu'], ['hr', 'Croatian'], ['hu', 'Hungarian'], ['ig', 'Igbo'], ['is', 'Icelandic'], ['io', 'Ido'], ['ii', 'Sichuan Yi'], ['iu', 'Inuktitut'], ['ie', 'Interlingue'], ['ia', 'Interlingua'], ['id', 'Indonesian'], ['ik', 'Inupiaq'], ['it', 'Italian'], ['jv', 'Javanese'], ['ja', 'Japanese'], ['kl', 'Kalaallisut'], ['kn', 'Kannada'], ['ks', 'Kashmiri'], ['kr', 'Kanuri'], ['kk', 'Kazakh'], ['km', 'Central Khmer'], ['ki', 'Kikuyu'], ['rw', 'Kinyarwanda'], ['ky', 'Kirghiz'], ['kv', 'Komi'], ['kg', 'Kongo'], ['ko', 'Korean'], ['kj', 'Kuanyama'], ['ku', 'Kurdish'], ['lo', 'Lao'], ['la', 'Latin'], ['lv', 'Latvian'], ['li', 'Limburgan'], ['ln', 'Lingala'], ['lt', 'Lithuanian'], ['lb', 'Luxembourgish'], ['lu', 'Luba-Katanga'], ['lg', 'Ganda'], ['mk', 'Macedonian'], ['mh', 'Marshallese'], ['ml', 'Malayalam'], ['mi', 'Maori'], ['mr', 'Marathi'], ['ms', 'Malay'], ['mg', 'Malagasy'], ['mt', 'Maltese'], ['mn', 'Mongolian'], ['na', 'Nauru'], ['nv', 'Navajo'], ['nr', 'Ndebele, South'], ['nd', 'Ndebele, North'], ['ng', 'Ndonga'], ['ne', 'Nepali'], ['nn', 'Norwegian Nynorsk'], ['nb', 'Bokm\xe5l, Norwegian'], ['no', 'Norwegian'], ['ny', 'Chichewa'], ['oc', 'Occitan'], ['oj', 'Ojibwa'], ['or', 'Oriya'], ['om', 'Oromo'], ['os', 'Ossetian'], ['pa', 'Panjabi'], ['fa', 'Persian'], ['pi', 'Pali'], ['pl', 'Polish'], ['pt', 'Portuguese'], ['ps', 'Pushto'], ['qu', 'Quechua'], ['rm', 'Romansh'], ['ro', 'Romanian'], ['rn', 'Rundi'], ['ru', 'Russian'], ['sg', 'Sango'], ['sa', 'Sanskrit'], ['si', 'Sinhala'], ['sk', 'Slovak'], ['sl', 'Slovenian'], ['se', 'Northern Sami'], ['sm', 'Samoan'], ['sn', 'Shona'], ['sd', 'Sindhi'], ['so', 'Somali'], ['st', 'Sotho, Southern'], ['es', 'Spanish'], ['sc', 'Sardinian'], ['sr', 'Serbian'], ['ss', 'Swati'], ['su', 'Sundanese'], ['sw', 'Swahili'], ['sv', 'Swedish'], ['ty', 'Tahitian'], ['ta', 'Tamil'], ['tt', 'Tatar'], ['te', 'Telugu'], ['tg', 'Tajik'], ['tl', 'Tagalog'], ['th', 'Thai'], ['bo', 'Tibetan'], ['ti', 'Tigrinya'], ['to', 'Tonga (Tonga Islands)'], ['tn', 'Tswana'], ['ts', 'Tsonga'], ['tk', 'Turkmen'], ['tr', 'Turkish'], ['tw', 'Twi'], ['ug', 'Uighur'], ['uk', 'Ukrainian'], ['ur', 'Urdu'], ['uz', 'Uzbek'], ['ve', 'Venda'], ['vi', 'Vietnamese'], ['vo', 'Volap\xfck'], ['cy', 'Welsh'], ['wa', 'Walloon'], ['wo', 'Wolof'], ['xh', 'Xhosa'], ['yi', 'Yiddish'], ['yo', 'Yoruba'], ['za', 'Zhuang'], ['zu', 'Zulu']])), ('last_activity_at', models.DateTimeField(db_index=True)), ('team_size', models.IntegerField(default=0, db_index=True)), ], diff --git a/lms/djangoapps/teams/migrations/0004_alter_defaults.py b/lms/djangoapps/teams/migrations/0004_alter_defaults.py index 078deb5c32..28a878812c 100644 --- a/lms/djangoapps/teams/migrations/0004_alter_defaults.py +++ b/lms/djangoapps/teams/migrations/0004_alter_defaults.py @@ -3,10 +3,10 @@ import django_countries.fields -import student.models from django.db import migrations, models import lms.djangoapps.teams.models +from common.djangoapps.student import models as student_models class Migration(migrations.Migration): @@ -23,7 +23,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='courseteam', name='language', - field=student.models.LanguageField(blank=True, choices=[['aa', 'Afar'], ['ab', 'Abkhazian'], ['af', 'Afrikaans'], ['ak', 'Akan'], ['sq', 'Albanian'], ['am', 'Amharic'], ['ar', 'Arabic'], ['an', 'Aragonese'], ['hy', 'Armenian'], ['as', 'Assamese'], ['av', 'Avaric'], ['ae', 'Avestan'], ['ay', 'Aymara'], ['az', 'Azerbaijani'], ['ba', 'Bashkir'], ['bm', 'Bambara'], ['eu', 'Basque'], ['be', 'Belarusian'], ['bn', 'Bengali'], ['bh', 'Bihari languages'], ['bi', 'Bislama'], ['bs', 'Bosnian'], ['br', 'Breton'], ['bg', 'Bulgarian'], ['my', 'Burmese'], ['ca', 'Catalan'], ['ch', 'Chamorro'], ['ce', 'Chechen'], ['zh', 'Chinese'], ['zh_HANS', 'Simplified Chinese'], ['zh_HANT', 'Traditional Chinese'], ['cu', 'Church Slavic'], ['cv', 'Chuvash'], ['kw', 'Cornish'], ['co', 'Corsican'], ['cr', 'Cree'], ['cs', 'Czech'], ['da', 'Danish'], ['dv', 'Divehi'], ['nl', 'Dutch'], ['dz', 'Dzongkha'], ['en', 'English'], ['eo', 'Esperanto'], ['et', 'Estonian'], ['ee', 'Ewe'], ['fo', 'Faroese'], ['fj', 'Fijian'], ['fi', 'Finnish'], ['fr', 'French'], ['fy', 'Western Frisian'], ['ff', 'Fulah'], ['ka', 'Georgian'], ['de', 'German'], ['gd', 'Gaelic'], ['ga', 'Irish'], ['gl', 'Galician'], ['gv', 'Manx'], ['el', 'Greek'], ['gn', 'Guarani'], ['gu', 'Gujarati'], ['ht', 'Haitian'], ['ha', 'Hausa'], ['he', 'Hebrew'], ['hz', 'Herero'], ['hi', 'Hindi'], ['ho', 'Hiri Motu'], ['hr', 'Croatian'], ['hu', 'Hungarian'], ['ig', 'Igbo'], ['is', 'Icelandic'], ['io', 'Ido'], ['ii', 'Sichuan Yi'], ['iu', 'Inuktitut'], ['ie', 'Interlingue'], ['ia', 'Interlingua'], ['id', 'Indonesian'], ['ik', 'Inupiaq'], ['it', 'Italian'], ['jv', 'Javanese'], ['ja', 'Japanese'], ['kl', 'Kalaallisut'], ['kn', 'Kannada'], ['ks', 'Kashmiri'], ['kr', 'Kanuri'], ['kk', 'Kazakh'], ['km', 'Central Khmer'], ['ki', 'Kikuyu'], ['rw', 'Kinyarwanda'], ['ky', 'Kirghiz'], ['kv', 'Komi'], ['kg', 'Kongo'], ['ko', 'Korean'], ['kj', 'Kuanyama'], ['ku', 'Kurdish'], ['lo', 'Lao'], ['la', 'Latin'], ['lv', 'Latvian'], ['li', 'Limburgan'], ['ln', 'Lingala'], ['lt', 'Lithuanian'], ['lb', 'Luxembourgish'], ['lu', 'Luba-Katanga'], ['lg', 'Ganda'], ['mk', 'Macedonian'], ['mh', 'Marshallese'], ['ml', 'Malayalam'], ['mi', 'Maori'], ['mr', 'Marathi'], ['ms', 'Malay'], ['mg', 'Malagasy'], ['mt', 'Maltese'], ['mn', 'Mongolian'], ['na', 'Nauru'], ['nv', 'Navajo'], ['nr', 'Ndebele, South'], ['nd', 'Ndebele, North'], ['ng', 'Ndonga'], ['ne', 'Nepali'], ['nn', 'Norwegian Nynorsk'], ['nb', 'Bokmål, Norwegian'], ['no', 'Norwegian'], ['ny', 'Chichewa'], ['oc', 'Occitan'], ['oj', 'Ojibwa'], ['or', 'Oriya'], ['om', 'Oromo'], ['os', 'Ossetian'], ['pa', 'Panjabi'], ['fa', 'Persian'], ['pi', 'Pali'], ['pl', 'Polish'], ['pt', 'Portuguese'], ['ps', 'Pushto'], ['qu', 'Quechua'], ['rm', 'Romansh'], ['ro', 'Romanian'], ['rn', 'Rundi'], ['ru', 'Russian'], ['sg', 'Sango'], ['sa', 'Sanskrit'], ['si', 'Sinhala'], ['sk', 'Slovak'], ['sl', 'Slovenian'], ['se', 'Northern Sami'], ['sm', 'Samoan'], ['sn', 'Shona'], ['sd', 'Sindhi'], ['so', 'Somali'], ['st', 'Sotho, Southern'], ['es', 'Spanish'], ['sc', 'Sardinian'], ['sr', 'Serbian'], ['ss', 'Swati'], ['su', 'Sundanese'], ['sw', 'Swahili'], ['sv', 'Swedish'], ['ty', 'Tahitian'], ['ta', 'Tamil'], ['tt', 'Tatar'], ['te', 'Telugu'], ['tg', 'Tajik'], ['tl', 'Tagalog'], ['th', 'Thai'], ['bo', 'Tibetan'], ['ti', 'Tigrinya'], ['to', 'Tonga (Tonga Islands)'], ['tn', 'Tswana'], ['ts', 'Tsonga'], ['tk', 'Turkmen'], ['tr', 'Turkish'], ['tw', 'Twi'], ['ug', 'Uighur'], ['uk', 'Ukrainian'], ['ur', 'Urdu'], ['uz', 'Uzbek'], ['ve', 'Venda'], ['vi', 'Vietnamese'], ['vo', 'Volapük'], ['cy', 'Welsh'], ['wa', 'Walloon'], ['wo', 'Wolof'], ['xh', 'Xhosa'], ['yi', 'Yiddish'], ['yo', 'Yoruba'], ['za', 'Zhuang'], ['zu', 'Zulu']], default='', help_text='Optional language the team uses as ISO 639-1 code.', max_length=16), + field=student_models.LanguageField(blank=True, choices=[['aa', 'Afar'], ['ab', 'Abkhazian'], ['af', 'Afrikaans'], ['ak', 'Akan'], ['sq', 'Albanian'], ['am', 'Amharic'], ['ar', 'Arabic'], ['an', 'Aragonese'], ['hy', 'Armenian'], ['as', 'Assamese'], ['av', 'Avaric'], ['ae', 'Avestan'], ['ay', 'Aymara'], ['az', 'Azerbaijani'], ['ba', 'Bashkir'], ['bm', 'Bambara'], ['eu', 'Basque'], ['be', 'Belarusian'], ['bn', 'Bengali'], ['bh', 'Bihari languages'], ['bi', 'Bislama'], ['bs', 'Bosnian'], ['br', 'Breton'], ['bg', 'Bulgarian'], ['my', 'Burmese'], ['ca', 'Catalan'], ['ch', 'Chamorro'], ['ce', 'Chechen'], ['zh', 'Chinese'], ['zh_HANS', 'Simplified Chinese'], ['zh_HANT', 'Traditional Chinese'], ['cu', 'Church Slavic'], ['cv', 'Chuvash'], ['kw', 'Cornish'], ['co', 'Corsican'], ['cr', 'Cree'], ['cs', 'Czech'], ['da', 'Danish'], ['dv', 'Divehi'], ['nl', 'Dutch'], ['dz', 'Dzongkha'], ['en', 'English'], ['eo', 'Esperanto'], ['et', 'Estonian'], ['ee', 'Ewe'], ['fo', 'Faroese'], ['fj', 'Fijian'], ['fi', 'Finnish'], ['fr', 'French'], ['fy', 'Western Frisian'], ['ff', 'Fulah'], ['ka', 'Georgian'], ['de', 'German'], ['gd', 'Gaelic'], ['ga', 'Irish'], ['gl', 'Galician'], ['gv', 'Manx'], ['el', 'Greek'], ['gn', 'Guarani'], ['gu', 'Gujarati'], ['ht', 'Haitian'], ['ha', 'Hausa'], ['he', 'Hebrew'], ['hz', 'Herero'], ['hi', 'Hindi'], ['ho', 'Hiri Motu'], ['hr', 'Croatian'], ['hu', 'Hungarian'], ['ig', 'Igbo'], ['is', 'Icelandic'], ['io', 'Ido'], ['ii', 'Sichuan Yi'], ['iu', 'Inuktitut'], ['ie', 'Interlingue'], ['ia', 'Interlingua'], ['id', 'Indonesian'], ['ik', 'Inupiaq'], ['it', 'Italian'], ['jv', 'Javanese'], ['ja', 'Japanese'], ['kl', 'Kalaallisut'], ['kn', 'Kannada'], ['ks', 'Kashmiri'], ['kr', 'Kanuri'], ['kk', 'Kazakh'], ['km', 'Central Khmer'], ['ki', 'Kikuyu'], ['rw', 'Kinyarwanda'], ['ky', 'Kirghiz'], ['kv', 'Komi'], ['kg', 'Kongo'], ['ko', 'Korean'], ['kj', 'Kuanyama'], ['ku', 'Kurdish'], ['lo', 'Lao'], ['la', 'Latin'], ['lv', 'Latvian'], ['li', 'Limburgan'], ['ln', 'Lingala'], ['lt', 'Lithuanian'], ['lb', 'Luxembourgish'], ['lu', 'Luba-Katanga'], ['lg', 'Ganda'], ['mk', 'Macedonian'], ['mh', 'Marshallese'], ['ml', 'Malayalam'], ['mi', 'Maori'], ['mr', 'Marathi'], ['ms', 'Malay'], ['mg', 'Malagasy'], ['mt', 'Maltese'], ['mn', 'Mongolian'], ['na', 'Nauru'], ['nv', 'Navajo'], ['nr', 'Ndebele, South'], ['nd', 'Ndebele, North'], ['ng', 'Ndonga'], ['ne', 'Nepali'], ['nn', 'Norwegian Nynorsk'], ['nb', 'Bokmål, Norwegian'], ['no', 'Norwegian'], ['ny', 'Chichewa'], ['oc', 'Occitan'], ['oj', 'Ojibwa'], ['or', 'Oriya'], ['om', 'Oromo'], ['os', 'Ossetian'], ['pa', 'Panjabi'], ['fa', 'Persian'], ['pi', 'Pali'], ['pl', 'Polish'], ['pt', 'Portuguese'], ['ps', 'Pushto'], ['qu', 'Quechua'], ['rm', 'Romansh'], ['ro', 'Romanian'], ['rn', 'Rundi'], ['ru', 'Russian'], ['sg', 'Sango'], ['sa', 'Sanskrit'], ['si', 'Sinhala'], ['sk', 'Slovak'], ['sl', 'Slovenian'], ['se', 'Northern Sami'], ['sm', 'Samoan'], ['sn', 'Shona'], ['sd', 'Sindhi'], ['so', 'Somali'], ['st', 'Sotho, Southern'], ['es', 'Spanish'], ['sc', 'Sardinian'], ['sr', 'Serbian'], ['ss', 'Swati'], ['su', 'Sundanese'], ['sw', 'Swahili'], ['sv', 'Swedish'], ['ty', 'Tahitian'], ['ta', 'Tamil'], ['tt', 'Tatar'], ['te', 'Telugu'], ['tg', 'Tajik'], ['tl', 'Tagalog'], ['th', 'Thai'], ['bo', 'Tibetan'], ['ti', 'Tigrinya'], ['to', 'Tonga (Tonga Islands)'], ['tn', 'Tswana'], ['ts', 'Tsonga'], ['tk', 'Turkmen'], ['tr', 'Turkish'], ['tw', 'Twi'], ['ug', 'Uighur'], ['uk', 'Ukrainian'], ['ur', 'Urdu'], ['uz', 'Uzbek'], ['ve', 'Venda'], ['vi', 'Vietnamese'], ['vo', 'Volapük'], ['cy', 'Welsh'], ['wa', 'Walloon'], ['wo', 'Wolof'], ['xh', 'Xhosa'], ['yi', 'Yiddish'], ['yo', 'Yoruba'], ['za', 'Zhuang'], ['zu', 'Zulu']], default='', help_text='Optional language the team uses as ISO 639-1 code.', max_length=16), ), migrations.AlterField( model_name='courseteam', diff --git a/lms/djangoapps/teams/models.py b/lms/djangoapps/teams/models.py index 2c8bb5251e..7f362e5806 100644 --- a/lms/djangoapps/teams/models.py +++ b/lms/djangoapps/teams/models.py @@ -33,7 +33,7 @@ from openedx.core.djangoapps.django_comment_common.signals import ( thread_unfollowed, thread_voted ) -from student.models import CourseEnrollment, LanguageField +from common.djangoapps.student.models import CourseEnrollment, LanguageField from .errors import ( AlreadyOnTeamInTeamset, diff --git a/lms/djangoapps/teams/tests/test_api.py b/lms/djangoapps/teams/tests/test_api.py index cb0839b0d0..2d82796237 100644 --- a/lms/djangoapps/teams/tests/test_api.py +++ b/lms/djangoapps/teams/tests/test_api.py @@ -9,14 +9,14 @@ import ddt import mock from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.teams import api as teams_api from lms.djangoapps.teams.models import CourseTeam from lms.djangoapps.teams.tests.factories import CourseTeamFactory from openedx.core.lib.teams_config import TeamsConfig, TeamsetType -from student.models import CourseEnrollment, AnonymousUserId -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment, AnonymousUserId +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/teams/tests/test_csv.py b/lms/djangoapps/teams/tests/test_csv.py index 4fc18db8de..337b32d406 100644 --- a/lms/djangoapps/teams/tests/test_csv.py +++ b/lms/djangoapps/teams/tests/test_csv.py @@ -9,8 +9,8 @@ from lms.djangoapps.teams import csv from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership from lms.djangoapps.teams.tests.factories import CourseTeamFactory from openedx.core.lib.teams_config import TeamsConfig -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.testing import EventTestMixin +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.testing import EventTestMixin from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/teams/tests/test_models.py b/lms/djangoapps/teams/tests/test_models.py index a0b99fa33f..50fa17b8a4 100644 --- a/lms/djangoapps/teams/tests/test_models.py +++ b/lms/djangoapps/teams/tests/test_models.py @@ -14,7 +14,7 @@ import six from mock import Mock, patch from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.teams import TEAM_DISCUSSION_CONTEXT from lms.djangoapps.teams.errors import AddToIncompatibleTeamError from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership @@ -31,8 +31,8 @@ from openedx.core.djangoapps.django_comment_common.signals import ( thread_voted ) from openedx.core.lib.teams_config import TeamsConfig -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.testing import EventTestMixin +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.testing import EventTestMixin from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/teams/tests/test_serializers.py b/lms/djangoapps/teams/tests/test_serializers.py index e3de6e73fc..809da1c785 100644 --- a/lms/djangoapps/teams/tests/test_serializers.py +++ b/lms/djangoapps/teams/tests/test_serializers.py @@ -11,7 +11,7 @@ from django.test.client import RequestFactory from lms.djangoapps.teams.serializers import BulkTeamCountTopicSerializer, MembershipSerializer, TopicSerializer from lms.djangoapps.teams.tests.factories import CourseTeamFactory, CourseTeamMembershipFactory from openedx.core.lib.teams_config import TeamsConfig -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/teams/tests/test_services.py b/lms/djangoapps/teams/tests/test_services.py index 6b31a9ca8c..5172ab84a5 100644 --- a/lms/djangoapps/teams/tests/test_services.py +++ b/lms/djangoapps/teams/tests/test_services.py @@ -6,7 +6,7 @@ Tests for any Teams app services from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from openedx.core.djangoapps.catalog.tests.factories import CourseRunFactory -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from lms.djangoapps.teams.services import TeamsService from lms.djangoapps.teams.tests.factories import CourseTeamFactory diff --git a/lms/djangoapps/teams/tests/test_views.py b/lms/djangoapps/teams/tests/test_views.py index 073b6b5cbf..2728e32faf 100644 --- a/lms/djangoapps/teams/tests/test_views.py +++ b/lms/djangoapps/teams/tests/test_views.py @@ -24,15 +24,15 @@ from search.search_engine_base import SearchEngine from six.moves import range from common.test.utils import skip_signal -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.tests.factories import StaffFactory from openedx.core.djangoapps.django_comment_common.models import FORUM_ROLE_COMMUNITY_TA, Role from openedx.core.djangoapps.django_comment_common.utils import seed_permissions_roles from openedx.core.lib.teams_config import TeamsConfig -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from lms.djangoapps.program_enrollments.tests.factories import ProgramEnrollmentFactory -from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory -from util.testing import EventTestMixin +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.testing import EventTestMixin from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/teams/utils.py b/lms/djangoapps/teams/utils.py index 3014f79a43..13e242e36c 100644 --- a/lms/djangoapps/teams/utils.py +++ b/lms/djangoapps/teams/utils.py @@ -5,7 +5,7 @@ Utility methods related to teams. from eventtracking import tracker -from track import contexts +from common.djangoapps.track import contexts def emit_team_event(event_name, course_key, event_data): diff --git a/lms/djangoapps/teams/views.py b/lms/djangoapps/teams/views.py index de81a44170..eb35d0d107 100644 --- a/lms/djangoapps/teams/views.py +++ b/lms/djangoapps/teams/views.py @@ -41,8 +41,8 @@ from openedx.core.lib.api.view_utils import ( add_serializer_errors, build_api_error ) -from student.models import CourseAccessRole, CourseEnrollment -from util.model_utils import truncate_fields +from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment +from common.djangoapps.util.model_utils import truncate_fields from xmodule.modulestore.django import modulestore from . import is_feature_enabled diff --git a/lms/djangoapps/verify_student/management/commands/backfill_sso_verifications_for_old_account_links.py b/lms/djangoapps/verify_student/management/commands/backfill_sso_verifications_for_old_account_links.py index 71492302ce..4126bacc6c 100644 --- a/lms/djangoapps/verify_student/management/commands/backfill_sso_verifications_for_old_account_links.py +++ b/lms/djangoapps/verify_student/management/commands/backfill_sso_verifications_for_old_account_links.py @@ -17,7 +17,7 @@ from social_django.models import UserSocialAuth from common.djangoapps.third_party_auth.api.utils import filter_user_social_auth_queryset_by_provider from lms.djangoapps.verify_student.models import SSOVerification -from third_party_auth.provider import Registry +from common.djangoapps.third_party_auth.provider import Registry class Command(BaseCommand): diff --git a/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py b/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py index 4f9ed84108..0ed1c116c1 100644 --- a/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py +++ b/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py @@ -12,7 +12,7 @@ from django.core.management.base import BaseCommand from django.db.models import F from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification -from util.query import use_read_replica_if_available +from common.djangoapps.util.query import use_read_replica_if_available logger = logging.getLogger(__name__) diff --git a/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py b/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py index 0f53be6fab..259eeb0121 100644 --- a/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py +++ b/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py @@ -7,7 +7,7 @@ import logging import time from datetime import timedelta -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site @@ -17,8 +17,8 @@ from django.urls import reverse from django.utils.timezone import now from edx_ace import ace from edx_ace.recipient import Recipient -from student.models import CourseEnrollment -from util.query import use_read_replica_if_available +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.query import use_read_replica_if_available from lms.djangoapps.verify_student.message_types import VerificationExpiry from lms.djangoapps.verify_student.models import ManualVerification, SoftwareSecurePhotoVerification, SSOVerification diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_backfill_sso_verifications_for_old_account_links.py b/lms/djangoapps/verify_student/management/commands/tests/test_backfill_sso_verifications_for_old_account_links.py index 666b9e6e1c..b0181efaa3 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_backfill_sso_verifications_for_old_account_links.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_backfill_sso_verifications_for_old_account_links.py @@ -10,7 +10,7 @@ from django.core.management.base import CommandError from lms.djangoapps.program_enrollments.management.commands.tests.utils import UserSocialAuthFactory from lms.djangoapps.verify_student.models import SSOVerification from lms.djangoapps.verify_student.tests.factories import SSOVerificationFactory -from third_party_auth.tests.testutil import TestCase +from common.djangoapps.third_party_auth.tests.testutil import TestCase class TestBackfillSSOVerificationsCommand(TestCase): diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py b/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py index c85704026e..cd2ac26bdf 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py @@ -15,7 +15,7 @@ from testfixtures import LogCapture from lms.djangoapps.verify_student.models import ManualVerification from lms.djangoapps.verify_student.utils import earliest_allowed_verification_date -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory LOGGER_NAME = 'lms.djangoapps.verify_student.management.commands.manual_verifications' diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py b/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py index 8a3ec881f9..35445b5cbc 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py @@ -14,7 +14,7 @@ from testfixtures import LogCapture from common.test.utils import MockS3BotoMixin from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from lms.djangoapps.verify_student.tests.test_models import FAKE_SETTINGS, mock_software_secure_post -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory LOGGER_NAME = 'lms.djangoapps.verify_student.management.commands.populate_expiry_date' diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py b/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py index 7b2e950eed..964fe38c05 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py @@ -13,7 +13,7 @@ from django.test import TestCase from django.test.utils import override_settings from django.utils.timezone import now from mock import patch -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from testfixtures import LogCapture from common.test.utils import MockS3BotoMixin diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py b/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py index 5cfa3667e6..c88dc6758c 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py @@ -17,7 +17,7 @@ from lms.djangoapps.verify_student.tests.test_models import ( mock_software_secure_post, mock_software_secure_post_error ) -from student.tests.factories import UserFactory # pylint: disable=import-error, useless-suppression +from common.djangoapps.student.tests.factories import UserFactory # pylint: disable=import-error, useless-suppression LOGGER_NAME = 'retry_photo_verification' diff --git a/lms/djangoapps/verify_student/migrations/0006_ssoverification.py b/lms/djangoapps/verify_student/migrations/0006_ssoverification.py index 9264bc512f..4f53cb9079 100644 --- a/lms/djangoapps/verify_student/migrations/0006_ssoverification.py +++ b/lms/djangoapps/verify_student/migrations/0006_ssoverification.py @@ -26,7 +26,19 @@ class Migration(migrations.Migration): ('name', models.CharField(blank=True, max_length=255)), ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), ('updated_at', models.DateTimeField(auto_now=True, db_index=True)), - ('identity_provider_type', models.CharField(choices=[(u'third_party_auth.models.OAuth2ProviderConfig', u'OAuth2 Provider'), (u'third_party_auth.models.SAMLProviderConfig', u'SAML Provider'), (u'third_party_auth.models.LTIProviderConfig', u'LTI Provider')], default=u'third_party_auth.models.SAMLProviderConfig', help_text=u'Specifies which type of Identity Provider this verification originated from.', max_length=100)), + ( + 'identity_provider_type', + models.CharField( + choices=[ + (u'common.djangoapps.third_party_auth.models.OAuth2ProviderConfig', u'OAuth2 Provider'), + (u'common.djangoapps.third_party_auth.models.SAMLProviderConfig', u'SAML Provider'), + (u'common.djangoapps.third_party_auth.models.LTIProviderConfig', u'LTI Provider'), + ], + default=u'common.djangoapps.third_party_auth.models.SAMLProviderConfig', + help_text=u'Specifies which type of Identity Provider this verification originated from.', + max_length=100, + ), + ), ('identity_provider_slug', models.SlugField(default=u'default', help_text=u'The slug uniquely identifying the Identity Provider this verification originated from.', max_length=30)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 98ac86e438..e7a9eb95de 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -190,9 +190,9 @@ class SSOVerification(IDVerificationAttempt): .. no_pii: """ - OAUTH2 = u'third_party_auth.models.OAuth2ProviderConfig' - SAML = u'third_party_auth.models.SAMLProviderConfig' - LTI = u'third_party_auth.models.LTIProviderConfig' + OAUTH2 = u'common.djangoapps.third_party_auth.models.OAuth2ProviderConfig' + SAML = u'common.djangoapps.third_party_auth.models.SAMLProviderConfig' + LTI = u'common.djangoapps.third_party_auth.models.LTIProviderConfig' IDENTITY_PROVIDER_TYPE_CHOICES = ( (OAUTH2, u'OAuth2 Provider'), (SAML, u'SAML Provider'), diff --git a/lms/djangoapps/verify_student/services.py b/lms/djangoapps/verify_student/services.py index e565644b09..a57df2321a 100644 --- a/lms/djangoapps/verify_student/services.py +++ b/lms/djangoapps/verify_student/services.py @@ -10,10 +10,10 @@ from django.urls import reverse from django.utils import timezone from django.utils.translation import ugettext as _ -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.verify_student.utils import is_verification_expiring_soon from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from student.models import User +from common.djangoapps.student.models import User from .models import ManualVerification, SoftwareSecurePhotoVerification, SSOVerification from .toggles import redirect_to_idv_microfrontend diff --git a/lms/djangoapps/verify_student/tasks.py b/lms/djangoapps/verify_student/tasks.py index 081e241f22..9ced28e260 100644 --- a/lms/djangoapps/verify_student/tasks.py +++ b/lms/djangoapps/verify_student/tasks.py @@ -12,7 +12,7 @@ from celery.states import FAILURE from django.conf import settings from django.core.mail import EmailMessage -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers ACE_ROUTING_KEY = getattr(settings, 'ACE_ROUTING_KEY', None) diff --git a/lms/djangoapps/verify_student/tests/__init__.py b/lms/djangoapps/verify_student/tests/__init__.py index e889ad708b..e6ec9d043a 100644 --- a/lms/djangoapps/verify_student/tests/__init__.py +++ b/lms/djangoapps/verify_student/tests/__init__.py @@ -8,7 +8,7 @@ from django.test import TestCase from django.utils.timezone import now from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class TestVerificationBase(TestCase): diff --git a/lms/djangoapps/verify_student/tests/fake_software_secure.py b/lms/djangoapps/verify_student/tests/fake_software_secure.py index 063162b1fd..9303b7e9c9 100644 --- a/lms/djangoapps/verify_student/tests/fake_software_secure.py +++ b/lms/djangoapps/verify_student/tests/fake_software_secure.py @@ -9,7 +9,7 @@ from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic.base import View -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification diff --git a/lms/djangoapps/verify_student/tests/test_fake_software_secure.py b/lms/djangoapps/verify_student/tests/test_fake_software_secure.py index ced1428482..ae4ffec876 100644 --- a/lms/djangoapps/verify_student/tests/test_fake_software_secure.py +++ b/lms/djangoapps/verify_student/tests/test_fake_software_secure.py @@ -7,8 +7,8 @@ from django.test import TestCase from mock import patch from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification -from student.tests.factories import UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import UrlResetMixin class SoftwareSecureFakeViewTest(UrlResetMixin, TestCase): diff --git a/lms/djangoapps/verify_student/tests/test_integration.py b/lms/djangoapps/verify_student/tests/test_integration.py index be12b7fffc..1191d51ea7 100644 --- a/lms/djangoapps/verify_student/tests/test_integration.py +++ b/lms/djangoapps/verify_student/tests/test_integration.py @@ -5,10 +5,10 @@ Integration tests of the payment flow, including course mode selection. import six from django.urls import reverse -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.commerce.tests.mocks import mock_payment_processors -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/verify_student/tests/test_models.py b/lms/djangoapps/verify_student/tests/test_models.py index c3af0917d7..654b9b1926 100644 --- a/lms/djangoapps/verify_student/tests/test_models.py +++ b/lms/djangoapps/verify_student/tests/test_models.py @@ -21,7 +21,7 @@ from lms.djangoapps.verify_student.models import ( SSOVerification, VerificationException ) -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.verify_student.tests import TestVerificationBase from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/verify_student/tests/test_services.py b/lms/djangoapps/verify_student/tests/test_services.py index e4a1f485ed..39c703bf92 100644 --- a/lms/djangoapps/verify_student/tests/test_services.py +++ b/lms/djangoapps/verify_student/tests/test_services.py @@ -14,7 +14,7 @@ from pytz import utc from lms.djangoapps.verify_student.models import ManualVerification, SoftwareSecurePhotoVerification, SSOVerification from lms.djangoapps.verify_student.services import IDVerificationService -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/verify_student/tests/test_signals.py b/lms/djangoapps/verify_student/tests/test_signals.py index d107ba67fe..2d9bc09f14 100644 --- a/lms/djangoapps/verify_student/tests/test_signals.py +++ b/lms/djangoapps/verify_student/tests/test_signals.py @@ -11,7 +11,7 @@ from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from lms.djangoapps.verify_student.signals import _listen_for_course_publish, _listen_for_lms_retire from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/verify_student/tests/test_utils.py b/lms/djangoapps/verify_student/tests/test_utils.py index a340968019..9adb9bf052 100644 --- a/lms/djangoapps/verify_student/tests/test_utils.py +++ b/lms/djangoapps/verify_student/tests/test_utils.py @@ -20,7 +20,7 @@ from lms.djangoapps.verify_student.utils import ( submit_request_to_ss, verification_for_datetime ) -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory FAKE_SETTINGS = { "DAYS_GOOD_FOR": 10, diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index a4ca870a71..8140362019 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -25,8 +25,8 @@ from six.moves import zip from waffle.testutils import override_switch from common.test.utils import MockS3BotoMixin, XssTestMixin -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.commerce.models import CommerceConfiguration from lms.djangoapps.commerce.tests import TEST_API_URL, TEST_PAYMENT_DATA, TEST_PUBLIC_URL_ROOT from lms.djangoapps.commerce.tests.mocks import mock_payment_processors @@ -36,9 +36,9 @@ from lms.djangoapps.verify_student.views import PayAndVerifyView, checkout_with_ from openedx.core.djangoapps.embargo.test_utils import restrict_course from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme from openedx.core.djangoapps.user_api.accounts.api import get_account_settings -from student.models import CourseEnrollment -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.testing import UrlResetMixin from lms.djangoapps.verify_student.tests import TestVerificationBase from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index c84f3134bb..7e3aded42a 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -29,8 +29,8 @@ from opaque_keys.edx.keys import CourseKey from rest_framework.response import Response from rest_framework.views import APIView -from course_modes.models import CourseMode -from edxmako.shortcuts import render_to_response +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.commerce.utils import EcommerceService, is_account_activation_requirement_disabled from lms.djangoapps.verify_student.emails import send_verification_approved_email, send_verification_confirmation_email from lms.djangoapps.verify_student.image import InvalidImageData, decode_image_data @@ -45,10 +45,10 @@ from openedx.core.djangoapps.user_api.accounts import NAME_MIN_LENGTH from openedx.core.djangoapps.user_api.accounts.api import update_account_settings from openedx.core.djangoapps.user_api.errors import AccountValidationError, UserNotFound from openedx.core.lib.log_utils import audit_log -from student.models import CourseEnrollment -from track import segment -from util.db import outer_atomic -from util.json_request import JsonResponse +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.track import segment +from common.djangoapps.util.db import outer_atomic +from common.djangoapps.util.json_request import JsonResponse from xmodule.modulestore.django import modulestore from .services import IDVerificationService diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index cab4720a5f..6c2f16e963 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -90,7 +90,7 @@ GRADES_DOWNLOAD = { LOG_OVERRIDES = [ ('track.middleware', logging.CRITICAL), - ('edxmako.shortcuts', logging.ERROR), + ('common.djangoapps.edxmako.shortcuts', logging.ERROR), ('edx.discussion', logging.CRITICAL), ] for log_name, log_level in LOG_OVERRIDES: diff --git a/lms/envs/bok_choy.yml b/lms/envs/bok_choy.yml index 9cbb67e65a..ba2ca578d5 100644 --- a/lms/envs/bok_choy.yml +++ b/lms/envs/bok_choy.yml @@ -20,27 +20,27 @@ BLOCK_STRUCTURES_SETTINGS: CACHES: celery: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['localhost:11211'] default: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['localhost:11211'] general: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['localhost:11211'] mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['localhost:11211'] staticfiles: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['localhost:11211'] @@ -201,7 +201,7 @@ MODULESTORE: fs_root: '** OVERRIDDEN **' host: [localhost] port: 27017 - render_template: edxmako.shortcuts.render_to_string + render_template: common.djangoapps.edxmako.shortcuts.render_to_string - ENGINE: xmodule.modulestore.xml.XMLModuleStore NAME: xml OPTIONS: {data_dir: '** OVERRIDDEN **', default_class: xmodule.hidden_module.HiddenDescriptor} @@ -229,8 +229,8 @@ SUPPORT_SITE_LINK: https://support.example.com SYSLOG_SERVER: '' TECH_SUPPORT_EMAIL: technical@example.com THIRD_PARTY_AUTH_BACKENDS: [social_core.backends.google.GoogleOAuth2, social_core.backends.linkedin.LinkedinOAuth2, - social_core.backends.facebook.FacebookOAuth2, third_party_auth.dummy.DummyBackend, - third_party_auth.saml.SAMLAuthBackend] + social_core.backends.facebook.FacebookOAuth2, common.djangoapps.third_party_auth.dummy.DummyBackend, + common.djangoapps.third_party_auth.saml.SAMLAuthBackend] THIRD_PARTY_AUTH: Google: SOCIAL_AUTH_GOOGLE_OAUTH2_KEY": "test" @@ -241,7 +241,7 @@ THIRD_PARTY_AUTH: TIME_ZONE: America/New_York TRACKING_BACKENDS: mongo: - ENGINE: track.backends.mongodb.MongoBackend + ENGINE: common.djangoapps.track.backends.mongodb.MongoBackend OPTIONS: {collection: events, database: test} WIKI_ENABLED: true WAFFLE_OVERRIDE: True diff --git a/lms/envs/bok_choy_docker.yml b/lms/envs/bok_choy_docker.yml index dd48b3e026..21ccda2df5 100644 --- a/lms/envs/bok_choy_docker.yml +++ b/lms/envs/bok_choy_docker.yml @@ -9,27 +9,27 @@ BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com CACHES: celery: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['edx.devstack.memcached:11211'] default: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['edx.devstack.memcached:11211'] general: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['edx.devstack.memcached:11211'] mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['edx.devstack.memcached:11211'] staticfiles: BACKEND: django.core.cache.backends.memcached.MemcachedCache - KEY_FUNCTION: util.memcache.safe_key + KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['edx.devstack.memcached:11211'] CELERY_BROKER_HOSTNAME: localhost @@ -122,7 +122,7 @@ MODULESTORE: fs_root: '** OVERRIDDEN **' host: [edx.devstack.mongo] port: 27017 - render_template: edxmako.shortcuts.render_to_string + render_template: common.djangoapps.edxmako.shortcuts.render_to_string - ENGINE: xmodule.modulestore.xml.XMLModuleStore NAME: xml OPTIONS: {data_dir: '** OVERRIDDEN **', default_class: xmodule.hidden_module.HiddenDescriptor} @@ -143,12 +143,12 @@ SUPPORT_SITE_LINK: https://support.example.com SYSLOG_SERVER: '' TECH_SUPPORT_EMAIL: technical@example.com THIRD_PARTY_AUTH_BACKENDS: [social_core.backends.google.GoogleOAuth2, social_core.backends.linkedin.LinkedinOAuth2, - social_core.backends.facebook.FacebookOAuth2, third_party_auth.dummy.DummyBackend, - third_party_auth.saml.SAMLAuthBackend] + social_core.backends.facebook.FacebookOAuth2, common.djangoapps.third_party_auth.dummy.DummyBackend, + common.djangoapps.third_party_auth.saml.SAMLAuthBackend] TIME_ZONE: America/New_York TRACKING_BACKENDS: mongo: - ENGINE: track.backends.mongodb.MongoBackend + ENGINE: common.djangoapps.track.backends.mongodb.MongoBackend OPTIONS: collection: events database: test diff --git a/lms/envs/common.py b/lms/envs/common.py index 186a98d759..5572bd1ddf 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -755,12 +755,10 @@ NODE_MODULES_ROOT = REPO_ROOT / "node_modules" DATA_DIR = COURSES_ROOT -# TODO: Is this next line necessary? -sys.path.append(REPO_ROOT) -# TODO: The next two path modifications will be removed in an upcoming Open edX release. +# TODO: This path modification exists as temporary support for deprecated import patterns. +# It will be removed in an upcoming Open edX release. # See docs/decisions/0007-sys-path-modification-removal.rst sys.path.append(REPO_ROOT / 'import_shims' / 'lms') -sys.path.append(COMMON_ROOT / 'djangoapps') # For Node.js @@ -789,53 +787,53 @@ DATABASE_ROUTERS = [ CACHES = { 'blockstore': { 'KEY_PREFIX': 'blockstore', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': '86400', # This data should be long-lived for performance, BundleCache handles invalidation 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'course_structure_cache': { 'KEY_PREFIX': 'course_structure', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'celery': { 'KEY_PREFIX': 'celery', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'mongo_metadata_inheritance': { 'KEY_PREFIX': 'mongo_metadata_inheritance', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'TIMEOUT': 300, 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'staticfiles': { - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'staticfiles_general', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'default': { 'VERSION': '1', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'default', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'configuration': { - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'configuration', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', }, 'general': { - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'general', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', @@ -931,7 +929,7 @@ CONTEXT_PROCESSORS = [ 'sekizai.context_processors.sekizai', # Hack to get required link URLs to password reset templates - 'edxmako.shortcuts.marketing_link_context_processor', + 'common.djangoapps.edxmako.shortcuts.marketing_link_context_processor', # Timezone processor (sends language and time_zone preference) 'lms.djangoapps.courseware.context_processor.user_timezone_locale_prefs', @@ -965,8 +963,8 @@ TEMPLATES = [ # We have to use mako-aware template loaders to be able to include # mako templates inside django templates (such as main_django.html). 'openedx.core.djangoapps.theming.template_loaders.ThemeTemplateLoader', - 'edxmako.makoloader.MakoFilesystemLoader', - 'edxmako.makoloader.MakoAppDirectoriesLoader', + 'common.djangoapps.edxmako.makoloader.MakoFilesystemLoader', + 'common.djangoapps.edxmako.makoloader.MakoAppDirectoriesLoader', ], 'context_processors': CONTEXT_PROCESSORS, # Change 'debug' in your environment settings files - not here. @@ -975,7 +973,7 @@ TEMPLATES = [ }, { 'NAME': 'mako', - 'BACKEND': 'edxmako.backend.Mako', + 'BACKEND': 'common.djangoapps.edxmako.backend.Mako', # Don't look for template source files inside installed applications. 'APP_DIRS': False, # Instead, look for template source files in these dirs. @@ -1106,7 +1104,7 @@ DEBUG_TRACK_LOG = False TRACKING_BACKENDS = { 'logger': { - 'ENGINE': 'track.backends.logger.LoggerBackend', + 'ENGINE': 'common.djangoapps.track.backends.logger.LoggerBackend', 'OPTIONS': { 'name': 'tracking' } @@ -1132,8 +1130,8 @@ EVENT_TRACKING_BACKENDS = { } }, 'processors': [ - {'ENGINE': 'track.shim.LegacyFieldMappingProcessor'}, - {'ENGINE': 'track.shim.PrefixedEventProcessor'} + {'ENGINE': 'common.djangoapps.track.shim.LegacyFieldMappingProcessor'}, + {'ENGINE': 'common.djangoapps.track.shim.PrefixedEventProcessor'} ] } }, @@ -1151,7 +1149,7 @@ EVENT_TRACKING_BACKENDS = { } }, { - 'ENGINE': 'track.shim.GoogleAnalyticsProcessor' + 'ENGINE': 'common.djangoapps.track.shim.GoogleAnalyticsProcessor' } ] } @@ -1261,7 +1259,7 @@ MODULESTORE = { 'OPTIONS': { 'default_class': 'xmodule.hidden_module.HiddenDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'edxmako.shortcuts.render_to_string', + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string', } }, { @@ -1271,7 +1269,7 @@ MODULESTORE = { 'OPTIONS': { 'default_class': 'xmodule.hidden_module.HiddenDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'edxmako.shortcuts.render_to_string', + 'render_template': 'common.djangoapps.edxmako.shortcuts.render_to_string', } } ] @@ -1715,7 +1713,7 @@ MIDDLEWARE = [ #'django.contrib.auth.middleware.AuthenticationMiddleware', 'openedx.core.djangoapps.cache_toolbox.middleware.CacheBackedAuthenticationMiddleware', - 'student.middleware.UserStandingMiddleware', + 'common.djangoapps.student.middleware.UserStandingMiddleware', 'openedx.core.djangoapps.contentserver.middleware.StaticContentServer', # Adds user tags to tracking events @@ -1723,7 +1721,7 @@ MIDDLEWARE = [ 'openedx.core.djangoapps.user_api.middleware.UserTagsEventContextMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', - 'track.middleware.TrackMiddleware', + 'common.djangoapps.track.middleware.TrackMiddleware', # CORS and CSRF 'corsheaders.middleware.CorsMiddleware', @@ -2480,12 +2478,12 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.service_status', # Display status message to students - 'status', + 'common.djangoapps.status', # For asset pipelining - 'edxmako.apps.EdxMakoConfig', + 'common.djangoapps.edxmako.apps.EdxMakoConfig', 'pipeline', - 'static_replace', + 'common.djangoapps.static_replace', 'webpack_loader', # For user interface plugins @@ -2507,13 +2505,13 @@ INSTALLED_APPS = [ # Our courseware 'lms.djangoapps.courseware', 'lms.djangoapps.coursewarehistoryextended', - 'student.apps.StudentConfig', + 'common.djangoapps.student.apps.StudentConfig', 'lms.djangoapps.static_template_view', 'lms.djangoapps.staticbook', - 'track', + 'common.djangoapps.track', 'eventtracking.django.apps.EventTrackingConfig', - 'util', + 'common.djangoapps.util', 'lms.djangoapps.certificates.apps.CertificatesConfig', 'lms.djangoapps.dashboard', 'lms.djangoapps.instructor_task', @@ -2531,7 +2529,7 @@ INSTALLED_APPS = [ 'oauth2_provider', 'openedx.core.djangoapps.oauth_dispatch.apps.OAuthDispatchAppConfig', - 'third_party_auth', + 'common.djangoapps.third_party_auth', # System Wide Roles 'openedx.core.djangoapps.system_wide_roles', @@ -2575,13 +2573,13 @@ INSTALLED_APPS = [ 'lms.djangoapps.shoppingcart', # Different Course Modes - 'course_modes.apps.CourseModesConfig', + 'common.djangoapps.course_modes.apps.CourseModesConfig', # Enrollment API 'openedx.core.djangoapps.enrollments', # Entitlement API - 'entitlements.apps.EntitlementsConfig', + 'common.djangoapps.entitlements.apps.EntitlementsConfig', # Bulk Enrollment API 'lms.djangoapps.bulk_enroll', @@ -2599,7 +2597,7 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.embargo', # Course action state - 'course_action_state', + 'common.djangoapps.course_action_state', # Additional problem types 'edx_jsme', # Molecular Structure @@ -2640,7 +2638,7 @@ INSTALLED_APPS = [ # Course teams 'lms.djangoapps.teams', - 'xblock_django', + 'common.djangoapps.xblock_django', # programs support 'openedx.core.djangoapps.programs.apps.ProgramsConfig', @@ -2695,7 +2693,7 @@ INSTALLED_APPS = [ 'openedx.core.djangoapps.crawlers', # Unusual migrations - 'database_fixups', + 'common.djangoapps.database_fixups', 'openedx.core.djangoapps.waffle_utils', @@ -3079,13 +3077,13 @@ AUTH_PASSWORD_VALIDATORS = [ "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", }, { - "NAME": "util.password_policy_validators.MinimumLengthValidator", + "NAME": "common.djangoapps.util.password_policy_validators.MinimumLengthValidator", "OPTIONS": { "min_length": 2 } }, { - "NAME": "util.password_policy_validators.MaximumLengthValidator", + "NAME": "common.djangoapps.util.password_policy_validators.MaximumLengthValidator", "OPTIONS": { "max_length": 75 } diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 769228ef17..8dc01e8024 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -46,8 +46,8 @@ IDA_LOGOUT_URI_LIST = [ ################################ LOGGERS ###################################### LOG_OVERRIDES = [ - ('track.contexts', logging.CRITICAL), - ('track.middleware', logging.CRITICAL), + ('common.djangoapps.track.contexts', logging.CRITICAL), + ('common.djangoapps.track.middleware', logging.CRITICAL), ('lms.djangoapps.discussion.django_comment_client.utils', logging.CRITICAL), ] for log_name, log_level in LOG_OVERRIDES: @@ -222,8 +222,10 @@ FEATURES['ENABLE_COURSEWARE_MICROFRONTEND'] = True ########################## Third Party Auth ####################### -if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and 'third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS: - AUTHENTICATION_BACKENDS = ['third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS) +if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and ( + 'common.djangoapps.third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS +): + AUTHENTICATION_BACKENDS = ['common.djangoapps.third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS) ############## ECOMMERCE API CONFIGURATION SETTINGS ############### ECOMMERCE_PUBLIC_URL_ROOT = 'http://localhost:18130' diff --git a/lms/envs/devstack_decentralized.py b/lms/envs/devstack_decentralized.py index f08323b752..44b0c53280 100644 --- a/lms/envs/devstack_decentralized.py +++ b/lms/envs/devstack_decentralized.py @@ -45,8 +45,8 @@ IDA_LOGOUT_URI_LIST = [ ################################ LOGGERS ###################################### LOG_OVERRIDES = [ - ('track.contexts', logging.CRITICAL), - ('track.middleware', logging.CRITICAL), + ('common.djangoapps.track.contexts', logging.CRITICAL), + ('common.djangoapps.track.middleware', logging.CRITICAL), ('lms.djangoapps.discussion.django_comment_client.utils', logging.CRITICAL), ] for log_name, log_level in LOG_OVERRIDES: @@ -188,8 +188,10 @@ FEATURES['ENABLE_COURSEWARE_MICROFRONTEND'] = True ########################## Third Party Auth ####################### -if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and 'third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS: - AUTHENTICATION_BACKENDS = ['third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS) +if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and ( + 'common.djangoapps.third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS +): + AUTHENTICATION_BACKENDS = ['common.djangoapps.third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS) ############## ECOMMERCE API CONFIGURATION SETTINGS ############### ECOMMERCE_PUBLIC_URL_ROOT = 'http://localhost:18130' diff --git a/lms/envs/docs/README.rst b/lms/envs/docs/README.rst index 2a1d0f2326..3cacfbc6ef 100644 --- a/lms/envs/docs/README.rst +++ b/lms/envs/docs/README.rst @@ -87,7 +87,7 @@ when nested within each other:: }, { 'NAME': 'mako', - 'BACKEND': 'edxmako.backend.Mako', + 'BACKEND': 'common.djangoapps.edxmako.backend.Mako', 'APP_DIRS': False, 'DIRS': _make_mako_template_dirs, }, diff --git a/lms/envs/production.py b/lms/envs/production.py index f664103932..c5d7fb1cd4 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -629,10 +629,10 @@ if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'): 'social_core.backends.linkedin.LinkedinOAuth2', 'social_core.backends.facebook.FacebookOAuth2', 'social_core.backends.azuread.AzureADOAuth2', - 'third_party_auth.appleid.AppleIdAuth', # vendored 'social_core.backends.apple.AppleIdAuth' - 'third_party_auth.identityserver3.IdentityServer3', - 'third_party_auth.saml.SAMLAuthBackend', - 'third_party_auth.lti.LTIAuthBackend', + 'common.djangoapps.third_party_auth.appleid.AppleIdAuth', # vendored 'social_core.backends.apple.AppleIdAuth' + 'common.djangoapps.third_party_auth.identityserver3.IdentityServer3', + 'common.djangoapps.third_party_auth.saml.SAMLAuthBackend', + 'common.djangoapps.third_party_auth.lti.LTIAuthBackend', ]) AUTHENTICATION_BACKENDS = list(tmp_backends) + list(AUTHENTICATION_BACKENDS) @@ -658,7 +658,7 @@ if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'): if ENV_TOKENS.get('THIRD_PARTY_AUTH_SAML_FETCH_PERIOD_HOURS', 24) is not None: CELERYBEAT_SCHEDULE['refresh-saml-metadata'] = { - 'task': 'third_party_auth.fetch_saml_metadata', + 'task': 'common.djangoapps.third_party_auth.fetch_saml_metadata', 'schedule': datetime.timedelta(hours=ENV_TOKENS.get('THIRD_PARTY_AUTH_SAML_FETCH_PERIOD_HOURS', 24)), } diff --git a/lms/envs/static.py b/lms/envs/static.py index 7982d96460..ab0bea3b48 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -42,7 +42,7 @@ CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': 'edx_loc_mem_cache', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', }, # The general cache is what you get if you use our util.cache. It's used for @@ -54,7 +54,7 @@ CACHES = { 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', 'KEY_PREFIX': 'general', 'VERSION': 4, - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', } } diff --git a/lms/envs/test.py b/lms/envs/test.py index c65cfcc921..a59b5a8100 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -34,7 +34,7 @@ from xmodule.modulestore.modulestore_settings import update_module_store_setting from .common import * -from util.testing import patch_sessions, patch_testcase # pylint: disable=wrong-import-order +from common.djangoapps.util.testing import patch_sessions, patch_testcase # pylint: disable=wrong-import-order # This patch disables the commit_on_success decorator during tests # in TestCase subclasses. @@ -220,7 +220,7 @@ CACHES = { # Blockstore caching tests require a cache that actually works: 'blockstore': { 'KEY_PREFIX': 'blockstore', - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': 'edx_loc_mem_cache', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', }, @@ -253,10 +253,10 @@ AUTHENTICATION_BACKENDS = [ 'social_core.backends.facebook.FacebookOAuth2', 'social_core.backends.azuread.AzureADOAuth2', 'social_core.backends.twitter.TwitterOAuth', - 'third_party_auth.identityserver3.IdentityServer3', - 'third_party_auth.dummy.DummyBackend', - 'third_party_auth.saml.SAMLAuthBackend', - 'third_party_auth.lti.LTIAuthBackend', + 'common.djangoapps.third_party_auth.identityserver3.IdentityServer3', + 'common.djangoapps.third_party_auth.dummy.DummyBackend', + 'common.djangoapps.third_party_auth.saml.SAMLAuthBackend', + 'common.djangoapps.third_party_auth.lti.LTIAuthBackend', ] + AUTHENTICATION_BACKENDS THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS = { diff --git a/lms/lib/courseware_search/lms_filter_generator.py b/lms/lib/courseware_search/lms_filter_generator.py index 852dde71b4..e3cec0f559 100644 --- a/lms/lib/courseware_search/lms_filter_generator.py +++ b/lms/lib/courseware_search/lms_filter_generator.py @@ -10,7 +10,7 @@ from search.filter_generator import SearchFilterGenerator from openedx.core.djangoapps.course_groups.partition_scheme import CohortPartitionScheme from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment INCLUDE_SCHEMES = [CohortPartitionScheme, RandomUserPartitionScheme, ] SCHEME_SUPPORTS_ASSIGNMENT = [RandomUserPartitionScheme, ] diff --git a/lms/lib/courseware_search/test/test_lms_filter_generator.py b/lms/lib/courseware_search/test/test_lms_filter_generator.py index 210d4192c3..ea16908892 100644 --- a/lms/lib/courseware_search/test/test_lms_filter_generator.py +++ b/lms/lib/courseware_search/test/test_lms_filter_generator.py @@ -7,8 +7,8 @@ import six from mock import Mock, patch from lms.lib.courseware_search.lms_filter_generator import LmsSearchFilterGenerator -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/static/js/instructor_dashboard/instructor_dashboard.js b/lms/static/js/instructor_dashboard/instructor_dashboard.js index 8c1d564769..12bca47788 100644 --- a/lms/static/js/instructor_dashboard/instructor_dashboard.js +++ b/lms/static/js/instructor_dashboard/instructor_dashboard.js @@ -6,7 +6,7 @@ The instructor dashboard is broken into sections. Only one section is visible at a time, and is responsible for its own functionality. -NOTE: plantTimeout (which is just setTimeout from util.js) +NOTE: plantTimeout (which is just setTimeout from common.djangoapps.util.js) is used frequently in the instructor dashboard to isolate failures. If one piece of code under a plantTimeout fails then it will not crash the rest of the dashboard. diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index 8c1ebd83b7..c09acc06d8 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -7,7 +7,7 @@ from django.urls import reverse from lms.djangoapps.courseware.courses import get_course_about_section from django.conf import settings from six import text_type -from edxmako.shortcuts import marketing_link +from common.djangoapps.edxmako.shortcuts import marketing_link from openedx.core.djangolib.js_utils import js_escaped_string from openedx.core.djangolib.markup import clean_dangerous_html, HTML, Text from openedx.core.lib.courses import course_image_url diff --git a/lms/templates/courseware/gradebook.html b/lms/templates/courseware/gradebook.html index dbae15c386..5207431873 100644 --- a/lms/templates/courseware/gradebook.html +++ b/lms/templates/courseware/gradebook.html @@ -79,7 +79,7 @@ from six import text_type <% tooltip_str = section['detail'] # We are making header labels from the first student record. So for tool tip (title), - # I am processing this string ```section['detail']``` from student record and removing + # I am processing this string ```section['detail']``` from common.djangoapps.student record and removing # all student related data i.e marks, percentage etc to get only the title of homework. if "=" in section['detail']: tooltip_str = section['detail'][0: section['detail'].rfind('=')] diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index 18ba42a71b..1ccf50a965 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -3,7 +3,7 @@ <%namespace name='static' file='/static_content.html'/> <%def name="online_help_token()"><% return "progress" %> <%! -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateStatuses from lms.djangoapps.grades.api import constants as grades_constants from django.utils.translation import ugettext as _ diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 2721a6bd27..063dea1bcf 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -9,16 +9,16 @@ from datetime import datetime, timedelta from django.urls import reverse from django.utils.translation import ugettext as _ from django.template import RequestContext -from entitlements.models import CourseEntitlement -from third_party_auth import pipeline -from util.date_utils import strftime_localized +from common.djangoapps.entitlements.models import CourseEntitlement +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.util.date_utils import strftime_localized from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string from openedx.core.djangolib.markup import HTML, Text -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment %> <% diff --git a/lms/templates/dashboard/_dashboard_certificate_information.html b/lms/templates/dashboard/_dashboard_certificate_information.html index 62f4b81bb8..230122bcd1 100644 --- a/lms/templates/dashboard/_dashboard_certificate_information.html +++ b/lms/templates/dashboard/_dashboard_certificate_information.html @@ -3,8 +3,8 @@ <%! from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML, Text -from course_modes.models import CourseMode -from util.course import should_display_grade +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.util.course import should_display_grade %> <%namespace name='static' file='../static_content.html'/> diff --git a/lms/templates/dashboard/_dashboard_course_listing.html b/lms/templates/dashboard/_dashboard_course_listing.html index 254bf81f39..621f92584b 100644 --- a/lms/templates/dashboard/_dashboard_course_listing.html +++ b/lms/templates/dashboard/_dashboard_course_listing.html @@ -9,13 +9,13 @@ from django.utils.http import urlencode, urlquote_plus from django.utils.translation import ugettext as _ from django.utils.translation import ungettext from django.urls import reverse -from course_modes.models import CourseMode -from course_modes.helpers import enrollment_mode_display +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.helpers import enrollment_mode_display from lms.djangoapps.verify_student.services import IDVerificationService from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string from openedx.core.djangolib.markup import HTML, Text from openedx.features.course_experience import course_home_url_name -from student.helpers import ( +from common.djangoapps.student.helpers import ( VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED, VERIFY_STATUS_RESUBMITTED, @@ -24,7 +24,7 @@ from student.helpers import ( VERIFY_STATUS_NEED_TO_REVERIFY, DISABLE_UNENROLL_CERT_STATES, ) -from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_params +from common.djangoapps.util.course import get_link_for_about_page, get_encoded_course_sharing_utm_params from lms.djangoapps.experiments.utils import UPSELL_TRACKING_FLAG %> diff --git a/lms/templates/dates_banner.html b/lms/templates/dates_banner.html index 143fe657e1..8e95f78df7 100644 --- a/lms/templates/dates_banner.html +++ b/lms/templates/dates_banner.html @@ -5,7 +5,7 @@ from django.utils.translation import ugettext as _ from lms.djangoapps.courseware.date_summary import CourseAssignmentDate -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode %> <% diff --git a/lms/templates/financial-assistance/financial-assistance.html b/lms/templates/financial-assistance/financial-assistance.html index 23ae661f7c..4321b6e453 100644 --- a/lms/templates/financial-assistance/financial-assistance.html +++ b/lms/templates/financial-assistance/financial-assistance.html @@ -4,7 +4,7 @@ from django.urls import reverse from django.utils.translation import ugettext as _ -from edxmako.shortcuts import marketing_link +from common.djangoapps.edxmako.shortcuts import marketing_link %>
    diff --git a/lms/templates/main.html b/lms/templates/main.html index 93b02c7184..14b02024c3 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -24,7 +24,7 @@ from lms.djangoapps.courseware.access import has_access from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string from openedx.core.release import RELEASE_LINE -from pipeline_mako import render_require_js_path_overrides +from common.djangoapps.pipeline_mako import render_require_js_path_overrides %> diff --git a/lms/templates/page_banner.html b/lms/templates/page_banner.html index 2b8139e834..1ecebd5ab0 100644 --- a/lms/templates/page_banner.html +++ b/lms/templates/page_banner.html @@ -9,7 +9,7 @@ from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML from openedx.core.djangoapps.util.user_messages import PageLevelMessages, UserMessage, UserMessageType # app that handles site status messages -from status.status import get_site_status_msg +from common.djangoapps.status.status import get_site_status_msg %> <% diff --git a/lms/templates/signup_modal.html b/lms/templates/signup_modal.html index f8ae07a982..9f2705a9b8 100644 --- a/lms/templates/signup_modal.html +++ b/lms/templates/signup_modal.html @@ -6,7 +6,7 @@ from openedx.core.djangolib.js_utils import js_escaped_string from django.conf import settings from django.urls import reverse from django_countries import countries -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile from datetime import date import calendar %> diff --git a/lms/templates/sysadmin_dashboard_gitlogs.html b/lms/templates/sysadmin_dashboard_gitlogs.html index 64d48f6b32..0a57eb59ab 100644 --- a/lms/templates/sysadmin_dashboard_gitlogs.html +++ b/lms/templates/sysadmin_dashboard_gitlogs.html @@ -5,7 +5,7 @@ from django.urls import reverse from django.utils.translation import ugettext as _ from django.utils.timezone import utc as UTC - from util.date_utils import get_time_display, DEFAULT_DATE_TIME_FORMAT + from common.djangoapps.util.date_utils import get_time_display, DEFAULT_DATE_TIME_FORMAT from django.conf import settings %> <%namespace name='static' file='/static_content.html'/> diff --git a/lms/tests.py b/lms/tests.py index 3ab766ebe5..b90707bafd 100644 --- a/lms/tests.py +++ b/lms/tests.py @@ -7,8 +7,6 @@ import mimetypes from django.conf import settings from django.test import TestCase -from edxmako import LOOKUP, add_lookup - log = logging.getLogger(__name__) diff --git a/lms/urls.py b/lms/urls.py index e79933cd07..085e604ad7 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -51,8 +51,8 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ from openedx.core.djangoapps.user_authn.views.login import redirect_to_lms_login from openedx.core.djangoapps.verified_track_content import views as verified_track_content_views from openedx.features.enterprise_support.api import enterprise_enabled -from student import views as student_views -from util import views as util_views +from common.djangoapps.student import views as student_views +from common.djangoapps.util import views as util_views RESET_COURSE_DEADLINES_NAME = 'reset_course_deadlines' RENDER_XBLOCK_NAME = 'render_xblock' @@ -95,13 +95,13 @@ notification_prefs_urls = [ urlpatterns = [ url(r'^$', branding_views.index, name='root'), # Main marketing page, or redirect to courseware - url(r'', include('student.urls')), + url(r'', include('common.djangoapps.student.urls')), # TODO: Move lms specific student views out of common code url(r'^dashboard/?$', student_views.student_dashboard, name='dashboard'), url(r'^change_enrollment$', student_views.change_enrollment, name='change_enrollment'), # Event tracking endpoints - url(r'', include('track.urls')), + url(r'', include('common.djangoapps.track.urls')), # Static template view endpoints like blog, faq, etc. url(r'', include('lms.djangoapps.static_template_view.urls')), @@ -114,8 +114,13 @@ urlpatterns = [ url(r'^api/enrollment/v1/', include('openedx.core.djangoapps.enrollments.urls')), # Entitlement API RESTful endpoints - url(r'^api/entitlements/', include(('entitlements.rest_api.urls', 'common.djangoapps.entitlements'), - namespace='entitlements_api')), + url( + r'^api/entitlements/', + include( + ('common.djangoapps.entitlements.rest_api.urls', 'common.djangoapps.entitlements'), + namespace='entitlements_api', + ), + ), # Demographics API RESTful endpoints url(r'^api/demographics/', include('openedx.core.djangoapps.demographics.rest_api.urls')), @@ -158,9 +163,17 @@ urlpatterns = [ url(r'^lang_pref/session_language', lang_pref_views.update_session_language, name='session_language'), # Multiple course modes and identity verification - url(r'^course_modes/', include('course_modes.urls')), - url(r'^api/course_modes/', include(('course_modes.rest_api.urls', 'common.djangoapps.course_mods'), - namespace='course_modes_api')), + url( + r'^course_modes/', + include('common.djangoapps.course_modes.urls'), + ), + url( + r'^api/course_modes/', + include( + ('common.djangoapps.course_modes.rest_api.urls', 'common.djangoapps.course_mods'), + namespace='course_modes_api', + ) + ), url(r'^verify_student/', include('lms.djangoapps.verify_student.urls')), @@ -836,8 +849,8 @@ urlpatterns += [ # Third-party auth. if settings.FEATURES.get('ENABLE_THIRD_PARTY_AUTH'): urlpatterns += [ - url(r'', include('third_party_auth.urls')), - url(r'^api/third_party_auth/', include('third_party_auth.api.urls')), + url(r'', include('common.djangoapps.third_party_auth.urls')), + url(r'^api/third_party_auth/', include('common.djangoapps.third_party_auth.api.urls')), ] # Enterprise diff --git a/openedx/core/djangoapps/ace_common/template_context.py b/openedx/core/djangoapps/ace_common/template_context.py index 2bff54cf3a..b569798a95 100644 --- a/openedx/core/djangoapps/ace_common/template_context.py +++ b/openedx/core/djangoapps/ace_common/template_context.py @@ -6,7 +6,7 @@ Context dictionary for templates that use the ace_common base template. from django.conf import settings from django.urls import NoReverseMatch, reverse -from edxmako.shortcuts import marketing_link +from common.djangoapps.edxmako.shortcuts import marketing_link from openedx.core.djangoapps.theming.helpers import get_config_value_from_site_or_settings diff --git a/openedx/core/djangoapps/ace_common/tests/mixins.py b/openedx/core/djangoapps/ace_common/tests/mixins.py index bc6dfe3241..e2d392a488 100644 --- a/openedx/core/djangoapps/ace_common/tests/mixins.py +++ b/openedx/core/djangoapps/ace_common/tests/mixins.py @@ -9,7 +9,7 @@ from mock import patch from six.moves.urllib.parse import parse_qs, urlparse # pylint: disable=import-error from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class QueryStringAssertionMixin(object): diff --git a/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py b/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py index f326021c90..aab2126e12 100644 --- a/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py +++ b/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py @@ -11,7 +11,7 @@ from django.test import TestCase from openedx.core.djangoapps.api_admin.tests import factories from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @skip_unless_lms diff --git a/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py b/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py index 8d9c6e6144..3111f98356 100644 --- a/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py +++ b/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py @@ -10,7 +10,7 @@ from mock import patch from openedx.core.djangoapps.api_admin.management.commands import create_api_access_request from openedx.core.djangoapps.api_admin.models import ApiAccessConfig, ApiAccessRequest -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Tests only valid in lms') diff --git a/openedx/core/djangoapps/api_admin/models.py b/openedx/core/djangoapps/api_admin/models.py index 60e7808dfb..e304569c84 100644 --- a/openedx/core/djangoapps/api_admin/models.py +++ b/openedx/core/djangoapps/api_admin/models.py @@ -20,7 +20,7 @@ from django.utils.encoding import python_2_unicode_compatible from model_utils.models import TimeStampedModel from six.moves.urllib.parse import urlunsplit # pylint: disable=import-error -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/api_admin/tests/factories.py b/openedx/core/djangoapps/api_admin/tests/factories.py index 337bbfbb32..591d871251 100644 --- a/openedx/core/djangoapps/api_admin/tests/factories.py +++ b/openedx/core/djangoapps/api_admin/tests/factories.py @@ -8,7 +8,7 @@ from oauth2_provider.models import get_application_model from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangoapps.api_admin.models import ApiAccessRequest, Catalog -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory Application = get_application_model() # pylint: disable=invalid-name diff --git a/openedx/core/djangoapps/api_admin/tests/test_models.py b/openedx/core/djangoapps/api_admin/tests/test_models.py index 6e3edc4bf5..e0c9b631f0 100644 --- a/openedx/core/djangoapps/api_admin/tests/test_models.py +++ b/openedx/core/djangoapps/api_admin/tests/test_models.py @@ -14,7 +14,7 @@ from openedx.core.djangoapps.api_admin.models import log as model_log from openedx.core.djangoapps.api_admin.tests.factories import ApiAccessRequestFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/openedx/core/djangoapps/api_admin/tests/test_views.py b/openedx/core/djangoapps/api_admin/tests/test_views.py index f612f31716..2f824d2a74 100644 --- a/openedx/core/djangoapps/api_admin/tests/test_views.py +++ b/openedx/core/djangoapps/api_admin/tests/test_views.py @@ -19,7 +19,7 @@ from openedx.core.djangoapps.api_admin.tests.factories import ( ) from openedx.core.djangoapps.api_admin.tests.utils import VALID_DATA from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory Application = get_application_model() # pylint: disable=invalid-name diff --git a/openedx/core/djangoapps/api_admin/views.py b/openedx/core/djangoapps/api_admin/views.py index c5ce3cbe07..3e2dbbfdf3 100644 --- a/openedx/core/djangoapps/api_admin/views.py +++ b/openedx/core/djangoapps/api_admin/views.py @@ -16,7 +16,7 @@ from oauth2_provider.models import get_application_model from oauth2_provider.views import ApplicationRegistration from slumber.exceptions import HttpNotFoundError -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.api_admin.decorators import require_api_access from openedx.core.djangoapps.api_admin.forms import ApiAccessRequestForm, CatalogForm from openedx.core.djangoapps.api_admin.models import ApiAccessRequest, Catalog diff --git a/openedx/core/djangoapps/auth_exchange/forms.py b/openedx/core/djangoapps/auth_exchange/forms.py index fdc9166bd6..b25860e6d6 100644 --- a/openedx/core/djangoapps/auth_exchange/forms.py +++ b/openedx/core/djangoapps/auth_exchange/forms.py @@ -13,7 +13,7 @@ from requests import HTTPError from social_core.backends import oauth as social_oauth from social_core.exceptions import AuthException -from third_party_auth import pipeline +from common.djangoapps.third_party_auth import pipeline class OAuthValidationError(Exception): diff --git a/openedx/core/djangoapps/auth_exchange/tests/test_forms.py b/openedx/core/djangoapps/auth_exchange/tests/test_forms.py index db135b68bb..b0dd06563d 100644 --- a/openedx/core/djangoapps/auth_exchange/tests/test_forms.py +++ b/openedx/core/djangoapps/auth_exchange/tests/test_forms.py @@ -13,7 +13,7 @@ from django.test import TestCase from django.test.client import RequestFactory from social_django.models import Partial -from third_party_auth.tests.utils import ThirdPartyOAuthTestMixinFacebook, ThirdPartyOAuthTestMixinGoogle +from common.djangoapps.third_party_auth.tests.utils import ThirdPartyOAuthTestMixinFacebook, ThirdPartyOAuthTestMixinGoogle from ..forms import AccessTokenExchangeForm from .mixins import DOTAdapterMixin diff --git a/openedx/core/djangoapps/auth_exchange/tests/test_views.py b/openedx/core/djangoapps/auth_exchange/tests/test_views.py index 6a3f44ad52..393762797d 100644 --- a/openedx/core/djangoapps/auth_exchange/tests/test_views.py +++ b/openedx/core/djangoapps/auth_exchange/tests/test_views.py @@ -21,8 +21,8 @@ from rest_framework.test import APIClient from social_django.models import Partial from openedx.core.djangoapps.oauth_dispatch.tests import factories as dot_factories -from student.tests.factories import UserFactory -from third_party_auth.tests.utils import ThirdPartyOAuthTestMixinFacebook, ThirdPartyOAuthTestMixinGoogle +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.tests.utils import ThirdPartyOAuthTestMixinFacebook, ThirdPartyOAuthTestMixinGoogle from .mixins import DOTAdapterMixin from .utils import TPA_FEATURE_ENABLED, TPA_FEATURES_KEY, AccessTokenExchangeTestMixin diff --git a/openedx/core/djangoapps/auth_exchange/tests/utils.py b/openedx/core/djangoapps/auth_exchange/tests/utils.py index e906a91722..0cfc360654 100644 --- a/openedx/core/djangoapps/auth_exchange/tests/utils.py +++ b/openedx/core/djangoapps/auth_exchange/tests/utils.py @@ -6,7 +6,7 @@ Test utilities for OAuth access token exchange from django.conf import settings from social_django.models import Partial, UserSocialAuth -from third_party_auth.tests.utils import ThirdPartyOAuthTestMixin +from common.djangoapps.third_party_auth.tests.utils import ThirdPartyOAuthTestMixin TPA_FEATURES_KEY = 'ENABLE_THIRD_PARTY_AUTH' TPA_FEATURE_ENABLED = TPA_FEATURES_KEY in settings.FEATURES diff --git a/openedx/core/djangoapps/bookmarks/tests/factories.py b/openedx/core/djangoapps/bookmarks/tests/factories.py index 7fe7f300e7..5fd497da03 100644 --- a/openedx/core/djangoapps/bookmarks/tests/factories.py +++ b/openedx/core/djangoapps/bookmarks/tests/factories.py @@ -9,7 +9,7 @@ import factory from factory.django import DjangoModelFactory from opaque_keys.edx.locator import CourseLocator -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..models import Bookmark, XBlockCache diff --git a/openedx/core/djangoapps/bookmarks/tests/test_models.py b/openedx/core/djangoapps/bookmarks/tests/test_models.py index fd00c1bf91..e60e11014b 100644 --- a/openedx/core/djangoapps/bookmarks/tests/test_models.py +++ b/openedx/core/djangoapps/bookmarks/tests/test_models.py @@ -16,7 +16,7 @@ from six import text_type from six.moves import range from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py b/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py index 6eb5015e3e..ee4de81e82 100644 --- a/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py +++ b/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py @@ -8,7 +8,7 @@ from django.test import TestCase from mock import patch from openedx.core.djangolib.testing.utils import skip_unless_cms, skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class CachedAuthMiddlewareTestCase(TestCase): diff --git a/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py b/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py index e7ceef8e53..93e1d3339b 100644 --- a/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py +++ b/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py @@ -23,7 +23,7 @@ from openedx.core.djangoapps.catalog.tests.factories import OrganizationFactory, from openedx.core.djangoapps.catalog.tests.mixins import CatalogIntegrationMixin from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @skip_unless_lms diff --git a/openedx/core/djangoapps/catalog/tests/test_utils.py b/openedx/core/djangoapps/catalog/tests/test_utils.py index f0216de2da..c2f2c10d88 100644 --- a/openedx/core/djangoapps/catalog/tests/test_utils.py +++ b/openedx/core/djangoapps/catalog/tests/test_utils.py @@ -14,9 +14,9 @@ from django.test.client import RequestFactory from django.utils.timezone import now from opaque_keys.edx.keys import CourseKey -from course_modes.helpers import CourseMode -from course_modes.tests.factories import CourseModeFactory -from entitlements.tests.factories import CourseEntitlementFactory +from common.djangoapps.course_modes.helpers import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory +from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory from openedx.core.constants import COURSE_UNPUBLISHED from openedx.core.djangoapps.catalog.cache import ( CATALOG_COURSE_PROGRAMS_CACHE_KEY_TPL, @@ -59,7 +59,7 @@ from openedx.core.djangoapps.catalog.utils import ( from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context UTILS_MODULE = 'openedx.core.djangoapps.catalog.utils' diff --git a/openedx/core/djangoapps/catalog/utils.py b/openedx/core/djangoapps/catalog/utils.py index 2d4b8f8f39..cfeeb008db 100644 --- a/openedx/core/djangoapps/catalog/utils.py +++ b/openedx/core/djangoapps/catalog/utils.py @@ -14,7 +14,7 @@ from opaque_keys.edx.keys import CourseKey from pytz import UTC from six import text_type -from entitlements.utils import is_course_run_entitlement_fulfillable +from common.djangoapps.entitlements.utils import is_course_run_entitlement_fulfillable from openedx.core.constants import COURSE_PUBLISHED from openedx.core.djangoapps.catalog.cache import ( COURSE_PROGRAMS_CACHE_KEY_TPL, @@ -30,7 +30,7 @@ from openedx.core.djangoapps.catalog.cache import ( from openedx.core.djangoapps.catalog.models import CatalogIntegration from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user from openedx.core.lib.edx_api_utils import get_edx_api_data -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment logger = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/ccxcon/api.py b/openedx/core/djangoapps/ccxcon/api.py index a215de6e1c..514cf122ac 100644 --- a/openedx/core/djangoapps/ccxcon/api.py +++ b/openedx/core/djangoapps/ccxcon/api.py @@ -16,8 +16,8 @@ from rest_framework.status import HTTP_200_OK, HTTP_201_CREATED from lms.djangoapps.courseware.courses import get_course_by_id from openedx.core.djangoapps.models.course_details import CourseDetails -from student.models import anonymous_id_for_user -from student.roles import CourseInstructorRole +from common.djangoapps.student.models import anonymous_id_for_user +from common.djangoapps.student.roles import CourseInstructorRole from .models import CCXCon diff --git a/openedx/core/djangoapps/ccxcon/tests/test_api.py b/openedx/core/djangoapps/ccxcon/tests/test_api.py index 50437b368e..08f2b0062e 100644 --- a/openedx/core/djangoapps/ccxcon/tests/test_api.py +++ b/openedx/core/djangoapps/ccxcon/tests/test_api.py @@ -12,7 +12,7 @@ from opaque_keys.edx.keys import CourseKey from six.moves import range from openedx.core.djangoapps.ccxcon import api as ccxconapi -from student.tests.factories import AdminFactory +from common.djangoapps.student.tests.factories import AdminFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/core/djangoapps/certificates/api.py b/openedx/core/djangoapps/certificates/api.py index 0ae6dec631..cbaefaf875 100644 --- a/openedx/core/djangoapps/certificates/api.py +++ b/openedx/core/djangoapps/certificates/api.py @@ -11,7 +11,7 @@ from pytz import UTC from lms.djangoapps.certificates.models import CertificateStatuses, CertificateWhitelist from openedx.core.djangoapps.certificates.config import waffle -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/certificates/tests/test_api.py b/openedx/core/djangoapps/certificates/tests/test_api.py index ba47c71d3e..4e705a3928 100644 --- a/openedx/core/djangoapps/certificates/tests/test_api.py +++ b/openedx/core/djangoapps/certificates/tests/test_api.py @@ -7,15 +7,15 @@ from datetime import datetime, timedelta import ddt import pytz import waffle -from course_modes.models import CourseMode from django.test import TestCase from edx_toggles.toggles import WaffleSwitch from edx_toggles.toggles.testutils import override_waffle_switch -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.certificates import api from openedx.core.djangoapps.certificates.config import waffle as certs_waffle from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory # TODO: Copied from lms.djangoapps.certificates.models, diff --git a/openedx/core/djangoapps/config_model_utils/utils.py b/openedx/core/djangoapps/config_model_utils/utils.py index cc41ed263c..c0369b0fad 100644 --- a/openedx/core/djangoapps/config_model_utils/utils.py +++ b/openedx/core/djangoapps/config_model_utils/utils.py @@ -1,7 +1,7 @@ """utils for feature-based enrollments""" -from student.models import FBEEnrollmentExclusion +from common.djangoapps.student.models import FBEEnrollmentExclusion def is_in_holdback(enrollment): diff --git a/openedx/core/djangoapps/content/course_overviews/models.py b/openedx/core/djangoapps/content/course_overviews/models.py index 3073e3845f..5c0f4323b4 100644 --- a/openedx/core/djangoapps/content/course_overviews/models.py +++ b/openedx/core/djangoapps/content/course_overviews/models.py @@ -29,7 +29,7 @@ from openedx.core.djangoapps.catalog.models import CatalogIntegration from openedx.core.djangoapps.lang_pref.api import get_closest_released_language from openedx.core.djangoapps.models.course_details import CourseDetails from openedx.core.lib.cache_utils import request_cached, RequestCache -from static_replace.models import AssetBaseUrlConfig +from common.djangoapps.static_replace.models import AssetBaseUrlConfig from xmodule import block_metadata_utils, course_metadata_utils from xmodule.course_module import DEFAULT_START_DATE, CourseDescriptor from xmodule.error_module import ErrorDescriptor diff --git a/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py b/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py index 05bb64cb22..5b140cc65b 100644 --- a/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py +++ b/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py @@ -26,7 +26,7 @@ from openedx.core.djangoapps.dark_lang.models import DarkLangConfig from openedx.core.djangoapps.models.course_details import CourseDetails from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.core.lib.courses import course_image_url -from static_replace.models import AssetBaseUrlConfig +from common.djangoapps.static_replace.models import AssetBaseUrlConfig from xmodule.assetstore.assetmgr import AssetManager from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore diff --git a/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment.py b/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment.py index e89ad72dd6..8a5793832a 100644 --- a/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment.py +++ b/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment.py @@ -2,7 +2,7 @@ Simple OutlineProcessor that removes items based on Enrollment and course visibility setting. """ from openedx.features.course_experience import COURSE_ENABLE_UNENROLLED_ACCESS_FLAG -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from .base import OutlineProcessor from ...data import CourseVisibility diff --git a/openedx/core/djangoapps/content/learning_sequences/api/processors/schedule.py b/openedx/core/djangoapps/content/learning_sequences/api/processors/schedule.py index 306b2423d6..5d2a437383 100644 --- a/openedx/core/djangoapps/content/learning_sequences/api/processors/schedule.py +++ b/openedx/core/djangoapps/content/learning_sequences/api/processors/schedule.py @@ -5,8 +5,8 @@ from datetime import datetime, timedelta from django.contrib.auth import get_user_model from edx_when.api import get_dates_for_course from opaque_keys.edx.keys import CourseKey, UsageKey -from student.auth import user_has_role -from student.roles import CourseBetaTesterRole +from common.djangoapps.student.auth import user_has_role +from common.djangoapps.student.roles import CourseBetaTesterRole from ...data import ScheduleData, ScheduleItemData, UserCourseOutlineData from .base import OutlineProcessor diff --git a/openedx/core/djangoapps/content/learning_sequences/api/tests/test_outlines.py b/openedx/core/djangoapps/content/learning_sequences/api/tests/test_outlines.py index 90e961ce64..c21799477c 100644 --- a/openedx/core/djangoapps/content/learning_sequences/api/tests/test_outlines.py +++ b/openedx/core/djangoapps/content/learning_sequences/api/tests/test_outlines.py @@ -14,9 +14,9 @@ from edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.courseware.tests.factories import BetaTesterFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.features.course_experience import COURSE_ENABLE_UNENROLLED_ACCESS_FLAG -from student.auth import user_has_role -from student.models import CourseEnrollment -from student.roles import CourseBetaTesterRole +from common.djangoapps.student.auth import user_has_role +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseBetaTesterRole from ...data import CourseLearningSequenceData, CourseOutlineData, CourseSectionData, CourseVisibility, VisibilityData from ..outlines import ( diff --git a/openedx/core/djangoapps/content/learning_sequences/tests/test_views.py b/openedx/core/djangoapps/content/learning_sequences/tests/test_views.py index 7bfb5dc1f2..cbcfe97199 100644 --- a/openedx/core/djangoapps/content/learning_sequences/tests/test_views.py +++ b/openedx/core/djangoapps/content/learning_sequences/tests/test_views.py @@ -20,7 +20,7 @@ from opaque_keys.edx.keys import CourseKey, UsageKey from rest_framework.test import APITestCase, APIClient from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..api import replace_course_outline from ..data import CourseOutlineData, CourseVisibility diff --git a/openedx/core/djangoapps/content_libraries/tests/base.py b/openedx/core/djangoapps/content_libraries/tests/base.py index 4200d15116..18875e9416 100644 --- a/openedx/core/djangoapps/content_libraries/tests/base.py +++ b/openedx/core/djangoapps/content_libraries/tests/base.py @@ -14,7 +14,7 @@ from organizations.models import Organization from rest_framework.test import APITestCase, APIClient from search.search_engine_base import SearchEngine -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.content_libraries.libraries_index import MAX_SIZE from openedx.core.djangoapps.content_libraries.constants import COMPLEX, ALL_RIGHTS_RESERVED from openedx.core.djangolib.testing.utils import skip_unless_cms diff --git a/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py b/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py index 5dd6165a0f..f01d531b09 100644 --- a/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py +++ b/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py @@ -13,7 +13,7 @@ from organizations.models import Organization from openedx.core.djangoapps.content_libraries.tests.base import ContentLibrariesRestApiTest, elasticsearch_test from openedx.core.djangoapps.content_libraries.constants import VIDEO, COMPLEX, PROBLEM, CC_4_BY, ALL_RIGHTS_RESERVED -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/openedx/core/djangoapps/content_libraries/tests/test_runtime.py b/openedx/core/djangoapps/content_libraries/tests/test_runtime.py index 69e18fd26e..498db69019 100644 --- a/openedx/core/djangoapps/content_libraries/tests/test_runtime.py +++ b/openedx/core/djangoapps/content_libraries/tests/test_runtime.py @@ -24,7 +24,7 @@ from openedx.core.djangoapps.dark_lang.models import DarkLangConfig from openedx.core.djangoapps.xblock import api as xblock_api from openedx.core.djangolib.testing.utils import skip_unless_lms, skip_unless_cms from openedx.core.lib import blockstore_api -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.unit_block import UnitBlock diff --git a/openedx/core/djangoapps/contentserver/middleware.py b/openedx/core/djangoapps/contentserver/middleware.py index ff810fff5b..21ab1d68d0 100644 --- a/openedx/core/djangoapps/contentserver/middleware.py +++ b/openedx/core/djangoapps/contentserver/middleware.py @@ -21,7 +21,7 @@ from opaque_keys.edx.locator import AssetLocator from six import text_type from openedx.core.djangoapps.header_control import force_header_for_response -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.assetstore.assetmgr import AssetManager from xmodule.contentstore.content import XASSET_LOCATION_TAG, StaticContent from xmodule.exceptions import NotFoundError diff --git a/openedx/core/djangoapps/contentserver/test/test_contentserver.py b/openedx/core/djangoapps/contentserver/test/test_contentserver.py index 5d8a7a1eda..80987ec227 100644 --- a/openedx/core/djangoapps/contentserver/test/test_contentserver.py +++ b/openedx/core/djangoapps/contentserver/test/test_contentserver.py @@ -27,8 +27,8 @@ from xmodule.assetstore.assetmgr import AssetManager from opaque_keys import InvalidKeyError from xmodule.modulestore.exceptions import ItemNotFoundError -from student.models import CourseEnrollment -from student.tests.factories import UserFactory, AdminFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory, AdminFactory from ..middleware import parse_range_header, HTTP_DATE_FORMAT, StaticContentServer diff --git a/openedx/core/djangoapps/cors_csrf/views.py b/openedx/core/djangoapps/cors_csrf/views.py index b6a26900d6..d0e5f05019 100644 --- a/openedx/core/djangoapps/cors_csrf/views.py +++ b/openedx/core/djangoapps/cors_csrf/views.py @@ -8,7 +8,7 @@ from django.conf import settings from django.http import HttpResponseNotFound from django.views.decorators.cache import cache_page -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from .models import XDomainProxyConfiguration diff --git a/openedx/core/djangoapps/course_groups/cohorts.py b/openedx/core/djangoapps/course_groups/cohorts.py index 20aa79f01d..458a19fe23 100644 --- a/openedx/core/djangoapps/course_groups/cohorts.py +++ b/openedx/core/djangoapps/course_groups/cohorts.py @@ -21,7 +21,7 @@ from eventtracking import tracker from lms.djangoapps.courseware import courses from openedx.core.lib.cache_utils import request_cached -from student.models import get_user_by_username_or_email +from common.djangoapps.student.models import get_user_by_username_or_email from .models import ( CohortMembership, diff --git a/openedx/core/djangoapps/course_groups/tests/test_api_views.py b/openedx/core/djangoapps/course_groups/tests/test_api_views.py index 16599da378..fe17c954bb 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_api_views.py +++ b/openedx/core/djangoapps/course_groups/tests/test_api_views.py @@ -13,7 +13,7 @@ from django.urls import reverse from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFactory, AccessTokenFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import ToyCourseFactory diff --git a/openedx/core/djangoapps/course_groups/tests/test_cohorts.py b/openedx/core/djangoapps/course_groups/tests/test_cohorts.py index 09f41b2e8b..efefac6f0f 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_cohorts.py +++ b/openedx/core/djangoapps/course_groups/tests/test_cohorts.py @@ -15,8 +15,8 @@ from opaque_keys.edx.locator import CourseLocator from six import text_type from six.moves import range -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import ToyCourseFactory diff --git a/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py b/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py index 39c616a964..d0d2d1b153 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py +++ b/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py @@ -11,7 +11,7 @@ from six.moves import range from lms.djangoapps.courseware.tests.test_masquerade import StaffMasqueradeTestCase from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import ToyCourseFactory diff --git a/openedx/core/djangoapps/course_groups/tests/test_views.py b/openedx/core/djangoapps/course_groups/tests/test_views.py index 040a6ff434..1596f6cb45 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_views.py +++ b/openedx/core/djangoapps/course_groups/tests/test_views.py @@ -18,8 +18,8 @@ from opaque_keys.edx.locator import CourseLocator from openedx.core.djangoapps.django_comment_common.models import CourseDiscussionSettings from openedx.core.djangoapps.django_comment_common.utils import get_course_discussion_settings from lms.djangoapps.courseware.tests.factories import InstructorFactory, StaffFactory -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/course_groups/views.py b/openedx/core/djangoapps/course_groups/views.py index 554f0a36d3..cb9545b23b 100644 --- a/openedx/core/djangoapps/course_groups/views.py +++ b/openedx/core/djangoapps/course_groups/views.py @@ -26,12 +26,12 @@ from rest_framework.response import Response from rest_framework.serializers import Serializer from lms.djangoapps.courseware.courses import get_course, get_course_with_access -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.course_groups.models import CohortMembership from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin -from student.auth import has_course_author_access -from util.json_request import JsonResponse, expect_json +from common.djangoapps.student.auth import has_course_author_access +from common.djangoapps.util.json_request import JsonResponse, expect_json from . import api, cohorts from .models import CourseUserGroup, CourseUserGroupPartitionGroup diff --git a/openedx/core/djangoapps/courseware_api/tests/test_views.py b/openedx/core/djangoapps/courseware_api/tests/test_views.py index e84b66a768..fa1a6e437d 100644 --- a/openedx/core/djangoapps/courseware_api/tests/test_views.py +++ b/openedx/core/djangoapps/courseware_api/tests/test_views.py @@ -19,8 +19,8 @@ from lms.djangoapps.certificates.tests.factories import ( from lms.djangoapps.courseware.access_utils import ACCESS_DENIED, ACCESS_GRANTED from lms.djangoapps.courseware.tabs import ExternalLinkCourseTab from lms.djangoapps.courseware.tests.helpers import MasqueradeMixin -from student.models import CourseEnrollment, CourseEnrollmentCelebration -from student.tests.factories import CourseEnrollmentCelebrationFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentCelebration +from common.djangoapps.student.tests.factories import CourseEnrollmentCelebrationFactory, UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import ItemFactory, ToyCourseFactory diff --git a/openedx/core/djangoapps/courseware_api/views.py b/openedx/core/djangoapps/courseware_api/views.py index adc479db63..a6c3e4e3f7 100644 --- a/openedx/core/djangoapps/courseware_api/views.py +++ b/openedx/core/djangoapps/courseware_api/views.py @@ -19,7 +19,7 @@ from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.edxnotes.helpers import is_feature_enabled from lms.djangoapps.certificates.api import get_certificate_url from lms.djangoapps.certificates.models import GeneratedCertificate @@ -45,7 +45,9 @@ from openedx.features.course_duration_limits.access import ( get_user_course_expiration_date, generate_course_expired_message ) from openedx.features.discounts.utils import generate_offer_html -from student.models import CourseEnrollment, CourseEnrollmentCelebration, LinkedInAddToProfileConfiguration +from common.djangoapps.student.models import ( + CourseEnrollment, CourseEnrollmentCelebration, LinkedInAddToProfileConfiguration +) from xmodule.modulestore.django import modulestore from xmodule.modulestore.search import path_to_location diff --git a/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py b/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py index 4cf4549d90..57ebd3244e 100644 --- a/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py +++ b/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py @@ -18,7 +18,7 @@ from lms.djangoapps.grades.models import PersistentCourseGrade from openedx.core.djangoapps.credentials.models import NotifyCredentialsConfig from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..notify_credentials import Command diff --git a/openedx/core/djangoapps/credentials/signals.py b/openedx/core/djangoapps/credentials/signals.py index be2b61129c..04f1b9705e 100644 --- a/openedx/core/djangoapps/credentials/signals.py +++ b/openedx/core/djangoapps/credentials/signals.py @@ -7,7 +7,7 @@ from logging import getLogger from django.contrib.sites.models import Site -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from lms.djangoapps.grades.api import CourseGradeFactory from openedx.core.djangoapps.catalog.utils import get_programs diff --git a/openedx/core/djangoapps/credentials/tests/test_signals.py b/openedx/core/djangoapps/credentials/tests/test_signals.py index 311be58cc0..de34014efe 100644 --- a/openedx/core/djangoapps/credentials/tests/test_signals.py +++ b/openedx/core/djangoapps/credentials/tests/test_signals.py @@ -14,7 +14,7 @@ from openedx.core.djangoapps.catalog.tests.factories import CourseFactory, Cours from openedx.core.djangoapps.credentials.signals import is_course_run_in_a_program, send_grade_if_interesting from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory, SiteFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory as XModuleCourseFactory diff --git a/openedx/core/djangoapps/credentials/tests/test_tasks.py b/openedx/core/djangoapps/credentials/tests/test_tasks.py index ef927306ef..d4a750ab4c 100644 --- a/openedx/core/djangoapps/credentials/tests/test_tasks.py +++ b/openedx/core/djangoapps/credentials/tests/test_tasks.py @@ -8,7 +8,7 @@ from django.conf import settings from django.test import TestCase, override_settings from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.credentials.tasks.v1 import tasks diff --git a/openedx/core/djangoapps/credentials/tests/test_utils.py b/openedx/core/djangoapps/credentials/tests/test_utils.py index 3586f571fc..da9cd6ea86 100644 --- a/openedx/core/djangoapps/credentials/tests/test_utils.py +++ b/openedx/core/djangoapps/credentials/tests/test_utils.py @@ -11,7 +11,7 @@ from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfi from openedx.core.djangoapps.credentials.utils import get_credentials from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory UTILS_MODULE = 'openedx.core.djangoapps.credentials.utils' diff --git a/openedx/core/djangoapps/credit/api/eligibility.py b/openedx/core/djangoapps/credit/api/eligibility.py index 4806f81f3a..c77866b148 100644 --- a/openedx/core/djangoapps/credit/api/eligibility.py +++ b/openedx/core/djangoapps/credit/api/eligibility.py @@ -9,7 +9,7 @@ import logging import six from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.credit.email_utils import send_credit_notifications from openedx.core.djangoapps.credit.exceptions import InvalidCreditCourse, InvalidCreditRequirements from openedx.core.djangoapps.credit.models import ( @@ -19,7 +19,7 @@ from openedx.core.djangoapps.credit.models import ( CreditRequirement, CreditRequirementStatus ) -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment # TODO: Cleanup this mess! ECOM-2908 diff --git a/openedx/core/djangoapps/credit/api/provider.py b/openedx/core/djangoapps/credit/api/provider.py index e19fcfa3d3..2e11ebf00c 100644 --- a/openedx/core/djangoapps/credit/api/provider.py +++ b/openedx/core/djangoapps/credit/api/provider.py @@ -26,9 +26,9 @@ from openedx.core.djangoapps.credit.models import ( CreditRequirementStatus ) from openedx.core.djangoapps.credit.signature import get_shared_secret_key, signature -from student.models import CourseEnrollment, User -from util.date_utils import to_timestamp -from util.json_request import JsonResponse +from common.djangoapps.student.models import CourseEnrollment, User +from common.djangoapps.util.date_utils import to_timestamp +from common.djangoapps.util.json_request import JsonResponse # TODO: Cleanup this mess! ECOM-2908 diff --git a/openedx/core/djangoapps/credit/email_utils.py b/openedx/core/djangoapps/credit/email_utils.py index 9433021ee8..967c9725f2 100644 --- a/openedx/core/djangoapps/credit/email_utils.py +++ b/openedx/core/djangoapps/credit/email_utils.py @@ -20,8 +20,8 @@ from django.urls import reverse from django.utils.translation import ugettext as _ from eventtracking import tracker -from edxmako.shortcuts import render_to_string -from edxmako.template import Template +from common.djangoapps.edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.template import Template from openedx.core.djangoapps.commerce.utils import ecommerce_api_client from openedx.core.djangoapps.credit.models import CreditConfig, CreditProvider from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers diff --git a/openedx/core/djangoapps/credit/serializers.py b/openedx/core/djangoapps/credit/serializers.py index 2ff76a31b0..6277ff3f6f 100644 --- a/openedx/core/djangoapps/credit/serializers.py +++ b/openedx/core/djangoapps/credit/serializers.py @@ -13,7 +13,7 @@ from rest_framework.exceptions import PermissionDenied from openedx.core.djangoapps.credit.models import CreditCourse, CreditEligibility, CreditProvider, CreditRequest from openedx.core.djangoapps.credit.signature import get_shared_secret_key, signature from openedx.core.lib.api.serializers import CourseKeyField -from util.date_utils import from_timestamp +from common.djangoapps.util.date_utils import from_timestamp log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/credit/services.py b/openedx/core/djangoapps/credit/services.py index d273bdfb1d..6499dd29ec 100644 --- a/openedx/core/djangoapps/credit/services.py +++ b/openedx/core/djangoapps/credit/services.py @@ -10,7 +10,7 @@ from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from opaque_keys.edx.keys import CourseKey -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/credit/tests/factories.py b/openedx/core/djangoapps/credit/tests/factories.py index 1aebc7ff63..8332b30f2c 100644 --- a/openedx/core/djangoapps/credit/tests/factories.py +++ b/openedx/core/djangoapps/credit/tests/factories.py @@ -18,7 +18,7 @@ from openedx.core.djangoapps.credit.models import ( CreditRequirement, CreditRequirementStatus ) -from util.date_utils import to_timestamp +from common.djangoapps.util.date_utils import to_timestamp class CreditCourseFactory(factory.DjangoModelFactory): diff --git a/openedx/core/djangoapps/credit/tests/test_api.py b/openedx/core/djangoapps/credit/tests/test_api.py index 69bc5f71a1..2eafd477e3 100644 --- a/openedx/core/djangoapps/credit/tests/test_api.py +++ b/openedx/core/djangoapps/credit/tests/test_api.py @@ -17,7 +17,7 @@ from django.db import connection from django.test.utils import override_settings from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.commerce.tests import TEST_API_URL from openedx.core.djangoapps.credit import api from openedx.core.djangoapps.credit.email_utils import get_credit_provider_attribute_values, make_providers_strings @@ -39,9 +39,9 @@ from openedx.core.djangoapps.credit.models import ( CreditRequirementStatus ) from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseEnrollment -from student.tests.factories import UserFactory -from util.date_utils import from_timestamp +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.date_utils import from_timestamp from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/credit/tests/test_models.py b/openedx/core/djangoapps/credit/tests/test_models.py index a48ffa1682..cb233954f1 100644 --- a/openedx/core/djangoapps/credit/tests/test_models.py +++ b/openedx/core/djangoapps/credit/tests/test_models.py @@ -20,7 +20,7 @@ from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import ( setup_retirement_states ) from openedx.core.djangoapps.user_api.models import UserRetirementStatus -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory def add_credit_course(course_key): diff --git a/openedx/core/djangoapps/credit/tests/test_serializers.py b/openedx/core/djangoapps/credit/tests/test_serializers.py index 9c94037983..a5da6cf3dd 100644 --- a/openedx/core/djangoapps/credit/tests/test_serializers.py +++ b/openedx/core/djangoapps/credit/tests/test_serializers.py @@ -8,7 +8,7 @@ from rest_framework.exceptions import PermissionDenied from openedx.core.djangoapps.credit import serializers, signature from openedx.core.djangoapps.credit.tests.factories import CreditEligibilityFactory, CreditProviderFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class CreditProviderSerializerTests(TestCase): diff --git a/openedx/core/djangoapps/credit/tests/test_services.py b/openedx/core/djangoapps/credit/tests/test_services.py index 202389f8d6..50f183f086 100644 --- a/openedx/core/djangoapps/credit/tests/test_services.py +++ b/openedx/core/djangoapps/credit/tests/test_services.py @@ -6,11 +6,11 @@ Tests for the Credit xBlock service import ddt import six -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.credit.api.eligibility import set_credit_requirements from openedx.core.djangoapps.credit.models import CreditCourse from openedx.core.djangoapps.credit.services import CreditService -from student.models import CourseEnrollment, UserProfile +from common.djangoapps.student.models import CourseEnrollment, UserProfile from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/credit/tests/test_signals.py b/openedx/core/djangoapps/credit/tests/test_signals.py index 275174bc4b..e7fdf6c28b 100644 --- a/openedx/core/djangoapps/credit/tests/test_signals.py +++ b/openedx/core/djangoapps/credit/tests/test_signals.py @@ -10,13 +10,13 @@ import pytz from django.test.client import RequestFactory from mock import MagicMock -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.credit.api import get_credit_requirement_status, set_credit_requirements from openedx.core.djangoapps.credit.models import CreditCourse, CreditProvider from openedx.core.djangoapps.credit.signals import listen_for_grade_calculation from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/credit/tests/test_views.py b/openedx/core/djangoapps/credit/tests/test_views.py index dffbad0b47..e4989ff235 100644 --- a/openedx/core/djangoapps/credit/tests/test_views.py +++ b/openedx/core/djangoapps/credit/tests/test_views.py @@ -33,8 +33,8 @@ from openedx.core.djangoapps.credit.tests.factories import ( from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFactory, AccessTokenFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import AdminFactory, UserFactory -from util.date_utils import to_timestamp +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.util.date_utils import to_timestamp JSON = 'application/json' diff --git a/openedx/core/djangoapps/dark_lang/tests.py b/openedx/core/djangoapps/dark_lang/tests.py index 4552dbd53e..76d61d2f49 100644 --- a/openedx/core/djangoapps/dark_lang/tests.py +++ b/openedx/core/djangoapps/dark_lang/tests.py @@ -14,7 +14,7 @@ from mock import Mock from openedx.core.djangoapps.dark_lang.middleware import DarkLangMiddleware from openedx.core.djangoapps.dark_lang.models import DarkLangConfig from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory UNSET = object() diff --git a/openedx/core/djangoapps/debug/views.py b/openedx/core/djangoapps/debug/views.py index 8f09c72161..37531ce46b 100644 --- a/openedx/core/djangoapps/debug/views.py +++ b/openedx/core/djangoapps/debug/views.py @@ -10,7 +10,7 @@ from django.http import HttpResponseNotFound from django.template import TemplateDoesNotExist from django.utils.translation import ugettext as _ -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.util.user_messages import PageLevelMessages diff --git a/openedx/core/djangoapps/demographics/tests/test_status.py b/openedx/core/djangoapps/demographics/tests/test_status.py index a8df58793c..e80b24e787 100644 --- a/openedx/core/djangoapps/demographics/tests/test_status.py +++ b/openedx/core/djangoapps/demographics/tests/test_status.py @@ -7,10 +7,10 @@ from django.conf import settings from pytest import mark from unittest import TestCase -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from opaque_keys.edx.keys import CourseKey -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase, TEST_DATA_SPLIT_MODULESTORE from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/django_comment_common/models.py b/openedx/core/djangoapps/django_comment_common/models.py index efd2709ead..55d8ab091e 100644 --- a/openedx/core/djangoapps/django_comment_common/models.py +++ b/openedx/core/djangoapps/django_comment_common/models.py @@ -17,8 +17,8 @@ from opaque_keys.edx.django.models import CourseKeyField from six import text_type from openedx.core.djangoapps.xmodule_django.models import NoneToEmptyManager -from student.models import CourseEnrollment -from student.roles import GlobalStaff +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import GlobalStaff from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/openedx/core/djangoapps/django_comment_common/tests.py b/openedx/core/djangoapps/django_comment_common/tests.py index f00338e8e4..d8f2594a09 100644 --- a/openedx/core/djangoapps/django_comment_common/tests.py +++ b/openedx/core/djangoapps/django_comment_common/tests.py @@ -13,7 +13,7 @@ from openedx.core.djangoapps.django_comment_common.utils import ( get_course_discussion_settings, set_course_discussion_settings ) -from student.models import CourseEnrollment, User +from common.djangoapps.student.models import CourseEnrollment, User from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/openedx/core/djangoapps/embargo/api.py b/openedx/core/djangoapps/embargo/api.py index 7369163b1a..7c9a73ad00 100644 --- a/openedx/core/djangoapps/embargo/api.py +++ b/openedx/core/djangoapps/embargo/api.py @@ -15,7 +15,7 @@ from rest_framework import status from rest_framework.response import Response import geoip2.database -from student.auth import has_course_author_access +from common.djangoapps.student.auth import has_course_author_access from .models import CountryAccessRule, RestrictedCourse diff --git a/openedx/core/djangoapps/embargo/tests/test_api.py b/openedx/core/djangoapps/embargo/tests/test_api.py index d996754d71..10dd306f6e 100644 --- a/openedx/core/djangoapps/embargo/tests/test_api.py +++ b/openedx/core/djangoapps/embargo/tests/test_api.py @@ -17,18 +17,18 @@ from django.core.cache import cache from django.db import connection from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import ( ModuleStoreTestCase, mixed_store_config ) -from student.roles import ( +from common.djangoapps.student.roles import ( GlobalStaff, CourseRole, OrgRole, CourseStaffRole, CourseInstructorRole, OrgStaffRole, OrgInstructorRole ) -from util.testing import UrlResetMixin +from common.djangoapps.util.testing import UrlResetMixin from ..models import ( RestrictedCourse, Country, CountryAccessRule, ) diff --git a/openedx/core/djangoapps/embargo/tests/test_middleware.py b/openedx/core/djangoapps/embargo/tests/test_middleware.py index b15578e33e..b08600f9cd 100644 --- a/openedx/core/djangoapps/embargo/tests/test_middleware.py +++ b/openedx/core/djangoapps/embargo/tests/test_middleware.py @@ -12,8 +12,8 @@ from django.urls import reverse from mock import patch from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/embargo/tests/test_views.py b/openedx/core/djangoapps/embargo/tests/test_views.py index ac4e982cfa..874b327205 100644 --- a/openedx/core/djangoapps/embargo/tests/test_views.py +++ b/openedx/core/djangoapps/embargo/tests/test_views.py @@ -14,8 +14,8 @@ from .. import messages from lms.djangoapps.course_api.tests.mixins import CourseApiFactoryMixin from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme -from student.tests.factories import UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/openedx/core/djangoapps/embargo/views.py b/openedx/core/djangoapps/embargo/views.py index fe9bdb4faf..5fa8635e51 100644 --- a/openedx/core/djangoapps/embargo/views.py +++ b/openedx/core/djangoapps/embargo/views.py @@ -11,7 +11,7 @@ from rest_framework.exceptions import ValidationError from rest_framework.response import Response from rest_framework.views import APIView -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from . import messages from .api import check_course_access diff --git a/openedx/core/djangoapps/enrollments/api.py b/openedx/core/djangoapps/enrollments/api.py index ee46fc31fc..a71aeed556 100644 --- a/openedx/core/djangoapps/enrollments/api.py +++ b/openedx/core/djangoapps/enrollments/api.py @@ -12,7 +12,7 @@ from django.conf import settings from django.core.cache import cache from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.enrollments import errors log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/enrollments/data.py b/openedx/core/djangoapps/enrollments/data.py index 448f50a52d..aaa4bfcba6 100644 --- a/openedx/core/djangoapps/enrollments/data.py +++ b/openedx/core/djangoapps/enrollments/data.py @@ -21,7 +21,7 @@ from openedx.core.djangoapps.enrollments.errors import ( ) from openedx.core.djangoapps.enrollments.serializers import CourseEnrollmentSerializer, CourseSerializer from openedx.core.lib.exceptions import CourseNotFoundError -from student.models import ( +from common.djangoapps.student.models import ( AlreadyEnrolledError, CourseEnrollment, CourseEnrollmentAttribute, @@ -29,7 +29,7 @@ from student.models import ( EnrollmentClosedError, NonExistentCourseError ) -from student.roles import RoleCache +from common.djangoapps.student.roles import RoleCache log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py b/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py index 566f5fe1ed..b23915b663 100644 --- a/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py +++ b/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py @@ -10,7 +10,7 @@ from django.core.management import call_command from django.core.management.base import CommandError from openedx.core.djangoapps.enrollments.api import get_enrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/enrollments/serializers.py b/openedx/core/djangoapps/enrollments/serializers.py index 8a1c7750ab..17739a61d1 100644 --- a/openedx/core/djangoapps/enrollments/serializers.py +++ b/openedx/core/djangoapps/enrollments/serializers.py @@ -7,8 +7,8 @@ import logging from rest_framework import serializers -from course_modes.models import CourseMode -from student.models import CourseEnrollment +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.student.models import CourseEnrollment log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/enrollments/tests/test_api.py b/openedx/core/djangoapps/enrollments/tests/test_api.py index 040791e750..6e2ec5710b 100644 --- a/openedx/core/djangoapps/enrollments/tests/test_api.py +++ b/openedx/core/djangoapps/enrollments/tests/test_api.py @@ -11,7 +11,7 @@ from django.conf import settings from django.test.utils import override_settings from mock import Mock, patch -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.enrollments import api from openedx.core.djangoapps.enrollments.errors import ( CourseModeNotFoundError, EnrollmentApiLoadError, EnrollmentNotFoundError, diff --git a/openedx/core/djangoapps/enrollments/tests/test_data.py b/openedx/core/djangoapps/enrollments/tests/test_data.py index a74047a71b..0cdc6f331b 100644 --- a/openedx/core/djangoapps/enrollments/tests/test_data.py +++ b/openedx/core/djangoapps/enrollments/tests/test_data.py @@ -15,8 +15,8 @@ from mock import patch from pytz import UTC from six.moves import range -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.enrollments import data from openedx.core.djangoapps.enrollments.errors import ( CourseEnrollmentClosedError, @@ -26,8 +26,8 @@ from openedx.core.djangoapps.enrollments.errors import ( ) from openedx.core.djangoapps.enrollments.serializers import CourseEnrollmentSerializer from openedx.core.lib.exceptions import CourseNotFoundError -from student.models import AlreadyEnrolledError, CourseEnrollment, CourseFullError, EnrollmentClosedError -from student.tests.factories import CourseAccessRoleFactory, UserFactory, CourseEnrollmentFactory +from common.djangoapps.student.models import AlreadyEnrolledError, CourseEnrollment, CourseFullError, EnrollmentClosedError +from common.djangoapps.student.tests.factories import CourseAccessRoleFactory, UserFactory, CourseEnrollmentFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/enrollments/tests/test_views.py b/openedx/core/djangoapps/enrollments/tests/test_views.py index e9a6bfa49f..38c2eedabf 100644 --- a/openedx/core/djangoapps/enrollments/tests/test_views.py +++ b/openedx/core/djangoapps/enrollments/tests/test_views.py @@ -27,8 +27,8 @@ from rest_framework.test import APITestCase from six import text_type from six.moves import range -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.course_groups import cohorts from openedx.core.djangoapps.embargo.models import Country, CountryAccessRule, RestrictedCourse @@ -41,11 +41,11 @@ from openedx.core.djangoapps.user_api.models import RetirementState, UserOrgTag, from openedx.core.lib.django_test_client_utils import get_absolute_url from openedx.features.enterprise_support.tests import FAKE_ENTERPRISE_CUSTOMER from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseServiceMockMixin -from student.models import CourseEnrollment -from student.roles import CourseStaffRole -from student.tests.factories import AdminFactory, SuperuserFactory, UserFactory -from util.models import RateLimitConfiguration -from util.testing import UrlResetMixin +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import AdminFactory, SuperuserFactory, UserFactory +from common.djangoapps.util.models import RateLimitConfiguration +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls_range diff --git a/openedx/core/djangoapps/enrollments/views.py b/openedx/core/djangoapps/enrollments/views.py index ea5dc5c46d..efd8b12e96 100644 --- a/openedx/core/djangoapps/enrollments/views.py +++ b/openedx/core/djangoapps/enrollments/views.py @@ -9,7 +9,7 @@ import logging from six import text_type -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.decorators import method_decorator from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication @@ -46,10 +46,10 @@ from rest_framework.generics import ListAPIView from rest_framework.response import Response from rest_framework.throttling import UserRateThrottle from rest_framework.views import APIView -from student.auth import user_has_role -from student.models import CourseEnrollment, User -from student.roles import CourseStaffRole, GlobalStaff -from util.disable_rate_limit import can_disable_rate_limit +from common.djangoapps.student.auth import user_has_role +from common.djangoapps.student.models import CourseEnrollment, User +from common.djangoapps.student.roles import CourseStaffRole, GlobalStaff +from common.djangoapps.util.disable_rate_limit import can_disable_rate_limit log = logging.getLogger(__name__) REQUIRED_ATTRIBUTES = { diff --git a/openedx/core/djangoapps/external_user_ids/tests/test_admin_generate_id.py b/openedx/core/djangoapps/external_user_ids/tests/test_admin_generate_id.py index f0d8878e8d..e9758b6abb 100644 --- a/openedx/core/djangoapps/external_user_ids/tests/test_admin_generate_id.py +++ b/openedx/core/djangoapps/external_user_ids/tests/test_admin_generate_id.py @@ -4,7 +4,7 @@ import mock from django.contrib.admin.sites import AdminSite from django.test import TestCase -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.external_user_ids.models import ( ExternalId, diff --git a/openedx/core/djangoapps/external_user_ids/tests/test_signals.py b/openedx/core/djangoapps/external_user_ids/tests/test_signals.py index 33ab1a9bc1..34aa8758ca 100644 --- a/openedx/core/djangoapps/external_user_ids/tests/test_signals.py +++ b/openedx/core/djangoapps/external_user_ids/tests/test_signals.py @@ -6,20 +6,20 @@ from opaque_keys.edx.keys import CourseKey from django.core.cache import cache from edx_django_utils.cache import RequestCache -from entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.models import CourseEntitlement from openedx.core.djangoapps.catalog.tests.factories import ( CourseFactory, ProgramFactory, ) -from student.tests.factories import TEST_PASSWORD, UserFactory, CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import TEST_PASSWORD, UserFactory, CourseEnrollmentFactory from openedx.core.djangoapps.catalog.cache import ( CATALOG_COURSE_PROGRAMS_CACHE_KEY_TPL, COURSE_PROGRAMS_CACHE_KEY_TPL, PROGRAM_CACHE_KEY_TPL, ) from openedx.core.djangoapps.external_user_ids.models import ExternalId, ExternalIdType -from student.models import CourseEnrollment -from course_modes.models import CourseMode +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/openedx/core/djangoapps/geoinfo/tests/test_middleware.py b/openedx/core/djangoapps/geoinfo/tests/test_middleware.py index dabb861ee8..c328ce0629 100644 --- a/openedx/core/djangoapps/geoinfo/tests/test_middleware.py +++ b/openedx/core/djangoapps/geoinfo/tests/test_middleware.py @@ -11,7 +11,7 @@ from django.test.client import RequestFactory from mock import MagicMock, PropertyMock, patch from openedx.core.djangoapps.geoinfo.middleware import CountryMiddleware -from student.tests.factories import AnonymousUserFactory, UserFactory +from common.djangoapps.student.tests.factories import AnonymousUserFactory, UserFactory class CountryMiddlewareTests(TestCase): diff --git a/openedx/core/djangoapps/heartbeat/views.py b/openedx/core/djangoapps/heartbeat/views.py index bdba4cf0bc..6697db4d30 100644 --- a/openedx/core/djangoapps/heartbeat/views.py +++ b/openedx/core/djangoapps/heartbeat/views.py @@ -6,7 +6,7 @@ Views for verifying the health (heartbeat) of the app. import logging import six -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse from .runchecks import runchecks diff --git a/openedx/core/djangoapps/lang_pref/tests/test_middleware.py b/openedx/core/djangoapps/lang_pref/tests/test_middleware.py index 0c699836db..f71946a514 100644 --- a/openedx/core/djangoapps/lang_pref/tests/test_middleware.py +++ b/openedx/core/djangoapps/lang_pref/tests/test_middleware.py @@ -23,7 +23,7 @@ from openedx.core.djangoapps.user_api.preferences.api import ( set_user_preference ) from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.tests.factories import AnonymousUserFactory, UserFactory +from common.djangoapps.student.tests.factories import AnonymousUserFactory, UserFactory @ddt.ddt diff --git a/openedx/core/djangoapps/lang_pref/tests/test_views.py b/openedx/core/djangoapps/lang_pref/tests/test_views.py index 682e0d77dd..0984c7422e 100644 --- a/openedx/core/djangoapps/lang_pref/tests/test_views.py +++ b/openedx/core/djangoapps/lang_pref/tests/test_views.py @@ -10,7 +10,7 @@ from django.test import TestCase from django.test.client import RequestFactory from django.urls import reverse from django.utils.translation import LANGUAGE_SESSION_KEY, get_language -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class TestLangPrefView(TestCase): diff --git a/openedx/core/djangoapps/oauth_dispatch/jwt.py b/openedx/core/djangoapps/oauth_dispatch/jwt.py index 6a1be45f0b..57ef0f8977 100644 --- a/openedx/core/djangoapps/oauth_dispatch/jwt.py +++ b/openedx/core/djangoapps/oauth_dispatch/jwt.py @@ -10,7 +10,7 @@ from edx_rbac.utils import create_role_auth_claim_for_user from jwkest import jwk from jwkest.jws import JWS -from student.models import UserProfile, anonymous_id_for_user +from common.djangoapps.student.models import UserProfile, anonymous_id_for_user def create_jwt_for_user(user, secret=None, aud=None, additional_claims=None, scopes=None): diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py index af34319718..9a3eacb56e 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py @@ -18,7 +18,7 @@ from oauth2_provider.models import AccessToken, RefreshToken from testfixtures import LogCapture from openedx.core.djangoapps.oauth_dispatch.tests import factories -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory LOGGER_NAME = 'openedx.core.djangoapps.oauth_dispatch.management.commands.edx_clear_expired_tokens' diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py index 98d7cbe563..437c71107f 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py @@ -9,7 +9,7 @@ from django.test import TestCase from oauth2_provider.models import get_application_model from openedx.core.djangoapps.oauth_dispatch.models import ApplicationAccess -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..create_dot_application import Command diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/factories.py b/openedx/core/djangoapps/oauth_dispatch/tests/factories.py index fe1405cefd..a0ca20aa0a 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/factories.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/factories.py @@ -10,7 +10,7 @@ from factory.fuzzy import FuzzyText from oauth2_provider.models import AccessToken, Application, RefreshToken from openedx.core.djangoapps.oauth_dispatch.models import ApplicationAccess -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class ApplicationFactory(DjangoModelFactory): diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py b/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py index b80c613f3a..64167c9b26 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py @@ -9,7 +9,7 @@ from jwkest.jwk import KEYS from jwkest.jws import JWS from jwt.exceptions import ExpiredSignatureError -from student.models import UserProfile, anonymous_id_for_user +from common.djangoapps.student.models import UserProfile, anonymous_id_for_user class AccessTokenMixin(object): diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py index 4e183b971f..4a08ef29e8 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py @@ -8,7 +8,7 @@ from django.http import HttpRequest from django.test import TestCase from oauth2_provider.models import AccessToken -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory OAUTH_PROVIDER_ENABLED = settings.FEATURES.get('ENABLE_OAUTH2_PROVIDER') if OAUTH_PROVIDER_ENABLED: diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py index 771d7b94c0..82db02e289 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py @@ -9,7 +9,7 @@ from django.test import TestCase from django.urls import reverse from oauth2_provider.models import Application -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..adapters import DOTAdapter from . import mixins diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py index d3db2e0d47..1e01febf3f 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py @@ -13,7 +13,7 @@ from django.test import TestCase from django.utils.timezone import now from oauth2_provider import models -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory # oauth_dispatch is not in CMS' INSTALLED_APPS so these imports will error during test collection if settings.FEATURES.get("ENABLE_OAUTH2_PROVIDER"): diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py index 7176710fbf..5a6504ae36 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py @@ -13,7 +13,7 @@ from django.contrib.auth.models import User from django.test import RequestFactory, TestCase from django.utils import timezone -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory # oauth_dispatch is not in CMS' INSTALLED_APPS so these imports will error during test collection if settings.ROOT_URLCONF == 'lms.urls': diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py index af26a93f4e..00dae55c8f 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py @@ -8,7 +8,7 @@ from django.test import TestCase from oauth2_provider.models import AccessToken, Application, RefreshToken from openedx.core.djangoapps.oauth_dispatch.tests import factories -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @unittest.skipUnless(settings.FEATURES.get("ENABLE_OAUTH2_PROVIDER"), "OAuth2 not enabled") diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py index 3a0d0ef886..ffb0f873b0 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py @@ -13,7 +13,7 @@ from openedx.core.djangoapps.oauth_dispatch import jwt as jwt_api from openedx.core.djangoapps.oauth_dispatch.adapters import DOTAdapter from openedx.core.djangoapps.oauth_dispatch.models import RestrictedApplication from openedx.core.djangoapps.oauth_dispatch.tests.mixins import AccessTokenMixin -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py index 13184ae2cd..c3b5aa264a 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py @@ -16,8 +16,8 @@ from jwkest import jwk from mock import call, patch from oauth2_provider import models as dot_models -from student.tests.factories import UserFactory -from third_party_auth.tests.utils import ThirdPartyOAuthTestMixin, ThirdPartyOAuthTestMixinGoogle +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.tests.utils import ThirdPartyOAuthTestMixin, ThirdPartyOAuthTestMixinGoogle from . import mixins diff --git a/openedx/core/djangoapps/olx_rest_api/adapters.py b/openedx/core/djangoapps/olx_rest_api/adapters.py index 97af88ecda..f5cf4aa823 100644 --- a/openedx/core/djangoapps/olx_rest_api/adapters.py +++ b/openedx/core/djangoapps/olx_rest_api/adapters.py @@ -10,7 +10,7 @@ from opaque_keys.edx.keys import AssetKey, CourseKey from fs.memoryfs import MemoryFS from fs.wrapfs import WrapFS -from static_replace import replace_static_urls +from common.djangoapps.static_replace import replace_static_urls from xmodule.contentstore.content import StaticContent from xmodule.assetstore.assetmgr import AssetManager from xmodule.modulestore.django import modulestore as store diff --git a/openedx/core/djangoapps/olx_rest_api/test_views.py b/openedx/core/djangoapps/olx_rest_api/test_views.py index 4e01e5752f..13233fd895 100644 --- a/openedx/core/djangoapps/olx_rest_api/test_views.py +++ b/openedx/core/djangoapps/olx_rest_api/test_views.py @@ -5,8 +5,8 @@ import re from xml.dom import minidom from openedx.core.djangolib.testing.utils import skip_unless_cms -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import ToyCourseFactory diff --git a/openedx/core/djangoapps/olx_rest_api/views.py b/openedx/core/djangoapps/olx_rest_api/views.py index 48fe29cc4e..3e2351f47d 100644 --- a/openedx/core/djangoapps/olx_rest_api/views.py +++ b/openedx/core/djangoapps/olx_rest_api/views.py @@ -9,7 +9,7 @@ from rest_framework.decorators import api_view from rest_framework.exceptions import NotFound, PermissionDenied, ValidationError from rest_framework.response import Response -from student.auth import has_studio_read_access +from common.djangoapps.student.auth import has_studio_read_access from openedx.core.lib.api.view_utils import view_auth_classes from . import adapters diff --git a/openedx/core/djangoapps/password_policy/compliance.py b/openedx/core/djangoapps/password_policy/compliance.py index b6283b9b28..583067efa8 100644 --- a/openedx/core/djangoapps/password_policy/compliance.py +++ b/openedx/core/djangoapps/password_policy/compliance.py @@ -9,8 +9,8 @@ from django.conf import settings from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML -from util.date_utils import DEFAULT_SHORT_DATE_FORMAT, strftime_localized -from util.password_policy_validators import validate_password +from common.djangoapps.util.date_utils import DEFAULT_SHORT_DATE_FORMAT, strftime_localized +from common.djangoapps.util.password_policy_validators import validate_password class NonCompliantPasswordException(Exception): diff --git a/openedx/core/djangoapps/password_policy/tests/test_compliance.py b/openedx/core/djangoapps/password_policy/tests/test_compliance.py index 1f26a5efdb..ca1e447274 100644 --- a/openedx/core/djangoapps/password_policy/tests/test_compliance.py +++ b/openedx/core/djangoapps/password_policy/tests/test_compliance.py @@ -15,9 +15,9 @@ from openedx.core.djangoapps.password_policy.compliance import (NonCompliantPass _get_compliance_deadline_for_user, enforce_compliance_on_login, should_enforce_compliance_on_login) -from student.tests.factories import (CourseAccessRoleFactory, - UserFactory) -from util.password_policy_validators import ValidationError +from common.djangoapps.student.tests.factories import (CourseAccessRoleFactory, + UserFactory) +from common.djangoapps.util.password_policy_validators import ValidationError date1 = parse_date('2018-01-01 00:00:00+00:00') diff --git a/openedx/core/djangoapps/password_policy/tests/test_forms.py b/openedx/core/djangoapps/password_policy/tests/test_forms.py index 1ee0691cab..0bfb3a840d 100644 --- a/openedx/core/djangoapps/password_policy/tests/test_forms.py +++ b/openedx/core/djangoapps/password_policy/tests/test_forms.py @@ -12,7 +12,7 @@ from openedx.core.djangoapps.password_policy.compliance import ( NonCompliantPasswordException, NonCompliantPasswordWarning ) from openedx.core.djangoapps.password_policy.forms import PasswordPolicyAwareAdminAuthForm -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class PasswordPolicyAwareAdminAuthFormTests(TestCase): diff --git a/openedx/core/djangoapps/plugin_api/views.py b/openedx/core/djangoapps/plugin_api/views.py index 965e0a1d3e..c2e07c6fcb 100644 --- a/openedx/core/djangoapps/plugin_api/views.py +++ b/openedx/core/djangoapps/plugin_api/views.py @@ -11,7 +11,7 @@ from django.http import HttpResponse from django.shortcuts import render from web_fragments.views import FragmentView -from edxmako.shortcuts import is_any_marketing_link_set, is_marketing_link_set, marketing_link +from common.djangoapps.edxmako.shortcuts import is_any_marketing_link_set, is_marketing_link_set, marketing_link log = logging.getLogger('plugin_api') diff --git a/openedx/core/djangoapps/profile_images/tests/test_views.py b/openedx/core/djangoapps/profile_images/tests/test_views.py index 99a4a67db7..04d3a58e9b 100644 --- a/openedx/core/djangoapps/profile_images/tests/test_views.py +++ b/openedx/core/djangoapps/profile_images/tests/test_views.py @@ -15,8 +15,8 @@ from mock import patch from PIL import Image from rest_framework.test import APITestCase, APIClient -from student.tests.factories import UserFactory -from student.tests.tests import UserSettingsEventTestMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.student.tests.tests import UserSettingsEventTestMixin from openedx.core.djangoapps.user_api.accounts.image_helpers import ( set_has_profile_image, get_profile_image_names, @@ -440,7 +440,7 @@ class ProfileImageViewDeleteTestCase(ProfileImageEndpointMixin, APITestCase): ) self.check_remove_event_emitted() - @patch('student.models.UserProfile.save') + @patch('common.djangoapps.student.models.UserProfile.save') def test_remove_failure(self, user_profile_save, mock_log): """ Test that when remove validation fails, the proper HTTP response and diff --git a/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py b/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py index e375fcff9a..8169dd4c53 100644 --- a/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py +++ b/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py @@ -9,7 +9,7 @@ from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from openedx.core.djangoapps.catalog.utils import get_programs from openedx.core.djangoapps.programs.tasks import award_program_certificates diff --git a/openedx/core/djangoapps/programs/tasks.py b/openedx/core/djangoapps/programs/tasks.py index 913c5d41a8..fb3c68ba2b 100644 --- a/openedx/core/djangoapps/programs/tasks.py +++ b/openedx/core/djangoapps/programs/tasks.py @@ -12,7 +12,7 @@ from django.contrib.sites.models import Site from edx_rest_api_client import exceptions from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import GeneratedCertificate from openedx.core.djangoapps.certificates.api import available_date_for_certificate from openedx.core.djangoapps.content.course_overviews.models import CourseOverview diff --git a/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py b/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py index 69173cf9f0..f12bd0a2e7 100644 --- a/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py +++ b/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py @@ -8,7 +8,7 @@ from django.test import TestCase from opaque_keys.edx.keys import CourseKey from six.moves import range -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.api import MODES from lms.djangoapps.certificates.models import CertificateStatuses from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory @@ -22,7 +22,7 @@ from openedx.core.djangoapps.catalog.tests.mixins import CatalogIntegrationMixin from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfigMixin from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory COMMAND_MODULE = 'openedx.core.djangoapps.programs.management.commands.backpopulate_program_credentials' diff --git a/openedx/core/djangoapps/programs/tests/test_signals.py b/openedx/core/djangoapps/programs/tests/test_signals.py index 4b4bca8c06..e33c6c20cd 100644 --- a/openedx/core/djangoapps/programs/tests/test_signals.py +++ b/openedx/core/djangoapps/programs/tests/test_signals.py @@ -20,7 +20,7 @@ from openedx.core.djangoapps.signals.signals import ( ) from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory TEST_USERNAME = 'test-user' TEST_COURSE_KEY = CourseKey.from_string('course-v1:edX+test_course+1') diff --git a/openedx/core/djangoapps/programs/tests/test_tasks.py b/openedx/core/djangoapps/programs/tests/test_tasks.py index 5576dada75..70965a08b4 100644 --- a/openedx/core/djangoapps/programs/tests/test_tasks.py +++ b/openedx/core/djangoapps/programs/tests/test_tasks.py @@ -27,7 +27,7 @@ from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFa from openedx.core.djangoapps.programs import tasks from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory, SiteFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/programs/tests/test_utils.py b/openedx/core/djangoapps/programs/tests/test_utils.py index 0a2b0fc2d6..bc75946421 100644 --- a/openedx/core/djangoapps/programs/tests/test_utils.py +++ b/openedx/core/djangoapps/programs/tests/test_utils.py @@ -20,9 +20,9 @@ from pytz import utc from testfixtures import LogCapture from waffle.testutils import override_switch -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory -from entitlements.tests.factories import CourseEntitlementFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory +from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory from lms.djangoapps.certificates.api import MODES from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from lms.djangoapps.commerce.tests.test_utils import update_commerce_config @@ -49,8 +49,8 @@ from openedx.core.djangoapps.programs.utils import ( ) from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import AnonymousUserFactory, CourseEnrollmentFactory, UserFactory -from util.date_utils import strftime_localized +from common.djangoapps.student.tests.factories import AnonymousUserFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.date_utils import strftime_localized from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ( ModuleStoreTestCase, SharedModuleStoreTestCase, TEST_DATA_SPLIT_MODULESTORE diff --git a/openedx/core/djangoapps/programs/utils.py b/openedx/core/djangoapps/programs/utils.py index 0926927da3..1f3aabbd6e 100644 --- a/openedx/core/djangoapps/programs/utils.py +++ b/openedx/core/djangoapps/programs/utils.py @@ -22,10 +22,10 @@ from pytz import utc from requests.exceptions import ConnectionError, Timeout from six.moves.urllib.parse import urljoin, urlparse, urlunparse # pylint: disable=import-error -from course_modes.api import get_paid_modes_for_course -from course_modes.models import CourseMode -from entitlements.api import get_active_entitlement_list_for_user -from entitlements.models import CourseEntitlement +from common.djangoapps.course_modes.api import get_paid_modes_for_course +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.entitlements.api import get_active_entitlement_list_for_user +from common.djangoapps.entitlements.models import CourseEntitlement from lms.djangoapps.certificates import api as certificate_api from lms.djangoapps.certificates.models import GeneratedCertificate from lms.djangoapps.commerce.utils import EcommerceService @@ -42,8 +42,8 @@ from openedx.core.djangoapps.enrollments.api import get_enrollments from openedx.core.djangoapps.enrollments.permissions import ENROLL_IN_COURSE from openedx.core.djangoapps.programs import ALWAYS_CALCULATE_PROGRAM_PRICE_AS_ANONYMOUS_USER from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from student.models import CourseEnrollment -from util.date_utils import strftime_localized +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.date_utils import strftime_localized from xmodule.modulestore.django import modulestore # The datetime module's strftime() methods require a year >= 1900. diff --git a/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py b/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py index 1dce15546d..8b1d249838 100644 --- a/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py +++ b/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py @@ -15,7 +15,7 @@ from django.test.utils import override_settings from mock import patch from openedx.core.djangolib.testing.utils import get_mock_request -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..middleware import SafeCookieData, SafeSessionMiddleware from .test_utils import TestSafeSessionsLogMixin diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py b/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py index 4474d5feb6..cc2b6ff481 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py @@ -22,8 +22,8 @@ from mock import Mock, patch from opaque_keys.edx.keys import CourseKey from six.moves import range -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.models import DynamicUpgradeDeadlineConfiguration from lms.djangoapps.commerce.models import CommerceConfiguration from openedx.core.djangoapps.schedules import resolvers, tasks @@ -33,8 +33,8 @@ from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfi from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES from openedx.core.djangolib.testing.utils import FilteredQueryCountMixin -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory SITE_QUERY = 1 # django_site SITE_CONFIG_QUERY = 1 # site_configuration_siteconfiguration diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py index a7ce38f88d..52dd962ee0 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py @@ -23,7 +23,7 @@ from openedx.core.djangoapps.schedules.management.commands.tests.send_email_base from openedx.core.djangoapps.schedules.management.commands.tests.upsell_base import ScheduleUpsellTestMixin from openedx.core.djangoapps.schedules.models import ScheduleExperience from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py index f49293f6a5..e3a0445172 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py @@ -15,7 +15,7 @@ from mock import patch from opaque_keys.edx.locator import CourseLocator from six.moves import range -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.schedules import resolvers, tasks from openedx.core.djangoapps.schedules.management.commands import send_upgrade_reminder as reminder from openedx.core.djangoapps.schedules.management.commands.tests.send_email_base import ( @@ -24,7 +24,7 @@ from openedx.core.djangoapps.schedules.management.commands.tests.send_email_base ) from openedx.core.djangoapps.schedules.models import ScheduleExperience from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory LOG = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/schedules/signals.py b/openedx/core/djangoapps/schedules/signals.py index dae8082184..09ef4cc9fd 100644 --- a/openedx/core/djangoapps/schedules/signals.py +++ b/openedx/core/djangoapps/schedules/signals.py @@ -11,7 +11,7 @@ from django.db.models.signals import post_save from django.dispatch import receiver from edx_ace.utils import date -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.models import ( CourseDynamicUpgradeDeadlineConfiguration, DynamicUpgradeDeadlineConfiguration, @@ -22,9 +22,9 @@ from openedx.core.djangoapps.schedules.content_highlights import course_has_high from openedx.core.djangoapps.schedules.models import ScheduleExperience from openedx.core.djangoapps.schedules.utils import reset_self_paced_schedule from openedx.core.djangoapps.theming.helpers import get_current_site -from student.models import CourseEnrollment -from student.signals import ENROLLMENT_TRACK_UPDATED -from track import segment +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.signals import ENROLLMENT_TRACK_UPDATED +from common.djangoapps.track import segment from .config import CREATE_SCHEDULE_WAFFLE_FLAG from .models import Schedule, ScheduleConfig diff --git a/openedx/core/djangoapps/schedules/tasks.py b/openedx/core/djangoapps/schedules/tasks.py index fb30694b53..4aa119cc3d 100644 --- a/openedx/core/djangoapps/schedules/tasks.py +++ b/openedx/core/djangoapps/schedules/tasks.py @@ -24,7 +24,7 @@ from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi from openedx.core.djangoapps.schedules import message_types, resolvers from openedx.core.djangoapps.schedules.models import Schedule, ScheduleConfig from openedx.core.lib.celery.task_utils import emulate_http_request -from track import segment +from common.djangoapps.track import segment LOG = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/schedules/tests/factories.py b/openedx/core/djangoapps/schedules/tests/factories.py index f7d13ab8a3..d7f060a567 100644 --- a/openedx/core/djangoapps/schedules/tests/factories.py +++ b/openedx/core/djangoapps/schedules/tests/factories.py @@ -8,7 +8,7 @@ import pytz from openedx.core.djangoapps.schedules import models from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory class ScheduleExperienceFactory(factory.DjangoModelFactory): diff --git a/openedx/core/djangoapps/schedules/tests/test_content_highlights.py b/openedx/core/djangoapps/schedules/tests/test_content_highlights.py index 1538342ded..c9b361cd07 100644 --- a/openedx/core/djangoapps/schedules/tests/test_content_highlights.py +++ b/openedx/core/djangoapps/schedules/tests/test_content_highlights.py @@ -12,8 +12,8 @@ from openedx.core.djangoapps.schedules.content_highlights import ( ) from openedx.core.djangoapps.schedules.exceptions import CourseUpdateDoesNotExist from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/core/djangoapps/schedules/tests/test_resolvers.py b/openedx/core/djangoapps/schedules/tests/test_resolvers.py index 94ae1bcc3f..520aca2770 100644 --- a/openedx/core/djangoapps/schedules/tests/test_resolvers.py +++ b/openedx/core/djangoapps/schedules/tests/test_resolvers.py @@ -24,7 +24,7 @@ from openedx.core.djangoapps.schedules.resolvers import ( from openedx.core.djangoapps.schedules.tests.factories import ScheduleConfigFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory, SiteFactory from openedx.core.djangolib.testing.utils import CacheIsolationMixin, skip_unless_lms -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/core/djangoapps/schedules/tests/test_signals.py b/openedx/core/djangoapps/schedules/tests/test_signals.py index 77cfe2d16d..3ff9c3b3a1 100644 --- a/openedx/core/djangoapps/schedules/tests/test_signals.py +++ b/openedx/core/djangoapps/schedules/tests/test_signals.py @@ -12,15 +12,15 @@ from mock import patch from pytz import utc from testfixtures import LogCapture -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.models import DynamicUpgradeDeadlineConfiguration from openedx.core.djangoapps.schedules.models import ScheduleExperience from openedx.core.djangoapps.schedules.signals import CREATE_SCHEDULE_WAFFLE_FLAG, log from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseEnrollment -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/schedules/tests/test_utils.py b/openedx/core/djangoapps/schedules/tests/test_utils.py index 3d2711c0a3..f3c96d6535 100644 --- a/openedx/core/djangoapps/schedules/tests/test_utils.py +++ b/openedx/core/djangoapps/schedules/tests/test_utils.py @@ -5,7 +5,7 @@ Tests for schedules utils import datetime import ddt -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from mock import patch from pytz import utc @@ -13,7 +13,7 @@ from openedx.core.djangoapps.schedules.models import Schedule from openedx.core.djangoapps.schedules.tests.factories import ScheduleConfigFactory from openedx.core.djangoapps.schedules.utils import reset_self_paced_schedule from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/schedules/utils.py b/openedx/core/djangoapps/schedules/utils.py index 282e91b84c..26e8f18245 100644 --- a/openedx/core/djangoapps/schedules/utils.py +++ b/openedx/core/djangoapps/schedules/utils.py @@ -9,7 +9,6 @@ from django.db.models.functions import Greatest from django.db import transaction from openedx.core.djangoapps.schedules.models import Schedule -from student.models import CourseEnrollment LOG = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/site_configuration/tests/test_middleware.py b/openedx/core/djangoapps/site_configuration/tests/test_middleware.py index 124ba1f4a0..ff8ca7c34b 100644 --- a/openedx/core/djangoapps/site_configuration/tests/test_middleware.py +++ b/openedx/core/djangoapps/site_configuration/tests/test_middleware.py @@ -8,7 +8,7 @@ from django.test import TestCase from django.test.client import Client from django.test.utils import override_settings -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory, SiteFactory from openedx.core.djangolib.testing.utils import skip_unless_lms diff --git a/openedx/core/djangoapps/system_wide_roles/tests/test_models.py b/openedx/core/djangoapps/system_wide_roles/tests/test_models.py index 1c4168dbe8..1349605023 100644 --- a/openedx/core/djangoapps/system_wide_roles/tests/test_models.py +++ b/openedx/core/djangoapps/system_wide_roles/tests/test_models.py @@ -4,7 +4,7 @@ Tests for system wide roles' django models. from django.test import TestCase -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.system_wide_roles.models import SystemWideRole, SystemWideRoleAssignment diff --git a/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py b/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py index e83a2b38b8..edbc54297f 100644 --- a/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py +++ b/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py @@ -18,7 +18,7 @@ from lms.djangoapps.commerce.models import CommerceConfiguration from openedx.core.djangoapps.oauth_dispatch.models import ApplicationAccess from openedx.core.djangoapps.site_configuration.models import SiteConfiguration from openedx.core.djangoapps.theming.models import SiteTheme -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile LOG = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py b/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py index 52f3e47384..aec1e4451e 100644 --- a/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py +++ b/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py @@ -12,7 +12,7 @@ from django.test import TestCase from oauth2_provider.models import Application from openedx.core.djangoapps.oauth_dispatch.models import ApplicationAccess from openedx.core.djangoapps.theming.models import SiteTheme -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile SITES = ["site_a", "site_b"] MANAGEMENT_COMMAND_PATH = "openedx.core.djangoapps.theming.management.commands.create_sites_and_configurations." diff --git a/openedx/core/djangoapps/theming/template_loaders.py b/openedx/core/djangoapps/theming/template_loaders.py index 87991682fa..803b2d27d5 100644 --- a/openedx/core/djangoapps/theming/template_loaders.py +++ b/openedx/core/djangoapps/theming/template_loaders.py @@ -5,7 +5,7 @@ Theming aware template loaders. from django.template.loaders.filesystem import Loader as FilesystemLoader -from edxmako.makoloader import MakoLoader +from common.djangoapps.edxmako.makoloader import MakoLoader from openedx.core.djangoapps.theming.helpers import get_all_theme_template_dirs, get_current_request, get_current_theme diff --git a/openedx/core/djangoapps/theming/tests/test_middleware.py b/openedx/core/djangoapps/theming/tests/test_middleware.py index 1084ca942c..97eff107b1 100644 --- a/openedx/core/djangoapps/theming/tests/test_middleware.py +++ b/openedx/core/djangoapps/theming/tests/test_middleware.py @@ -8,7 +8,7 @@ from django.contrib.sites.models import Site from django.test import RequestFactory, TestCase, override_settings from openedx.core.djangoapps.theming.middleware import CurrentSiteThemeMiddleware -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..views import set_user_preview_site_theme diff --git a/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py b/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py index 117fa438e9..eb5a8839c2 100644 --- a/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py +++ b/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py @@ -10,7 +10,7 @@ from django.urls import reverse from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme from openedx.core.djangolib.testing.utils import skip_unless_cms, skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @skip_unless_lms diff --git a/openedx/core/djangoapps/theming/tests/test_util.py b/openedx/core/djangoapps/theming/tests/test_util.py index 8c61eab160..001827ecb4 100644 --- a/openedx/core/djangoapps/theming/tests/test_util.py +++ b/openedx/core/djangoapps/theming/tests/test_util.py @@ -13,7 +13,7 @@ from django.conf import settings from django.contrib.sites.models import Site from mock import patch -import edxmako +from common.djangoapps import edxmako from openedx.core.djangoapps.theming.models import SiteTheme diff --git a/openedx/core/djangoapps/theming/tests/test_views.py b/openedx/core/djangoapps/theming/tests/test_views.py index 48f885c405..89af8f2c1b 100644 --- a/openedx/core/djangoapps/theming/tests/test_views.py +++ b/openedx/core/djangoapps/theming/tests/test_views.py @@ -10,7 +10,7 @@ from django.test import TestCase from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory from openedx.core.djangoapps.theming.middleware import CurrentSiteThemeMiddleware -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory THEMING_ADMIN_URL = '/theming/admin' TEST_THEME_NAME = 'test-theme' diff --git a/openedx/core/djangoapps/theming/views.py b/openedx/core/djangoapps/theming/views.py index f9cd0af0bf..af7c4e6dda 100644 --- a/openedx/core/djangoapps/theming/views.py +++ b/openedx/core/djangoapps/theming/views.py @@ -19,7 +19,7 @@ from openedx.core.djangoapps.user_api.preferences.api import ( set_user_preference ) from openedx.core.djangoapps.util.user_messages import PageLevelMessages -from student.roles import GlobalStaff +from common.djangoapps.student.roles import GlobalStaff from .helpers import theme_exists from .models import SiteTheme diff --git a/openedx/core/djangoapps/user_api/accounts/api.py b/openedx/core/djangoapps/user_api/accounts/api.py index 62d341c8a6..276f16e4f2 100644 --- a/openedx/core/djangoapps/user_api/accounts/api.py +++ b/openedx/core/djangoapps/user_api/accounts/api.py @@ -15,16 +15,16 @@ from django.utils.translation import override as override_language from django.utils.translation import ugettext as _ from pytz import UTC from six import text_type # pylint: disable=ungrouped-imports -from student import views as student_views -from student.models import ( +from common.djangoapps.student import views as student_views +from common.djangoapps.student.models import ( AccountRecovery, User, UserProfile, email_exists_or_retired, username_exists_or_retired ) -from util.model_utils import emit_setting_changed_event -from util.password_policy_validators import validate_password +from common.djangoapps.util.model_utils import emit_setting_changed_event +from common.djangoapps.util.password_policy_validators import validate_password from openedx.core.djangoapps.user_api import accounts, errors, helpers from openedx.core.djangoapps.user_api.errors import ( diff --git a/openedx/core/djangoapps/user_api/accounts/image_helpers.py b/openedx/core/djangoapps/user_api/accounts/image_helpers.py index 40128af60a..a21fa88fd8 100644 --- a/openedx/core/djangoapps/user_api/accounts/image_helpers.py +++ b/openedx/core/djangoapps/user_api/accounts/image_helpers.py @@ -11,7 +11,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.core.files.storage import get_storage_class from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile from ..errors import UserNotFound diff --git a/openedx/core/djangoapps/user_api/accounts/serializers.py b/openedx/core/djangoapps/user_api/accounts/serializers.py index bdf7cd8aeb..390e16bf8b 100644 --- a/openedx/core/djangoapps/user_api/accounts/serializers.py +++ b/openedx/core/djangoapps/user_api/accounts/serializers.py @@ -14,14 +14,14 @@ from django.urls import reverse from rest_framework import serializers from six import text_type -from student.models import UserPasswordToggleHistory +from common.djangoapps.student.models import UserPasswordToggleHistory from lms.djangoapps.badges.utils import badges_enabled from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_api import errors from openedx.core.djangoapps.user_api.accounts.utils import is_secondary_email_feature_enabled from openedx.core.djangoapps.user_api.models import RetirementState, UserPreference, UserRetirementStatus from openedx.core.djangoapps.user_api.serializers import ReadOnlyFieldsSerializerMixin -from student.models import LanguageProficiency, SocialLink, UserProfile +from common.djangoapps.student.models import LanguageProficiency, SocialLink, UserProfile from . import ( ACCOUNT_VISIBILITY_PREF_KEY, diff --git a/openedx/core/djangoapps/user_api/accounts/settings_views.py b/openedx/core/djangoapps/user_api/accounts/settings_views.py index f40a0da71f..fa1b30d9cf 100644 --- a/openedx/core/djangoapps/user_api/accounts/settings_views.py +++ b/openedx/core/djangoapps/user_api/accounts/settings_views.py @@ -14,8 +14,8 @@ from django.utils.translation import ugettext as _ from django.views.decorators.http import require_http_methods from django_countries import countries -import third_party_auth -from edxmako.shortcuts import render_to_response +from common.djangoapps import third_party_auth +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.commerce.models import CommerceConfiguration from lms.djangoapps.commerce.utils import EcommerceService from openedx.core.djangoapps.commerce.utils import ecommerce_api_client @@ -32,9 +32,9 @@ from openedx.core.lib.edx_api_utils import get_edx_api_data from openedx.core.lib.time_zone_utils import TIME_ZONE_CHOICES from openedx.features.enterprise_support.api import enterprise_customer_for_request from openedx.features.enterprise_support.utils import update_account_settings_context_for_enterprise -from student.models import UserProfile -from third_party_auth import pipeline -from util.date_utils import strftime_localized +from common.djangoapps.student.models import UserProfile +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.util.date_utils import strftime_localized log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py b/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py index 7d20969953..9dab0717b1 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py @@ -12,8 +12,8 @@ from social_django.models import UserSocialAuth from openedx.core.djangoapps.enrollments import api from openedx.core.djangoapps.user_api.models import RetirementState, UserRetirementStatus -from student.models import get_retired_email_by_email, get_retired_username_by_username -from student.tests.factories import UserFactory +from common.djangoapps.student.models import get_retired_email_by_email, get_retired_username_by_username +from common.djangoapps.student.tests.factories import UserFactory from ..views import AccountRetirementView diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py index f0eac87b1c..bc3f1789d5 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py @@ -19,15 +19,15 @@ from django.urls import reverse from mock import Mock, patch from six import iteritems from social_django.models import UserSocialAuth -from student.models import ( +from common.djangoapps.student.models import ( AccountRecovery, PendingEmailChange, PendingSecondaryEmailChange, UserProfile ) -from student.tests.factories import UserFactory -from student.tests.tests import UserSettingsEventTestMixin -from student.views.management import activate_secondary_email +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.student.tests.tests import UserSettingsEventTestMixin +from common.djangoapps.student.views.management import activate_secondary_email from openedx.core.djangoapps.ace_common.tests.mixins import EmailTemplateTagMixin from openedx.core.djangoapps.user_api.accounts import PRIVATE_VISIBILITY @@ -80,7 +80,7 @@ class CreateAccountMixin(object): @skip_unless_lms @ddt.ddt -@patch('student.views.management.render_to_response', Mock(side_effect=mock_render_to_response, autospec=True)) +@patch('common.djangoapps.student.views.management.render_to_response', Mock(side_effect=mock_render_to_response, autospec=True)) class TestAccountApi(UserSettingsEventTestMixin, EmailTemplateTagMixin, CreateAccountMixin, RetirementTestCase): """ These tests specifically cover the parts of the API methods that are not covered by test_views.py. @@ -366,7 +366,7 @@ class TestAccountApi(UserSettingsEventTestMixin, EmailTemplateTagMixin, CreateAc self.assertIn("Full Name cannot contain the following characters: < >", field_errors["name"]["user_message"]) @patch('django.core.mail.EmailMultiAlternatives.send') - @patch('student.views.management.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True)) + @patch('common.djangoapps.student.views.management.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True)) def test_update_sending_email_fails(self, send_mail): """Test what happens if all validation checks pass, but sending the email for email change fails.""" send_mail.side_effect = [Exception, None] diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py b/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py index fb9b6715b0..5d42a89547 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py @@ -11,7 +11,7 @@ from mock import patch from pytz import UTC from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from six import text_type from ..image_helpers import get_profile_image_urls_for_user diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_models.py b/openedx/core/djangoapps/user_api/accounts/tests/test_models.py index b64abff7d5..c216a0ac55 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_models.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_models.py @@ -11,8 +11,8 @@ from openedx.core.djangoapps.user_api.models import ( UserRetirementRequest, UserRetirementStatus ) -from student.models import get_retired_email_by_email, get_retired_username_by_username -from student.tests.factories import UserFactory +from common.djangoapps.student.models import get_retired_email_by_email, get_retired_username_by_username +from common.djangoapps.student.tests.factories import UserFactory from .retirement_helpers import setup_retirement_states # pylint: disable=unused-import diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py b/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py index 16cc0e8a60..44d6cf2bf7 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py @@ -6,7 +6,7 @@ Tests for User deactivation API permissions from django.test import RequestFactory, TestCase from openedx.core.djangoapps.user_api.accounts.permissions import CanDeactivateUser, CanRetireUser -from student.tests.factories import ContentTypeFactory, PermissionFactory, SuperuserFactory, UserFactory +from common.djangoapps.student.tests.factories import ContentTypeFactory, PermissionFactory, SuperuserFactory, UserFactory class CanDeactivateUserTest(TestCase): diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py index ab44772a3b..88e557fd5e 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py @@ -35,8 +35,8 @@ from social_django.models import UserSocialAuth from wiki.models import Article, ArticleRevision from wiki.models.pluginbase import RevisionPlugin, RevisionPluginRevision -from entitlements.models import CourseEntitlementSupportDetail -from entitlements.tests.factories import CourseEntitlementFactory +from common.djangoapps.entitlements.models import CourseEntitlementSupportDetail +from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory from openedx.core.djangoapps.api_admin.models import ApiAccessRequest from openedx.core.djangoapps.course_groups.models import CourseUserGroup, UnregisteredLearnerCohortAssignments from openedx.core.djangoapps.credit.models import ( @@ -56,7 +56,7 @@ from openedx.core.djangoapps.user_api.models import ( UserRetirementPartnerReportingStatus, UserRetirementStatus ) -from student.models import ( +from common.djangoapps.student.models import ( AccountRecovery, CourseEnrollment, CourseEnrollmentAllowed, @@ -69,7 +69,7 @@ from student.models import ( get_retired_email_by_email, get_retired_username_by_username ) -from student.tests.factories import ( +from common.djangoapps.student.tests.factories import ( AccountRecoveryFactory, ContentTypeFactory, CourseEnrollmentAllowedFactory, diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py b/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py index bdd0913582..72b69b99ed 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py @@ -10,8 +10,8 @@ from django.test.client import RequestFactory from testfixtures import LogCapture from openedx.core.djangoapps.user_api.accounts.serializers import UserReadOnlySerializer -from student.models import UserProfile -from student.tests.factories import UserFactory +from common.djangoapps.student.models import UserProfile +from common.djangoapps.student.tests.factories import UserFactory LOGGER_NAME = "openedx.core.djangoapps.user_api.accounts.serializers" diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py index f1778123cf..840028988c 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py @@ -26,8 +26,8 @@ from openedx.core.djangoapps.user_api.accounts.toggles import REDIRECT_TO_ACCOUN from openedx.core.djangoapps.user_api.tests.factories import UserPreferenceFactory from openedx.core.djangolib.testing.utils import skip_unless_lms from openedx.features.enterprise_support.utils import get_enterprise_readonly_account_fields -from student.tests.factories import UserFactory -from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.tests.testutil import ThirdPartyAuthTestMixin @skip_unless_lms diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py b/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py index 79432fd45a..b1e7d73a61 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py @@ -9,8 +9,8 @@ from django.test.utils import override_settings from openedx.core.djangoapps.user_api.accounts.utils import retrieve_last_sitewide_block_completed from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py index 0d6849d07d..f789f1eea7 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py @@ -25,8 +25,8 @@ from openedx.core.djangoapps.user_api.accounts import ACCOUNT_VISIBILITY_PREF_KE from openedx.core.djangoapps.user_api.models import UserPreference from openedx.core.djangoapps.user_api.preferences.api import set_user_preference from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms -from student.models import PendingEmailChange, UserProfile -from student.tests.factories import TEST_PASSWORD, UserFactory +from common.djangoapps.student.models import PendingEmailChange, UserProfile +from common.djangoapps.student.tests.factories import TEST_PASSWORD, UserFactory from .. import ALL_USERS_VISIBILITY, CUSTOM_VISIBILITY, PRIVATE_VISIBILITY @@ -792,7 +792,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): ) self.assertEqual("Valid e-mail address required.", field_errors["email"]["user_message"]) - @mock.patch('student.views.management.do_email_change_request') + @mock.patch('common.djangoapps.student.views.management.do_email_change_request') def test_patch_duplicate_email(self, do_email_change_request): """ Test that same success response will be sent to user even if the given email already used. @@ -950,7 +950,7 @@ class TestAccountAPITransactions(TransactionTestCase): self.user = UserFactory.create(password=TEST_PASSWORD) self.url = reverse("accounts_api", kwargs={'username': self.user.username}) - @mock.patch('student.views.do_email_change_request') + @mock.patch('common.djangoapps.student.views.do_email_change_request') def test_update_account_settings_rollback(self, mock_email_change): """ Verify that updating account settings is transactional when a failure happens. diff --git a/openedx/core/djangoapps/user_api/accounts/tests/testutils.py b/openedx/core/djangoapps/user_api/accounts/tests/testutils.py index dad9eb76e1..ad04da509f 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/testutils.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/testutils.py @@ -5,7 +5,7 @@ Utility functions, constants, etc. for testing. from openedx.core.djangoapps.user_api.accounts import EMAIL_MAX_LENGTH, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH -from util.password_policy_validators import DEFAULT_MAX_PASSWORD_LENGTH +from common.djangoapps.util.password_policy_validators import DEFAULT_MAX_PASSWORD_LENGTH INVALID_NAMES = [ None, diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index 0719ebe217..27ea1bdc1f 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -39,7 +39,7 @@ from social_django.models import UserSocialAuth from wiki.models import ArticleRevision from wiki.models.pluginbase import RevisionPluginRevision -from entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.models import CourseEntitlement from openedx.core.djangoapps.ace_common.template_context import get_base_template_context from openedx.core.djangoapps.api_admin.models import ApiAccessRequest from openedx.core.djangoapps.course_groups.models import UnregisteredLearnerCohortAssignments @@ -52,7 +52,7 @@ from openedx.core.djangoapps.user_authn.exceptions import AuthFailedError from openedx.core.djangolib.oauth2_retirement_utils import retire_dot_oauth2_models from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser from openedx.core.lib.api.parsers import MergePatchParser -from student.models import ( +from common.djangoapps.student.models import ( AccountRecovery, CourseEnrollment, CourseEnrollmentAllowed, diff --git a/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py b/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py index cd115cd8fe..37496fa620 100644 --- a/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py @@ -7,7 +7,7 @@ from django.test import TestCase from opaque_keys.edx.locator import CourseLocator from openedx.core.djangoapps.user_api.course_tag import api as course_tag_api -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class TestCourseTagAPI(TestCase): diff --git a/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py b/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py index a038b1f245..b7529633b9 100644 --- a/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py +++ b/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py @@ -22,12 +22,12 @@ from integrated_channels.sap_success_factors.models import SapSuccessFactorsLear from opaque_keys.edx.keys import CourseKey from pytz import UTC -from entitlements.models import CourseEntitlement, CourseEntitlementSupportDetail +from common.djangoapps.entitlements.models import CourseEntitlement, CourseEntitlementSupportDetail from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from openedx.core.djangoapps.course_groups.models import CourseUserGroup, UnregisteredLearnerCohortAssignments from openedx.core.djangoapps.profile_images.images import create_profile_images from openedx.core.djangoapps.profile_images.tests.helpers import make_image_file -from student.models import CourseEnrollment, CourseEnrollmentAllowed, PendingEmailChange, UserProfile +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed, PendingEmailChange, UserProfile from ...models import UserOrgTag diff --git a/openedx/core/djangoapps/user_api/management/commands/retire_user.py b/openedx/core/djangoapps/user_api/management/commands/retire_user.py index 7851cf1af6..7fc084e074 100644 --- a/openedx/core/djangoapps/user_api/management/commands/retire_user.py +++ b/openedx/core/djangoapps/user_api/management/commands/retire_user.py @@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand, CommandError from django.db import transaction from social_django.models import UserSocialAuth -from student.models import AccountRecovery, Registration, get_retired_email_by_email +from common.djangoapps.student.models import AccountRecovery, Registration, get_retired_email_by_email from openedx.core.djangolib.oauth2_retirement_utils import retire_dot_oauth2_models from ...models import UserRetirementStatus diff --git a/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py b/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py index 7dcb7bd47b..6cf8802893 100644 --- a/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py +++ b/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py @@ -18,8 +18,8 @@ from edx_rest_api_client.client import EdxRestApiClient from slumber.exceptions import HttpClientError, HttpServerError from openedx.core.djangoapps.site_configuration.models import SiteConfiguration -from student.models import UserAttribute -from util.query import use_read_replica_if_available +from common.djangoapps.student.models import UserAttribute +from common.djangoapps.util.query import use_read_replica_if_available HUBSPOT_API_BASE_URL = 'https://api.hubapi.com' diff --git a/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py b/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py index b55da7368e..61fe608b00 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py @@ -13,7 +13,7 @@ from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import ( setup_retirement_states ) from openedx.core.djangoapps.user_api.models import RetirementState, UserRetirementRequest, UserRetirementStatus -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory pytestmark = pytest.mark.django_db diff --git a/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py b/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py index 98597af576..6fae0b2f90 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py @@ -20,8 +20,8 @@ from openedx.core.djangoapps.user_api.management.commands import email_opt_in_li from openedx.core.djangoapps.user_api.models import UserOrgTag from openedx.core.djangoapps.user_api.preferences.api import update_email_opt_in from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseEnrollment -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py b/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py index 94d3eba39a..0944ec8234 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py @@ -10,7 +10,7 @@ from django.core.management import CommandError, call_command from openedx.core.djangoapps.user_api.management.commands.populate_retirement_states import START_STATE from openedx.core.djangoapps.user_api.models import RetirementState, UserRetirementStatus -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory pytestmark = pytest.mark.django_db diff --git a/openedx/core/djangoapps/user_api/management/tests/test_retire_user.py b/openedx/core/djangoapps/user_api/management/tests/test_retire_user.py index 46e5dcfc39..4c0a37108a 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_retire_user.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_retire_user.py @@ -12,7 +12,7 @@ from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import ( setup_retirement_states ) from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory pytestmark = pytest.mark.django_db diff --git a/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py b/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py index 2a966f48c9..01359e6630 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py @@ -16,8 +16,8 @@ from six.moves import range from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory from openedx.core.djangoapps.user_api.management.commands.sync_hubspot_contacts import Command as sync_command from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import UserAttribute, UserProfile -from student.tests.factories import UserFactory +from common.djangoapps.student.models import UserAttribute, UserProfile +from common.djangoapps.student.tests.factories import UserFactory @skip_unless_lms diff --git a/openedx/core/djangoapps/user_api/middleware.py b/openedx/core/djangoapps/user_api/middleware.py index 927ee7dc7d..95bb3d568d 100644 --- a/openedx/core/djangoapps/user_api/middleware.py +++ b/openedx/core/djangoapps/user_api/middleware.py @@ -9,7 +9,7 @@ from eventtracking import tracker from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from track.contexts import COURSE_REGEX +from common.djangoapps.track.contexts import COURSE_REGEX from .models import UserCourseTag diff --git a/openedx/core/djangoapps/user_api/models.py b/openedx/core/djangoapps/user_api/models.py index 673a6e7db0..ca2e28f7c8 100644 --- a/openedx/core/djangoapps/user_api/models.py +++ b/openedx/core/djangoapps/user_api/models.py @@ -22,14 +22,14 @@ from opaque_keys.edx.django.models import CourseKeyField from openedx.core.djangolib.model_mixins import DeletableByUserValue from openedx.core.lib.cache_utils import request_cached # pylint: disable=unused-import -from student.models import ( +from common.djangoapps.student.models import ( PendingEmailChange, Registration, UserProfile, get_retired_email_by_email, get_retired_username_by_username ) -from util.model_utils import emit_setting_changed_event, get_changed_fields_dict +from common.djangoapps.util.model_utils import emit_setting_changed_event, get_changed_fields_dict class RetirementStateError(Exception): diff --git a/openedx/core/djangoapps/user_api/preferences/api.py b/openedx/core/djangoapps/user_api/preferences/api.py index 3b3915a0f4..c52b198b31 100644 --- a/openedx/core/djangoapps/user_api/preferences/api.py +++ b/openedx/core/djangoapps/user_api/preferences/api.py @@ -15,8 +15,8 @@ from django_countries import countries from pytz import common_timezones, common_timezones_set, country_timezones from openedx.core.lib.time_zone_utils import get_display_time_zone -from student.models import User, UserProfile -from track import segment +from common.djangoapps.student.models import User, UserProfile +from common.djangoapps.track import segment from ..errors import ( CountryCodeError, diff --git a/openedx/core/djangoapps/user_api/preferences/tests/test_api.py b/openedx/core/djangoapps/user_api/preferences/tests/test_api.py index 2ed1de98b5..942d5eb486 100644 --- a/openedx/core/djangoapps/user_api/preferences/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/preferences/tests/test_api.py @@ -16,8 +16,8 @@ from pytz import common_timezones, utc from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.core.lib.time_zone_utils import get_display_time_zone -from student.models import UserProfile -from student.tests.factories import UserFactory +from common.djangoapps.student.models import UserProfile +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/user_api/preferences/tests/test_views.py b/openedx/core/djangoapps/user_api/preferences/tests/test_views.py index 33b6ceb750..19bd64665b 100644 --- a/openedx/core/djangoapps/user_api/preferences/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/preferences/tests/test_views.py @@ -14,7 +14,7 @@ from mock import patch from rest_framework.test import APIClient from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import TEST_PASSWORD, UserFactory +from common.djangoapps.student.tests.factories import TEST_PASSWORD, UserFactory from ...accounts.tests.test_views import UserAPITestCase from ..api import set_user_preference diff --git a/openedx/core/djangoapps/user_api/tests/factories.py b/openedx/core/djangoapps/user_api/tests/factories.py index b1413bd215..ff8a18fa13 100644 --- a/openedx/core/djangoapps/user_api/tests/factories.py +++ b/openedx/core/djangoapps/user_api/tests/factories.py @@ -5,7 +5,7 @@ from factory import SubFactory from factory.django import DjangoModelFactory from opaque_keys.edx.locator import CourseLocator -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..models import UserCourseTag, UserOrgTag, UserPreference diff --git a/openedx/core/djangoapps/user_api/tests/test_middleware.py b/openedx/core/djangoapps/user_api/tests/test_middleware.py index 55c578e260..70fe3bb069 100644 --- a/openedx/core/djangoapps/user_api/tests/test_middleware.py +++ b/openedx/core/djangoapps/user_api/tests/test_middleware.py @@ -6,7 +6,7 @@ from django.test import TestCase from django.test.client import RequestFactory from mock import Mock, patch -from student.tests.factories import AnonymousUserFactory, UserFactory +from common.djangoapps.student.tests.factories import AnonymousUserFactory, UserFactory from ..middleware import UserTagsEventContextMiddleware from ..tests.factories import UserCourseTagFactory diff --git a/openedx/core/djangoapps/user_api/tests/test_models.py b/openedx/core/djangoapps/user_api/tests/test_models.py index 361ce05700..4206647d6d 100644 --- a/openedx/core/djangoapps/user_api/tests/test_models.py +++ b/openedx/core/djangoapps/user_api/tests/test_models.py @@ -6,8 +6,8 @@ Test UserPreferenceModel and UserPreference events from django.db import IntegrityError from django.test import TestCase -from student.tests.factories import UserFactory -from student.tests.tests import UserSettingsEventTestMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.student.tests.tests import UserSettingsEventTestMixin from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py b/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py index 8098f92a53..1b45831687 100644 --- a/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py +++ b/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py @@ -11,7 +11,7 @@ from mock import patch from six.moves import range from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme, UserPartitionError -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.partitions.partitions import Group, UserPartition from xmodule.partitions.tests.test_partitions import PartitionTestCase diff --git a/openedx/core/djangoapps/user_api/tests/test_views.py b/openedx/core/djangoapps/user_api/tests/test_views.py index 7e95cf803b..b1eee633f4 100644 --- a/openedx/core/djangoapps/user_api/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/tests/test_views.py @@ -27,14 +27,14 @@ from openedx.core.djangoapps.site_configuration.tests.test_util import with_site from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.core.lib.api.test_utils import TEST_API_KEY, ApiTestCase from openedx.core.lib.time_zone_utils import get_display_time_zone -from student.tests.factories import UserFactory -from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline -from third_party_auth.tests.utils import ( +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline +from common.djangoapps.third_party_auth.tests.utils import ( ThirdPartyOAuthTestMixin, ThirdPartyOAuthTestMixinFacebook, ThirdPartyOAuthTestMixinGoogle ) -from util.password_policy_validators import ( +from common.djangoapps.util.password_policy_validators import ( create_validator_config, password_validators_instruction_texts, password_validators_restrictions diff --git a/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py b/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py index 309d588a1d..93678ddea4 100644 --- a/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py @@ -12,7 +12,7 @@ from django.urls import reverse from lms.djangoapps.verify_student.models import ManualVerification, SoftwareSecurePhotoVerification, SSOVerification from lms.djangoapps.verify_student.tests.factories import SSOVerificationFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory FROZEN_TIME = '2015-01-01' VERIFY_STUDENT = {'DAYS_GOOD_FOR': 365} diff --git a/openedx/core/djangoapps/user_api/views.py b/openedx/core/djangoapps/user_api/views.py index 37400f42f9..d00cd76917 100644 --- a/openedx/core/djangoapps/user_api/views.py +++ b/openedx/core/djangoapps/user_api/views.py @@ -30,8 +30,8 @@ from openedx.core.djangoapps.user_api.serializers import ( UserSerializer ) from openedx.core.lib.api.permissions import ApiKeyHeaderPermission -from student.helpers import AccountValidationError -from util.json_request import JsonResponse +from common.djangoapps.student.helpers import AccountValidationError +from common.djangoapps.util.json_request import JsonResponse class UserViewSet(viewsets.ReadOnlyModelViewSet): diff --git a/openedx/core/djangoapps/user_authn/api/tests/test_views.py b/openedx/core/djangoapps/user_authn/api/tests/test_views.py index 3634c1f063..12d18e3e63 100644 --- a/openedx/core/djangoapps/user_authn/api/tests/test_views.py +++ b/openedx/core/djangoapps/user_authn/api/tests/test_views.py @@ -9,8 +9,8 @@ from rest_framework.test import APITestCase from six.moves.urllib.parse import urlencode from openedx.core.djangolib.testing.utils import skip_unless_lms -from third_party_auth import pipeline -from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline @skip_unless_lms diff --git a/openedx/core/djangoapps/user_authn/cookies.py b/openedx/core/djangoapps/user_authn/cookies.py index 159084b7ee..8afb219042 100644 --- a/openedx/core/djangoapps/user_authn/cookies.py +++ b/openedx/core/djangoapps/user_authn/cookies.py @@ -22,7 +22,6 @@ from openedx.core.djangoapps.oauth_dispatch.api import create_dot_access_token from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_from_token from openedx.core.djangoapps.user_api.accounts.utils import retrieve_last_sitewide_block_completed from openedx.core.djangoapps.user_authn.exceptions import AuthFailedError -from student.models import CourseEnrollment log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/user_authn/tests/test_cookies.py b/openedx/core/djangoapps/user_authn/tests/test_cookies.py index ed34799ed3..95f11d1241 100644 --- a/openedx/core/djangoapps/user_authn/tests/test_cookies.py +++ b/openedx/core/djangoapps/user_authn/tests/test_cookies.py @@ -14,8 +14,7 @@ from openedx.core.djangoapps.user_api.accounts.utils import retrieve_last_sitewi from openedx.core.djangoapps.user_authn import cookies as cookies_api from openedx.core.djangoapps.user_authn.tests.utils import setup_login_oauth_client from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseEnrollment -from student.tests.factories import AnonymousUserFactory, UserFactory +from common.djangoapps.student.tests.factories import AnonymousUserFactory, UserFactory class CookieTests(TestCase): diff --git a/openedx/core/djangoapps/user_authn/tests/utils.py b/openedx/core/djangoapps/user_authn/tests/utils.py index d2f767e920..74aae437d9 100644 --- a/openedx/core/djangoapps/user_authn/tests/utils.py +++ b/openedx/core/djangoapps/user_authn/tests/utils.py @@ -13,7 +13,7 @@ from rest_framework import status from openedx.core.djangoapps.oauth_dispatch.adapters.dot import DOTAdapter from openedx.core.djangoapps.oauth_dispatch.jwt import _create_jwt -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class AuthType(Enum): diff --git a/openedx/core/djangoapps/user_authn/utils.py b/openedx/core/djangoapps/user_authn/utils.py index cfc2f5846d..5a0e83062d 100644 --- a/openedx/core/djangoapps/user_authn/utils.py +++ b/openedx/core/djangoapps/user_authn/utils.py @@ -13,9 +13,9 @@ from django.utils.translation import ugettext as _ from oauth2_provider.models import Application from six.moves.urllib.parse import urlparse # pylint: disable=import-error -import third_party_auth +from common.djangoapps import third_party_auth from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from third_party_auth import pipeline +from common.djangoapps.third_party_auth import pipeline def third_party_auth_context(request, redirect_to, tpa_hint=None): diff --git a/openedx/core/djangoapps/user_authn/views/auto_auth.py b/openedx/core/djangoapps/user_authn/views/auto_auth.py index 6e4a9a8bc3..11c7d258a2 100644 --- a/openedx/core/djangoapps/user_authn/views/auto_auth.py +++ b/openedx/core/djangoapps/user_authn/views/auto_auth.py @@ -21,13 +21,13 @@ from openedx.core.djangoapps.django_comment_common.models import assign_role from openedx.core.djangoapps.user_authn.utils import generate_password from openedx.core.djangoapps.user_authn.views.registration_form import AccountCreationForm from openedx.features.course_experience import course_home_url_name -from student.helpers import ( +from common.djangoapps.student.helpers import ( AccountValidationError, authenticate_new_user, create_or_set_user_attribute_created_on_site, do_create_account ) -from student.models import ( +from common.djangoapps.student.models import ( CourseAccessRole, CourseEnrollment, Registration, @@ -35,7 +35,7 @@ from student.models import ( anonymous_id_for_user, create_comments_service_user ) -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse def auto_auth(request): # pylint: disable=too-many-statements diff --git a/openedx/core/djangoapps/user_authn/views/login.py b/openedx/core/djangoapps/user_authn/views/login.py index 3c8ad24219..255265f763 100644 --- a/openedx/core/djangoapps/user_authn/views/login.py +++ b/openedx/core/djangoapps/user_authn/views/login.py @@ -28,7 +28,7 @@ from ratelimit.decorators import ratelimit from ratelimitbackend.exceptions import RateLimitException from rest_framework.views import APIView -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.password_policy import compliance as password_policy_compliance from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_authn.views.login_form import get_login_session_form @@ -40,14 +40,14 @@ from openedx.core.djangoapps.user_authn.views.password_reset import send_passwor from openedx.core.djangoapps.user_authn.config.waffle import ENABLE_LOGIN_USING_THIRDPARTY_AUTH_ONLY from openedx.core.djangolib.markup import HTML, Text from openedx.core.lib.api.view_utils import require_post_params -from student.helpers import get_next_url_for_login_page -from student.models import LoginFailures, AllowedAuthUser, UserProfile -from student.views import compose_and_send_activation_email -from third_party_auth import pipeline, provider -import third_party_auth -from track import segment -from util.json_request import JsonResponse -from util.password_policy_validators import normalize_password +from common.djangoapps.student.helpers import get_next_url_for_login_page +from common.djangoapps.student.models import LoginFailures, AllowedAuthUser, UserProfile +from common.djangoapps.student.views import compose_and_send_activation_email +from common.djangoapps.third_party_auth import pipeline, provider +from common.djangoapps import third_party_auth +from common.djangoapps.track import segment +from common.djangoapps.util.json_request import JsonResponse +from common.djangoapps.util.password_policy_validators import normalize_password log = logging.getLogger("edx.student") AUDIT_LOG = logging.getLogger("audit") diff --git a/openedx/core/djangoapps/user_authn/views/login_form.py b/openedx/core/djangoapps/user_authn/views/login_form.py index 25a9002e21..b9dd29b175 100644 --- a/openedx/core/djangoapps/user_authn/views/login_form.py +++ b/openedx/core/djangoapps/user_authn/views/login_form.py @@ -14,8 +14,8 @@ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods from ratelimit.decorators import ratelimit -import third_party_auth -from edxmako.shortcuts import render_to_response +from common.djangoapps import third_party_auth +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_api import accounts from openedx.core.djangoapps.user_api.accounts.utils import ( @@ -36,10 +36,10 @@ from openedx.features.enterprise_support.utils import ( handle_enterprise_cookies_for_logistration, update_logistration_context_for_enterprise ) -from student.helpers import get_next_url_for_login_page -from third_party_auth import pipeline -from third_party_auth.decorators import xframe_allow_whitelisted -from util.password_policy_validators import DEFAULT_MAX_PASSWORD_LENGTH +from common.djangoapps.student.helpers import get_next_url_for_login_page +from common.djangoapps.third_party_auth import pipeline +from common.djangoapps.third_party_auth.decorators import xframe_allow_whitelisted +from common.djangoapps.util.password_policy_validators import DEFAULT_MAX_PASSWORD_LENGTH log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/user_authn/views/logout.py b/openedx/core/djangoapps/user_authn/views/logout.py index 47f0b89e17..06363fa7fc 100644 --- a/openedx/core/djangoapps/user_authn/views/logout.py +++ b/openedx/core/djangoapps/user_authn/views/logout.py @@ -13,7 +13,7 @@ from six.moves.urllib.parse import parse_qs, urlsplit, urlunsplit # pylint: dis from openedx.core.djangoapps.user_authn.cookies import delete_logged_in_cookies from openedx.core.djangoapps.user_authn.utils import is_safe_login_or_logout_redirect -from third_party_auth import pipeline as tpa_pipeline +from common.djangoapps.third_party_auth import pipeline as tpa_pipeline class LogoutView(TemplateView): diff --git a/openedx/core/djangoapps/user_authn/views/password_reset.py b/openedx/core/djangoapps/user_authn/views/password_reset.py index 76990c3b8d..cf6f8548ed 100644 --- a/openedx/core/djangoapps/user_authn/views/password_reset.py +++ b/openedx/core/djangoapps/user_authn/views/password_reset.py @@ -27,7 +27,7 @@ from eventtracking import tracker from ratelimit.decorators import ratelimit from rest_framework.views import APIView -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from openedx.core.djangoapps.ace_common.template_context import get_base_template_context from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangoapps.oauth_dispatch.api import destroy_oauth_tokens @@ -41,10 +41,10 @@ from openedx.core.djangoapps.user_api.models import UserRetirementRequest from openedx.core.djangoapps.user_api.preferences.api import get_user_preference from openedx.core.djangoapps.user_authn.message_types import PasswordReset, PasswordResetSuccess from openedx.core.djangolib.markup import HTML -from student.forms import send_account_recovery_email_for_user -from student.models import AccountRecovery -from util.json_request import JsonResponse -from util.password_policy_validators import normalize_password, validate_password +from common.djangoapps.student.forms import send_account_recovery_email_for_user +from common.djangoapps.student.models import AccountRecovery +from common.djangoapps.util.json_request import JsonResponse +from common.djangoapps.util.password_policy_validators import normalize_password, validate_password POST_EMAIL_KEY = 'post:email' REAL_IP_KEY = 'openedx.core.djangoapps.util.ratelimit.real_ip' diff --git a/openedx/core/djangoapps/user_authn/views/register.py b/openedx/core/djangoapps/user_authn/views/register.py index 18674b186d..db72b48542 100644 --- a/openedx/core/djangoapps/user_authn/views/register.py +++ b/openedx/core/djangoapps/user_authn/views/register.py @@ -31,7 +31,7 @@ from six import text_type from social_core.exceptions import AuthAlreadyAssociated, AuthException from social_django import utils as social_utils -import third_party_auth +from common.djangoapps import third_party_auth # Note that this lives in LMS, so this dependency should be refactored. # TODO Have the discussions code subscribe to the REGISTER_USER signal instead. from common.djangoapps.student.helpers import get_next_url_for_login_page @@ -57,25 +57,25 @@ from openedx.core.djangoapps.user_authn.views.registration_form import ( RegistrationFormFactory, get_registration_extension_form ) -from student.helpers import ( +from common.djangoapps.student.helpers import ( AccountValidationError, authenticate_new_user, create_or_set_user_attribute_created_on_site, do_create_account ) -from student.models import ( +from common.djangoapps.student.models import ( RegistrationCookieConfiguration, UserAttribute, create_comments_service_user, email_exists_or_retired, username_exists_or_retired ) -from student.views import compose_and_send_activation_email -from third_party_auth import pipeline, provider -from third_party_auth.saml import SAP_SUCCESSFACTORS_SAML_KEY -from track import segment -from util.db import outer_atomic -from util.json_request import JsonResponse +from common.djangoapps.student.views import compose_and_send_activation_email +from common.djangoapps.third_party_auth import pipeline, provider +from common.djangoapps.third_party_auth.saml import SAP_SUCCESSFACTORS_SAML_KEY +from common.djangoapps.track import segment +from common.djangoapps.util.db import outer_atomic +from common.djangoapps.util.json_request import JsonResponse log = logging.getLogger("edx.student") AUDIT_LOG = logging.getLogger("audit") diff --git a/openedx/core/djangoapps/user_authn/views/registration_form.py b/openedx/core/djangoapps/user_authn/views/registration_form.py index fbc7ce5344..01e2e302a3 100644 --- a/openedx/core/djangoapps/user_authn/views/registration_form.py +++ b/openedx/core/djangoapps/user_authn/views/registration_form.py @@ -18,20 +18,20 @@ from django.urls import reverse from django.utils.translation import ugettext as _ from django_countries import countries -import third_party_auth -from edxmako.shortcuts import marketing_link +from common.djangoapps import third_party_auth +from common.djangoapps.edxmako.shortcuts import marketing_link from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_api import accounts from openedx.core.djangoapps.user_api.helpers import FormDescription from openedx.core.djangoapps.user_authn.utils import is_registration_api_v1 as is_api_v1 from openedx.core.djangolib.markup import HTML, Text from openedx.features.enterprise_support.api import enterprise_customer_for_request -from student.models import ( +from common.djangoapps.student.models import ( CourseEnrollmentAllowed, UserProfile, email_exists_or_retired, ) -from util.password_policy_validators import ( +from common.djangoapps.util.password_policy_validators import ( password_validators_instruction_texts, password_validators_restrictions, validate_password, diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py b/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py index d7020e55dc..84304665ae 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py @@ -19,8 +19,8 @@ from openedx.core.djangoapps.django_comment_common.models import ( Role ) from openedx.core.djangoapps.django_comment_common.utils import seed_permissions_roles -from student.models import CourseAccessRole, CourseEnrollment, UserProfile, anonymous_id_for_user -from util.testing import UrlResetMixin +from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment, UserProfile, anonymous_id_for_user +from common.djangoapps.util.testing import UrlResetMixin class AutoAuthTestCase(UrlResetMixin, TestCase): diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_login.py b/openedx/core/djangoapps/user_authn/views/tests/test_login.py index 99886392a5..91233681ac 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_login.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_login.py @@ -20,8 +20,7 @@ from django.test.utils import override_settings from django.urls import NoReverseMatch, reverse from edx_toggles.toggles.testutils import override_waffle_switch from mock import patch -from student.tests.factories import RegistrationFactory, UserFactory, UserProfileFactory -from util.password_policy_validators import DEFAULT_MAX_PASSWORD_LENGTH +from common.djangoapps.student.tests.factories import RegistrationFactory, UserFactory, UserProfileFactory from openedx.core.djangoapps.password_policy.compliance import ( NonCompliantPasswordException, @@ -38,6 +37,7 @@ from openedx.core.djangoapps.user_authn.views.login import ( from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.core.lib.api.test_utils import ApiTestCase +from common.djangoapps.util.password_policy_validators import DEFAULT_MAX_PASSWORD_LENGTH @ddt.ddt @@ -74,7 +74,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase): def test_login_success(self): response, mock_audit_log = self._login_response( - self.user_email, self.password, patched_audit_log='student.models.AUDIT_LOG' + self.user_email, self.password, patched_audit_log='common.djangoapps.student.models.AUDIT_LOG' ) self._assert_response(response, success=True) self._assert_audit_log(mock_audit_log, 'info', [u'Login success', self.user_email]) @@ -160,7 +160,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase): @patch.dict("django.conf.settings.FEATURES", {'SQUELCH_PII_IN_LOGS': True}) def test_login_success_no_pii(self): response, mock_audit_log = self._login_response( - self.user_email, self.password, patched_audit_log='student.models.AUDIT_LOG' + self.user_email, self.password, patched_audit_log='common.djangoapps.student.models.AUDIT_LOG' ) self._assert_response(response, success=True) self._assert_audit_log(mock_audit_log, 'info', [u'Login success']) @@ -172,7 +172,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase): self.user.save() response, mock_audit_log = self._login_response( - unicode_email, self.password, patched_audit_log='student.models.AUDIT_LOG' + unicode_email, self.password, patched_audit_log='common.djangoapps.student.models.AUDIT_LOG' ) self._assert_response(response, success=True) self._assert_audit_log(mock_audit_log, 'info', [u'Login success', unicode_email]) @@ -283,7 +283,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase): response, _ = self._login_response(self.user_email, self.password) self._assert_response(response, success=True) logout_url = reverse('logout') - with patch('student.models.AUDIT_LOG') as mock_audit_log: + with patch('common.djangoapps.student.models.AUDIT_LOG') as mock_audit_log: response = self.client.post(logout_url) self.assertEqual(response.status_code, 200) self._assert_audit_log(mock_audit_log, 'info', [u'Logout', u'test']) @@ -343,7 +343,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase): response, _ = self._login_response(self.user_email, self.password) self._assert_response(response, success=True) logout_url = reverse('logout') - with patch('student.models.AUDIT_LOG') as mock_audit_log: + with patch('common.djangoapps.student.models.AUDIT_LOG') as mock_audit_log: response = self.client.post(logout_url) self.assertEqual(response.status_code, 200) self._assert_audit_log(mock_audit_log, 'info', [u'Logout']) diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py b/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py index 8a5cc6d78f..a59da6d128 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py @@ -22,7 +22,7 @@ from django.utils.translation import ugettext as _ from freezegun import freeze_time from pytz import UTC -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.branding.api import get_privacy_url from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme_context @@ -30,8 +30,8 @@ from openedx.core.djangoapps.user_authn.views.login_form import login_and_regist from openedx.core.djangolib.js_utils import dump_js_escaped_json from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.testing.utils import skip_unless_lms -from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline -from util.testing import UrlResetMixin +from common.djangoapps.third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase @@ -367,7 +367,7 @@ class LoginAndRegistrationTest(ThirdPartyAuthTestMixin, UrlResetMixin, ModuleSto } pipeline_target = 'openedx.core.djangoapps.user_authn.views.login_form.third_party_auth.pipeline' with simulate_running_pipeline(pipeline_target, current_backend, **pipeline_response): - with mock.patch('edxmako.request_context.get_current_request', return_value=request): + with mock.patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=request): response = login_and_registration_form(request) expected_error_message = Text(_( diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_logout.py b/openedx/core/djangoapps/user_authn/views/tests/test_logout.py index 2ba360ab89..651ff7bb6d 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_logout.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_logout.py @@ -14,7 +14,7 @@ from django.test.utils import override_settings from django.urls import reverse from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_register.py b/openedx/core/djangoapps/user_authn/views/tests/test_register.py index 593a83a15f..2ca881337c 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_register.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_register.py @@ -52,15 +52,15 @@ from openedx.core.djangoapps.user_api.tests.test_views import UserAPITestCase from openedx.core.djangoapps.user_authn.views.register import REGISTRATION_FAILURE_LOGGING_FLAG from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.core.lib.api import test_utils -from student.helpers import authenticate_new_user -from student.tests.factories import UserFactory -from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline -from third_party_auth.tests.utils import ( +from common.djangoapps.student.helpers import authenticate_new_user +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.third_party_auth.tests.testutil import ThirdPartyAuthTestMixin, simulate_running_pipeline +from common.djangoapps.third_party_auth.tests.utils import ( ThirdPartyOAuthTestMixin, ThirdPartyOAuthTestMixinFacebook, ThirdPartyOAuthTestMixinGoogle ) -from util.password_policy_validators import ( +from common.djangoapps.util.password_policy_validators import ( DEFAULT_MAX_PASSWORD_LENGTH, create_validator_config, password_validators_instruction_texts, @@ -473,9 +473,15 @@ class RegistrationViewTestV1(ThirdPartyAuthTestMixin, UserAPITestCase): ) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), - create_validator_config('util.password_policy_validators.UppercaseValidator', {'min_upper': 3}), - create_validator_config('util.password_policy_validators.SymbolValidator', {'min_symbol': 1}), + create_validator_config( + 'common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 2} + ), + create_validator_config( + 'common.djangoapps.util.password_policy_validators.UppercaseValidator', {'min_upper': 3} + ), + create_validator_config( + 'common.djangoapps.util.password_policy_validators.SymbolValidator', {'min_symbol': 1} + ), ]) def test_register_form_password_complexity(self): no_extra_fields_setting = {} diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py index 494a604568..947a98c3da 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py @@ -37,13 +37,13 @@ from openedx.core.djangoapps.user_authn.views.password_reset import ( SETTING_CHANGE_INITIATED, password_reset, password_reset_logistration, PasswordResetConfirmWrapper) from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.tests.factories import TEST_PASSWORD, UserFactory -from student.tests.test_configuration_overrides import fake_get_value -from student.tests.test_email import mock_render_to_string -from student.models import AccountRecovery +from common.djangoapps.student.tests.factories import TEST_PASSWORD, UserFactory +from common.djangoapps.student.tests.test_configuration_overrides import fake_get_value +from common.djangoapps.student.tests.test_email import mock_render_to_string +from common.djangoapps.student.models import AccountRecovery -from util.password_policy_validators import create_validator_config -from util.testing import EventTestMixin +from common.djangoapps.util.password_policy_validators import create_validator_config +from common.djangoapps.util.testing import EventTestMixin ENABLE_LOGISTRATION_MICROFRONTEND = settings.FEATURES.copy() @@ -541,8 +541,12 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase): }) @override_settings(AUTH_PASSWORD_VALIDATORS=[ - create_validator_config('util.password_policy_validators.MinimumLengthValidator', {'min_length': 2}), - create_validator_config('util.password_policy_validators.MaximumLengthValidator', {'max_length': 10}) + create_validator_config( + 'common.djangoapps.util.password_policy_validators.MinimumLengthValidator', {'min_length': 2} + ), + create_validator_config( + 'common.djangoapps.util.password_policy_validators.MaximumLengthValidator', {'max_length': 10} + ), ]) @ddt.data( { diff --git a/openedx/core/djangoapps/util/row_delete.py b/openedx/core/djangoapps/util/row_delete.py index 7d60e1392b..2cfe51bd75 100644 --- a/openedx/core/djangoapps/util/row_delete.py +++ b/openedx/core/djangoapps/util/row_delete.py @@ -8,7 +8,7 @@ Following lines show how to use delete_rows(): import logging from openedx.core.djangoapps.util.row_delete import BaseDeletionCommand, delete_rows -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/util/testing.py b/openedx/core/djangoapps/util/testing.py index 24178f4aad..3ab1637c02 100644 --- a/openedx/core/djangoapps/util/testing.py +++ b/openedx/core/djangoapps/util/testing.py @@ -11,7 +11,7 @@ from openedx.core.djangoapps.django_comment_common.models import Role from openedx.core.djangoapps.django_comment_common.utils import seed_permissions_roles from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactory from openedx.core.lib.teams_config import TeamsConfig -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.partitions.partitions import Group, UserPartition diff --git a/openedx/core/djangoapps/util/tests/test_user_messages.py b/openedx/core/djangoapps/util/tests/test_user_messages.py index 8bfd6ab2b9..ffb2240fee 100644 --- a/openedx/core/djangoapps/util/tests/test_user_messages.py +++ b/openedx/core/djangoapps/util/tests/test_user_messages.py @@ -9,7 +9,7 @@ from django.test import RequestFactory, TestCase from common.test.utils import normalize_repr from openedx.core.djangolib.markup import HTML, Text -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..user_messages import PageLevelMessages, UserMessageType diff --git a/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py b/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py index ffcf963527..26dfb7cd57 100644 --- a/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py +++ b/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py @@ -7,7 +7,7 @@ from django.conf import settings from django.core.management.base import BaseCommand, CommandError from cms.djangoapps.contentstore.course_group_config import GroupConfiguration -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.course_groups.cohorts import CourseCohort from openedx.core.djangoapps.course_groups.models import CourseUserGroup, CourseUserGroupPartitionGroup from openedx.core.djangoapps.verified_track_content.models import ( diff --git a/openedx/core/djangoapps/verified_track_content/models.py b/openedx/core/djangoapps/verified_track_content/models.py index 0960106d06..5b54362365 100644 --- a/openedx/core/djangoapps/verified_track_content/models.py +++ b/openedx/core/djangoapps/verified_track_content/models.py @@ -24,7 +24,7 @@ from openedx.core.djangoapps.course_groups.cohorts import ( ) from openedx.core.djangoapps.verified_track_content.tasks import sync_cohort_with_mode from openedx.core.lib.cache_utils import request_cached -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/verified_track_content/partition_scheme.py b/openedx/core/djangoapps/verified_track_content/partition_scheme.py index 441921c360..651156ba94 100644 --- a/openedx/core/djangoapps/verified_track_content/partition_scheme.py +++ b/openedx/core/djangoapps/verified_track_content/partition_scheme.py @@ -9,14 +9,14 @@ import six from django.conf import settings from opaque_keys.edx.keys import CourseKey -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.masquerade import ( get_course_masquerade, get_masquerading_user_group, is_masquerading_as_specific_student ) from openedx.core.djangoapps.verified_track_content.models import VerifiedTrackCohortedCourse -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.partitions.partitions import Group, UserPartition LOGGER = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/verified_track_content/tasks.py b/openedx/core/djangoapps/verified_track_content/tasks.py index 7666494ccf..2335743df2 100644 --- a/openedx/core/djangoapps/verified_track_content/tasks.py +++ b/openedx/core/djangoapps/verified_track_content/tasks.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import User from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.course_groups.cohorts import add_user_to_cohort, get_cohort, get_cohort_by_name -from student.models import CourseEnrollment, CourseMode +from common.djangoapps.student.models import CourseEnrollment, CourseMode LOGGER = get_task_logger(__name__) diff --git a/openedx/core/djangoapps/verified_track_content/tests/test_models.py b/openedx/core/djangoapps/verified_track_content/tests/test_models.py index 0b97ea7c17..8a500bb2b6 100644 --- a/openedx/core/djangoapps/verified_track_content/tests/test_models.py +++ b/openedx/core/djangoapps/verified_track_content/tests/test_models.py @@ -18,8 +18,8 @@ from openedx.core.djangoapps.course_groups.cohorts import ( set_course_cohorted ) from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.models import CourseMode -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseMode +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py b/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py index 882ec05df5..9f364ef0a6 100644 --- a/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py +++ b/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py @@ -8,9 +8,9 @@ from datetime import datetime, timedelta import pytz import six -from course_modes.models import CourseMode -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from xmodule.partitions.partitions import MINIMUM_STATIC_PARTITION_ID, UserPartition, ReadOnlyUserPartitionError diff --git a/openedx/core/djangoapps/verified_track_content/tests/test_views.py b/openedx/core/djangoapps/verified_track_content/tests/test_views.py index 5ff6492000..5ceb73504b 100644 --- a/openedx/core/djangoapps/verified_track_content/tests/test_views.py +++ b/openedx/core/djangoapps/verified_track_content/tests/test_views.py @@ -10,7 +10,7 @@ from django.http import Http404 from django.test.client import RequestFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from student.tests.factories import UserFactory, AdminFactory +from common.djangoapps.student.tests.factories import UserFactory, AdminFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/verified_track_content/views.py b/openedx/core/djangoapps/verified_track_content/views.py index 3c362b470d..20d7196d87 100644 --- a/openedx/core/djangoapps/verified_track_content/views.py +++ b/openedx/core/djangoapps/verified_track_content/views.py @@ -8,7 +8,7 @@ from opaque_keys.edx.keys import CourseKey from lms.djangoapps.courseware.courses import get_course_with_access from openedx.core.djangoapps.verified_track_content.models import VerifiedTrackCohortedCourse -from util.json_request import JsonResponse, expect_json +from common.djangoapps.util.json_request import JsonResponse, expect_json @expect_json diff --git a/openedx/core/djangoapps/video_pipeline/tests/test_api.py b/openedx/core/djangoapps/video_pipeline/tests/test_api.py index 38b5f34074..2f025f7816 100644 --- a/openedx/core/djangoapps/video_pipeline/tests/test_api.py +++ b/openedx/core/djangoapps/video_pipeline/tests/test_api.py @@ -8,7 +8,7 @@ import ddt from django.test.testcases import TestCase from mock import Mock, patch from slumber.exceptions import HttpClientError -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.video_pipeline.api import update_3rd_party_transcription_service_credentials from openedx.core.djangoapps.video_pipeline.tests.mixins import VideoPipelineMixin diff --git a/openedx/core/djangoapps/waffle_utils/tests/test_views.py b/openedx/core/djangoapps/waffle_utils/tests/test_views.py index 49cd95f31b..3e35247e2b 100644 --- a/openedx/core/djangoapps/waffle_utils/tests/test_views.py +++ b/openedx/core/djangoapps/waffle_utils/tests/test_views.py @@ -9,7 +9,7 @@ from edx_toggles.toggles.testutils import override_waffle_flag from rest_framework.test import APIRequestFactory from waffle.testutils import override_switch -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from .. import WaffleFlag, WaffleFlagNamespace from ..views import ToggleStateView @@ -69,7 +69,7 @@ class ToggleStateViewTests(TestCase): { "name": "FEATURES['MILESTONES_APP']", "is_active": True, - "module": "util.milestones_helpers", + "module": "common.djangoapps.util.milestones_helpers", "class": "SettingDictToggle", }, response.data["django_settings"], diff --git a/openedx/core/djangoapps/xblock/runtime/runtime.py b/openedx/core/djangoapps/xblock/runtime/runtime.py index c92a6a0b9b..17d6204735 100644 --- a/openedx/core/djangoapps/xblock/runtime/runtime.py +++ b/openedx/core/djangoapps/xblock/runtime/runtime.py @@ -19,8 +19,8 @@ from xblock.field_data import SplitFieldData from xblock.fields import Scope from xblock.runtime import KvsFieldData, MemoryIdManager, Runtime -import track.contexts -import track.views +from common.djangoapps.track import contexts as track_contexts +from common.djangoapps.track import views as track_views from lms.djangoapps.courseware.model_data import DjangoKeyValueStore, FieldDataCache from lms.djangoapps.grades.api import signals as grades_signals from openedx.core.djangoapps.xblock.apps import get_xblock_app_config @@ -29,7 +29,7 @@ from openedx.core.djangoapps.xblock.runtime.ephemeral_field_data import Ephemera from openedx.core.djangoapps.xblock.runtime.mixin import LmsBlockMixin from openedx.core.djangoapps.xblock.utils import get_xblock_id_for_anonymous_user from openedx.core.lib.xblock_utils import wrap_fragment, xblock_local_resource_url -from static_replace import process_static_urls +from common.djangoapps.static_replace import process_static_urls from xmodule.errortracker import make_error_tracker from xmodule.modulestore.django import ModuleI18nService @@ -47,7 +47,7 @@ def make_track_function(): current_request = crum.get_current_request() def function(event_type, event): - return track.views.server_track(current_request, event_type, event, page='x_module') + return track_views.server_track(current_request, event_type, event, page='x_module') return function @@ -155,7 +155,7 @@ class XBlockRuntime(RuntimeShim, Runtime): """ Log this XBlock event to the tracking log """ - log_context = track.contexts.context_dict_for_learning_context(block.scope_ids.usage_id.context_key) + log_context = track_contexts.context_dict_for_learning_context(block.scope_ids.usage_id.context_key) if self.user_id: log_context['user_id'] = self.user_id log_context['asides'] = {} diff --git a/openedx/core/djangoapps/xblock/runtime/shims.py b/openedx/core/djangoapps/xblock/runtime/shims.py index edf1d56951..a5afd95357 100644 --- a/openedx/core/djangoapps/xblock/runtime/shims.py +++ b/openedx/core/djangoapps/xblock/runtime/shims.py @@ -14,7 +14,7 @@ from fs.memoryfs import MemoryFS from openedx.core.djangoapps.xblock.apps import get_xblock_app_config import six -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string class RuntimeShim(object): diff --git a/openedx/core/djangolib/testing/utils.py b/openedx/core/djangolib/testing/utils.py index b2cb8fb155..031ca12ab1 100644 --- a/openedx/core/djangolib/testing/utils.py +++ b/openedx/core/djangolib/testing/utils.py @@ -89,7 +89,7 @@ class CacheIsolationMixin(object): cache_name: { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': cache_name, - 'KEY_FUNCTION': 'util.memcache.safe_key', + 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'OPTIONS': { 'MAX_ENTRIES': 1000, }, diff --git a/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py b/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py index be69cb31b4..21d706a9df 100644 --- a/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py +++ b/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py @@ -12,7 +12,7 @@ from oauth2_provider.models import Grant as DOTGrant from oauth2_provider.models import RefreshToken as DOTRefreshToken from openedx.core.djangoapps.oauth_dispatch.tests import factories -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from ..oauth2_retirement_utils import retire_dot_oauth2_models diff --git a/openedx/core/lib/api/permissions.py b/openedx/core/lib/api/permissions.py index df889079bc..b15b651a64 100644 --- a/openedx/core/lib/api/permissions.py +++ b/openedx/core/lib/api/permissions.py @@ -13,7 +13,7 @@ from rest_framework import permissions from edx_rest_framework_extensions.permissions import IsStaff, IsUserInUrl from openedx.core.lib.log_utils import audit_log -from student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole class ApiKeyHeaderPermission(permissions.BasePermission): diff --git a/openedx/core/lib/api/tests/test_permissions.py b/openedx/core/lib/api/tests/test_permissions.py index 95633d643a..8cc9f6ca2a 100644 --- a/openedx/core/lib/api/tests/test_permissions.py +++ b/openedx/core/lib/api/tests/test_permissions.py @@ -9,8 +9,8 @@ from opaque_keys.edx.keys import CourseKey from rest_framework.generics import GenericAPIView from openedx.core.lib.api.permissions import IsCourseStaffInstructor, IsMasterCourseStaffInstructor, IsStaffOrOwner -from student.roles import CourseInstructorRole, CourseStaffRole -from student.tests.factories import UserFactory +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import UserFactory class TestObject(object): diff --git a/openedx/core/lib/gating/api.py b/openedx/core/lib/gating/api.py index 39c913b1c2..003e4e5ac3 100644 --- a/openedx/core/lib/gating/api.py +++ b/openedx/core/lib/gating/api.py @@ -17,7 +17,7 @@ from lms.djangoapps.course_blocks.api import get_course_blocks from lms.djangoapps.courseware.access import _has_access_to_course from lms.djangoapps.grades.api import SubsectionGradeFactory from openedx.core.lib.gating.exceptions import GatingValidationError -from util import milestones_helpers +from common.djangoapps.util import milestones_helpers from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/openedx/core/lib/gating/tests/test_api.py b/openedx/core/lib/gating/tests/test_api.py index e9074ad58c..19783a3908 100644 --- a/openedx/core/lib/gating/tests/test_api.py +++ b/openedx/core/lib/gating/tests/test_api.py @@ -20,7 +20,7 @@ from lms.djangoapps.grades.tests.base import GradeTestBase from lms.djangoapps.grades.tests.utils import mock_get_score from openedx.core.lib.gating import api as gating_api from openedx.core.lib.gating.exceptions import GatingValidationError -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/core/lib/tests/test_edx_api_utils.py b/openedx/core/lib/tests/test_edx_api_utils.py index dfd54b1dd3..4c66d633ae 100644 --- a/openedx/core/lib/tests/test_edx_api_utils.py +++ b/openedx/core/lib/tests/test_edx_api_utils.py @@ -13,7 +13,7 @@ from openedx.core.djangoapps.catalog.utils import create_catalog_api_client from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfigMixin from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.core.lib.edx_api_utils import get_edx_api_data -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory UTILITY_MODULE = 'openedx.core.lib.edx_api_utils' TEST_API_URL = 'http://www-internal.example.com/api' diff --git a/openedx/core/lib/tests/test_time_zone_utils.py b/openedx/core/lib/tests/test_time_zone_utils.py index 796a237bf9..0a46337aef 100644 --- a/openedx/core/lib/tests/test_time_zone_utils.py +++ b/openedx/core/lib/tests/test_time_zone_utils.py @@ -6,7 +6,7 @@ from freezegun import freeze_time from pytz import timezone from openedx.core.lib.time_zone_utils import get_display_time_zone, get_time_zone_abbr, get_time_zone_offset -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class TestTimeZoneUtils(TestCase): diff --git a/openedx/core/lib/xblock_utils/__init__.py b/openedx/core/lib/xblock_utils/__init__.py index c8c205f2e2..32b121dce9 100644 --- a/openedx/core/lib/xblock_utils/__init__.py +++ b/openedx/core/lib/xblock_utils/__init__.py @@ -28,8 +28,8 @@ from xblock.core import XBlock from xblock.exceptions import InvalidScopeError from xblock.scorable import ScorableXBlockMixin -import static_replace -from edxmako.shortcuts import render_to_string +from common.djangoapps import static_replace +from common.djangoapps.edxmako.shortcuts import render_to_string from xmodule.seq_module import SequenceModule from xmodule.util.xmodule_django import add_webpack_to_fragment from xmodule.vertical_block import VerticalBlock diff --git a/openedx/core/tests/test_admin_view.py b/openedx/core/tests/test_admin_view.py index 4f02167bf5..095e7c40ce 100644 --- a/openedx/core/tests/test_admin_view.py +++ b/openedx/core/tests/test_admin_view.py @@ -7,7 +7,7 @@ This is not inside a django app because it is a global property of the system. from django.test import Client, TestCase from django.urls import reverse from edx_toggles.toggles.testutils import override_waffle_switch -from student.tests.factories import TEST_PASSWORD, UserFactory +from common.djangoapps.student.tests.factories import UserFactory, TEST_PASSWORD from openedx.core.djangoapps.user_authn.views.login import ENABLE_LOGIN_USING_THIRDPARTY_AUTH_ONLY diff --git a/openedx/features/announcements/tests/test_announcements.py b/openedx/features/announcements/tests/test_announcements.py index dc1bd336d3..d280aa100b 100644 --- a/openedx/features/announcements/tests/test_announcements.py +++ b/openedx/features/announcements/tests/test_announcements.py @@ -12,7 +12,7 @@ from django.test import TestCase from django.test.client import Client from django.urls import reverse -from student.tests.factories import AdminFactory +from common.djangoapps.student.tests.factories import AdminFactory from openedx.features.announcements.models import Announcement diff --git a/openedx/features/calendar_sync/plugins.py b/openedx/features/calendar_sync/plugins.py index 0e07f52649..0c0c801857 100644 --- a/openedx/features/calendar_sync/plugins.py +++ b/openedx/features/calendar_sync/plugins.py @@ -10,7 +10,7 @@ from openedx.features.calendar_sync.api import SUBSCRIBE, UNSUBSCRIBE from openedx.features.calendar_sync.models import UserCalendarSyncConfig from openedx.features.course_experience import CALENDAR_SYNC_FLAG, RELATIVE_DATES_FLAG from openedx.features.course_experience.course_tools import CourseTool, HttpMethod -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class CalendarSyncToggleTool(CourseTool): diff --git a/openedx/features/calendar_sync/tests/test_api.py b/openedx/features/calendar_sync/tests/test_api.py index d238374b8c..f38a85be47 100644 --- a/openedx/features/calendar_sync/tests/test_api.py +++ b/openedx/features/calendar_sync/tests/test_api.py @@ -3,7 +3,7 @@ from openedx.features.calendar_sync.api import subscribe_user_to_calendar, unsubscribe_user_to_calendar from openedx.features.calendar_sync.models import UserCalendarSyncConfig -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/features/calendar_sync/tests/test_ics.py b/openedx/features/calendar_sync/tests/test_ics.py index fd4ff6c1e2..c2a5679496 100644 --- a/openedx/features/calendar_sync/tests/test_ics.py +++ b/openedx/features/calendar_sync/tests/test_ics.py @@ -13,7 +13,7 @@ from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfi from openedx.features.calendar_sync import get_calendar_event_id from openedx.features.calendar_sync.ics import generate_ics_files_for_user_course from openedx.features.calendar_sync.tests.factories import UserCalendarSyncConfigFactory -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class TestIcsGeneration(TestCase): diff --git a/openedx/features/calendar_sync/tests/test_init.py b/openedx/features/calendar_sync/tests/test_init.py index 6722abfb9e..527f9cf8d9 100644 --- a/openedx/features/calendar_sync/tests/test_init.py +++ b/openedx/features/calendar_sync/tests/test_init.py @@ -4,7 +4,7 @@ from django.test import TestCase from openedx.features.calendar_sync import get_calendar_event_id -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory TEST_PASSWORD = 'test' diff --git a/openedx/features/calendar_sync/tests/test_models.py b/openedx/features/calendar_sync/tests/test_models.py index fe1f51a6fb..6c4a5385c5 100644 --- a/openedx/features/calendar_sync/tests/test_models.py +++ b/openedx/features/calendar_sync/tests/test_models.py @@ -2,7 +2,7 @@ from openedx.features.calendar_sync.models import UserCalendarSyncConfig -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/features/calendar_sync/views/calendar_sync.py b/openedx/features/calendar_sync/views/calendar_sync.py index 930d3d80ab..a35b9d7464 100644 --- a/openedx/features/calendar_sync/views/calendar_sync.py +++ b/openedx/features/calendar_sync/views/calendar_sync.py @@ -18,7 +18,7 @@ from rest_framework import status from openedx.features.calendar_sync.api import ( SUBSCRIBE, UNSUBSCRIBE, subscribe_user_to_calendar, unsubscribe_user_to_calendar ) -from util.views import ensure_valid_course_key +from common.djangoapps.util.views import ensure_valid_course_key class CalendarSyncView(View): diff --git a/openedx/features/content_type_gating/helpers.py b/openedx/features/content_type_gating/helpers.py index 2326e209af..b0c0bb4fec 100644 --- a/openedx/features/content_type_gating/helpers.py +++ b/openedx/features/content_type_gating/helpers.py @@ -6,10 +6,10 @@ import logging from django.utils import timezone -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.config_model_utils.utils import is_in_holdback -from student.models import CourseEnrollment -from student.role_helpers import has_staff_roles +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.role_helpers import has_staff_roles from xmodule.partitions.partitions import Group # Studio generates partition IDs starting at 100. There is already a manually generated diff --git a/openedx/features/content_type_gating/partitions.py b/openedx/features/content_type_gating/partitions.py index 77369ddee0..0394ac677c 100644 --- a/openedx/features/content_type_gating/partitions.py +++ b/openedx/features/content_type_gating/partitions.py @@ -16,7 +16,7 @@ from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from web_fragments.fragment import Fragment -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.commerce.utils import EcommerceService from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.lib.mobile_utils import is_request_from_mobile_app diff --git a/openedx/features/content_type_gating/tests/test_access.py b/openedx/features/content_type_gating/tests/test_access.py index 3daf966a28..faa0baae42 100644 --- a/openedx/features/content_type_gating/tests/test_access.py +++ b/openedx/features/content_type_gating/tests/test_access.py @@ -19,7 +19,7 @@ from mock import patch, Mock from pyquery import PyQuery as pq from lms.djangoapps.course_api.blocks.api import get_blocks -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.module_render import load_single_xblock from lms.djangoapps.courseware.tests.factories import ( BetaTesterFactory, @@ -46,9 +46,9 @@ from openedx.features.content_type_gating.helpers import CONTENT_GATING_PARTITIO from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.content_type_gating.partitions import ContentTypeGatingPartition from openedx.features.content_type_gating.services import ContentTypeGatingService -from student.models import CourseEnrollment, FBEEnrollmentExclusion -from student.roles import CourseInstructorRole -from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment, FBEEnrollmentExclusion +from common.djangoapps.student.roles import CourseInstructorRole +from common.djangoapps.student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.partitions.partitions import ENROLLMENT_TRACK_PARTITION_ID diff --git a/openedx/features/content_type_gating/tests/test_models.py b/openedx/features/content_type_gating/tests/test_models.py index e58aa32ac4..c60b6ad8a3 100644 --- a/openedx/features/content_type_gating/tests/test_models.py +++ b/openedx/features/content_type_gating/tests/test_models.py @@ -10,14 +10,14 @@ from edx_django_utils.cache import RequestCache from mock import Mock from opaque_keys.edx.locator import CourseLocator -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from edx_toggles.toggles.testutils import override_waffle_flag from openedx.core.djangoapps.config_model_utils.models import Provenance from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.features.content_type_gating.models import ContentTypeGatingConfig -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory @ddt.ddt diff --git a/openedx/features/content_type_gating/tests/test_partitions.py b/openedx/features/content_type_gating/tests/test_partitions.py index 658f050b98..3de4d02183 100644 --- a/openedx/features/content_type_gating/tests/test_partitions.py +++ b/openedx/features/content_type_gating/tests/test_partitions.py @@ -7,14 +7,14 @@ from django.test import RequestFactory from mock import Mock, patch from opaque_keys.edx.keys import CourseKey -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.features.content_type_gating.helpers import CONTENT_GATING_PARTITION_ID, FULL_ACCESS, LIMITED_ACCESS from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.content_type_gating.partitions import ContentTypeGatingPartition, create_content_gating_partition from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.tests.factories import GroupFactory +from common.djangoapps.student.tests.factories import GroupFactory from xmodule.partitions.partitions import ENROLLMENT_TRACK_PARTITION_ID, UserPartitionError diff --git a/openedx/features/course_bookmarks/plugins.py b/openedx/features/course_bookmarks/plugins.py index 88a6988b8d..7acf0e5e5d 100644 --- a/openedx/features/course_bookmarks/plugins.py +++ b/openedx/features/course_bookmarks/plugins.py @@ -8,7 +8,7 @@ from django.utils.translation import ugettext as _ from lms.djangoapps.courseware.permissions import EDIT_BOOKMARK from openedx.features.course_experience.course_tools import CourseTool -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class CourseBookmarksTool(CourseTool): diff --git a/openedx/features/course_bookmarks/views/course_bookmarks.py b/openedx/features/course_bookmarks/views/course_bookmarks.py index 585b047ba3..3a3c740e5b 100644 --- a/openedx/features/course_bookmarks/views/course_bookmarks.py +++ b/openedx/features/course_bookmarks/views/course_bookmarks.py @@ -21,7 +21,7 @@ from lms.djangoapps.courseware.courses import get_course_with_access from openedx.core.djangoapps.plugin_api.views import EdxFragmentView from openedx.core.djangoapps.user_api.models import UserPreference from openedx.features.course_experience import default_course_url_name -from util.views import ensure_valid_course_key +from common.djangoapps.util.views import ensure_valid_course_key class CourseBookmarksView(View): diff --git a/openedx/features/course_duration_limits/access.py b/openedx/features/course_duration_limits/access.py index a6f6781b5f..fb8455b66d 100644 --- a/openedx/features/course_duration_limits/access.py +++ b/openedx/features/course_duration_limits/access.py @@ -14,7 +14,7 @@ from django.utils.translation import ugettext as _ from edx_django_utils.cache import RequestCache from web_fragments.fragment import Fragment -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.access_response import AccessError from lms.djangoapps.courseware.access_utils import ACCESS_GRANTED from lms.djangoapps.courseware.utils import verified_upgrade_deadline_link @@ -24,8 +24,8 @@ from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi from openedx.core.djangoapps.course_date_signals.utils import get_expected_duration from openedx.core.djangolib.markup import HTML from openedx.features.course_duration_limits.models import CourseDurationLimitConfig -from student.models import CourseEnrollment -from util.date_utils import strftime_localized +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.date_utils import strftime_localized EXPIRATION_DATE_FORMAT_STR = u'%b %-d, %Y' diff --git a/openedx/features/course_duration_limits/tests/test_access.py b/openedx/features/course_duration_limits/tests/test_access.py index 8f621b5856..b872f18f40 100644 --- a/openedx/features/course_duration_limits/tests/test_access.py +++ b/openedx/features/course_duration_limits/tests/test_access.py @@ -8,8 +8,8 @@ import ddt from django.utils import timezone from pytz import UTC -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.courseware.models import DynamicUpgradeDeadlineConfiguration from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase @@ -19,8 +19,8 @@ from openedx.features.course_duration_limits.access import ( get_user_course_expiration_date ) from openedx.features.course_duration_limits.models import CourseDurationLimitConfig -from student.tests.factories import CourseEnrollmentFactory -from util.date_utils import strftime_localized +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.util.date_utils import strftime_localized @ddt.ddt diff --git a/openedx/features/course_duration_limits/tests/test_course_expiration.py b/openedx/features/course_duration_limits/tests/test_course_expiration.py index d05d46f0e5..00cc1724c1 100644 --- a/openedx/features/course_duration_limits/tests/test_course_expiration.py +++ b/openedx/features/course_duration_limits/tests/test_course_expiration.py @@ -11,7 +11,7 @@ from django.conf import settings from django.urls import reverse from django.utils.timezone import now -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.tests.factories import ( BetaTesterFactory, GlobalStaffFactory, @@ -35,9 +35,9 @@ from openedx.features.content_type_gating.helpers import CONTENT_GATING_PARTITIO from openedx.features.course_duration_limits.access import get_user_course_expiration_date from openedx.features.course_duration_limits.models import CourseDurationLimitConfig from openedx.features.course_experience.tests.views.helpers import add_course_mode -from student.models import CourseEnrollment, FBEEnrollmentExclusion -from student.roles import CourseInstructorRole -from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment, FBEEnrollmentExclusion +from common.djangoapps.student.roles import CourseInstructorRole +from common.djangoapps.student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from xmodule.partitions.partitions import ENROLLMENT_TRACK_PARTITION_ID diff --git a/openedx/features/course_duration_limits/tests/test_models.py b/openedx/features/course_duration_limits/tests/test_models.py index 2da1d5128f..98c042b636 100644 --- a/openedx/features/course_duration_limits/tests/test_models.py +++ b/openedx/features/course_duration_limits/tests/test_models.py @@ -13,13 +13,13 @@ from edx_django_utils.cache import RequestCache from mock import Mock from opaque_keys.edx.locator import CourseLocator -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.config_model_utils.models import Provenance from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.features.course_duration_limits.models import CourseDurationLimitConfig -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory @ddt.ddt diff --git a/openedx/features/course_experience/api/v1/tests/test_views.py b/openedx/features/course_experience/api/v1/tests/test_views.py index fdd208ee76..795e61d74f 100644 --- a/openedx/features/course_experience/api/v1/tests/test_views.py +++ b/openedx/features/course_experience/api/v1/tests/test_views.py @@ -5,9 +5,9 @@ import ddt from django.urls import reverse -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.course_home_api.tests.utils import BaseCourseHomeTests -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment @ddt.ddt diff --git a/openedx/features/course_experience/plugins.py b/openedx/features/course_experience/plugins.py index 65ec4b3bca..7e801fa267 100644 --- a/openedx/features/course_experience/plugins.py +++ b/openedx/features/course_experience/plugins.py @@ -9,7 +9,7 @@ from django.urls import reverse from django.utils.translation import ugettext as _ from lms.djangoapps.courseware.courses import get_course_by_id -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from . import DISABLE_UNIFIED_COURSE_TAB_FLAG, SHOW_REVIEWS_TOOL_FLAG from .course_tools import CourseTool diff --git a/openedx/features/course_experience/tests/views/helpers.py b/openedx/features/course_experience/tests/views/helpers.py index 5c02e87cca..e38700c7ee 100644 --- a/openedx/features/course_experience/tests/views/helpers.py +++ b/openedx/features/course_experience/tests/views/helpers.py @@ -8,7 +8,7 @@ from datetime import timedelta from django.core.exceptions import ObjectDoesNotExist from django.utils.timezone import now -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode TEST_COURSE_PRICE = 50 diff --git a/openedx/features/course_experience/tests/views/test_course_dates.py b/openedx/features/course_experience/tests/views/test_course_dates.py index db81ed41b6..5bd34bb872 100644 --- a/openedx/features/course_experience/tests/views/test_course_dates.py +++ b/openedx/features/course_experience/tests/views/test_course_dates.py @@ -8,7 +8,7 @@ from datetime import datetime, timedelta import six from django.urls import reverse -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/features/course_experience/tests/views/test_course_home.py b/openedx/features/course_experience/tests/views/test_course_home.py index 1a71adcd66..5c727ac54a 100644 --- a/openedx/features/course_experience/tests/views/test_course_home.py +++ b/openedx/features/course_experience/tests/views/test_course_home.py @@ -19,8 +19,8 @@ from pytz import UTC from waffle.models import Flag from waffle.testutils import override_flag -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.experiments.models import ExperimentData from lms.djangoapps.commerce.models import CommerceConfiguration from lms.djangoapps.commerce.utils import EcommerceService @@ -56,9 +56,9 @@ from openedx.features.course_experience import ( ) from openedx.features.discounts.applicability import get_discount_expiration_date from openedx.features.discounts.utils import REV1008_EXPERIMENT_ID, format_strikeout_price -from student.models import CourseEnrollment, FBEEnrollmentExclusion -from student.tests.factories import UserFactory -from util.date_utils import strftime_localized +from common.djangoapps.student.models import CourseEnrollment, FBEEnrollmentExclusion +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.date_utils import strftime_localized from xmodule.course_module import COURSE_VISIBILITY_PRIVATE, COURSE_VISIBILITY_PUBLIC, COURSE_VISIBILITY_PUBLIC_OUTLINE from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import CourseUserType, ModuleStoreTestCase, SharedModuleStoreTestCase @@ -671,7 +671,7 @@ class TestCourseHomePageAccess(CourseHomePageTestCase): self.assertEqual(response.status_code, 200) @mock.patch.dict(settings.FEATURES, {'DISABLE_START_DATES': False}) - @mock.patch("util.date_utils.strftime_localized") + @mock.patch("common.djangoapps.util.date_utils.strftime_localized") def test_non_live_course_other_language(self, mock_strftime_localized): """ Ensure that a user accessing a non-live course sees a redirect to @@ -817,7 +817,7 @@ class TestCourseHomePageAccess(CourseHomePageTestCase): bannerText = get_expiration_banner_text(self.staff_user, self.course) self.assertNotContains(response, bannerText, html=True) - @mock.patch("util.date_utils.strftime_localized") + @mock.patch("common.djangoapps.util.date_utils.strftime_localized") @mock.patch("openedx.features.course_duration_limits.access.get_date_string") def test_course_expiration_banner_with_unicode(self, mock_strftime_localized, mock_get_date_string): """ diff --git a/openedx/features/course_experience/tests/views/test_course_outline.py b/openedx/features/course_experience/tests/views/test_course_outline.py index a865d8a620..ab5e6b13ee 100644 --- a/openedx/features/course_experience/tests/views/test_course_outline.py +++ b/openedx/features/course_experience/tests/views/test_course_outline.py @@ -24,8 +24,8 @@ from six import text_type from waffle.models import Switch from waffle.testutils import override_switch -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.course_api.blocks.transformers.milestones import MilestonesAndSpecialExamsTransformer from lms.djangoapps.gating import api as lms_gating_api from lms.djangoapps.courseware.tests.factories import StaffFactory @@ -42,8 +42,8 @@ from openedx.features.course_experience.views.course_outline import ( DEFAULT_COMPLETION_TRACKING_START, CourseOutlineFragmentView ) -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/features/course_experience/tests/views/test_course_sock.py b/openedx/features/course_experience/tests/views/test_course_sock.py index 8dd8b012a2..6c11abb92a 100644 --- a/openedx/features/course_experience/tests/views/test_course_sock.py +++ b/openedx/features/course_experience/tests/views/test_course_sock.py @@ -7,11 +7,11 @@ import ddt import mock from edx_toggles.toggles.testutils import override_waffle_flag -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.commerce.models import CommerceConfiguration from openedx.core.djangolib.markup import HTML from openedx.features.course_experience import DISPLAY_COURSE_SOCK_FLAG -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/features/course_experience/tests/views/test_course_updates.py b/openedx/features/course_experience/tests/views/test_course_updates.py index 0adf7a1e89..b9113290c1 100644 --- a/openedx/features/course_experience/tests/views/test_course_updates.py +++ b/openedx/features/course_experience/tests/views/test_course_updates.py @@ -12,8 +12,8 @@ from lms.djangoapps.courseware.courses import get_course_info_usage_key from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_experience.views.course_updates import STATUS_VISIBLE -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/openedx/features/course_experience/tests/views/test_masquerade.py b/openedx/features/course_experience/tests/views/test_masquerade.py index 0072a69612..20f9470c15 100644 --- a/openedx/features/course_experience/tests/views/test_masquerade.py +++ b/openedx/features/course_experience/tests/views/test_masquerade.py @@ -5,8 +5,8 @@ Tests for masquerading functionality on course_experience from edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.courseware.tests.helpers import MasqueradeMixin from openedx.features.course_experience import DISPLAY_COURSE_SOCK_FLAG, SHOW_UPGRADE_MSG_ON_COURSE_HOME -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from xmodule.partitions.partitions import ENROLLMENT_TRACK_PARTITION_ID diff --git a/openedx/features/course_experience/tests/views/test_welcome_message.py b/openedx/features/course_experience/tests/views/test_welcome_message.py index a3e4d4389d..c75b93b947 100644 --- a/openedx/features/course_experience/tests/views/test_welcome_message.py +++ b/openedx/features/course_experience/tests/views/test_welcome_message.py @@ -7,8 +7,8 @@ import ddt import six from django.urls import reverse -from student.models import CourseEnrollment -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/features/course_experience/utils.py b/openedx/features/course_experience/utils.py index 5acb6dc4e4..f5af09d5e4 100644 --- a/openedx/features/course_experience/utils.py +++ b/openedx/features/course_experience/utils.py @@ -11,7 +11,6 @@ from django.utils import timezone from opaque_keys.edx.keys import CourseKey from six.moves import range -from course_modes.models import CourseMode from lms.djangoapps.course_api.blocks.api import get_blocks from lms.djangoapps.course_blocks.api import get_course_blocks from lms.djangoapps.course_blocks.utils import get_student_module_as_dict @@ -19,7 +18,7 @@ from lms.djangoapps.courseware.access import has_access from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.lib.cache_utils import request_cached from openedx.features.course_experience import RELATIVE_DATES_FLAG -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.django import modulestore diff --git a/openedx/features/course_experience/views/course_dates.py b/openedx/features/course_experience/views/course_dates.py index bebdb7079d..78e439742b 100644 --- a/openedx/features/course_experience/views/course_dates.py +++ b/openedx/features/course_experience/views/course_dates.py @@ -18,7 +18,6 @@ from lms.djangoapps.courseware.tabs import DatesTab from lms.djangoapps.course_home_api.toggles import course_home_mfe_dates_tab_is_active from lms.djangoapps.course_home_api.utils import get_microfrontend_url from openedx.core.djangoapps.plugin_api.views import EdxFragmentView -from student.models import CourseEnrollment class CourseDatesFragmentView(EdxFragmentView): diff --git a/openedx/features/course_experience/views/course_home.py b/openedx/features/course_experience/views/course_home.py index edbf2dd07e..f495eb3ea3 100644 --- a/openedx/features/course_experience/views/course_home.py +++ b/openedx/features/course_experience/views/course_home.py @@ -33,8 +33,8 @@ from openedx.features.course_duration_limits.access import generate_course_expir from openedx.features.course_experience.course_tools import CourseToolsPluginManager from openedx.features.discounts.utils import get_first_purchase_offer_banner_fragment from openedx.features.discounts.utils import format_strikeout_price -from student.models import CourseEnrollment -from util.views import ensure_valid_course_key +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.views import ensure_valid_course_key from xmodule.course_module import COURSE_VISIBILITY_PUBLIC, COURSE_VISIBILITY_PUBLIC_OUTLINE from .. import ( diff --git a/openedx/features/course_experience/views/course_home_messages.py b/openedx/features/course_experience/views/course_home_messages.py index d1c32b761d..5e2671ea93 100644 --- a/openedx/features/course_experience/views/course_home_messages.py +++ b/openedx/features/course_experience/views/course_home_messages.py @@ -15,7 +15,7 @@ from opaque_keys.edx.keys import CourseKey from pytz import UTC from web_fragments.fragment import Fragment -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.courses import get_course_date_blocks, get_course_with_access from lms.djangoapps.course_goals.api import ( get_course_goal, @@ -29,7 +29,7 @@ from lms.djangoapps.courseware.access_utils import check_public_access from openedx.core.djangoapps.plugin_api.views import EdxFragmentView from openedx.core.djangolib.markup import HTML, Text from openedx.features.course_experience import CourseHomeMessages -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.course_module import COURSE_VISIBILITY_PUBLIC diff --git a/openedx/features/course_experience/views/course_outline.py b/openedx/features/course_experience/views/course_outline.py index dfb2477d84..a7fb935642 100644 --- a/openedx/features/course_experience/views/course_outline.py +++ b/openedx/features/course_experience/views/course_outline.py @@ -22,7 +22,6 @@ from pytz import UTC from waffle.models import Switch from web_fragments.fragment import Fragment -from course_modes.models import CourseMode from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.courses import get_course_overview_with_access from lms.djangoapps.courseware.date_summary import verified_upgrade_deadline_link @@ -33,8 +32,8 @@ from openedx.core.djangoapps.schedules.utils import reset_self_paced_schedule from openedx.features.course_experience import RELATIVE_DATES_FLAG from openedx.features.course_experience.utils import dates_banner_should_display from openedx.features.content_type_gating.models import ContentTypeGatingConfig -from student.models import CourseEnrollment -from util.milestones_helpers import get_course_content_milestones +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.util.milestones_helpers import get_course_content_milestones from xmodule.course_module import COURSE_VISIBILITY_PUBLIC from xmodule.modulestore.django import modulestore diff --git a/openedx/features/course_experience/views/course_reviews.py b/openedx/features/course_experience/views/course_reviews.py index c139015b94..bf29aa650a 100644 --- a/openedx/features/course_experience/views/course_reviews.py +++ b/openedx/features/course_experience/views/course_reviews.py @@ -17,7 +17,7 @@ from lms.djangoapps.courseware.courses import get_course_with_access from lms.djangoapps.courseware.views.views import CourseTabView from openedx.core.djangoapps.plugin_api.views import EdxFragmentView from openedx.features.course_experience import default_course_url_name -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class CourseReviewsView(CourseTabView): diff --git a/openedx/features/course_experience/views/course_sock.py b/openedx/features/course_experience/views/course_sock.py index ae06fd2995..a095ad0481 100644 --- a/openedx/features/course_experience/views/course_sock.py +++ b/openedx/features/course_experience/views/course_sock.py @@ -11,7 +11,7 @@ from lms.djangoapps.courseware.utils import ( ) from openedx.core.djangoapps.plugin_api.views import EdxFragmentView from openedx.features.discounts.utils import format_strikeout_price -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class CourseSockFragmentView(EdxFragmentView): diff --git a/openedx/features/course_search/views/course_search.py b/openedx/features/course_search/views/course_search.py index 036029ec95..5d7fe587ed 100644 --- a/openedx/features/course_search/views/course_search.py +++ b/openedx/features/course_search/views/course_search.py @@ -18,7 +18,7 @@ from lms.djangoapps.courseware.courses import get_course_overview_with_access from lms.djangoapps.courseware.views.views import CourseTabView from openedx.core.djangoapps.plugin_api.views import EdxFragmentView from openedx.features.course_experience import default_course_url_name -from util.views import ensure_valid_course_key +from common.djangoapps.util.views import ensure_valid_course_key class CourseSearchView(CourseTabView): diff --git a/openedx/features/discounts/applicability.py b/openedx/features/discounts/applicability.py index 9ca8331779..e1487f6ac0 100644 --- a/openedx/features/discounts/applicability.py +++ b/openedx/features/discounts/applicability.py @@ -18,13 +18,13 @@ from django.utils import timezone from django.utils.dateparse import parse_datetime from edx_toggles.toggles import WaffleFlag, WaffleFlagNamespace -from course_modes.models import CourseMode -from entitlements.models import CourseEntitlement +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.entitlements.models import CourseEntitlement from lms.djangoapps.experiments.models import ExperimentData from lms.djangoapps.experiments.stable_bucketing import stable_bucketing_hash_group from openedx.features.discounts.models import DiscountPercentageConfig, DiscountRestrictionConfig -from student.models import CourseEnrollment -from track import segment +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.track import segment # .. toggle_name: discounts.enable_discounting # .. toggle_implementation: WaffleFlag diff --git a/openedx/features/discounts/tests/test_applicability.py b/openedx/features/discounts/tests/test_applicability.py index e79963b0fe..7ba7eaf9ef 100644 --- a/openedx/features/discounts/tests/test_applicability.py +++ b/openedx/features/discounts/tests/test_applicability.py @@ -13,14 +13,14 @@ from edx_toggles.toggles.testutils import override_waffle_flag from enterprise.models import EnterpriseCustomer, EnterpriseCustomerUser from mock import Mock, patch -from course_modes.models import CourseMode -from course_modes.tests.factories import CourseModeFactory -from entitlements.tests.factories import CourseEntitlementFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.course_modes.tests.factories import CourseModeFactory +from common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory from lms.djangoapps.experiments.models import ExperimentData from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.features.discounts.models import DiscountRestrictionConfig from openedx.features.discounts.utils import REV1008_EXPERIMENT_ID -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/features/discounts/tests/test_discount_restriction_models.py b/openedx/features/discounts/tests/test_discount_restriction_models.py index 1288d202e3..8e7efcb093 100644 --- a/openedx/features/discounts/tests/test_discount_restriction_models.py +++ b/openedx/features/discounts/tests/test_discount_restriction_models.py @@ -11,7 +11,7 @@ from openedx.core.djangoapps.content.course_overviews.tests.factories import Cou from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.features.discounts.models import DiscountRestrictionConfig -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/openedx/features/discounts/tests/test_views.py b/openedx/features/discounts/tests/test_views.py index da29f4200e..9bf92678a6 100644 --- a/openedx/features/discounts/tests/test_views.py +++ b/openedx/features/discounts/tests/test_views.py @@ -7,7 +7,7 @@ import six from django.test.client import Client from django.urls import reverse -from student.tests.factories import TEST_PASSWORD, UserFactory +from common.djangoapps.student.tests.factories import TEST_PASSWORD, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/features/discounts/utils.py b/openedx/features/discounts/utils.py index 22e188a903..0352a91725 100644 --- a/openedx/features/discounts/utils.py +++ b/openedx/features/discounts/utils.py @@ -11,7 +11,7 @@ from django.utils.translation import ugettext as _ from edx_django_utils.cache import RequestCache from web_fragments.fragment import Fragment -from course_modes.models import format_course_price, get_course_prices +from common.djangoapps.course_modes.models import format_course_price, get_course_prices from lms.djangoapps.experiments.models import ExperimentData from lms.djangoapps.courseware.utils import verified_upgrade_deadline_link from openedx.core.djangoapps.content.course_overviews.models import CourseOverview diff --git a/openedx/features/enterprise_support/admin/views.py b/openedx/features/enterprise_support/admin/views.py index 838d22fbc3..9238caaea3 100644 --- a/openedx/features/enterprise_support/admin/views.py +++ b/openedx/features/enterprise_support/admin/views.py @@ -9,7 +9,7 @@ from django.views.generic.edit import FormView from enterprise.models import EnterpriseCourseEnrollment from openedx.features.enterprise_support.admin.forms import CSVImportForm -from student.models import CourseEnrollment, CourseEnrollmentAttribute +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAttribute class EnrollmentAttributeOverrideView(FormView): diff --git a/openedx/features/enterprise_support/api.py b/openedx/features/enterprise_support/api.py index febe4a6d96..ceaff8ffb8 100644 --- a/openedx/features/enterprise_support/api.py +++ b/openedx/features/enterprise_support/api.py @@ -25,8 +25,8 @@ from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangolib.markup import HTML, Text from openedx.features.enterprise_support.utils import get_data_consent_share_cache_key -from third_party_auth.pipeline import get as get_partial_pipeline -from third_party_auth.provider import Registry +from common.djangoapps.third_party_auth.pipeline import get as get_partial_pipeline +from common.djangoapps.third_party_auth.provider import Registry try: from enterprise.models import ( diff --git a/openedx/features/enterprise_support/signals.py b/openedx/features/enterprise_support/signals.py index d41203c170..7d7f472aea 100644 --- a/openedx/features/enterprise_support/signals.py +++ b/openedx/features/enterprise_support/signals.py @@ -20,7 +20,7 @@ from openedx.core.djangoapps.signals.signals import COURSE_GRADE_NOW_PASSED from openedx.features.enterprise_support.api import enterprise_enabled from openedx.features.enterprise_support.tasks import clear_enterprise_customer_data_consent_share_cache from openedx.features.enterprise_support.utils import clear_data_consent_share_cache, is_enterprise_learner -from student.signals import UNENROLL_DONE +from common.djangoapps.student.signals import UNENROLL_DONE log = logging.getLogger(__name__) diff --git a/openedx/features/enterprise_support/tests/test_admin.py b/openedx/features/enterprise_support/tests/test_admin.py index d47dd29fc6..5519961c0d 100644 --- a/openedx/features/enterprise_support/tests/test_admin.py +++ b/openedx/features/enterprise_support/tests/test_admin.py @@ -12,8 +12,8 @@ from django.urls import reverse from openedx.core.djangoapps.catalog.tests.factories import CourseRunFactory from openedx.features.enterprise_support.admin.forms import CSVImportForm -from student.models import CourseEnrollment, CourseEnrollmentAttribute -from student.tests.factories import TEST_PASSWORD, AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAttribute +from common.djangoapps.student.tests.factories import TEST_PASSWORD, AdminFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/openedx/features/enterprise_support/tests/test_api.py b/openedx/features/enterprise_support/tests/test_api.py index 9916adc7bf..453ff00613 100644 --- a/openedx/features/enterprise_support/tests/test_api.py +++ b/openedx/features/enterprise_support/tests/test_api.py @@ -45,7 +45,7 @@ from openedx.features.enterprise_support.tests.factories import ( ) from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseServiceMockMixin from openedx.features.enterprise_support.utils import clear_data_consent_share_cache -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class MockEnrollment(mock.MagicMock): diff --git a/openedx/features/enterprise_support/tests/test_logout.py b/openedx/features/enterprise_support/tests/test_logout.py index ddd82ec5be..ec1c9792aa 100644 --- a/openedx/features/enterprise_support/tests/test_logout.py +++ b/openedx/features/enterprise_support/tests/test_logout.py @@ -17,8 +17,8 @@ from openedx.features.enterprise_support.tests import ( factories ) from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseServiceMockMixin -from student.tests.factories import UserFactory -from util.testing import UrlResetMixin +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import UrlResetMixin @ddt.ddt diff --git a/openedx/features/enterprise_support/tests/test_signals.py b/openedx/features/enterprise_support/tests/test_signals.py index ae4bdf53c1..b45f4d5c68 100644 --- a/openedx/features/enterprise_support/tests/test_signals.py +++ b/openedx/features/enterprise_support/tests/test_signals.py @@ -13,7 +13,7 @@ from opaque_keys.edx.keys import CourseKey from slumber.exceptions import HttpClientError, HttpServerError from testfixtures import LogCapture -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from lms.djangoapps.certificates.signals import listen_for_passing_grade from openedx.core.djangoapps.commerce.utils import ECOMMERCE_DATE_FORMAT from openedx.core.djangoapps.credit.tests.test_api import TEST_ECOMMERCE_WORKER @@ -25,8 +25,8 @@ from openedx.features.enterprise_support.tests.factories import ( EnterpriseCustomerUserFactory ) from openedx.features.enterprise_support.utils import get_data_consent_share_cache_key -from student.models import CourseEnrollmentAttribute -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollmentAttribute +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/features/enterprise_support/tests/test_utils.py b/openedx/features/enterprise_support/tests/test_utils.py index 3c8b106f82..27a38eb5a6 100644 --- a/openedx/features/enterprise_support/tests/test_utils.py +++ b/openedx/features/enterprise_support/tests/test_utils.py @@ -17,7 +17,7 @@ from openedx.features.enterprise_support.tests.factories import ( EnterpriseCustomerUserFactory ) from openedx.features.enterprise_support.utils import ENTERPRISE_HEADER_LINKS, get_enterprise_learner_portal -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/openedx/features/enterprise_support/utils.py b/openedx/features/enterprise_support/utils.py index 4acbc4d299..ca7dcaa460 100644 --- a/openedx/features/enterprise_support/utils.py +++ b/openedx/features/enterprise_support/utils.py @@ -15,12 +15,12 @@ from enterprise.api.v1.serializers import EnterpriseCustomerBrandingConfiguratio from enterprise.models import EnterpriseCustomer, EnterpriseCustomerUser from social_django.models import UserSocialAuth -import third_party_auth +from common.djangoapps import third_party_auth from lms.djangoapps.branding.api import get_privacy_url from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.user_authn.cookies import standard_cookie_settings from openedx.core.djangolib.markup import HTML, Text -from student.helpers import get_next_url_for_login_page +from common.djangoapps.student.helpers import get_next_url_for_login_page ENTERPRISE_HEADER_LINKS = WaffleFlag('enterprise', 'enterprise_header_links', __name__) diff --git a/openedx/features/learner_profile/static/learner_profile/templates/third_party_auth.html b/openedx/features/learner_profile/static/learner_profile/templates/third_party_auth.html index 170bde10a9..e8ed1b1230 100644 --- a/openedx/features/learner_profile/static/learner_profile/templates/third_party_auth.html +++ b/openedx/features/learner_profile/static/learner_profile/templates/third_party_auth.html @@ -1,7 +1,7 @@ <%page expression_filter="h"/> <%! from django.utils.translation import ugettext as _ -from third_party_auth import pipeline +from common.djangoapps.third_party_auth import pipeline %>