From 151bd136667d27bf85256e382ed5b5ea0144e00f Mon Sep 17 00:00:00 2001 From: Kyle McCormick <kmccormick@edx.org> Date: Tue, 10 Nov 2020 07:02:01 -0500 Subject: [PATCH] Use full names for common.djangoapps imports; warn when using old style (#25477) * Generate common/djangoapps import shims for LMS * Generate common/djangoapps import shims for Studio * Stop appending project root to sys.path * Stop appending common/djangoapps to sys.path * Import from common.djangoapps.course_action_state instead of course_action_state * Import from common.djangoapps.course_modes instead of course_modes * Import from common.djangoapps.database_fixups instead of database_fixups * Import from common.djangoapps.edxmako instead of edxmako * Import from common.djangoapps.entitlements instead of entitlements * Import from common.djangoapps.pipline_mako instead of pipeline_mako * Import from common.djangoapps.static_replace instead of static_replace * Import from common.djangoapps.student instead of student * Import from common.djangoapps.terrain instead of terrain * Import from common.djangoapps.third_party_auth instead of third_party_auth * Import from common.djangoapps.track instead of track * Import from common.djangoapps.util instead of util * Import from common.djangoapps.xblock_django instead of xblock_django * Add empty common/djangoapps/__init__.py to fix pytest collection * Fix pylint formatting violations * Exclude import_shims/ directory tree from linting --- cms/devstack.yml | 18 ++--- .../api/v1/serializers/course_runs.py | 2 +- .../test_serializers/test_course_runs.py | 4 +- .../v1/tests/test_views/test_course_runs.py | 6 +- cms/djangoapps/cms_user_tasks/tasks.py | 2 +- cms/djangoapps/contentstore/api/tests/base.py | 2 +- .../contentstore/api/tests/test_import.py | 2 +- .../contentstore/api/tests/test_validation.py | 2 +- .../contentstore/api/views/utils.py | 2 +- .../contentstore/course_group_config.py | 2 +- .../contentstore/courseware_index.py | 2 +- .../commands/tests/test_delete_course.py | 4 +- .../commands/tests/test_sync_courses.py | 2 +- .../rest_api/v1/tests/test_views.py | 2 +- .../contentstore/signals/handlers.py | 4 +- cms/djangoapps/contentstore/tasks.py | 6 +- .../contentstore/tests/test_clone_course.py | 6 +- .../contentstore/tests/test_contentstore.py | 10 +-- .../tests/test_course_create_rerun.py | 6 +- .../contentstore/tests/test_course_listing.py | 6 +- .../tests/test_course_settings.py | 18 ++--- .../tests/test_courseware_index.py | 4 +- .../contentstore/tests/test_libraries.py | 10 +-- .../contentstore/tests/test_orphan.py | 2 +- .../contentstore/tests/test_permissions.py | 4 +- .../contentstore/tests/test_signals.py | 4 +- .../contentstore/tests/test_tasks.py | 2 +- .../tests/test_transcripts_utils.py | 2 +- .../tests/test_users_default_role.py | 2 +- cms/djangoapps/contentstore/tests/utils.py | 2 +- cms/djangoapps/contentstore/utils.py | 6 +- cms/djangoapps/contentstore/views/access.py | 4 +- cms/djangoapps/contentstore/views/assets.py | 8 +- .../contentstore/views/certificates.py | 12 +-- .../contentstore/views/checklists.py | 4 +- .../contentstore/views/component.py | 8 +- cms/djangoapps/contentstore/views/course.py | 32 ++++---- cms/djangoapps/contentstore/views/dev.py | 2 +- .../contentstore/views/entrance_exam.py | 4 +- cms/djangoapps/contentstore/views/error.py | 4 +- .../contentstore/views/export_git.py | 4 +- cms/djangoapps/contentstore/views/helpers.py | 2 +- .../contentstore/views/import_export.py | 8 +- cms/djangoapps/contentstore/views/item.py | 12 +-- cms/djangoapps/contentstore/views/library.py | 8 +- .../contentstore/views/organization.py | 2 +- cms/djangoapps/contentstore/views/preview.py | 6 +- cms/djangoapps/contentstore/views/public.py | 2 +- cms/djangoapps/contentstore/views/tabs.py | 6 +- .../contentstore/views/tests/test_access.py | 6 +- .../contentstore/views/tests/test_assets.py | 2 +- .../views/tests/test_certificates.py | 10 +-- .../views/tests/test_course_index.py | 10 +-- .../views/tests/test_entrance_exam.py | 4 +- .../views/tests/test_exam_settings_view.py | 2 +- .../views/tests/test_header_menu.py | 2 +- .../views/tests/test_import_export.py | 6 +- .../contentstore/views/tests/test_item.py | 8 +- .../contentstore/views/tests/test_library.py | 2 +- .../views/tests/test_organizations.py | 4 +- .../contentstore/views/tests/test_preview.py | 2 +- .../views/tests/test_transcript_settings.py | 2 +- .../contentstore/views/tests/test_user.py | 6 +- .../contentstore/views/transcript_settings.py | 4 +- .../contentstore/views/transcripts_ajax.py | 4 +- cms/djangoapps/contentstore/views/user.py | 12 +-- cms/djangoapps/contentstore/views/videos.py | 4 +- cms/djangoapps/course_creators/admin.py | 2 +- .../course_creators/tests/test_admin.py | 4 +- .../course_creators/tests/test_views.py | 4 +- cms/djangoapps/course_creators/views.py | 4 +- cms/djangoapps/maintenance/tests.py | 2 +- cms/djangoapps/maintenance/views.py | 6 +- .../models/settings/course_grading.py | 2 +- .../models/settings/course_metadata.py | 4 +- cms/envs/bok_choy.auth.json | 2 +- cms/envs/bok_choy.env.json | 10 +-- cms/envs/bok_choy.py | 2 +- cms/envs/bok_choy.yml | 10 +-- cms/envs/bok_choy_docker.auth.json | 2 +- cms/envs/bok_choy_docker.env.json | 10 +-- cms/envs/bok_choy_docker.yml | 10 +-- cms/envs/common.py | 70 +++++++++--------- cms/envs/devstack.py | 2 +- cms/envs/devstack_decentralized.py | 2 +- cms/envs/test.py | 6 +- cms/lib/xblock/tagging/tagging.py | 2 +- cms/lib/xblock/tagging/test.py | 2 +- cms/lib/xblock/test/test_authoring_mixin.py | 2 +- cms/templates/checklists.html | 2 +- cms/templates/course_outline.html | 2 +- cms/templates/widgets/user_dropdown.html | 2 +- cms/urls.py | 2 +- common/djangoapps/__init__.py | 0 .../djangoapps/course_action_state/models.py | 2 +- .../tests/test_managers.py | 4 +- .../tests/test_rerun_manager.py | 6 +- common/djangoapps/course_modes/admin.py | 4 +- common/djangoapps/course_modes/api.py | 2 +- common/djangoapps/course_modes/apps.py | 4 +- common/djangoapps/course_modes/helpers.py | 4 +- .../course_modes/rest_api/serializers.py | 2 +- .../djangoapps/course_modes/rest_api/urls.py | 2 +- .../rest_api/v1/tests/test_views.py | 8 +- .../course_modes/rest_api/v1/urls.py | 2 +- .../course_modes/rest_api/v1/views.py | 4 +- .../course_modes/tests/factories.py | 2 +- .../course_modes/tests/test_admin.py | 10 +-- .../course_modes/tests/test_models.py | 16 ++-- .../course_modes/tests/test_signals.py | 8 +- .../course_modes/tests/test_views.py | 18 ++--- common/djangoapps/course_modes/urls.py | 2 +- common/djangoapps/course_modes/views.py | 8 +- common/djangoapps/edxmako/apps.py | 2 +- common/djangoapps/edxmako/makoloader.py | 2 +- common/djangoapps/edxmako/tests.py | 31 ++++---- common/djangoapps/entitlements/apps.py | 2 +- .../commands/expire_old_entitlements.py | 4 +- .../tests/test_expire_old_entitlements.py | 4 +- .../commands/update_entitlement_mode.py | 2 +- common/djangoapps/entitlements/models.py | 8 +- .../djangoapps/entitlements/rest_api/urls.py | 2 +- .../entitlements/rest_api/v1/filters.py | 2 +- .../entitlements/rest_api/v1/serializers.py | 2 +- .../rest_api/v1/tests/test_serializers.py | 4 +- .../rest_api/v1/tests/test_views.py | 62 ++++++++-------- .../entitlements/rest_api/v1/views.py | 14 ++-- common/djangoapps/entitlements/signals.py | 4 +- common/djangoapps/entitlements/tasks.py | 2 +- .../entitlements/tests/factories.py | 6 +- .../entitlements/tests/test_models.py | 20 ++--- .../entitlements/tests/test_tasks.py | 12 +-- .../entitlements/tests/test_utils.py | 10 +-- common/djangoapps/entitlements/utils.py | 4 +- common/djangoapps/pipeline_mako/__init__.py | 4 +- .../templates/static_content.html | 6 +- .../pipeline_mako/tests/test_render.py | 6 +- .../tests/test_static_content.py | 2 +- common/djangoapps/static_replace/__init__.py | 2 +- .../test/test_static_replace.py | 24 +++--- common/djangoapps/student/admin.py | 6 +- common/djangoapps/student/api.py | 10 +-- common/djangoapps/student/apps.py | 4 +- common/djangoapps/student/auth.py | 2 +- common/djangoapps/student/forms.py | 4 +- common/djangoapps/student/helpers.py | 8 +- .../management/commands/_create_users.py | 4 +- .../commands/anonymized_id_mapping.py | 2 +- .../management/commands/assigngroups.py | 2 +- .../commands/bulk_change_enrollment.py | 4 +- .../commands/bulk_change_enrollment_csv.py | 6 +- .../management/commands/bulk_unenroll.py | 2 +- .../management/commands/bulk_update_email.py | 2 +- .../management/commands/cert_restriction.py | 2 +- .../commands/change_eligibility_deadline.py | 4 +- .../management/commands/change_enrollment.py | 2 +- .../management/commands/create_test_users.py | 2 +- .../management/commands/export_staff_users.py | 2 +- .../management/commands/manage_user.py | 2 +- ...populate_created_on_site_user_attribute.py | 2 +- .../management/commands/recover_account.py | 2 +- .../management/commands/transfer_students.py | 4 +- .../tests/test_bulk_change_enrollment.py | 12 +-- .../tests/test_bulk_change_enrollment_csv.py | 12 +-- .../management/tests/test_bulk_unenroll.py | 8 +- .../tests/test_change_eligibility_deadline.py | 8 +- .../tests/test_change_enrollment.py | 10 +-- .../test_change_enterprise_user_username.py | 4 +- .../tests/test_create_random_users.py | 2 +- .../tests/test_create_test_users.py | 6 +- .../tests/test_export_staff_users.py | 2 +- ...populate_created_on_site_user_attribute.py | 4 +- .../management/tests/test_recover_account.py | 6 +- .../tests/test_transfer_students.py | 10 +-- common/djangoapps/student/middleware.py | 2 +- .../0001_squashed_0031_auto_20200317_1122.py | 8 +- .../migrations/0025_auto_20191101_1846.py | 2 +- ..._courseenrollment_mode_callable_default.py | 7 +- .../migrations/0029_add_data_researcher.py | 2 +- common/djangoapps/student/models.py | 12 +-- common/djangoapps/student/models_api.py | 10 +-- common/djangoapps/student/role_helpers.py | 2 +- common/djangoapps/student/roles.py | 4 +- common/djangoapps/student/signals/__init__.py | 2 +- .../djangoapps/student/signals/receivers.py | 4 +- common/djangoapps/student/tests/factories.py | 2 +- .../student/tests/test_activate_account.py | 6 +- .../student/tests/test_admin_views.py | 7 +- common/djangoapps/student/tests/test_authz.py | 6 +- .../student/tests/test_bulk_email_settings.py | 2 +- .../student/tests/test_certificates.py | 6 +- .../tests/test_configuration_overrides.py | 2 +- .../student/tests/test_course_listing.py | 10 +-- .../djangoapps/student/tests/test_credit.py | 6 +- common/djangoapps/student/tests/test_email.py | 44 +++++------ .../student/tests/test_enrollment.py | 12 +-- .../djangoapps/student/tests/test_events.py | 8 +- .../djangoapps/student/tests/test_helpers.py | 6 +- .../djangoapps/student/tests/test_models.py | 8 +- .../student/tests/test_parental_controls.py | 4 +- .../student/tests/test_password_policy.py | 50 ++++++------- .../student/tests/test_receivers.py | 4 +- .../student/tests/test_recent_enrollments.py | 10 +-- .../djangoapps/student/tests/test_refunds.py | 16 ++-- .../student/tests/test_retirement.py | 4 +- common/djangoapps/student/tests/test_roles.py | 4 +- common/djangoapps/student/tests/test_tasks.py | 14 ++-- .../tests/test_user_profile_properties.py | 4 +- .../student/tests/test_userstanding.py | 4 +- .../student/tests/test_verification_status.py | 8 +- common/djangoapps/student/tests/test_views.py | 40 +++++----- common/djangoapps/student/tests/tests.py | 22 +++--- common/djangoapps/student/views/dashboard.py | 15 ++-- common/djangoapps/student/views/management.py | 28 +++---- .../terrain/stubs/tests/test_http.py | 2 +- .../terrain/stubs/tests/test_lti_stub.py | 16 ++-- .../terrain/stubs/tests/test_video.py | 2 +- .../terrain/stubs/tests/test_xqueue_stub.py | 6 +- .../djangoapps/third_party_auth/__init__.py | 2 +- .../api/tests/test_permissions.py | 4 +- .../third_party_auth/api/tests/test_views.py | 6 +- .../djangoapps/third_party_auth/api/views.py | 8 +- common/djangoapps/third_party_auth/apps.py | 4 +- .../djangoapps/third_party_auth/decorators.py | 4 +- .../commands/remove_social_auth_users.py | 2 +- .../management/commands/saml.py | 4 +- .../tests/test_remove_social_auth_users.py | 8 +- .../management/commands/tests/test_saml.py | 2 +- .../djangoapps/third_party_auth/middleware.py | 2 +- .../0001_squashed_0026_auto_20200401_1932.py | 5 +- .../migrations/0026_auto_20200401_1932.py | 5 +- .../djangoapps/third_party_auth/pipeline.py | 10 +-- common/djangoapps/third_party_auth/saml.py | 4 +- .../saml_configuration/serializers.py | 2 +- .../tests/test_saml_configuration.py | 6 +- .../samlproviderconfig/serializers.py | 2 +- .../tests/test_samlproviderconfig.py | 10 +-- .../samlproviderconfig/views.py | 2 +- .../samlproviderdata/serializers.py | 2 +- .../tests/test_samlproviderdata.py | 10 +-- .../samlproviderdata/views.py | 2 +- .../djangoapps/third_party_auth/settings.py | 24 +++--- common/djangoapps/third_party_auth/tasks.py | 4 +- .../third_party_auth/tests/factories.py | 2 +- .../third_party_auth/tests/specs/base.py | 14 ++-- .../tests/specs/test_azuread.py | 2 +- .../tests/specs/test_generic.py | 4 +- .../tests/specs/test_google.py | 6 +- .../tests/specs/test_linkedin.py | 2 +- .../third_party_auth/tests/specs/test_lti.py | 2 +- .../tests/specs/test_testshib.py | 8 +- .../tests/specs/test_twitter.py | 2 +- .../third_party_auth/tests/test_admin.py | 10 +-- .../third_party_auth/tests/test_decorators.py | 6 +- .../tests/test_identityserver3.py | 6 +- .../third_party_auth/tests/test_lti.py | 4 +- .../third_party_auth/tests/test_middleware.py | 6 +- .../third_party_auth/tests/test_pipeline.py | 18 ++--- .../tests/test_pipeline_integration.py | 26 +++---- .../third_party_auth/tests/test_provider.py | 8 +- .../third_party_auth/tests/test_saml.py | 8 +- .../third_party_auth/tests/test_settings.py | 8 +- .../third_party_auth/tests/test_utils.py | 6 +- .../third_party_auth/tests/test_views.py | 4 +- .../third_party_auth/tests/testutil.py | 8 +- .../third_party_auth/tests/utils.py | 2 +- common/djangoapps/third_party_auth/urls.py | 6 +- common/djangoapps/third_party_auth/views.py | 10 +-- common/djangoapps/track/backends/logger.py | 8 +- common/djangoapps/track/backends/mongodb.py | 2 +- .../track/backends/tests/test_logger.py | 4 +- .../track/backends/tests/test_mongodb.py | 4 +- .../commands/tracked_dummy_command.py | 2 +- common/djangoapps/track/middleware.py | 2 +- common/djangoapps/track/segment.py | 2 +- common/djangoapps/track/tests/__init__.py | 2 +- .../djangoapps/track/tests/test_contexts.py | 2 +- .../djangoapps/track/tests/test_middleware.py | 4 +- common/djangoapps/track/tests/test_segment.py | 6 +- common/djangoapps/track/tests/test_shim.py | 10 +-- common/djangoapps/track/tests/test_tracker.py | 16 ++-- common/djangoapps/track/tests/test_util.py | 2 +- common/djangoapps/track/tracker.py | 2 +- common/djangoapps/track/urls.py | 8 +- common/djangoapps/track/views/__init__.py | 2 +- common/djangoapps/track/views/segmentio.py | 2 +- common/djangoapps/track/views/tests/base.py | 8 +- .../track/views/tests/test_segmentio.py | 6 +- .../track/views/tests/test_views.py | 10 +-- common/djangoapps/util/admin.py | 2 +- common/djangoapps/util/disable_rate_limit.py | 2 +- .../djangoapps/util/keyword_substitution.py | 2 +- .../util/password_policy_validators.py | 2 +- common/djangoapps/util/testing.py | 2 +- common/djangoapps/util/tests/test_course.py | 2 +- .../djangoapps/util/tests/test_date_utils.py | 8 +- common/djangoapps/util/tests/test_db.py | 2 +- .../util/tests/test_disable_rate_limit.py | 4 +- common/djangoapps/util/tests/test_file.py | 6 +- .../util/tests/test_json_request.py | 2 +- .../util/tests/test_keyword_sub_utils.py | 8 +- common/djangoapps/util/tests/test_memcache.py | 2 +- .../util/tests/test_milestones_helpers.py | 2 +- .../util/tests/test_organizations_helpers.py | 2 +- .../tests/test_password_policy_validators.py | 70 +++++++++--------- .../util/tests/test_string_utils.py | 2 +- common/djangoapps/util/views.py | 10 +-- common/djangoapps/xblock_django/admin.py | 2 +- common/djangoapps/xblock_django/api.py | 2 +- .../xblock_django/tests/test_api.py | 4 +- .../xblock_django/tests/test_user_service.py | 6 +- .../djangoapps/xblock_django/user_service.py | 2 +- common/lib/xmodule/xmodule/library_tools.py | 2 +- .../lib/xmodule/xmodule/modulestore/django.py | 6 +- .../lib/xmodule/xmodule/modulestore/search.py | 2 +- .../xmodule/modulestore/tests/django_utils.py | 10 +-- .../tests/test_modulestore_settings.py | 6 +- .../tests/test_library_sourced_block.py | 2 +- .../xmodule/tests/test_library_tools.py | 2 +- .../xmodule/xmodule/tests/test_sequence.py | 2 +- common/templates/edxnotes_wrapper.html | 2 +- .../lms/course_action_state/__init__.py | 5 ++ .../lms/course_action_state/managers.py | 5 ++ .../lms/course_action_state/models.py | 5 ++ .../lms/course_action_state/tests/__init__.py | 5 ++ .../tests/test_managers.py | 5 ++ .../tests/test_rerun_manager.py | 5 ++ import_shims/lms/course_modes/__init__.py | 5 ++ import_shims/lms/course_modes/admin.py | 5 ++ import_shims/lms/course_modes/api.py | 5 ++ import_shims/lms/course_modes/apps.py | 5 ++ import_shims/lms/course_modes/helpers.py | 5 ++ import_shims/lms/course_modes/models.py | 5 ++ .../lms/course_modes/rest_api/__init__.py | 5 ++ .../lms/course_modes/rest_api/serializers.py | 5 ++ .../lms/course_modes/rest_api/urls.py | 5 ++ .../lms/course_modes/rest_api/v1/__init__.py | 5 ++ .../rest_api/v1/tests/__init__.py | 5 ++ .../rest_api/v1/tests/test_views.py | 5 ++ .../lms/course_modes/rest_api/v1/urls.py | 5 ++ .../lms/course_modes/rest_api/v1/views.py | 5 ++ import_shims/lms/course_modes/signals.py | 5 ++ .../lms/course_modes/tests/__init__.py | 5 ++ .../lms/course_modes/tests/factories.py | 5 ++ .../lms/course_modes/tests/test_admin.py | 5 ++ .../lms/course_modes/tests/test_models.py | 5 ++ .../lms/course_modes/tests/test_signals.py | 5 ++ .../lms/course_modes/tests/test_views.py | 5 ++ import_shims/lms/course_modes/urls.py | 5 ++ import_shims/lms/course_modes/views.py | 5 ++ import_shims/lms/database_fixups/__init__.py | 5 ++ import_shims/lms/edxmako/__init__.py | 5 ++ import_shims/lms/edxmako/apps.py | 5 ++ import_shims/lms/edxmako/backend.py | 5 ++ import_shims/lms/edxmako/makoloader.py | 5 ++ import_shims/lms/edxmako/paths.py | 5 ++ import_shims/lms/edxmako/request_context.py | 5 ++ import_shims/lms/edxmako/shortcuts.py | 5 ++ import_shims/lms/edxmako/template.py | 5 ++ import_shims/lms/edxmako/tests.py | 5 ++ import_shims/lms/entitlements/__init__.py | 5 ++ import_shims/lms/entitlements/admin.py | 5 ++ import_shims/lms/entitlements/api.py | 5 ++ import_shims/lms/entitlements/apps.py | 5 ++ .../lms/entitlements/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../commands/expire_old_entitlements.py | 5 ++ .../management/commands/tests/__init__.py | 5 ++ .../tests/test_expire_old_entitlements.py | 5 ++ .../commands/update_entitlement_mode.py | 5 ++ import_shims/lms/entitlements/models.py | 5 ++ .../lms/entitlements/rest_api/__init__.py | 5 ++ .../lms/entitlements/rest_api/urls.py | 5 ++ .../lms/entitlements/rest_api/v1/__init__.py | 5 ++ .../lms/entitlements/rest_api/v1/filters.py | 5 ++ .../entitlements/rest_api/v1/permissions.py | 5 ++ .../entitlements/rest_api/v1/serializers.py | 5 ++ .../rest_api/v1/tests/__init__.py | 5 ++ .../rest_api/v1/tests/test_serializers.py | 5 ++ .../rest_api/v1/tests/test_views.py | 5 ++ .../lms/entitlements/rest_api/v1/urls.py | 5 ++ .../lms/entitlements/rest_api/v1/views.py | 5 ++ import_shims/lms/entitlements/signals.py | 5 ++ import_shims/lms/entitlements/tasks.py | 5 ++ .../lms/entitlements/tests/__init__.py | 5 ++ .../lms/entitlements/tests/factories.py | 5 ++ .../lms/entitlements/tests/test_models.py | 5 ++ .../lms/entitlements/tests/test_tasks.py | 5 ++ .../lms/entitlements/tests/test_utils.py | 5 ++ import_shims/lms/entitlements/utils.py | 5 ++ import_shims/lms/pipeline_mako/__init__.py | 5 ++ .../lms/pipeline_mako/helpers/__init__.py | 5 ++ .../pipeline_mako/helpers/studiofrontend.py | 5 ++ .../lms/pipeline_mako/tests/__init__.py | 5 ++ .../lms/pipeline_mako/tests/test_render.py | 5 ++ .../tests/test_static_content.py | 5 ++ import_shims/lms/static_replace/__init__.py | 5 ++ import_shims/lms/static_replace/admin.py | 5 ++ .../lms/static_replace/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../commands/clear_collectstatic_cache.py | 5 ++ import_shims/lms/static_replace/models.py | 5 ++ .../lms/static_replace/test/__init__.py | 5 ++ .../test/test_static_replace.py | 5 ++ import_shims/lms/status/__init__.py | 5 ++ import_shims/lms/status/models.py | 5 ++ import_shims/lms/status/status.py | 5 ++ import_shims/lms/status/tests.py | 5 ++ import_shims/lms/student/__init__.py | 5 ++ import_shims/lms/student/admin.py | 5 ++ import_shims/lms/student/api.py | 5 ++ import_shims/lms/student/apps.py | 5 ++ import_shims/lms/student/auth.py | 5 ++ import_shims/lms/student/forms.py | 5 ++ import_shims/lms/student/helpers.py | 5 ++ .../lms/student/management/__init__.py | 5 ++ .../student/management/commands/__init__.py | 5 ++ .../management/commands/_create_users.py | 5 ++ .../management/commands/add_to_group.py | 5 ++ .../commands/anonymized_id_mapping.py | 5 ++ .../management/commands/assigngroups.py | 5 ++ .../commands/bulk_change_enrollment.py | 5 ++ .../commands/bulk_change_enrollment_csv.py | 5 ++ .../management/commands/bulk_unenroll.py | 5 ++ .../management/commands/bulk_update_email.py | 5 ++ .../management/commands/cert_restriction.py | 5 ++ .../commands/change_eligibility_deadline.py | 5 ++ .../management/commands/change_enrollment.py | 5 ++ .../change_enterprise_user_username.py | 5 ++ .../commands/create_random_users.py | 5 ++ .../management/commands/create_test_users.py | 5 ++ .../management/commands/export_staff_users.py | 5 ++ .../management/commands/manage_group.py | 5 ++ .../management/commands/manage_user.py | 5 ++ ...populate_created_on_site_user_attribute.py | 5 ++ .../management/commands/recover_account.py | 5 ++ .../student/management/commands/set_staff.py | 5 ++ .../management/commands/set_superuser.py | 5 ++ .../management/commands/transfer_students.py | 5 ++ .../lms/student/management/tests/__init__.py | 5 ++ .../tests/test_bulk_change_enrollment.py | 5 ++ .../tests/test_bulk_change_enrollment_csv.py | 5 ++ .../management/tests/test_bulk_unenroll.py | 5 ++ .../tests/test_change_eligibility_deadline.py | 5 ++ .../tests/test_change_enrollment.py | 5 ++ .../test_change_enterprise_user_username.py | 5 ++ .../tests/test_create_random_users.py | 5 ++ .../tests/test_create_test_users.py | 5 ++ .../tests/test_export_staff_users.py | 5 ++ .../management/tests/test_manage_group.py | 5 ++ .../management/tests/test_manage_user.py | 5 ++ ...populate_created_on_site_user_attribute.py | 5 ++ .../management/tests/test_recover_account.py | 5 ++ .../tests/test_transfer_students.py | 5 ++ import_shims/lms/student/message_types.py | 5 ++ import_shims/lms/student/middleware.py | 5 ++ import_shims/lms/student/models.py | 5 ++ import_shims/lms/student/models_api.py | 5 ++ import_shims/lms/student/role_helpers.py | 5 ++ import_shims/lms/student/roles.py | 5 ++ import_shims/lms/student/signals/__init__.py | 5 ++ import_shims/lms/student/signals/receivers.py | 5 ++ import_shims/lms/student/signals/signals.py | 5 ++ import_shims/lms/student/tasks.py | 5 ++ import_shims/lms/student/tests/__init__.py | 5 ++ import_shims/lms/student/tests/factories.py | 5 ++ .../student/tests/test_activate_account.py | 5 ++ .../lms/student/tests/test_admin_views.py | 5 ++ import_shims/lms/student/tests/test_authz.py | 5 ++ .../student/tests/test_bulk_email_settings.py | 5 ++ .../lms/student/tests/test_certificates.py | 5 ++ .../tests/test_configuration_overrides.py | 5 ++ .../lms/student/tests/test_course_listing.py | 5 ++ import_shims/lms/student/tests/test_credit.py | 5 ++ import_shims/lms/student/tests/test_email.py | 5 ++ .../lms/student/tests/test_enrollment.py | 5 ++ import_shims/lms/student/tests/test_events.py | 5 ++ .../lms/student/tests/test_helpers.py | 5 ++ .../lms/student/tests/test_linkedin.py | 5 ++ .../student/tests/test_long_username_email.py | 5 ++ import_shims/lms/student/tests/test_models.py | 5 ++ .../student/tests/test_parental_controls.py | 5 ++ .../lms/student/tests/test_password_policy.py | 5 ++ .../lms/student/tests/test_receivers.py | 5 ++ .../student/tests/test_recent_enrollments.py | 5 ++ .../lms/student/tests/test_refunds.py | 5 ++ .../lms/student/tests/test_retirement.py | 5 ++ import_shims/lms/student/tests/test_roles.py | 5 ++ import_shims/lms/student/tests/test_tasks.py | 5 ++ .../tests/test_user_profile_properties.py | 5 ++ .../lms/student/tests/test_userstanding.py | 5 ++ .../student/tests/test_verification_status.py | 5 ++ import_shims/lms/student/tests/test_views.py | 5 ++ import_shims/lms/student/tests/tests.py | 5 ++ import_shims/lms/student/text_me_the_app.py | 5 ++ import_shims/lms/student/urls.py | 5 ++ import_shims/lms/student/views/__init__.py | 5 ++ import_shims/lms/student/views/dashboard.py | 5 ++ import_shims/lms/student/views/management.py | 5 ++ import_shims/lms/terrain/__init__.py | 5 ++ import_shims/lms/terrain/stubs/__init__.py | 5 ++ import_shims/lms/terrain/stubs/catalog.py | 5 ++ import_shims/lms/terrain/stubs/comments.py | 5 ++ import_shims/lms/terrain/stubs/ecommerce.py | 5 ++ import_shims/lms/terrain/stubs/edxnotes.py | 5 ++ import_shims/lms/terrain/stubs/http.py | 5 ++ import_shims/lms/terrain/stubs/lti.py | 5 ++ import_shims/lms/terrain/stubs/start.py | 5 ++ .../lms/terrain/stubs/tests/__init__.py | 5 ++ .../lms/terrain/stubs/tests/test_edxnotes.py | 5 ++ .../lms/terrain/stubs/tests/test_http.py | 5 ++ .../lms/terrain/stubs/tests/test_lti_stub.py | 5 ++ .../lms/terrain/stubs/tests/test_video.py | 5 ++ .../terrain/stubs/tests/test_xqueue_stub.py | 5 ++ .../terrain/stubs/tests/test_youtube_stub.py | 5 ++ .../lms/terrain/stubs/video_source.py | 5 ++ import_shims/lms/terrain/stubs/xqueue.py | 5 ++ import_shims/lms/terrain/stubs/youtube.py | 5 ++ import_shims/lms/third_party_auth/__init__.py | 5 ++ import_shims/lms/third_party_auth/admin.py | 5 ++ .../lms/third_party_auth/api/__init__.py | 5 ++ .../lms/third_party_auth/api/permissions.py | 5 ++ .../lms/third_party_auth/api/serializers.py | 5 ++ .../third_party_auth/api/tests/__init__.py | 5 ++ .../api/tests/test_permissions.py | 5 ++ .../third_party_auth/api/tests/test_views.py | 5 ++ import_shims/lms/third_party_auth/api/urls.py | 5 ++ .../lms/third_party_auth/api/utils.py | 5 ++ .../lms/third_party_auth/api/views.py | 5 ++ import_shims/lms/third_party_auth/appleid.py | 5 ++ import_shims/lms/third_party_auth/apps.py | 5 ++ .../lms/third_party_auth/decorators.py | 5 ++ import_shims/lms/third_party_auth/dummy.py | 5 ++ .../lms/third_party_auth/exceptions.py | 5 ++ .../lms/third_party_auth/identityserver3.py | 5 ++ import_shims/lms/third_party_auth/lti.py | 5 ++ .../third_party_auth/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../commands/remove_social_auth_users.py | 5 ++ .../management/commands/saml.py | 5 ++ .../management/commands/tests/__init__.py | 5 ++ .../tests/test_remove_social_auth_users.py | 5 ++ .../management/commands/tests/test_saml.py | 5 ++ .../lms/third_party_auth/middleware.py | 5 ++ import_shims/lms/third_party_auth/models.py | 5 ++ import_shims/lms/third_party_auth/pipeline.py | 5 ++ import_shims/lms/third_party_auth/provider.py | 5 ++ import_shims/lms/third_party_auth/saml.py | 5 ++ .../saml_configuration/__init__.py | 5 ++ .../saml_configuration/serializers.py | 5 ++ .../saml_configuration/tests/__init__.py | 5 ++ .../tests/test_saml_configuration.py | 5 ++ .../saml_configuration/urls.py | 5 ++ .../saml_configuration/views.py | 5 ++ .../samlproviderconfig/__init__.py | 5 ++ .../samlproviderconfig/serializers.py | 5 ++ .../tests/test_samlproviderconfig.py | 5 ++ .../samlproviderconfig/urls.py | 5 ++ .../samlproviderconfig/views.py | 5 ++ .../samlproviderdata/__init__.py | 5 ++ .../samlproviderdata/serializers.py | 5 ++ .../tests/test_samlproviderdata.py | 5 ++ .../third_party_auth/samlproviderdata/urls.py | 5 ++ .../samlproviderdata/views.py | 5 ++ import_shims/lms/third_party_auth/settings.py | 5 ++ import_shims/lms/third_party_auth/strategy.py | 5 ++ import_shims/lms/third_party_auth/tasks.py | 5 ++ .../lms/third_party_auth/tests/__init__.py | 5 ++ .../third_party_auth/tests/data/__init__.py | 5 ++ .../data/saml_identity_provider_mock_data.py | 5 ++ .../lms/third_party_auth/tests/factories.py | 5 ++ .../lms/third_party_auth/tests/samlutils.py | 5 ++ .../third_party_auth/tests/specs/__init__.py | 5 ++ .../lms/third_party_auth/tests/specs/base.py | 5 ++ .../tests/specs/test_azuread.py | 5 ++ .../tests/specs/test_generic.py | 5 ++ .../tests/specs/test_google.py | 5 ++ .../tests/specs/test_linkedin.py | 5 ++ .../third_party_auth/tests/specs/test_lti.py | 5 ++ .../tests/specs/test_testshib.py | 5 ++ .../tests/specs/test_twitter.py | 5 ++ .../lms/third_party_auth/tests/test_admin.py | 5 ++ .../third_party_auth/tests/test_decorators.py | 5 ++ .../tests/test_identityserver3.py | 5 ++ .../lms/third_party_auth/tests/test_lti.py | 5 ++ .../third_party_auth/tests/test_middleware.py | 5 ++ .../third_party_auth/tests/test_pipeline.py | 5 ++ .../tests/test_pipeline_integration.py | 5 ++ .../third_party_auth/tests/test_provider.py | 5 ++ .../lms/third_party_auth/tests/test_saml.py | 5 ++ .../third_party_auth/tests/test_settings.py | 5 ++ .../lms/third_party_auth/tests/test_utils.py | 5 ++ .../lms/third_party_auth/tests/test_views.py | 5 ++ .../lms/third_party_auth/tests/testutil.py | 5 ++ .../lms/third_party_auth/tests/utils.py | 5 ++ import_shims/lms/third_party_auth/urls.py | 5 ++ import_shims/lms/third_party_auth/utils.py | 5 ++ import_shims/lms/third_party_auth/views.py | 5 ++ import_shims/lms/track/__init__.py | 5 ++ import_shims/lms/track/backends/__init__.py | 5 ++ import_shims/lms/track/backends/logger.py | 5 ++ import_shims/lms/track/backends/mongodb.py | 5 ++ .../lms/track/backends/tests/__init__.py | 5 ++ .../lms/track/backends/tests/test_logger.py | 5 ++ .../lms/track/backends/tests/test_mongodb.py | 5 ++ import_shims/lms/track/contexts.py | 5 ++ .../lms/track/event_transaction_utils.py | 5 ++ import_shims/lms/track/management/__init__.py | 5 ++ .../lms/track/management/commands/__init__.py | 5 ++ .../commands/tracked_dummy_command.py | 5 ++ .../lms/track/management/tests/__init__.py | 5 ++ .../management/tests/test_tracked_command.py | 5 ++ .../lms/track/management/tracked_command.py | 5 ++ import_shims/lms/track/middleware.py | 5 ++ import_shims/lms/track/segment.py | 5 ++ import_shims/lms/track/shim.py | 5 ++ import_shims/lms/track/tests/__init__.py | 5 ++ import_shims/lms/track/tests/test_contexts.py | 5 ++ .../lms/track/tests/test_middleware.py | 5 ++ import_shims/lms/track/tests/test_segment.py | 5 ++ import_shims/lms/track/tests/test_shim.py | 5 ++ import_shims/lms/track/tests/test_tracker.py | 5 ++ import_shims/lms/track/tests/test_util.py | 5 ++ import_shims/lms/track/tracker.py | 5 ++ import_shims/lms/track/transformers.py | 5 ++ import_shims/lms/track/urls.py | 5 ++ import_shims/lms/track/utils.py | 5 ++ import_shims/lms/track/views/__init__.py | 5 ++ import_shims/lms/track/views/segmentio.py | 5 ++ .../lms/track/views/tests/__init__.py | 5 ++ import_shims/lms/track/views/tests/base.py | 5 ++ .../lms/track/views/tests/test_segmentio.py | 5 ++ .../lms/track/views/tests/test_views.py | 5 ++ import_shims/lms/util/__init__.py | 5 ++ import_shims/lms/util/admin.py | 5 ++ import_shims/lms/util/cache.py | 5 ++ import_shims/lms/util/config_parse.py | 5 ++ import_shims/lms/util/course.py | 5 ++ import_shims/lms/util/date_utils.py | 5 ++ import_shims/lms/util/db.py | 5 ++ import_shims/lms/util/disable_rate_limit.py | 5 ++ import_shims/lms/util/file.py | 5 ++ import_shims/lms/util/json_request.py | 5 ++ import_shims/lms/util/keyword_substitution.py | 5 ++ import_shims/lms/util/memcache.py | 5 ++ import_shims/lms/util/milestones_helpers.py | 5 ++ import_shims/lms/util/model_utils.py | 5 ++ import_shims/lms/util/models.py | 5 ++ import_shims/lms/util/module_utils.py | 5 ++ .../lms/util/organizations_helpers.py | 5 ++ .../lms/util/password_policy_validators.py | 5 ++ import_shims/lms/util/query.py | 5 ++ import_shims/lms/util/request_rate_limiter.py | 5 ++ import_shims/lms/util/string_utils.py | 5 ++ import_shims/lms/util/testing.py | 5 ++ import_shims/lms/util/tests/__init__.py | 5 ++ .../lms/util/tests/mixins/__init__.py | 5 ++ .../lms/util/tests/mixins/discovery.py | 5 ++ import_shims/lms/util/tests/test_course.py | 5 ++ .../lms/util/tests/test_date_utils.py | 5 ++ import_shims/lms/util/tests/test_db.py | 5 ++ .../lms/util/tests/test_disable_rate_limit.py | 5 ++ .../lms/util/tests/test_django_utils.py | 5 ++ import_shims/lms/util/tests/test_file.py | 5 ++ .../lms/util/tests/test_json_request.py | 5 ++ .../lms/util/tests/test_keyword_sub_utils.py | 5 ++ import_shims/lms/util/tests/test_memcache.py | 5 ++ .../lms/util/tests/test_milestones_helpers.py | 5 ++ .../util/tests/test_organizations_helpers.py | 5 ++ .../tests/test_password_policy_validators.py | 5 ++ .../lms/util/tests/test_sandboxing.py | 5 ++ .../lms/util/tests/test_string_utils.py | 5 ++ import_shims/lms/util/url.py | 5 ++ import_shims/lms/util/validate_on_save.py | 5 ++ import_shims/lms/util/views.py | 5 ++ import_shims/lms/xblock_django/__init__.py | 5 ++ import_shims/lms/xblock_django/admin.py | 5 ++ import_shims/lms/xblock_django/api.py | 5 ++ .../lms/xblock_django/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../management/commands/ensure_indexes.py | 5 ++ import_shims/lms/xblock_django/models.py | 5 ++ .../lms/xblock_django/tests/__init__.py | 5 ++ .../lms/xblock_django/tests/test_api.py | 5 ++ .../xblock_django/tests/test_user_service.py | 5 ++ .../lms/xblock_django/user_service.py | 5 ++ .../studio/course_action_state/__init__.py | 5 ++ .../studio/course_action_state/managers.py | 5 ++ .../studio/course_action_state/models.py | 5 ++ .../course_action_state/tests/__init__.py | 5 ++ .../tests/test_managers.py | 5 ++ .../tests/test_rerun_manager.py | 5 ++ import_shims/studio/course_modes/__init__.py | 5 ++ import_shims/studio/course_modes/admin.py | 5 ++ import_shims/studio/course_modes/api.py | 5 ++ import_shims/studio/course_modes/apps.py | 5 ++ import_shims/studio/course_modes/helpers.py | 5 ++ import_shims/studio/course_modes/models.py | 5 ++ .../studio/course_modes/rest_api/__init__.py | 5 ++ .../course_modes/rest_api/serializers.py | 5 ++ .../studio/course_modes/rest_api/urls.py | 5 ++ .../course_modes/rest_api/v1/__init__.py | 5 ++ .../rest_api/v1/tests/__init__.py | 5 ++ .../rest_api/v1/tests/test_views.py | 5 ++ .../studio/course_modes/rest_api/v1/urls.py | 5 ++ .../studio/course_modes/rest_api/v1/views.py | 5 ++ import_shims/studio/course_modes/signals.py | 5 ++ .../studio/course_modes/tests/__init__.py | 5 ++ .../studio/course_modes/tests/factories.py | 5 ++ .../studio/course_modes/tests/test_admin.py | 5 ++ .../studio/course_modes/tests/test_models.py | 5 ++ .../studio/course_modes/tests/test_signals.py | 5 ++ .../studio/course_modes/tests/test_views.py | 5 ++ import_shims/studio/course_modes/urls.py | 5 ++ import_shims/studio/course_modes/views.py | 5 ++ .../studio/database_fixups/__init__.py | 5 ++ import_shims/studio/edxmako/__init__.py | 5 ++ import_shims/studio/edxmako/apps.py | 5 ++ import_shims/studio/edxmako/backend.py | 5 ++ import_shims/studio/edxmako/makoloader.py | 5 ++ import_shims/studio/edxmako/paths.py | 5 ++ .../studio/edxmako/request_context.py | 5 ++ import_shims/studio/edxmako/shortcuts.py | 5 ++ import_shims/studio/edxmako/template.py | 5 ++ import_shims/studio/edxmako/tests.py | 5 ++ import_shims/studio/entitlements/__init__.py | 5 ++ import_shims/studio/entitlements/admin.py | 5 ++ import_shims/studio/entitlements/api.py | 5 ++ import_shims/studio/entitlements/apps.py | 5 ++ .../entitlements/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../commands/expire_old_entitlements.py | 5 ++ .../management/commands/tests/__init__.py | 5 ++ .../tests/test_expire_old_entitlements.py | 5 ++ .../commands/update_entitlement_mode.py | 5 ++ import_shims/studio/entitlements/models.py | 5 ++ .../studio/entitlements/rest_api/__init__.py | 5 ++ .../studio/entitlements/rest_api/urls.py | 5 ++ .../entitlements/rest_api/v1/__init__.py | 5 ++ .../entitlements/rest_api/v1/filters.py | 5 ++ .../entitlements/rest_api/v1/permissions.py | 5 ++ .../entitlements/rest_api/v1/serializers.py | 5 ++ .../rest_api/v1/tests/__init__.py | 5 ++ .../rest_api/v1/tests/test_serializers.py | 5 ++ .../rest_api/v1/tests/test_views.py | 5 ++ .../studio/entitlements/rest_api/v1/urls.py | 5 ++ .../studio/entitlements/rest_api/v1/views.py | 5 ++ import_shims/studio/entitlements/signals.py | 5 ++ import_shims/studio/entitlements/tasks.py | 5 ++ .../studio/entitlements/tests/__init__.py | 5 ++ .../studio/entitlements/tests/factories.py | 5 ++ .../studio/entitlements/tests/test_models.py | 5 ++ .../studio/entitlements/tests/test_tasks.py | 5 ++ .../studio/entitlements/tests/test_utils.py | 5 ++ import_shims/studio/entitlements/utils.py | 5 ++ import_shims/studio/pipeline_mako/__init__.py | 5 ++ .../studio/pipeline_mako/helpers/__init__.py | 5 ++ .../pipeline_mako/helpers/studiofrontend.py | 5 ++ .../studio/pipeline_mako/tests/__init__.py | 5 ++ .../studio/pipeline_mako/tests/test_render.py | 5 ++ .../tests/test_static_content.py | 5 ++ .../studio/static_replace/__init__.py | 5 ++ import_shims/studio/static_replace/admin.py | 5 ++ .../static_replace/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../commands/clear_collectstatic_cache.py | 5 ++ import_shims/studio/static_replace/models.py | 5 ++ .../studio/static_replace/test/__init__.py | 5 ++ .../test/test_static_replace.py | 5 ++ import_shims/studio/status/__init__.py | 5 ++ import_shims/studio/status/models.py | 5 ++ import_shims/studio/status/status.py | 5 ++ import_shims/studio/status/tests.py | 5 ++ import_shims/studio/student/__init__.py | 5 ++ import_shims/studio/student/admin.py | 5 ++ import_shims/studio/student/api.py | 5 ++ import_shims/studio/student/apps.py | 5 ++ import_shims/studio/student/auth.py | 5 ++ import_shims/studio/student/forms.py | 5 ++ import_shims/studio/student/helpers.py | 5 ++ .../studio/student/management/__init__.py | 5 ++ .../student/management/commands/__init__.py | 5 ++ .../management/commands/_create_users.py | 5 ++ .../management/commands/add_to_group.py | 5 ++ .../commands/anonymized_id_mapping.py | 5 ++ .../management/commands/assigngroups.py | 5 ++ .../commands/bulk_change_enrollment.py | 5 ++ .../commands/bulk_change_enrollment_csv.py | 5 ++ .../management/commands/bulk_unenroll.py | 5 ++ .../management/commands/bulk_update_email.py | 5 ++ .../management/commands/cert_restriction.py | 5 ++ .../commands/change_eligibility_deadline.py | 5 ++ .../management/commands/change_enrollment.py | 5 ++ .../change_enterprise_user_username.py | 5 ++ .../commands/create_random_users.py | 5 ++ .../management/commands/create_test_users.py | 5 ++ .../management/commands/export_staff_users.py | 5 ++ .../management/commands/manage_group.py | 5 ++ .../management/commands/manage_user.py | 5 ++ ...populate_created_on_site_user_attribute.py | 5 ++ .../management/commands/recover_account.py | 5 ++ .../student/management/commands/set_staff.py | 5 ++ .../management/commands/set_superuser.py | 5 ++ .../management/commands/transfer_students.py | 5 ++ .../student/management/tests/__init__.py | 5 ++ .../tests/test_bulk_change_enrollment.py | 5 ++ .../tests/test_bulk_change_enrollment_csv.py | 5 ++ .../management/tests/test_bulk_unenroll.py | 5 ++ .../tests/test_change_eligibility_deadline.py | 5 ++ .../tests/test_change_enrollment.py | 5 ++ .../test_change_enterprise_user_username.py | 5 ++ .../tests/test_create_random_users.py | 5 ++ .../tests/test_create_test_users.py | 5 ++ .../tests/test_export_staff_users.py | 5 ++ .../management/tests/test_manage_group.py | 5 ++ .../management/tests/test_manage_user.py | 5 ++ ...populate_created_on_site_user_attribute.py | 5 ++ .../management/tests/test_recover_account.py | 5 ++ .../tests/test_transfer_students.py | 5 ++ import_shims/studio/student/message_types.py | 5 ++ import_shims/studio/student/middleware.py | 5 ++ import_shims/studio/student/models.py | 5 ++ import_shims/studio/student/models_api.py | 5 ++ import_shims/studio/student/role_helpers.py | 5 ++ import_shims/studio/student/roles.py | 5 ++ .../studio/student/signals/__init__.py | 5 ++ .../studio/student/signals/receivers.py | 5 ++ .../studio/student/signals/signals.py | 5 ++ import_shims/studio/student/tasks.py | 5 ++ import_shims/studio/student/tests/__init__.py | 5 ++ .../studio/student/tests/factories.py | 5 ++ .../student/tests/test_activate_account.py | 5 ++ .../studio/student/tests/test_admin_views.py | 5 ++ .../studio/student/tests/test_authz.py | 5 ++ .../student/tests/test_bulk_email_settings.py | 5 ++ .../studio/student/tests/test_certificates.py | 5 ++ .../tests/test_configuration_overrides.py | 5 ++ .../student/tests/test_course_listing.py | 5 ++ .../studio/student/tests/test_credit.py | 5 ++ .../studio/student/tests/test_email.py | 5 ++ .../studio/student/tests/test_enrollment.py | 5 ++ .../studio/student/tests/test_events.py | 5 ++ .../studio/student/tests/test_helpers.py | 5 ++ .../studio/student/tests/test_linkedin.py | 5 ++ .../student/tests/test_long_username_email.py | 5 ++ .../studio/student/tests/test_models.py | 5 ++ .../student/tests/test_parental_controls.py | 5 ++ .../student/tests/test_password_policy.py | 5 ++ .../studio/student/tests/test_receivers.py | 5 ++ .../student/tests/test_recent_enrollments.py | 5 ++ .../studio/student/tests/test_refunds.py | 5 ++ .../studio/student/tests/test_retirement.py | 5 ++ .../studio/student/tests/test_roles.py | 5 ++ .../studio/student/tests/test_tasks.py | 5 ++ .../tests/test_user_profile_properties.py | 5 ++ .../studio/student/tests/test_userstanding.py | 5 ++ .../student/tests/test_verification_status.py | 5 ++ .../studio/student/tests/test_views.py | 5 ++ import_shims/studio/student/tests/tests.py | 5 ++ .../studio/student/text_me_the_app.py | 5 ++ import_shims/studio/student/urls.py | 5 ++ import_shims/studio/student/views/__init__.py | 5 ++ .../studio/student/views/dashboard.py | 5 ++ .../studio/student/views/management.py | 5 ++ import_shims/studio/terrain/__init__.py | 5 ++ import_shims/studio/terrain/stubs/__init__.py | 5 ++ import_shims/studio/terrain/stubs/catalog.py | 5 ++ import_shims/studio/terrain/stubs/comments.py | 5 ++ .../studio/terrain/stubs/ecommerce.py | 5 ++ import_shims/studio/terrain/stubs/edxnotes.py | 5 ++ import_shims/studio/terrain/stubs/http.py | 5 ++ import_shims/studio/terrain/stubs/lti.py | 5 ++ import_shims/studio/terrain/stubs/start.py | 5 ++ .../studio/terrain/stubs/tests/__init__.py | 5 ++ .../terrain/stubs/tests/test_edxnotes.py | 5 ++ .../studio/terrain/stubs/tests/test_http.py | 5 ++ .../terrain/stubs/tests/test_lti_stub.py | 5 ++ .../studio/terrain/stubs/tests/test_video.py | 5 ++ .../terrain/stubs/tests/test_xqueue_stub.py | 5 ++ .../terrain/stubs/tests/test_youtube_stub.py | 5 ++ .../studio/terrain/stubs/video_source.py | 5 ++ import_shims/studio/terrain/stubs/xqueue.py | 5 ++ import_shims/studio/terrain/stubs/youtube.py | 5 ++ .../studio/third_party_auth/__init__.py | 5 ++ import_shims/studio/third_party_auth/admin.py | 5 ++ .../studio/third_party_auth/api/__init__.py | 5 ++ .../third_party_auth/api/permissions.py | 5 ++ .../third_party_auth/api/serializers.py | 5 ++ .../third_party_auth/api/tests/__init__.py | 5 ++ .../api/tests/test_permissions.py | 5 ++ .../third_party_auth/api/tests/test_views.py | 5 ++ .../studio/third_party_auth/api/urls.py | 5 ++ .../studio/third_party_auth/api/utils.py | 5 ++ .../studio/third_party_auth/api/views.py | 5 ++ .../studio/third_party_auth/appleid.py | 5 ++ import_shims/studio/third_party_auth/apps.py | 5 ++ .../studio/third_party_auth/decorators.py | 5 ++ import_shims/studio/third_party_auth/dummy.py | 5 ++ .../studio/third_party_auth/exceptions.py | 5 ++ .../third_party_auth/identityserver3.py | 5 ++ import_shims/studio/third_party_auth/lti.py | 5 ++ .../third_party_auth/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../commands/remove_social_auth_users.py | 5 ++ .../management/commands/saml.py | 5 ++ .../management/commands/tests/__init__.py | 5 ++ .../tests/test_remove_social_auth_users.py | 5 ++ .../management/commands/tests/test_saml.py | 5 ++ .../studio/third_party_auth/middleware.py | 5 ++ .../studio/third_party_auth/models.py | 5 ++ .../studio/third_party_auth/pipeline.py | 5 ++ .../studio/third_party_auth/provider.py | 5 ++ import_shims/studio/third_party_auth/saml.py | 5 ++ .../saml_configuration/__init__.py | 5 ++ .../saml_configuration/serializers.py | 5 ++ .../saml_configuration/tests/__init__.py | 5 ++ .../tests/test_saml_configuration.py | 5 ++ .../saml_configuration/urls.py | 5 ++ .../saml_configuration/views.py | 5 ++ .../samlproviderconfig/__init__.py | 5 ++ .../samlproviderconfig/serializers.py | 5 ++ .../tests/test_samlproviderconfig.py | 5 ++ .../samlproviderconfig/urls.py | 5 ++ .../samlproviderconfig/views.py | 5 ++ .../samlproviderdata/__init__.py | 5 ++ .../samlproviderdata/serializers.py | 5 ++ .../tests/test_samlproviderdata.py | 5 ++ .../third_party_auth/samlproviderdata/urls.py | 5 ++ .../samlproviderdata/views.py | 5 ++ .../studio/third_party_auth/settings.py | 5 ++ .../studio/third_party_auth/strategy.py | 5 ++ import_shims/studio/third_party_auth/tasks.py | 5 ++ .../studio/third_party_auth/tests/__init__.py | 5 ++ .../third_party_auth/tests/data/__init__.py | 5 ++ .../data/saml_identity_provider_mock_data.py | 5 ++ .../third_party_auth/tests/factories.py | 5 ++ .../third_party_auth/tests/samlutils.py | 5 ++ .../third_party_auth/tests/specs/__init__.py | 5 ++ .../third_party_auth/tests/specs/base.py | 5 ++ .../tests/specs/test_azuread.py | 5 ++ .../tests/specs/test_generic.py | 5 ++ .../tests/specs/test_google.py | 5 ++ .../tests/specs/test_linkedin.py | 5 ++ .../third_party_auth/tests/specs/test_lti.py | 5 ++ .../tests/specs/test_testshib.py | 5 ++ .../tests/specs/test_twitter.py | 5 ++ .../third_party_auth/tests/test_admin.py | 5 ++ .../third_party_auth/tests/test_decorators.py | 5 ++ .../tests/test_identityserver3.py | 5 ++ .../studio/third_party_auth/tests/test_lti.py | 5 ++ .../third_party_auth/tests/test_middleware.py | 5 ++ .../third_party_auth/tests/test_pipeline.py | 5 ++ .../tests/test_pipeline_integration.py | 5 ++ .../third_party_auth/tests/test_provider.py | 5 ++ .../third_party_auth/tests/test_saml.py | 5 ++ .../third_party_auth/tests/test_settings.py | 5 ++ .../third_party_auth/tests/test_utils.py | 5 ++ .../third_party_auth/tests/test_views.py | 5 ++ .../studio/third_party_auth/tests/testutil.py | 5 ++ .../studio/third_party_auth/tests/utils.py | 5 ++ import_shims/studio/third_party_auth/urls.py | 5 ++ import_shims/studio/third_party_auth/utils.py | 5 ++ import_shims/studio/third_party_auth/views.py | 5 ++ import_shims/studio/track/__init__.py | 5 ++ .../studio/track/backends/__init__.py | 5 ++ import_shims/studio/track/backends/logger.py | 5 ++ import_shims/studio/track/backends/mongodb.py | 5 ++ .../studio/track/backends/tests/__init__.py | 5 ++ .../track/backends/tests/test_logger.py | 5 ++ .../track/backends/tests/test_mongodb.py | 5 ++ import_shims/studio/track/contexts.py | 5 ++ .../studio/track/event_transaction_utils.py | 5 ++ .../studio/track/management/__init__.py | 5 ++ .../track/management/commands/__init__.py | 5 ++ .../commands/tracked_dummy_command.py | 5 ++ .../studio/track/management/tests/__init__.py | 5 ++ .../management/tests/test_tracked_command.py | 5 ++ .../track/management/tracked_command.py | 5 ++ import_shims/studio/track/middleware.py | 5 ++ import_shims/studio/track/segment.py | 5 ++ import_shims/studio/track/shim.py | 5 ++ import_shims/studio/track/tests/__init__.py | 5 ++ .../studio/track/tests/test_contexts.py | 5 ++ .../studio/track/tests/test_middleware.py | 5 ++ .../studio/track/tests/test_segment.py | 5 ++ import_shims/studio/track/tests/test_shim.py | 5 ++ .../studio/track/tests/test_tracker.py | 5 ++ import_shims/studio/track/tests/test_util.py | 5 ++ import_shims/studio/track/tracker.py | 5 ++ import_shims/studio/track/transformers.py | 5 ++ import_shims/studio/track/urls.py | 5 ++ import_shims/studio/track/utils.py | 5 ++ import_shims/studio/track/views/__init__.py | 5 ++ import_shims/studio/track/views/segmentio.py | 5 ++ .../studio/track/views/tests/__init__.py | 5 ++ import_shims/studio/track/views/tests/base.py | 5 ++ .../track/views/tests/test_segmentio.py | 5 ++ .../studio/track/views/tests/test_views.py | 5 ++ import_shims/studio/util/__init__.py | 5 ++ import_shims/studio/util/admin.py | 5 ++ import_shims/studio/util/cache.py | 5 ++ import_shims/studio/util/config_parse.py | 5 ++ import_shims/studio/util/course.py | 5 ++ import_shims/studio/util/date_utils.py | 5 ++ import_shims/studio/util/db.py | 5 ++ .../studio/util/disable_rate_limit.py | 5 ++ import_shims/studio/util/file.py | 5 ++ import_shims/studio/util/json_request.py | 5 ++ .../studio/util/keyword_substitution.py | 5 ++ import_shims/studio/util/memcache.py | 5 ++ .../studio/util/milestones_helpers.py | 5 ++ import_shims/studio/util/model_utils.py | 5 ++ import_shims/studio/util/models.py | 5 ++ import_shims/studio/util/module_utils.py | 5 ++ .../studio/util/organizations_helpers.py | 5 ++ .../studio/util/password_policy_validators.py | 5 ++ import_shims/studio/util/query.py | 5 ++ .../studio/util/request_rate_limiter.py | 5 ++ import_shims/studio/util/string_utils.py | 5 ++ import_shims/studio/util/testing.py | 5 ++ import_shims/studio/util/tests/__init__.py | 5 ++ .../studio/util/tests/mixins/__init__.py | 5 ++ .../studio/util/tests/mixins/discovery.py | 5 ++ import_shims/studio/util/tests/test_course.py | 5 ++ .../studio/util/tests/test_date_utils.py | 5 ++ import_shims/studio/util/tests/test_db.py | 5 ++ .../util/tests/test_disable_rate_limit.py | 5 ++ .../studio/util/tests/test_django_utils.py | 5 ++ import_shims/studio/util/tests/test_file.py | 5 ++ .../studio/util/tests/test_json_request.py | 5 ++ .../util/tests/test_keyword_sub_utils.py | 5 ++ .../studio/util/tests/test_memcache.py | 5 ++ .../util/tests/test_milestones_helpers.py | 5 ++ .../util/tests/test_organizations_helpers.py | 5 ++ .../tests/test_password_policy_validators.py | 5 ++ .../studio/util/tests/test_sandboxing.py | 5 ++ .../studio/util/tests/test_string_utils.py | 5 ++ import_shims/studio/util/url.py | 5 ++ import_shims/studio/util/validate_on_save.py | 5 ++ import_shims/studio/util/views.py | 5 ++ import_shims/studio/xblock_django/__init__.py | 5 ++ import_shims/studio/xblock_django/admin.py | 5 ++ import_shims/studio/xblock_django/api.py | 5 ++ .../xblock_django/management/__init__.py | 5 ++ .../management/commands/__init__.py | 5 ++ .../management/commands/ensure_indexes.py | 5 ++ import_shims/studio/xblock_django/models.py | 5 ++ .../studio/xblock_django/tests/__init__.py | 5 ++ .../studio/xblock_django/tests/test_api.py | 5 ++ .../xblock_django/tests/test_user_service.py | 5 ++ .../studio/xblock_django/user_service.py | 5 ++ lms/devstack.yml | 18 ++--- lms/djangoapps/badges/api/tests.py | 4 +- .../backends/tests/test_badgr_backend.py | 4 +- .../badges/events/course_complete.py | 2 +- .../events/tests/test_course_complete.py | 2 +- .../badges/events/tests/test_course_meta.py | 4 +- lms/djangoapps/badges/handlers.py | 4 +- lms/djangoapps/badges/tests/factories.py | 2 +- lms/djangoapps/badges/tests/test_models.py | 2 +- lms/djangoapps/branding/api.py | 2 +- lms/djangoapps/branding/tests/test_page.py | 14 ++-- lms/djangoapps/branding/tests/test_views.py | 4 +- lms/djangoapps/branding/views.py | 10 +-- lms/djangoapps/bulk_email/models.py | 8 +- lms/djangoapps/bulk_email/signals.py | 2 +- lms/djangoapps/bulk_email/tasks.py | 4 +- .../bulk_email/tests/test_course_optout.py | 4 +- lms/djangoapps/bulk_email/tests/test_email.py | 8 +- .../bulk_email/tests/test_err_handling.py | 2 +- .../bulk_email/tests/test_models.py | 4 +- .../bulk_email/tests/test_signals.py | 2 +- lms/djangoapps/bulk_email/tests/test_views.py | 2 +- lms/djangoapps/bulk_email/views.py | 2 +- .../bulk_enroll/tests/test_views.py | 4 +- lms/djangoapps/bulk_enroll/views.py | 2 +- lms/djangoapps/ccx/api/v0/tests/test_views.py | 6 +- lms/djangoapps/ccx/api/v0/views.py | 4 +- lms/djangoapps/ccx/plugins.py | 2 +- lms/djangoapps/ccx/tests/factories.py | 2 +- .../ccx/tests/test_ccx_modulestore.py | 2 +- .../tests/test_field_override_performance.py | 6 +- lms/djangoapps/ccx/tests/test_models.py | 4 +- lms/djangoapps/ccx/tests/test_overrides.py | 2 +- lms/djangoapps/ccx/tests/test_tasks.py | 4 +- lms/djangoapps/ccx/tests/test_utils.py | 6 +- lms/djangoapps/ccx/tests/test_views.py | 8 +- lms/djangoapps/ccx/tests/utils.py | 4 +- lms/djangoapps/ccx/utils.py | 4 +- lms/djangoapps/ccx/views.py | 6 +- lms/djangoapps/certificates/admin.py | 2 +- lms/djangoapps/certificates/api.py | 2 +- .../certificates/apis/v0/tests/test_views.py | 4 +- lms/djangoapps/certificates/models.py | 12 +-- lms/djangoapps/certificates/queue.py | 4 +- lms/djangoapps/certificates/signals.py | 4 +- .../certificates/tests/factories.py | 2 +- lms/djangoapps/certificates/tests/test_api.py | 10 +-- .../tests/test_cert_management.py | 4 +- .../tests/test_create_fake_cert.py | 2 +- .../certificates/tests/test_models.py | 2 +- .../certificates/tests/test_queue.py | 4 +- .../certificates/tests/test_services.py | 2 +- .../certificates/tests/test_signals.py | 2 +- .../certificates/tests/test_support_views.py | 8 +- .../certificates/tests/test_tasks.py | 2 +- .../certificates/tests/test_views.py | 2 +- .../certificates/tests/test_webview_views.py | 12 +-- lms/djangoapps/certificates/tests/tests.py | 6 +- lms/djangoapps/certificates/views/support.py | 4 +- lms/djangoapps/certificates/views/webview.py | 12 +-- lms/djangoapps/certificates/views/xqueue.py | 4 +- .../commerce/api/v0/tests/test_views.py | 8 +- lms/djangoapps/commerce/api/v0/views.py | 10 +-- lms/djangoapps/commerce/api/v1/models.py | 2 +- lms/djangoapps/commerce/api/v1/serializers.py | 2 +- .../commerce/api/v1/tests/test_models.py | 2 +- .../commerce/api/v1/tests/test_views.py | 4 +- lms/djangoapps/commerce/api/v1/views.py | 4 +- lms/djangoapps/commerce/http.py | 2 +- ...rs_for_old_enterprise_course_enrollment.py | 4 +- ...rs_for_old_enterprise_course_enrollmnet.py | 4 +- lms/djangoapps/commerce/signals.py | 2 +- lms/djangoapps/commerce/tests/__init__.py | 2 +- lms/djangoapps/commerce/tests/test_signals.py | 6 +- lms/djangoapps/commerce/tests/test_utils.py | 10 +-- lms/djangoapps/commerce/tests/test_views.py | 2 +- lms/djangoapps/commerce/utils.py | 4 +- lms/djangoapps/course_api/api.py | 4 +- .../course_api/blocks/permissions.py | 4 +- .../course_api/blocks/tests/test_api.py | 4 +- .../course_api/blocks/tests/test_forms.py | 4 +- .../blocks/tests/test_serializers.py | 4 +- .../course_api/blocks/tests/test_views.py | 4 +- .../blocks/transformers/milestones.py | 4 +- .../tests/test_block_completion.py | 2 +- .../transformers/tests/test_milestones.py | 2 +- lms/djangoapps/course_api/permissions.py | 2 +- lms/djangoapps/course_api/tests/mixins.py | 2 +- lms/djangoapps/course_api/tests/test_forms.py | 2 +- lms/djangoapps/course_api/tests/test_views.py | 10 +-- .../transformers/library_content.py | 2 +- .../transformers/tests/helpers.py | 4 +- .../tests/test_library_content.py | 2 +- .../tests/test_load_override_data.py | 2 +- .../transformers/tests/test_split_test.py | 2 +- .../tests/test_user_partitions.py | 4 +- lms/djangoapps/course_goals/api.py | 2 +- lms/djangoapps/course_goals/handlers.py | 4 +- lms/djangoapps/course_goals/tests/test_api.py | 4 +- lms/djangoapps/course_goals/views.py | 2 +- .../course_metadata/v1/tests/test_views.py | 6 +- .../course_metadata/v1/views.py | 2 +- .../dates/v1/tests/test_views.py | 4 +- .../outline/v1/tests/test_views.py | 6 +- .../course_home_api/outline/v1/views.py | 4 +- .../progress/v1/tests/test_views.py | 6 +- .../course_home_api/progress/v1/views.py | 2 +- lms/djangoapps/course_home_api/tests/utils.py | 4 +- lms/djangoapps/course_wiki/middleware.py | 2 +- .../course_wiki/tests/test_access.py | 2 +- lms/djangoapps/course_wiki/tests/test_tab.py | 2 +- lms/djangoapps/courseware/access.py | 10 +-- lms/djangoapps/courseware/access_utils.py | 4 +- lms/djangoapps/courseware/course_tools.py | 4 +- lms/djangoapps/courseware/courses.py | 6 +- lms/djangoapps/courseware/date_summary.py | 4 +- lms/djangoapps/courseware/entrance_exams.py | 4 +- lms/djangoapps/courseware/masquerade.py | 8 +- lms/djangoapps/courseware/module_render.py | 20 ++--- lms/djangoapps/courseware/rules.py | 6 +- lms/djangoapps/courseware/services.py | 2 +- lms/djangoapps/courseware/tabs.py | 2 +- lms/djangoapps/courseware/tests/factories.py | 6 +- lms/djangoapps/courseware/tests/helpers.py | 8 +- lms/djangoapps/courseware/tests/test_about.py | 10 +-- .../courseware/tests/test_access.py | 8 +- .../tests/test_comprehensive_theming.py | 2 +- .../tests/test_context_processor.py | 2 +- .../courseware/tests/test_course_info.py | 8 +- .../courseware/tests/test_course_tools.py | 6 +- .../courseware/tests/test_courses.py | 2 +- .../tests/test_credit_requirements.py | 4 +- .../courseware/tests/test_date_summary.py | 6 +- .../tests/test_discussion_xblock.py | 2 +- .../courseware/tests/test_entrance_exam.py | 8 +- .../courseware/tests/test_favicon.py | 2 +- lms/djangoapps/courseware/tests/test_i18n.py | 2 +- .../courseware/tests/test_masquerade.py | 4 +- .../courseware/tests/test_model_data.py | 2 +- .../courseware/tests/test_module_render.py | 10 ++- .../courseware/tests/test_navigation.py | 2 +- lms/djangoapps/courseware/tests/test_rules.py | 6 +- .../courseware/tests/test_services.py | 2 +- .../courseware/tests/test_split_module.py | 2 +- .../tests/test_submitting_problems.py | 4 +- lms/djangoapps/courseware/tests/test_tabs.py | 12 +-- .../tests/test_view_authentication.py | 2 +- lms/djangoapps/courseware/tests/test_views.py | 20 ++--- lms/djangoapps/courseware/testutils.py | 2 +- lms/djangoapps/courseware/utils.py | 2 +- lms/djangoapps/courseware/views/index.py | 6 +- lms/djangoapps/courseware/views/views.py | 16 ++-- lms/djangoapps/dashboard/sysadmin.py | 12 +-- .../dashboard/tests/test_sysadmin.py | 6 +- lms/djangoapps/debug/views.py | 2 +- .../base/event_transformers.py | 4 +- .../django_comment_client/base/tests.py | 22 +++--- .../django_comment_client/base/views.py | 2 +- .../django_comment_client/tests/group_id.py | 4 +- .../django_comment_client/tests/test_utils.py | 8 +- .../django_comment_client/tests/utils.py | 4 +- .../discussion/django_comment_client/utils.py | 4 +- .../commands/assign_roles_for_course.py | 2 +- .../commands/create_roles_for_existing.py | 2 +- .../discussion/notification_prefs/tests.py | 4 +- .../discussion/notification_prefs/views.py | 2 +- .../discussion/rest_api/serializers.py | 2 +- .../discussion/rest_api/tests/test_api.py | 4 +- .../rest_api/tests/test_serializers.py | 4 +- .../discussion/rest_api/tests/test_views.py | 10 +-- lms/djangoapps/discussion/rest_api/views.py | 2 +- lms/djangoapps/discussion/tasks.py | 2 +- lms/djangoapps/discussion/tests/test_tasks.py | 4 +- lms/djangoapps/discussion/tests/test_views.py | 26 +++---- lms/djangoapps/discussion/views.py | 4 +- lms/djangoapps/edxnotes/decorators.py | 2 +- lms/djangoapps/edxnotes/helpers.py | 4 +- lms/djangoapps/edxnotes/tests.py | 4 +- lms/djangoapps/edxnotes/views.py | 4 +- lms/djangoapps/email_marketing/signals.py | 8 +- .../email_marketing/tests/test_signals.py | 6 +- lms/djangoapps/experiments/factories.py | 2 +- lms/djangoapps/experiments/flags.py | 4 +- .../experiments/tests/test_flags.py | 2 +- .../experiments/tests/test_utils.py | 2 +- .../experiments/tests/test_views.py | 2 +- .../experiments/tests/test_views_custom.py | 6 +- lms/djangoapps/experiments/utils.py | 6 +- lms/djangoapps/experiments/views.py | 4 +- lms/djangoapps/experiments/views_custom.py | 6 +- lms/djangoapps/gating/api.py | 2 +- .../gating/tests/test_integration.py | 2 +- lms/djangoapps/gating/tests/test_signals.py | 2 +- lms/djangoapps/grades/api.py | 2 +- lms/djangoapps/grades/events.py | 4 +- .../commands/recalculate_subsection_grades.py | 6 +- .../commands/tests/test_compute_grades.py | 2 +- .../tests/test_recalculate_learner_grades.py | 2 +- .../test_recalculate_subsection_grades.py | 4 +- .../grades/rest_api/v1/gradebook_views.py | 10 +-- .../grades/rest_api/v1/tests/mixins.py | 2 +- .../rest_api/v1/tests/test_gradebook_views.py | 4 +- .../v1/tests/test_grading_policy_view.py | 2 +- .../grades/rest_api/v1/tests/test_views.py | 2 +- lms/djangoapps/grades/rest_api/v1/utils.py | 4 +- lms/djangoapps/grades/signals/handlers.py | 8 +- .../grades/subsection_grade_factory.py | 2 +- lms/djangoapps/grades/tasks.py | 6 +- lms/djangoapps/grades/tests/base.py | 4 +- .../grades/tests/integration/test_access.py | 4 +- .../grades/tests/integration/test_events.py | 4 +- .../grades/tests/integration/test_problems.py | 4 +- lms/djangoapps/grades/tests/test_api.py | 2 +- .../grades/tests/test_course_data.py | 2 +- .../grades/tests/test_course_grade.py | 4 +- .../grades/tests/test_course_grade_factory.py | 2 +- lms/djangoapps/grades/tests/test_models.py | 4 +- lms/djangoapps/grades/tests/test_services.py | 2 +- lms/djangoapps/grades/tests/test_signals.py | 2 +- .../tests/test_subsection_grade_factory.py | 2 +- lms/djangoapps/grades/tests/test_tasks.py | 8 +- .../grades/tests/test_transformer.py | 2 +- lms/djangoapps/instructor/access.py | 2 +- lms/djangoapps/instructor/enrollment.py | 6 +- lms/djangoapps/instructor/services.py | 4 +- .../instructor/tests/test_access.py | 4 +- lms/djangoapps/instructor/tests/test_api.py | 10 +-- .../tests/test_api_email_localization.py | 4 +- .../instructor/tests/test_certificates.py | 4 +- lms/djangoapps/instructor/tests/test_email.py | 2 +- .../instructor/tests/test_enrollment.py | 6 +- .../instructor/tests/test_proctoring.py | 4 +- .../instructor/tests/test_services.py | 4 +- .../instructor/tests/test_spoc_gradebook.py | 2 +- lms/djangoapps/instructor/tests/test_tools.py | 2 +- lms/djangoapps/instructor/tests/utils.py | 2 +- .../tests/views/test_instructor_dashboard.py | 10 +-- lms/djangoapps/instructor/views/api.py | 14 ++-- .../instructor/views/gradebook_api.py | 2 +- .../instructor/views/instructor_dashboard.py | 10 +-- .../views/instructor_task_helpers.py | 2 +- lms/djangoapps/instructor/views/tools.py | 2 +- lms/djangoapps/instructor_analytics/basic.py | 2 +- .../instructor_analytics/distributions.py | 2 +- .../instructor_analytics/tests/test_basic.py | 12 +-- .../tests/test_distributions.py | 4 +- lms/djangoapps/instructor_task/api.py | 2 +- lms/djangoapps/instructor_task/api_helper.py | 2 +- lms/djangoapps/instructor_task/subtasks.py | 2 +- .../instructor_task/tasks_helper/certs.py | 2 +- .../tasks_helper/enrollments.py | 6 +- .../instructor_task/tasks_helper/grades.py | 6 +- .../instructor_task/tasks_helper/misc.py | 2 +- .../tasks_helper/module_state.py | 8 +- .../instructor_task/tasks_helper/runner.py | 2 +- .../instructor_task/tasks_helper/utils.py | 2 +- .../instructor_task/tests/factories.py | 2 +- .../instructor_task/tests/test_base.py | 2 +- .../instructor_task/tests/test_subtasks.py | 2 +- .../instructor_task/tests/test_tasks.py | 2 +- .../tests/test_tasks_helper.py | 8 +- .../learner_dashboard/tests/test_programs.py | 2 +- lms/djangoapps/learner_dashboard/views.py | 2 +- .../lms_xblock/test/test_runtime.py | 2 +- .../commands/tests/test_resend_lti_scores.py | 2 +- .../lti_provider/tests/test_outcomes.py | 2 +- .../lti_provider/tests/test_tasks.py | 2 +- .../lti_provider/tests/test_users.py | 2 +- .../lti_provider/tests/test_views.py | 2 +- lms/djangoapps/lti_provider/users.py | 2 +- lms/djangoapps/lti_provider/views.py | 2 +- .../commands/mailchimp_sync_course.py | 2 +- .../mobile_api/course_info/views.py | 2 +- .../mobile_api/tests/test_milestones.py | 2 +- lms/djangoapps/mobile_api/testutils.py | 4 +- .../mobile_api/users/serializers.py | 4 +- lms/djangoapps/mobile_api/users/tests.py | 10 +-- lms/djangoapps/mobile_api/users/views.py | 2 +- .../program_enrollments/api/grades.py | 2 +- .../program_enrollments/api/linking.py | 6 +- .../program_enrollments/api/reading.py | 4 +- .../api/tests/test_linking.py | 6 +- .../api/tests/test_reading.py | 8 +- .../api/tests/test_writing.py | 8 +- .../program_enrollments/api/writing.py | 6 +- .../program_enrollments/constants.py | 2 +- .../commands/reset_enrollment_data.py | 2 +- .../commands/tests/test_migrate_saml_uids.py | 2 +- .../tests/test_reset_enrollment_data.py | 4 +- .../management/commands/tests/utils.py | 2 +- lms/djangoapps/program_enrollments/models.py | 2 +- .../rest_api/v1/tests/test_views.py | 10 +-- .../program_enrollments/rest_api/v1/utils.py | 6 +- .../program_enrollments/rest_api/v1/views.py | 4 +- lms/djangoapps/program_enrollments/signals.py | 2 +- .../program_enrollments/tests/factories.py | 2 +- .../program_enrollments/tests/test_models.py | 4 +- .../program_enrollments/tests/test_signals.py | 12 +-- .../program_enrollments/tests/test_tasks.py | 4 +- lms/djangoapps/static_template_view/views.py | 6 +- lms/djangoapps/staticbook/tests.py | 2 +- lms/djangoapps/staticbook/views.py | 4 +- lms/djangoapps/support/serializers.py | 2 +- lms/djangoapps/support/tests/test_views.py | 12 +-- lms/djangoapps/support/views/certificate.py | 2 +- lms/djangoapps/support/views/contact_us.py | 4 +- .../support/views/course_entitlements.py | 4 +- lms/djangoapps/support/views/enrollments.py | 8 +- .../views/feature_based_enrollments.py | 2 +- lms/djangoapps/support/views/index.py | 2 +- lms/djangoapps/support/views/manage_user.py | 6 +- .../support/views/program_enrollments.py | 4 +- lms/djangoapps/support/views/sso_records.py | 2 +- lms/djangoapps/survey/models.py | 2 +- lms/djangoapps/survey/tests/factories.py | 2 +- lms/djangoapps/survey/tests/test_signals.py | 2 +- lms/djangoapps/survey/tests/test_views.py | 2 +- lms/djangoapps/survey/views.py | 2 +- lms/djangoapps/teams/api.py | 6 +- lms/djangoapps/teams/csv.py | 2 +- .../teams/migrations/0001_initial.py | 4 +- .../teams/migrations/0004_alter_defaults.py | 4 +- lms/djangoapps/teams/models.py | 2 +- lms/djangoapps/teams/tests/test_api.py | 8 +- lms/djangoapps/teams/tests/test_csv.py | 4 +- lms/djangoapps/teams/tests/test_models.py | 6 +- .../teams/tests/test_serializers.py | 2 +- lms/djangoapps/teams/tests/test_services.py | 2 +- lms/djangoapps/teams/tests/test_views.py | 8 +- lms/djangoapps/teams/utils.py | 2 +- lms/djangoapps/teams/views.py | 4 +- ...sso_verifications_for_old_account_links.py | 2 +- .../commands/populate_expiry_date.py | 2 +- .../send_verification_expiry_email.py | 6 +- ...sso_verifications_for_old_account_links.py | 2 +- .../tests/test_manual_verify_student.py | 2 +- .../tests/test_populate_expiry_date.py | 2 +- .../test_send_verification_expiry_email.py | 2 +- .../commands/tests/test_verify_student.py | 2 +- .../migrations/0006_ssoverification.py | 14 +++- lms/djangoapps/verify_student/models.py | 6 +- lms/djangoapps/verify_student/services.py | 4 +- lms/djangoapps/verify_student/tasks.py | 2 +- .../verify_student/tests/__init__.py | 2 +- .../tests/fake_software_secure.py | 2 +- .../tests/test_fake_software_secure.py | 4 +- .../verify_student/tests/test_integration.py | 6 +- .../verify_student/tests/test_models.py | 2 +- .../verify_student/tests/test_services.py | 2 +- .../verify_student/tests/test_signals.py | 2 +- .../verify_student/tests/test_utils.py | 2 +- .../verify_student/tests/test_views.py | 10 +-- lms/djangoapps/verify_student/views.py | 12 +-- lms/envs/bok_choy.py | 2 +- lms/envs/bok_choy.yml | 18 ++--- lms/envs/bok_choy_docker.yml | 18 ++--- lms/envs/common.py | 74 +++++++++---------- lms/envs/devstack.py | 10 ++- lms/envs/devstack_decentralized.py | 10 ++- lms/envs/docs/README.rst | 2 +- lms/envs/production.py | 10 +-- lms/envs/static.py | 4 +- lms/envs/test.py | 12 +-- .../courseware_search/lms_filter_generator.py | 2 +- .../test/test_lms_filter_generator.py | 4 +- .../instructor_dashboard.js | 2 +- lms/templates/courseware/course_about.html | 2 +- lms/templates/courseware/gradebook.html | 2 +- lms/templates/courseware/progress.html | 2 +- lms/templates/dashboard.html | 8 +- .../_dashboard_certificate_information.html | 4 +- .../dashboard/_dashboard_course_listing.html | 8 +- lms/templates/dates_banner.html | 2 +- .../financial-assistance.html | 2 +- lms/templates/main.html | 2 +- lms/templates/page_banner.html | 2 +- lms/templates/signup_modal.html | 2 +- lms/templates/sysadmin_dashboard_gitlogs.html | 2 +- lms/tests.py | 2 - lms/urls.py | 35 ++++++--- .../djangoapps/ace_common/template_context.py | 2 +- .../djangoapps/ace_common/tests/mixins.py | 2 +- .../api_admin/api/v1/tests/test_views.py | 2 +- .../tests/test_create_api_access_request.py | 2 +- openedx/core/djangoapps/api_admin/models.py | 2 +- .../djangoapps/api_admin/tests/factories.py | 2 +- .../djangoapps/api_admin/tests/test_models.py | 2 +- .../djangoapps/api_admin/tests/test_views.py | 2 +- openedx/core/djangoapps/api_admin/views.py | 2 +- .../core/djangoapps/auth_exchange/forms.py | 2 +- .../auth_exchange/tests/test_forms.py | 2 +- .../auth_exchange/tests/test_views.py | 4 +- .../djangoapps/auth_exchange/tests/utils.py | 2 +- .../djangoapps/bookmarks/tests/factories.py | 2 +- .../djangoapps/bookmarks/tests/test_models.py | 2 +- .../cache_toolbox/tests/test_middleware.py | 2 +- .../commands/tests/test_cache_programs.py | 2 +- .../djangoapps/catalog/tests/test_utils.py | 8 +- openedx/core/djangoapps/catalog/utils.py | 4 +- openedx/core/djangoapps/ccxcon/api.py | 4 +- .../core/djangoapps/ccxcon/tests/test_api.py | 2 +- openedx/core/djangoapps/certificates/api.py | 2 +- .../djangoapps/certificates/tests/test_api.py | 4 +- .../djangoapps/config_model_utils/utils.py | 2 +- .../content/course_overviews/models.py | 2 +- .../tests/test_course_overviews.py | 2 +- .../api/processors/enrollment.py | 2 +- .../api/processors/schedule.py | 4 +- .../api/tests/test_outlines.py | 6 +- .../learning_sequences/tests/test_views.py | 2 +- .../content_libraries/tests/base.py | 2 +- .../tests/test_content_libraries.py | 2 +- .../content_libraries/tests/test_runtime.py | 2 +- .../djangoapps/contentserver/middleware.py | 2 +- .../contentserver/test/test_contentserver.py | 4 +- openedx/core/djangoapps/cors_csrf/views.py | 2 +- .../core/djangoapps/course_groups/cohorts.py | 2 +- .../course_groups/tests/test_api_views.py | 2 +- .../course_groups/tests/test_cohorts.py | 4 +- .../tests/test_partition_scheme.py | 2 +- .../course_groups/tests/test_views.py | 4 +- .../core/djangoapps/course_groups/views.py | 6 +- .../courseware_api/tests/test_views.py | 4 +- .../core/djangoapps/courseware_api/views.py | 6 +- .../commands/tests/test_notify_credentials.py | 2 +- .../core/djangoapps/credentials/signals.py | 2 +- .../credentials/tests/test_signals.py | 2 +- .../credentials/tests/test_tasks.py | 2 +- .../credentials/tests/test_utils.py | 2 +- .../core/djangoapps/credit/api/eligibility.py | 4 +- .../core/djangoapps/credit/api/provider.py | 6 +- openedx/core/djangoapps/credit/email_utils.py | 4 +- openedx/core/djangoapps/credit/serializers.py | 2 +- openedx/core/djangoapps/credit/services.py | 2 +- .../core/djangoapps/credit/tests/factories.py | 2 +- .../core/djangoapps/credit/tests/test_api.py | 8 +- .../djangoapps/credit/tests/test_models.py | 2 +- .../credit/tests/test_serializers.py | 2 +- .../djangoapps/credit/tests/test_services.py | 4 +- .../djangoapps/credit/tests/test_signals.py | 6 +- .../djangoapps/credit/tests/test_views.py | 4 +- openedx/core/djangoapps/dark_lang/tests.py | 2 +- openedx/core/djangoapps/debug/views.py | 2 +- .../demographics/tests/test_status.py | 6 +- .../django_comment_common/models.py | 4 +- .../djangoapps/django_comment_common/tests.py | 2 +- openedx/core/djangoapps/embargo/api.py | 2 +- .../core/djangoapps/embargo/tests/test_api.py | 6 +- .../embargo/tests/test_middleware.py | 4 +- .../djangoapps/embargo/tests/test_views.py | 4 +- openedx/core/djangoapps/embargo/views.py | 2 +- openedx/core/djangoapps/enrollments/api.py | 2 +- openedx/core/djangoapps/enrollments/data.py | 4 +- .../tests/test_enroll_user_in_course.py | 2 +- .../djangoapps/enrollments/serializers.py | 4 +- .../djangoapps/enrollments/tests/test_api.py | 2 +- .../djangoapps/enrollments/tests/test_data.py | 8 +- .../enrollments/tests/test_views.py | 14 ++-- openedx/core/djangoapps/enrollments/views.py | 10 +-- .../tests/test_admin_generate_id.py | 2 +- .../external_user_ids/tests/test_signals.py | 8 +- .../geoinfo/tests/test_middleware.py | 2 +- openedx/core/djangoapps/heartbeat/views.py | 2 +- .../lang_pref/tests/test_middleware.py | 2 +- .../djangoapps/lang_pref/tests/test_views.py | 2 +- openedx/core/djangoapps/oauth_dispatch/jwt.py | 2 +- .../tests/test_clear_expired_tokens.py | 2 +- .../tests/test_create_dot_application.py | 2 +- .../oauth_dispatch/tests/factories.py | 2 +- .../djangoapps/oauth_dispatch/tests/mixins.py | 2 +- .../oauth_dispatch/tests/test_api.py | 2 +- .../tests/test_client_credentials.py | 2 +- .../oauth_dispatch/tests/test_dot_adapter.py | 2 +- .../tests/test_dot_overrides.py | 2 +- .../oauth_dispatch/tests/test_factories.py | 2 +- .../oauth_dispatch/tests/test_jwt.py | 2 +- .../oauth_dispatch/tests/test_views.py | 4 +- .../core/djangoapps/olx_rest_api/adapters.py | 2 +- .../djangoapps/olx_rest_api/test_views.py | 4 +- openedx/core/djangoapps/olx_rest_api/views.py | 2 +- .../djangoapps/password_policy/compliance.py | 4 +- .../password_policy/tests/test_compliance.py | 6 +- .../password_policy/tests/test_forms.py | 2 +- openedx/core/djangoapps/plugin_api/views.py | 2 +- .../profile_images/tests/test_views.py | 6 +- .../backpopulate_program_credentials.py | 2 +- openedx/core/djangoapps/programs/tasks.py | 2 +- .../test_backpopulate_program_credentials.py | 4 +- .../djangoapps/programs/tests/test_signals.py | 2 +- .../djangoapps/programs/tests/test_tasks.py | 2 +- .../djangoapps/programs/tests/test_utils.py | 10 +-- openedx/core/djangoapps/programs/utils.py | 12 +-- .../safe_sessions/tests/test_middleware.py | 2 +- .../commands/tests/send_email_base.py | 8 +- .../commands/tests/test_send_course_update.py | 2 +- .../tests/test_send_upgrade_reminder.py | 4 +- openedx/core/djangoapps/schedules/signals.py | 8 +- openedx/core/djangoapps/schedules/tasks.py | 2 +- .../djangoapps/schedules/tests/factories.py | 2 +- .../tests/test_content_highlights.py | 4 +- .../schedules/tests/test_resolvers.py | 2 +- .../schedules/tests/test_signals.py | 8 +- .../djangoapps/schedules/tests/test_utils.py | 4 +- openedx/core/djangoapps/schedules/utils.py | 1 - .../tests/test_middleware.py | 2 +- .../system_wide_roles/tests/test_models.py | 2 +- .../create_sites_and_configurations.py | 2 +- .../test_create_sites_and_configurations.py | 2 +- .../djangoapps/theming/template_loaders.py | 2 +- .../theming/tests/test_middleware.py | 2 +- .../tests/test_theme_style_overrides.py | 2 +- .../djangoapps/theming/tests/test_util.py | 2 +- .../djangoapps/theming/tests/test_views.py | 2 +- openedx/core/djangoapps/theming/views.py | 2 +- .../core/djangoapps/user_api/accounts/api.py | 8 +- .../user_api/accounts/image_helpers.py | 2 +- .../user_api/accounts/serializers.py | 4 +- .../user_api/accounts/settings_views.py | 10 +-- .../accounts/tests/retirement_helpers.py | 4 +- .../user_api/accounts/tests/test_api.py | 12 +-- .../accounts/tests/test_image_helpers.py | 2 +- .../user_api/accounts/tests/test_models.py | 4 +- .../accounts/tests/test_permissions.py | 2 +- .../accounts/tests/test_retirement_views.py | 8 +- .../accounts/tests/test_serializers.py | 4 +- .../accounts/tests/test_settings_views.py | 4 +- .../user_api/accounts/tests/test_utils.py | 4 +- .../user_api/accounts/tests/test_views.py | 8 +- .../user_api/accounts/tests/testutils.py | 2 +- .../djangoapps/user_api/accounts/views.py | 4 +- .../user_api/course_tag/tests/test_api.py | 2 +- .../commands/create_user_gdpr_testing.py | 4 +- .../management/commands/retire_user.py | 2 +- .../commands/sync_hubspot_contacts.py | 4 +- .../tests/test_cancel_retirement.py | 2 +- .../tests/test_email_opt_in_list.py | 4 +- .../tests/test_populate_retirement_states.py | 2 +- .../management/tests/test_retire_user.py | 2 +- .../tests/test_sync_hubspot_contacts.py | 4 +- .../core/djangoapps/user_api/middleware.py | 2 +- openedx/core/djangoapps/user_api/models.py | 4 +- .../djangoapps/user_api/preferences/api.py | 4 +- .../user_api/preferences/tests/test_api.py | 4 +- .../user_api/preferences/tests/test_views.py | 2 +- .../djangoapps/user_api/tests/factories.py | 2 +- .../user_api/tests/test_middleware.py | 2 +- .../djangoapps/user_api/tests/test_models.py | 4 +- .../user_api/tests/test_partition_schemes.py | 2 +- .../djangoapps/user_api/tests/test_views.py | 8 +- .../verification_api/tests/test_views.py | 2 +- openedx/core/djangoapps/user_api/views.py | 4 +- .../user_authn/api/tests/test_views.py | 4 +- openedx/core/djangoapps/user_authn/cookies.py | 1 - .../user_authn/tests/test_cookies.py | 3 +- .../core/djangoapps/user_authn/tests/utils.py | 2 +- openedx/core/djangoapps/user_authn/utils.py | 4 +- .../djangoapps/user_authn/views/auto_auth.py | 6 +- .../core/djangoapps/user_authn/views/login.py | 18 ++--- .../djangoapps/user_authn/views/login_form.py | 12 +-- .../djangoapps/user_authn/views/logout.py | 2 +- .../user_authn/views/password_reset.py | 10 +-- .../djangoapps/user_authn/views/register.py | 18 ++--- .../user_authn/views/registration_form.py | 8 +- .../user_authn/views/tests/test_auto_auth.py | 4 +- .../user_authn/views/tests/test_login.py | 14 ++-- .../views/tests/test_logistration.py | 8 +- .../user_authn/views/tests/test_logout.py | 2 +- .../user_authn/views/tests/test_register.py | 22 ++++-- .../views/tests/test_reset_password.py | 20 +++-- openedx/core/djangoapps/util/row_delete.py | 2 +- openedx/core/djangoapps/util/testing.py | 2 +- .../util/tests/test_user_messages.py | 2 +- .../swap_from_auto_track_cohort_pilot.py | 2 +- .../verified_track_content/models.py | 2 +- .../partition_scheme.py | 4 +- .../verified_track_content/tasks.py | 2 +- .../tests/test_models.py | 4 +- .../tests/test_partition_scheme.py | 6 +- .../tests/test_views.py | 2 +- .../verified_track_content/views.py | 2 +- .../video_pipeline/tests/test_api.py | 2 +- .../waffle_utils/tests/test_views.py | 4 +- .../core/djangoapps/xblock/runtime/runtime.py | 10 +-- .../core/djangoapps/xblock/runtime/shims.py | 2 +- openedx/core/djangolib/testing/utils.py | 2 +- .../tests/test_oauth2_retirement_utils.py | 2 +- openedx/core/lib/api/permissions.py | 2 +- .../core/lib/api/tests/test_permissions.py | 4 +- openedx/core/lib/gating/api.py | 2 +- openedx/core/lib/gating/tests/test_api.py | 2 +- openedx/core/lib/tests/test_edx_api_utils.py | 2 +- .../core/lib/tests/test_time_zone_utils.py | 2 +- openedx/core/lib/xblock_utils/__init__.py | 4 +- openedx/core/tests/test_admin_view.py | 2 +- .../announcements/tests/test_announcements.py | 2 +- openedx/features/calendar_sync/plugins.py | 2 +- .../features/calendar_sync/tests/test_api.py | 2 +- .../features/calendar_sync/tests/test_ics.py | 2 +- .../features/calendar_sync/tests/test_init.py | 2 +- .../calendar_sync/tests/test_models.py | 2 +- .../calendar_sync/views/calendar_sync.py | 2 +- .../features/content_type_gating/helpers.py | 6 +- .../content_type_gating/partitions.py | 2 +- .../content_type_gating/tests/test_access.py | 8 +- .../content_type_gating/tests/test_models.py | 4 +- .../tests/test_partitions.py | 4 +- openedx/features/course_bookmarks/plugins.py | 2 +- .../views/course_bookmarks.py | 2 +- .../features/course_duration_limits/access.py | 6 +- .../tests/test_access.py | 8 +- .../tests/test_course_expiration.py | 8 +- .../tests/test_models.py | 4 +- .../api/v1/tests/test_views.py | 4 +- openedx/features/course_experience/plugins.py | 2 +- .../course_experience/tests/views/helpers.py | 2 +- .../tests/views/test_course_dates.py | 2 +- .../tests/views/test_course_home.py | 14 ++-- .../tests/views/test_course_outline.py | 8 +- .../tests/views/test_course_sock.py | 4 +- .../tests/views/test_course_updates.py | 4 +- .../tests/views/test_masquerade.py | 4 +- .../tests/views/test_welcome_message.py | 4 +- openedx/features/course_experience/utils.py | 3 +- .../course_experience/views/course_dates.py | 1 - .../course_experience/views/course_home.py | 4 +- .../views/course_home_messages.py | 4 +- .../course_experience/views/course_outline.py | 5 +- .../course_experience/views/course_reviews.py | 2 +- .../course_experience/views/course_sock.py | 2 +- .../course_search/views/course_search.py | 2 +- openedx/features/discounts/applicability.py | 8 +- .../discounts/tests/test_applicability.py | 8 +- .../tests/test_discount_restriction_models.py | 2 +- .../features/discounts/tests/test_views.py | 2 +- openedx/features/discounts/utils.py | 2 +- .../enterprise_support/admin/views.py | 2 +- openedx/features/enterprise_support/api.py | 4 +- .../features/enterprise_support/signals.py | 2 +- .../enterprise_support/tests/test_admin.py | 4 +- .../enterprise_support/tests/test_api.py | 2 +- .../enterprise_support/tests/test_logout.py | 4 +- .../enterprise_support/tests/test_signals.py | 6 +- .../enterprise_support/tests/test_utils.py | 2 +- openedx/features/enterprise_support/utils.py | 4 +- .../templates/third_party_auth.html | 2 +- .../tests/views/test_learner_profile.py | 6 +- .../learner_profile/views/learner_profile.py | 4 +- .../completion_integration/test_models.py | 2 +- .../completion_integration/test_services.py | 2 +- .../completion_integration/test_views.py | 2 +- openedx/tests/settings.py | 11 +-- pylintrc | 5 +- pylintrc_tweaks | 6 +- scripts/xsslint_config.py | 1 + themes/edx.org/lms/templates/dashboard.html | 8 +- .../lms/templates/register-form.html | 6 +- 1707 files changed, 6132 insertions(+), 2430 deletions(-) create mode 100644 common/djangoapps/__init__.py create mode 100644 import_shims/lms/course_action_state/__init__.py create mode 100644 import_shims/lms/course_action_state/managers.py create mode 100644 import_shims/lms/course_action_state/models.py create mode 100644 import_shims/lms/course_action_state/tests/__init__.py create mode 100644 import_shims/lms/course_action_state/tests/test_managers.py create mode 100644 import_shims/lms/course_action_state/tests/test_rerun_manager.py create mode 100644 import_shims/lms/course_modes/__init__.py create mode 100644 import_shims/lms/course_modes/admin.py create mode 100644 import_shims/lms/course_modes/api.py create mode 100644 import_shims/lms/course_modes/apps.py create mode 100644 import_shims/lms/course_modes/helpers.py create mode 100644 import_shims/lms/course_modes/models.py create mode 100644 import_shims/lms/course_modes/rest_api/__init__.py create mode 100644 import_shims/lms/course_modes/rest_api/serializers.py create mode 100644 import_shims/lms/course_modes/rest_api/urls.py create mode 100644 import_shims/lms/course_modes/rest_api/v1/__init__.py create mode 100644 import_shims/lms/course_modes/rest_api/v1/tests/__init__.py create mode 100644 import_shims/lms/course_modes/rest_api/v1/tests/test_views.py create mode 100644 import_shims/lms/course_modes/rest_api/v1/urls.py create mode 100644 import_shims/lms/course_modes/rest_api/v1/views.py create mode 100644 import_shims/lms/course_modes/signals.py create mode 100644 import_shims/lms/course_modes/tests/__init__.py create mode 100644 import_shims/lms/course_modes/tests/factories.py create mode 100644 import_shims/lms/course_modes/tests/test_admin.py create mode 100644 import_shims/lms/course_modes/tests/test_models.py create mode 100644 import_shims/lms/course_modes/tests/test_signals.py create mode 100644 import_shims/lms/course_modes/tests/test_views.py create mode 100644 import_shims/lms/course_modes/urls.py create mode 100644 import_shims/lms/course_modes/views.py create mode 100644 import_shims/lms/database_fixups/__init__.py create mode 100644 import_shims/lms/edxmako/__init__.py create mode 100644 import_shims/lms/edxmako/apps.py create mode 100644 import_shims/lms/edxmako/backend.py create mode 100644 import_shims/lms/edxmako/makoloader.py create mode 100644 import_shims/lms/edxmako/paths.py create mode 100644 import_shims/lms/edxmako/request_context.py create mode 100644 import_shims/lms/edxmako/shortcuts.py create mode 100644 import_shims/lms/edxmako/template.py create mode 100644 import_shims/lms/edxmako/tests.py create mode 100644 import_shims/lms/entitlements/__init__.py create mode 100644 import_shims/lms/entitlements/admin.py create mode 100644 import_shims/lms/entitlements/api.py create mode 100644 import_shims/lms/entitlements/apps.py create mode 100644 import_shims/lms/entitlements/management/__init__.py create mode 100644 import_shims/lms/entitlements/management/commands/__init__.py create mode 100644 import_shims/lms/entitlements/management/commands/expire_old_entitlements.py create mode 100644 import_shims/lms/entitlements/management/commands/tests/__init__.py create mode 100644 import_shims/lms/entitlements/management/commands/tests/test_expire_old_entitlements.py create mode 100644 import_shims/lms/entitlements/management/commands/update_entitlement_mode.py create mode 100644 import_shims/lms/entitlements/models.py create mode 100644 import_shims/lms/entitlements/rest_api/__init__.py create mode 100644 import_shims/lms/entitlements/rest_api/urls.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/__init__.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/filters.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/permissions.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/serializers.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/tests/__init__.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/tests/test_serializers.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/tests/test_views.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/urls.py create mode 100644 import_shims/lms/entitlements/rest_api/v1/views.py create mode 100644 import_shims/lms/entitlements/signals.py create mode 100644 import_shims/lms/entitlements/tasks.py create mode 100644 import_shims/lms/entitlements/tests/__init__.py create mode 100644 import_shims/lms/entitlements/tests/factories.py create mode 100644 import_shims/lms/entitlements/tests/test_models.py create mode 100644 import_shims/lms/entitlements/tests/test_tasks.py create mode 100644 import_shims/lms/entitlements/tests/test_utils.py create mode 100644 import_shims/lms/entitlements/utils.py create mode 100644 import_shims/lms/pipeline_mako/__init__.py create mode 100644 import_shims/lms/pipeline_mako/helpers/__init__.py create mode 100644 import_shims/lms/pipeline_mako/helpers/studiofrontend.py create mode 100644 import_shims/lms/pipeline_mako/tests/__init__.py create mode 100644 import_shims/lms/pipeline_mako/tests/test_render.py create mode 100644 import_shims/lms/pipeline_mako/tests/test_static_content.py create mode 100644 import_shims/lms/static_replace/__init__.py create mode 100644 import_shims/lms/static_replace/admin.py create mode 100644 import_shims/lms/static_replace/management/__init__.py create mode 100644 import_shims/lms/static_replace/management/commands/__init__.py create mode 100644 import_shims/lms/static_replace/management/commands/clear_collectstatic_cache.py create mode 100644 import_shims/lms/static_replace/models.py create mode 100644 import_shims/lms/static_replace/test/__init__.py create mode 100644 import_shims/lms/static_replace/test/test_static_replace.py create mode 100644 import_shims/lms/status/__init__.py create mode 100644 import_shims/lms/status/models.py create mode 100644 import_shims/lms/status/status.py create mode 100644 import_shims/lms/status/tests.py create mode 100644 import_shims/lms/student/__init__.py create mode 100644 import_shims/lms/student/admin.py create mode 100644 import_shims/lms/student/api.py create mode 100644 import_shims/lms/student/apps.py create mode 100644 import_shims/lms/student/auth.py create mode 100644 import_shims/lms/student/forms.py create mode 100644 import_shims/lms/student/helpers.py create mode 100644 import_shims/lms/student/management/__init__.py create mode 100644 import_shims/lms/student/management/commands/__init__.py create mode 100644 import_shims/lms/student/management/commands/_create_users.py create mode 100644 import_shims/lms/student/management/commands/add_to_group.py create mode 100644 import_shims/lms/student/management/commands/anonymized_id_mapping.py create mode 100644 import_shims/lms/student/management/commands/assigngroups.py create mode 100644 import_shims/lms/student/management/commands/bulk_change_enrollment.py create mode 100644 import_shims/lms/student/management/commands/bulk_change_enrollment_csv.py create mode 100644 import_shims/lms/student/management/commands/bulk_unenroll.py create mode 100644 import_shims/lms/student/management/commands/bulk_update_email.py create mode 100644 import_shims/lms/student/management/commands/cert_restriction.py create mode 100644 import_shims/lms/student/management/commands/change_eligibility_deadline.py create mode 100644 import_shims/lms/student/management/commands/change_enrollment.py create mode 100644 import_shims/lms/student/management/commands/change_enterprise_user_username.py create mode 100644 import_shims/lms/student/management/commands/create_random_users.py create mode 100644 import_shims/lms/student/management/commands/create_test_users.py create mode 100644 import_shims/lms/student/management/commands/export_staff_users.py create mode 100644 import_shims/lms/student/management/commands/manage_group.py create mode 100644 import_shims/lms/student/management/commands/manage_user.py create mode 100644 import_shims/lms/student/management/commands/populate_created_on_site_user_attribute.py create mode 100644 import_shims/lms/student/management/commands/recover_account.py create mode 100644 import_shims/lms/student/management/commands/set_staff.py create mode 100644 import_shims/lms/student/management/commands/set_superuser.py create mode 100644 import_shims/lms/student/management/commands/transfer_students.py create mode 100644 import_shims/lms/student/management/tests/__init__.py create mode 100644 import_shims/lms/student/management/tests/test_bulk_change_enrollment.py create mode 100644 import_shims/lms/student/management/tests/test_bulk_change_enrollment_csv.py create mode 100644 import_shims/lms/student/management/tests/test_bulk_unenroll.py create mode 100644 import_shims/lms/student/management/tests/test_change_eligibility_deadline.py create mode 100644 import_shims/lms/student/management/tests/test_change_enrollment.py create mode 100644 import_shims/lms/student/management/tests/test_change_enterprise_user_username.py create mode 100644 import_shims/lms/student/management/tests/test_create_random_users.py create mode 100644 import_shims/lms/student/management/tests/test_create_test_users.py create mode 100644 import_shims/lms/student/management/tests/test_export_staff_users.py create mode 100644 import_shims/lms/student/management/tests/test_manage_group.py create mode 100644 import_shims/lms/student/management/tests/test_manage_user.py create mode 100644 import_shims/lms/student/management/tests/test_populate_created_on_site_user_attribute.py create mode 100644 import_shims/lms/student/management/tests/test_recover_account.py create mode 100644 import_shims/lms/student/management/tests/test_transfer_students.py create mode 100644 import_shims/lms/student/message_types.py create mode 100644 import_shims/lms/student/middleware.py create mode 100644 import_shims/lms/student/models.py create mode 100644 import_shims/lms/student/models_api.py create mode 100644 import_shims/lms/student/role_helpers.py create mode 100644 import_shims/lms/student/roles.py create mode 100644 import_shims/lms/student/signals/__init__.py create mode 100644 import_shims/lms/student/signals/receivers.py create mode 100644 import_shims/lms/student/signals/signals.py create mode 100644 import_shims/lms/student/tasks.py create mode 100644 import_shims/lms/student/tests/__init__.py create mode 100644 import_shims/lms/student/tests/factories.py create mode 100644 import_shims/lms/student/tests/test_activate_account.py create mode 100644 import_shims/lms/student/tests/test_admin_views.py create mode 100644 import_shims/lms/student/tests/test_authz.py create mode 100644 import_shims/lms/student/tests/test_bulk_email_settings.py create mode 100644 import_shims/lms/student/tests/test_certificates.py create mode 100644 import_shims/lms/student/tests/test_configuration_overrides.py create mode 100644 import_shims/lms/student/tests/test_course_listing.py create mode 100644 import_shims/lms/student/tests/test_credit.py create mode 100644 import_shims/lms/student/tests/test_email.py create mode 100644 import_shims/lms/student/tests/test_enrollment.py create mode 100644 import_shims/lms/student/tests/test_events.py create mode 100644 import_shims/lms/student/tests/test_helpers.py create mode 100644 import_shims/lms/student/tests/test_linkedin.py create mode 100644 import_shims/lms/student/tests/test_long_username_email.py create mode 100644 import_shims/lms/student/tests/test_models.py create mode 100644 import_shims/lms/student/tests/test_parental_controls.py create mode 100644 import_shims/lms/student/tests/test_password_policy.py create mode 100644 import_shims/lms/student/tests/test_receivers.py create mode 100644 import_shims/lms/student/tests/test_recent_enrollments.py create mode 100644 import_shims/lms/student/tests/test_refunds.py create mode 100644 import_shims/lms/student/tests/test_retirement.py create mode 100644 import_shims/lms/student/tests/test_roles.py create mode 100644 import_shims/lms/student/tests/test_tasks.py create mode 100644 import_shims/lms/student/tests/test_user_profile_properties.py create mode 100644 import_shims/lms/student/tests/test_userstanding.py create mode 100644 import_shims/lms/student/tests/test_verification_status.py create mode 100644 import_shims/lms/student/tests/test_views.py create mode 100644 import_shims/lms/student/tests/tests.py create mode 100644 import_shims/lms/student/text_me_the_app.py create mode 100644 import_shims/lms/student/urls.py create mode 100644 import_shims/lms/student/views/__init__.py create mode 100644 import_shims/lms/student/views/dashboard.py create mode 100644 import_shims/lms/student/views/management.py create mode 100644 import_shims/lms/terrain/__init__.py create mode 100644 import_shims/lms/terrain/stubs/__init__.py create mode 100644 import_shims/lms/terrain/stubs/catalog.py create mode 100644 import_shims/lms/terrain/stubs/comments.py create mode 100644 import_shims/lms/terrain/stubs/ecommerce.py create mode 100644 import_shims/lms/terrain/stubs/edxnotes.py create mode 100644 import_shims/lms/terrain/stubs/http.py create mode 100644 import_shims/lms/terrain/stubs/lti.py create mode 100644 import_shims/lms/terrain/stubs/start.py create mode 100644 import_shims/lms/terrain/stubs/tests/__init__.py create mode 100644 import_shims/lms/terrain/stubs/tests/test_edxnotes.py create mode 100644 import_shims/lms/terrain/stubs/tests/test_http.py create mode 100644 import_shims/lms/terrain/stubs/tests/test_lti_stub.py create mode 100644 import_shims/lms/terrain/stubs/tests/test_video.py create mode 100644 import_shims/lms/terrain/stubs/tests/test_xqueue_stub.py create mode 100644 import_shims/lms/terrain/stubs/tests/test_youtube_stub.py create mode 100644 import_shims/lms/terrain/stubs/video_source.py create mode 100644 import_shims/lms/terrain/stubs/xqueue.py create mode 100644 import_shims/lms/terrain/stubs/youtube.py create mode 100644 import_shims/lms/third_party_auth/__init__.py create mode 100644 import_shims/lms/third_party_auth/admin.py create mode 100644 import_shims/lms/third_party_auth/api/__init__.py create mode 100644 import_shims/lms/third_party_auth/api/permissions.py create mode 100644 import_shims/lms/third_party_auth/api/serializers.py create mode 100644 import_shims/lms/third_party_auth/api/tests/__init__.py create mode 100644 import_shims/lms/third_party_auth/api/tests/test_permissions.py create mode 100644 import_shims/lms/third_party_auth/api/tests/test_views.py create mode 100644 import_shims/lms/third_party_auth/api/urls.py create mode 100644 import_shims/lms/third_party_auth/api/utils.py create mode 100644 import_shims/lms/third_party_auth/api/views.py create mode 100644 import_shims/lms/third_party_auth/appleid.py create mode 100644 import_shims/lms/third_party_auth/apps.py create mode 100644 import_shims/lms/third_party_auth/decorators.py create mode 100644 import_shims/lms/third_party_auth/dummy.py create mode 100644 import_shims/lms/third_party_auth/exceptions.py create mode 100644 import_shims/lms/third_party_auth/identityserver3.py create mode 100644 import_shims/lms/third_party_auth/lti.py create mode 100644 import_shims/lms/third_party_auth/management/__init__.py create mode 100644 import_shims/lms/third_party_auth/management/commands/__init__.py create mode 100644 import_shims/lms/third_party_auth/management/commands/remove_social_auth_users.py create mode 100644 import_shims/lms/third_party_auth/management/commands/saml.py create mode 100644 import_shims/lms/third_party_auth/management/commands/tests/__init__.py create mode 100644 import_shims/lms/third_party_auth/management/commands/tests/test_remove_social_auth_users.py create mode 100644 import_shims/lms/third_party_auth/management/commands/tests/test_saml.py create mode 100644 import_shims/lms/third_party_auth/middleware.py create mode 100644 import_shims/lms/third_party_auth/models.py create mode 100644 import_shims/lms/third_party_auth/pipeline.py create mode 100644 import_shims/lms/third_party_auth/provider.py create mode 100644 import_shims/lms/third_party_auth/saml.py create mode 100644 import_shims/lms/third_party_auth/saml_configuration/__init__.py create mode 100644 import_shims/lms/third_party_auth/saml_configuration/serializers.py create mode 100644 import_shims/lms/third_party_auth/saml_configuration/tests/__init__.py create mode 100644 import_shims/lms/third_party_auth/saml_configuration/tests/test_saml_configuration.py create mode 100644 import_shims/lms/third_party_auth/saml_configuration/urls.py create mode 100644 import_shims/lms/third_party_auth/saml_configuration/views.py create mode 100644 import_shims/lms/third_party_auth/samlproviderconfig/__init__.py create mode 100644 import_shims/lms/third_party_auth/samlproviderconfig/serializers.py create mode 100644 import_shims/lms/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py create mode 100644 import_shims/lms/third_party_auth/samlproviderconfig/urls.py create mode 100644 import_shims/lms/third_party_auth/samlproviderconfig/views.py create mode 100644 import_shims/lms/third_party_auth/samlproviderdata/__init__.py create mode 100644 import_shims/lms/third_party_auth/samlproviderdata/serializers.py create mode 100644 import_shims/lms/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py create mode 100644 import_shims/lms/third_party_auth/samlproviderdata/urls.py create mode 100644 import_shims/lms/third_party_auth/samlproviderdata/views.py create mode 100644 import_shims/lms/third_party_auth/settings.py create mode 100644 import_shims/lms/third_party_auth/strategy.py create mode 100644 import_shims/lms/third_party_auth/tasks.py create mode 100644 import_shims/lms/third_party_auth/tests/__init__.py create mode 100644 import_shims/lms/third_party_auth/tests/data/__init__.py create mode 100644 import_shims/lms/third_party_auth/tests/data/saml_identity_provider_mock_data.py create mode 100644 import_shims/lms/third_party_auth/tests/factories.py create mode 100644 import_shims/lms/third_party_auth/tests/samlutils.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/__init__.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/base.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/test_azuread.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/test_generic.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/test_google.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/test_linkedin.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/test_lti.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/test_testshib.py create mode 100644 import_shims/lms/third_party_auth/tests/specs/test_twitter.py create mode 100644 import_shims/lms/third_party_auth/tests/test_admin.py create mode 100644 import_shims/lms/third_party_auth/tests/test_decorators.py create mode 100644 import_shims/lms/third_party_auth/tests/test_identityserver3.py create mode 100644 import_shims/lms/third_party_auth/tests/test_lti.py create mode 100644 import_shims/lms/third_party_auth/tests/test_middleware.py create mode 100644 import_shims/lms/third_party_auth/tests/test_pipeline.py create mode 100644 import_shims/lms/third_party_auth/tests/test_pipeline_integration.py create mode 100644 import_shims/lms/third_party_auth/tests/test_provider.py create mode 100644 import_shims/lms/third_party_auth/tests/test_saml.py create mode 100644 import_shims/lms/third_party_auth/tests/test_settings.py create mode 100644 import_shims/lms/third_party_auth/tests/test_utils.py create mode 100644 import_shims/lms/third_party_auth/tests/test_views.py create mode 100644 import_shims/lms/third_party_auth/tests/testutil.py create mode 100644 import_shims/lms/third_party_auth/tests/utils.py create mode 100644 import_shims/lms/third_party_auth/urls.py create mode 100644 import_shims/lms/third_party_auth/utils.py create mode 100644 import_shims/lms/third_party_auth/views.py create mode 100644 import_shims/lms/track/__init__.py create mode 100644 import_shims/lms/track/backends/__init__.py create mode 100644 import_shims/lms/track/backends/logger.py create mode 100644 import_shims/lms/track/backends/mongodb.py create mode 100644 import_shims/lms/track/backends/tests/__init__.py create mode 100644 import_shims/lms/track/backends/tests/test_logger.py create mode 100644 import_shims/lms/track/backends/tests/test_mongodb.py create mode 100644 import_shims/lms/track/contexts.py create mode 100644 import_shims/lms/track/event_transaction_utils.py create mode 100644 import_shims/lms/track/management/__init__.py create mode 100644 import_shims/lms/track/management/commands/__init__.py create mode 100644 import_shims/lms/track/management/commands/tracked_dummy_command.py create mode 100644 import_shims/lms/track/management/tests/__init__.py create mode 100644 import_shims/lms/track/management/tests/test_tracked_command.py create mode 100644 import_shims/lms/track/management/tracked_command.py create mode 100644 import_shims/lms/track/middleware.py create mode 100644 import_shims/lms/track/segment.py create mode 100644 import_shims/lms/track/shim.py create mode 100644 import_shims/lms/track/tests/__init__.py create mode 100644 import_shims/lms/track/tests/test_contexts.py create mode 100644 import_shims/lms/track/tests/test_middleware.py create mode 100644 import_shims/lms/track/tests/test_segment.py create mode 100644 import_shims/lms/track/tests/test_shim.py create mode 100644 import_shims/lms/track/tests/test_tracker.py create mode 100644 import_shims/lms/track/tests/test_util.py create mode 100644 import_shims/lms/track/tracker.py create mode 100644 import_shims/lms/track/transformers.py create mode 100644 import_shims/lms/track/urls.py create mode 100644 import_shims/lms/track/utils.py create mode 100644 import_shims/lms/track/views/__init__.py create mode 100644 import_shims/lms/track/views/segmentio.py create mode 100644 import_shims/lms/track/views/tests/__init__.py create mode 100644 import_shims/lms/track/views/tests/base.py create mode 100644 import_shims/lms/track/views/tests/test_segmentio.py create mode 100644 import_shims/lms/track/views/tests/test_views.py create mode 100644 import_shims/lms/util/__init__.py create mode 100644 import_shims/lms/util/admin.py create mode 100644 import_shims/lms/util/cache.py create mode 100644 import_shims/lms/util/config_parse.py create mode 100644 import_shims/lms/util/course.py create mode 100644 import_shims/lms/util/date_utils.py create mode 100644 import_shims/lms/util/db.py create mode 100644 import_shims/lms/util/disable_rate_limit.py create mode 100644 import_shims/lms/util/file.py create mode 100644 import_shims/lms/util/json_request.py create mode 100644 import_shims/lms/util/keyword_substitution.py create mode 100644 import_shims/lms/util/memcache.py create mode 100644 import_shims/lms/util/milestones_helpers.py create mode 100644 import_shims/lms/util/model_utils.py create mode 100644 import_shims/lms/util/models.py create mode 100644 import_shims/lms/util/module_utils.py create mode 100644 import_shims/lms/util/organizations_helpers.py create mode 100644 import_shims/lms/util/password_policy_validators.py create mode 100644 import_shims/lms/util/query.py create mode 100644 import_shims/lms/util/request_rate_limiter.py create mode 100644 import_shims/lms/util/string_utils.py create mode 100644 import_shims/lms/util/testing.py create mode 100644 import_shims/lms/util/tests/__init__.py create mode 100644 import_shims/lms/util/tests/mixins/__init__.py create mode 100644 import_shims/lms/util/tests/mixins/discovery.py create mode 100644 import_shims/lms/util/tests/test_course.py create mode 100644 import_shims/lms/util/tests/test_date_utils.py create mode 100644 import_shims/lms/util/tests/test_db.py create mode 100644 import_shims/lms/util/tests/test_disable_rate_limit.py create mode 100644 import_shims/lms/util/tests/test_django_utils.py create mode 100644 import_shims/lms/util/tests/test_file.py create mode 100644 import_shims/lms/util/tests/test_json_request.py create mode 100644 import_shims/lms/util/tests/test_keyword_sub_utils.py create mode 100644 import_shims/lms/util/tests/test_memcache.py create mode 100644 import_shims/lms/util/tests/test_milestones_helpers.py create mode 100644 import_shims/lms/util/tests/test_organizations_helpers.py create mode 100644 import_shims/lms/util/tests/test_password_policy_validators.py create mode 100644 import_shims/lms/util/tests/test_sandboxing.py create mode 100644 import_shims/lms/util/tests/test_string_utils.py create mode 100644 import_shims/lms/util/url.py create mode 100644 import_shims/lms/util/validate_on_save.py create mode 100644 import_shims/lms/util/views.py create mode 100644 import_shims/lms/xblock_django/__init__.py create mode 100644 import_shims/lms/xblock_django/admin.py create mode 100644 import_shims/lms/xblock_django/api.py create mode 100644 import_shims/lms/xblock_django/management/__init__.py create mode 100644 import_shims/lms/xblock_django/management/commands/__init__.py create mode 100644 import_shims/lms/xblock_django/management/commands/ensure_indexes.py create mode 100644 import_shims/lms/xblock_django/models.py create mode 100644 import_shims/lms/xblock_django/tests/__init__.py create mode 100644 import_shims/lms/xblock_django/tests/test_api.py create mode 100644 import_shims/lms/xblock_django/tests/test_user_service.py create mode 100644 import_shims/lms/xblock_django/user_service.py create mode 100644 import_shims/studio/course_action_state/__init__.py create mode 100644 import_shims/studio/course_action_state/managers.py create mode 100644 import_shims/studio/course_action_state/models.py create mode 100644 import_shims/studio/course_action_state/tests/__init__.py create mode 100644 import_shims/studio/course_action_state/tests/test_managers.py create mode 100644 import_shims/studio/course_action_state/tests/test_rerun_manager.py create mode 100644 import_shims/studio/course_modes/__init__.py create mode 100644 import_shims/studio/course_modes/admin.py create mode 100644 import_shims/studio/course_modes/api.py create mode 100644 import_shims/studio/course_modes/apps.py create mode 100644 import_shims/studio/course_modes/helpers.py create mode 100644 import_shims/studio/course_modes/models.py create mode 100644 import_shims/studio/course_modes/rest_api/__init__.py create mode 100644 import_shims/studio/course_modes/rest_api/serializers.py create mode 100644 import_shims/studio/course_modes/rest_api/urls.py create mode 100644 import_shims/studio/course_modes/rest_api/v1/__init__.py create mode 100644 import_shims/studio/course_modes/rest_api/v1/tests/__init__.py create mode 100644 import_shims/studio/course_modes/rest_api/v1/tests/test_views.py create mode 100644 import_shims/studio/course_modes/rest_api/v1/urls.py create mode 100644 import_shims/studio/course_modes/rest_api/v1/views.py create mode 100644 import_shims/studio/course_modes/signals.py create mode 100644 import_shims/studio/course_modes/tests/__init__.py create mode 100644 import_shims/studio/course_modes/tests/factories.py create mode 100644 import_shims/studio/course_modes/tests/test_admin.py create mode 100644 import_shims/studio/course_modes/tests/test_models.py create mode 100644 import_shims/studio/course_modes/tests/test_signals.py create mode 100644 import_shims/studio/course_modes/tests/test_views.py create mode 100644 import_shims/studio/course_modes/urls.py create mode 100644 import_shims/studio/course_modes/views.py create mode 100644 import_shims/studio/database_fixups/__init__.py create mode 100644 import_shims/studio/edxmako/__init__.py create mode 100644 import_shims/studio/edxmako/apps.py create mode 100644 import_shims/studio/edxmako/backend.py create mode 100644 import_shims/studio/edxmako/makoloader.py create mode 100644 import_shims/studio/edxmako/paths.py create mode 100644 import_shims/studio/edxmako/request_context.py create mode 100644 import_shims/studio/edxmako/shortcuts.py create mode 100644 import_shims/studio/edxmako/template.py create mode 100644 import_shims/studio/edxmako/tests.py create mode 100644 import_shims/studio/entitlements/__init__.py create mode 100644 import_shims/studio/entitlements/admin.py create mode 100644 import_shims/studio/entitlements/api.py create mode 100644 import_shims/studio/entitlements/apps.py create mode 100644 import_shims/studio/entitlements/management/__init__.py create mode 100644 import_shims/studio/entitlements/management/commands/__init__.py create mode 100644 import_shims/studio/entitlements/management/commands/expire_old_entitlements.py create mode 100644 import_shims/studio/entitlements/management/commands/tests/__init__.py create mode 100644 import_shims/studio/entitlements/management/commands/tests/test_expire_old_entitlements.py create mode 100644 import_shims/studio/entitlements/management/commands/update_entitlement_mode.py create mode 100644 import_shims/studio/entitlements/models.py create mode 100644 import_shims/studio/entitlements/rest_api/__init__.py create mode 100644 import_shims/studio/entitlements/rest_api/urls.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/__init__.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/filters.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/permissions.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/serializers.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/tests/__init__.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/tests/test_serializers.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/tests/test_views.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/urls.py create mode 100644 import_shims/studio/entitlements/rest_api/v1/views.py create mode 100644 import_shims/studio/entitlements/signals.py create mode 100644 import_shims/studio/entitlements/tasks.py create mode 100644 import_shims/studio/entitlements/tests/__init__.py create mode 100644 import_shims/studio/entitlements/tests/factories.py create mode 100644 import_shims/studio/entitlements/tests/test_models.py create mode 100644 import_shims/studio/entitlements/tests/test_tasks.py create mode 100644 import_shims/studio/entitlements/tests/test_utils.py create mode 100644 import_shims/studio/entitlements/utils.py create mode 100644 import_shims/studio/pipeline_mako/__init__.py create mode 100644 import_shims/studio/pipeline_mako/helpers/__init__.py create mode 100644 import_shims/studio/pipeline_mako/helpers/studiofrontend.py create mode 100644 import_shims/studio/pipeline_mako/tests/__init__.py create mode 100644 import_shims/studio/pipeline_mako/tests/test_render.py create mode 100644 import_shims/studio/pipeline_mako/tests/test_static_content.py create mode 100644 import_shims/studio/static_replace/__init__.py create mode 100644 import_shims/studio/static_replace/admin.py create mode 100644 import_shims/studio/static_replace/management/__init__.py create mode 100644 import_shims/studio/static_replace/management/commands/__init__.py create mode 100644 import_shims/studio/static_replace/management/commands/clear_collectstatic_cache.py create mode 100644 import_shims/studio/static_replace/models.py create mode 100644 import_shims/studio/static_replace/test/__init__.py create mode 100644 import_shims/studio/static_replace/test/test_static_replace.py create mode 100644 import_shims/studio/status/__init__.py create mode 100644 import_shims/studio/status/models.py create mode 100644 import_shims/studio/status/status.py create mode 100644 import_shims/studio/status/tests.py create mode 100644 import_shims/studio/student/__init__.py create mode 100644 import_shims/studio/student/admin.py create mode 100644 import_shims/studio/student/api.py create mode 100644 import_shims/studio/student/apps.py create mode 100644 import_shims/studio/student/auth.py create mode 100644 import_shims/studio/student/forms.py create mode 100644 import_shims/studio/student/helpers.py create mode 100644 import_shims/studio/student/management/__init__.py create mode 100644 import_shims/studio/student/management/commands/__init__.py create mode 100644 import_shims/studio/student/management/commands/_create_users.py create mode 100644 import_shims/studio/student/management/commands/add_to_group.py create mode 100644 import_shims/studio/student/management/commands/anonymized_id_mapping.py create mode 100644 import_shims/studio/student/management/commands/assigngroups.py create mode 100644 import_shims/studio/student/management/commands/bulk_change_enrollment.py create mode 100644 import_shims/studio/student/management/commands/bulk_change_enrollment_csv.py create mode 100644 import_shims/studio/student/management/commands/bulk_unenroll.py create mode 100644 import_shims/studio/student/management/commands/bulk_update_email.py create mode 100644 import_shims/studio/student/management/commands/cert_restriction.py create mode 100644 import_shims/studio/student/management/commands/change_eligibility_deadline.py create mode 100644 import_shims/studio/student/management/commands/change_enrollment.py create mode 100644 import_shims/studio/student/management/commands/change_enterprise_user_username.py create mode 100644 import_shims/studio/student/management/commands/create_random_users.py create mode 100644 import_shims/studio/student/management/commands/create_test_users.py create mode 100644 import_shims/studio/student/management/commands/export_staff_users.py create mode 100644 import_shims/studio/student/management/commands/manage_group.py create mode 100644 import_shims/studio/student/management/commands/manage_user.py create mode 100644 import_shims/studio/student/management/commands/populate_created_on_site_user_attribute.py create mode 100644 import_shims/studio/student/management/commands/recover_account.py create mode 100644 import_shims/studio/student/management/commands/set_staff.py create mode 100644 import_shims/studio/student/management/commands/set_superuser.py create mode 100644 import_shims/studio/student/management/commands/transfer_students.py create mode 100644 import_shims/studio/student/management/tests/__init__.py create mode 100644 import_shims/studio/student/management/tests/test_bulk_change_enrollment.py create mode 100644 import_shims/studio/student/management/tests/test_bulk_change_enrollment_csv.py create mode 100644 import_shims/studio/student/management/tests/test_bulk_unenroll.py create mode 100644 import_shims/studio/student/management/tests/test_change_eligibility_deadline.py create mode 100644 import_shims/studio/student/management/tests/test_change_enrollment.py create mode 100644 import_shims/studio/student/management/tests/test_change_enterprise_user_username.py create mode 100644 import_shims/studio/student/management/tests/test_create_random_users.py create mode 100644 import_shims/studio/student/management/tests/test_create_test_users.py create mode 100644 import_shims/studio/student/management/tests/test_export_staff_users.py create mode 100644 import_shims/studio/student/management/tests/test_manage_group.py create mode 100644 import_shims/studio/student/management/tests/test_manage_user.py create mode 100644 import_shims/studio/student/management/tests/test_populate_created_on_site_user_attribute.py create mode 100644 import_shims/studio/student/management/tests/test_recover_account.py create mode 100644 import_shims/studio/student/management/tests/test_transfer_students.py create mode 100644 import_shims/studio/student/message_types.py create mode 100644 import_shims/studio/student/middleware.py create mode 100644 import_shims/studio/student/models.py create mode 100644 import_shims/studio/student/models_api.py create mode 100644 import_shims/studio/student/role_helpers.py create mode 100644 import_shims/studio/student/roles.py create mode 100644 import_shims/studio/student/signals/__init__.py create mode 100644 import_shims/studio/student/signals/receivers.py create mode 100644 import_shims/studio/student/signals/signals.py create mode 100644 import_shims/studio/student/tasks.py create mode 100644 import_shims/studio/student/tests/__init__.py create mode 100644 import_shims/studio/student/tests/factories.py create mode 100644 import_shims/studio/student/tests/test_activate_account.py create mode 100644 import_shims/studio/student/tests/test_admin_views.py create mode 100644 import_shims/studio/student/tests/test_authz.py create mode 100644 import_shims/studio/student/tests/test_bulk_email_settings.py create mode 100644 import_shims/studio/student/tests/test_certificates.py create mode 100644 import_shims/studio/student/tests/test_configuration_overrides.py create mode 100644 import_shims/studio/student/tests/test_course_listing.py create mode 100644 import_shims/studio/student/tests/test_credit.py create mode 100644 import_shims/studio/student/tests/test_email.py create mode 100644 import_shims/studio/student/tests/test_enrollment.py create mode 100644 import_shims/studio/student/tests/test_events.py create mode 100644 import_shims/studio/student/tests/test_helpers.py create mode 100644 import_shims/studio/student/tests/test_linkedin.py create mode 100644 import_shims/studio/student/tests/test_long_username_email.py create mode 100644 import_shims/studio/student/tests/test_models.py create mode 100644 import_shims/studio/student/tests/test_parental_controls.py create mode 100644 import_shims/studio/student/tests/test_password_policy.py create mode 100644 import_shims/studio/student/tests/test_receivers.py create mode 100644 import_shims/studio/student/tests/test_recent_enrollments.py create mode 100644 import_shims/studio/student/tests/test_refunds.py create mode 100644 import_shims/studio/student/tests/test_retirement.py create mode 100644 import_shims/studio/student/tests/test_roles.py create mode 100644 import_shims/studio/student/tests/test_tasks.py create mode 100644 import_shims/studio/student/tests/test_user_profile_properties.py create mode 100644 import_shims/studio/student/tests/test_userstanding.py create mode 100644 import_shims/studio/student/tests/test_verification_status.py create mode 100644 import_shims/studio/student/tests/test_views.py create mode 100644 import_shims/studio/student/tests/tests.py create mode 100644 import_shims/studio/student/text_me_the_app.py create mode 100644 import_shims/studio/student/urls.py create mode 100644 import_shims/studio/student/views/__init__.py create mode 100644 import_shims/studio/student/views/dashboard.py create mode 100644 import_shims/studio/student/views/management.py create mode 100644 import_shims/studio/terrain/__init__.py create mode 100644 import_shims/studio/terrain/stubs/__init__.py create mode 100644 import_shims/studio/terrain/stubs/catalog.py create mode 100644 import_shims/studio/terrain/stubs/comments.py create mode 100644 import_shims/studio/terrain/stubs/ecommerce.py create mode 100644 import_shims/studio/terrain/stubs/edxnotes.py create mode 100644 import_shims/studio/terrain/stubs/http.py create mode 100644 import_shims/studio/terrain/stubs/lti.py create mode 100644 import_shims/studio/terrain/stubs/start.py create mode 100644 import_shims/studio/terrain/stubs/tests/__init__.py create mode 100644 import_shims/studio/terrain/stubs/tests/test_edxnotes.py create mode 100644 import_shims/studio/terrain/stubs/tests/test_http.py create mode 100644 import_shims/studio/terrain/stubs/tests/test_lti_stub.py create mode 100644 import_shims/studio/terrain/stubs/tests/test_video.py create mode 100644 import_shims/studio/terrain/stubs/tests/test_xqueue_stub.py create mode 100644 import_shims/studio/terrain/stubs/tests/test_youtube_stub.py create mode 100644 import_shims/studio/terrain/stubs/video_source.py create mode 100644 import_shims/studio/terrain/stubs/xqueue.py create mode 100644 import_shims/studio/terrain/stubs/youtube.py create mode 100644 import_shims/studio/third_party_auth/__init__.py create mode 100644 import_shims/studio/third_party_auth/admin.py create mode 100644 import_shims/studio/third_party_auth/api/__init__.py create mode 100644 import_shims/studio/third_party_auth/api/permissions.py create mode 100644 import_shims/studio/third_party_auth/api/serializers.py create mode 100644 import_shims/studio/third_party_auth/api/tests/__init__.py create mode 100644 import_shims/studio/third_party_auth/api/tests/test_permissions.py create mode 100644 import_shims/studio/third_party_auth/api/tests/test_views.py create mode 100644 import_shims/studio/third_party_auth/api/urls.py create mode 100644 import_shims/studio/third_party_auth/api/utils.py create mode 100644 import_shims/studio/third_party_auth/api/views.py create mode 100644 import_shims/studio/third_party_auth/appleid.py create mode 100644 import_shims/studio/third_party_auth/apps.py create mode 100644 import_shims/studio/third_party_auth/decorators.py create mode 100644 import_shims/studio/third_party_auth/dummy.py create mode 100644 import_shims/studio/third_party_auth/exceptions.py create mode 100644 import_shims/studio/third_party_auth/identityserver3.py create mode 100644 import_shims/studio/third_party_auth/lti.py create mode 100644 import_shims/studio/third_party_auth/management/__init__.py create mode 100644 import_shims/studio/third_party_auth/management/commands/__init__.py create mode 100644 import_shims/studio/third_party_auth/management/commands/remove_social_auth_users.py create mode 100644 import_shims/studio/third_party_auth/management/commands/saml.py create mode 100644 import_shims/studio/third_party_auth/management/commands/tests/__init__.py create mode 100644 import_shims/studio/third_party_auth/management/commands/tests/test_remove_social_auth_users.py create mode 100644 import_shims/studio/third_party_auth/management/commands/tests/test_saml.py create mode 100644 import_shims/studio/third_party_auth/middleware.py create mode 100644 import_shims/studio/third_party_auth/models.py create mode 100644 import_shims/studio/third_party_auth/pipeline.py create mode 100644 import_shims/studio/third_party_auth/provider.py create mode 100644 import_shims/studio/third_party_auth/saml.py create mode 100644 import_shims/studio/third_party_auth/saml_configuration/__init__.py create mode 100644 import_shims/studio/third_party_auth/saml_configuration/serializers.py create mode 100644 import_shims/studio/third_party_auth/saml_configuration/tests/__init__.py create mode 100644 import_shims/studio/third_party_auth/saml_configuration/tests/test_saml_configuration.py create mode 100644 import_shims/studio/third_party_auth/saml_configuration/urls.py create mode 100644 import_shims/studio/third_party_auth/saml_configuration/views.py create mode 100644 import_shims/studio/third_party_auth/samlproviderconfig/__init__.py create mode 100644 import_shims/studio/third_party_auth/samlproviderconfig/serializers.py create mode 100644 import_shims/studio/third_party_auth/samlproviderconfig/tests/test_samlproviderconfig.py create mode 100644 import_shims/studio/third_party_auth/samlproviderconfig/urls.py create mode 100644 import_shims/studio/third_party_auth/samlproviderconfig/views.py create mode 100644 import_shims/studio/third_party_auth/samlproviderdata/__init__.py create mode 100644 import_shims/studio/third_party_auth/samlproviderdata/serializers.py create mode 100644 import_shims/studio/third_party_auth/samlproviderdata/tests/test_samlproviderdata.py create mode 100644 import_shims/studio/third_party_auth/samlproviderdata/urls.py create mode 100644 import_shims/studio/third_party_auth/samlproviderdata/views.py create mode 100644 import_shims/studio/third_party_auth/settings.py create mode 100644 import_shims/studio/third_party_auth/strategy.py create mode 100644 import_shims/studio/third_party_auth/tasks.py create mode 100644 import_shims/studio/third_party_auth/tests/__init__.py create mode 100644 import_shims/studio/third_party_auth/tests/data/__init__.py create mode 100644 import_shims/studio/third_party_auth/tests/data/saml_identity_provider_mock_data.py create mode 100644 import_shims/studio/third_party_auth/tests/factories.py create mode 100644 import_shims/studio/third_party_auth/tests/samlutils.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/__init__.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/base.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/test_azuread.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/test_generic.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/test_google.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/test_linkedin.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/test_lti.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/test_testshib.py create mode 100644 import_shims/studio/third_party_auth/tests/specs/test_twitter.py create mode 100644 import_shims/studio/third_party_auth/tests/test_admin.py create mode 100644 import_shims/studio/third_party_auth/tests/test_decorators.py create mode 100644 import_shims/studio/third_party_auth/tests/test_identityserver3.py create mode 100644 import_shims/studio/third_party_auth/tests/test_lti.py create mode 100644 import_shims/studio/third_party_auth/tests/test_middleware.py create mode 100644 import_shims/studio/third_party_auth/tests/test_pipeline.py create mode 100644 import_shims/studio/third_party_auth/tests/test_pipeline_integration.py create mode 100644 import_shims/studio/third_party_auth/tests/test_provider.py create mode 100644 import_shims/studio/third_party_auth/tests/test_saml.py create mode 100644 import_shims/studio/third_party_auth/tests/test_settings.py create mode 100644 import_shims/studio/third_party_auth/tests/test_utils.py create mode 100644 import_shims/studio/third_party_auth/tests/test_views.py create mode 100644 import_shims/studio/third_party_auth/tests/testutil.py create mode 100644 import_shims/studio/third_party_auth/tests/utils.py create mode 100644 import_shims/studio/third_party_auth/urls.py create mode 100644 import_shims/studio/third_party_auth/utils.py create mode 100644 import_shims/studio/third_party_auth/views.py create mode 100644 import_shims/studio/track/__init__.py create mode 100644 import_shims/studio/track/backends/__init__.py create mode 100644 import_shims/studio/track/backends/logger.py create mode 100644 import_shims/studio/track/backends/mongodb.py create mode 100644 import_shims/studio/track/backends/tests/__init__.py create mode 100644 import_shims/studio/track/backends/tests/test_logger.py create mode 100644 import_shims/studio/track/backends/tests/test_mongodb.py create mode 100644 import_shims/studio/track/contexts.py create mode 100644 import_shims/studio/track/event_transaction_utils.py create mode 100644 import_shims/studio/track/management/__init__.py create mode 100644 import_shims/studio/track/management/commands/__init__.py create mode 100644 import_shims/studio/track/management/commands/tracked_dummy_command.py create mode 100644 import_shims/studio/track/management/tests/__init__.py create mode 100644 import_shims/studio/track/management/tests/test_tracked_command.py create mode 100644 import_shims/studio/track/management/tracked_command.py create mode 100644 import_shims/studio/track/middleware.py create mode 100644 import_shims/studio/track/segment.py create mode 100644 import_shims/studio/track/shim.py create mode 100644 import_shims/studio/track/tests/__init__.py create mode 100644 import_shims/studio/track/tests/test_contexts.py create mode 100644 import_shims/studio/track/tests/test_middleware.py create mode 100644 import_shims/studio/track/tests/test_segment.py create mode 100644 import_shims/studio/track/tests/test_shim.py create mode 100644 import_shims/studio/track/tests/test_tracker.py create mode 100644 import_shims/studio/track/tests/test_util.py create mode 100644 import_shims/studio/track/tracker.py create mode 100644 import_shims/studio/track/transformers.py create mode 100644 import_shims/studio/track/urls.py create mode 100644 import_shims/studio/track/utils.py create mode 100644 import_shims/studio/track/views/__init__.py create mode 100644 import_shims/studio/track/views/segmentio.py create mode 100644 import_shims/studio/track/views/tests/__init__.py create mode 100644 import_shims/studio/track/views/tests/base.py create mode 100644 import_shims/studio/track/views/tests/test_segmentio.py create mode 100644 import_shims/studio/track/views/tests/test_views.py create mode 100644 import_shims/studio/util/__init__.py create mode 100644 import_shims/studio/util/admin.py create mode 100644 import_shims/studio/util/cache.py create mode 100644 import_shims/studio/util/config_parse.py create mode 100644 import_shims/studio/util/course.py create mode 100644 import_shims/studio/util/date_utils.py create mode 100644 import_shims/studio/util/db.py create mode 100644 import_shims/studio/util/disable_rate_limit.py create mode 100644 import_shims/studio/util/file.py create mode 100644 import_shims/studio/util/json_request.py create mode 100644 import_shims/studio/util/keyword_substitution.py create mode 100644 import_shims/studio/util/memcache.py create mode 100644 import_shims/studio/util/milestones_helpers.py create mode 100644 import_shims/studio/util/model_utils.py create mode 100644 import_shims/studio/util/models.py create mode 100644 import_shims/studio/util/module_utils.py create mode 100644 import_shims/studio/util/organizations_helpers.py create mode 100644 import_shims/studio/util/password_policy_validators.py create mode 100644 import_shims/studio/util/query.py create mode 100644 import_shims/studio/util/request_rate_limiter.py create mode 100644 import_shims/studio/util/string_utils.py create mode 100644 import_shims/studio/util/testing.py create mode 100644 import_shims/studio/util/tests/__init__.py create mode 100644 import_shims/studio/util/tests/mixins/__init__.py create mode 100644 import_shims/studio/util/tests/mixins/discovery.py create mode 100644 import_shims/studio/util/tests/test_course.py create mode 100644 import_shims/studio/util/tests/test_date_utils.py create mode 100644 import_shims/studio/util/tests/test_db.py create mode 100644 import_shims/studio/util/tests/test_disable_rate_limit.py create mode 100644 import_shims/studio/util/tests/test_django_utils.py create mode 100644 import_shims/studio/util/tests/test_file.py create mode 100644 import_shims/studio/util/tests/test_json_request.py create mode 100644 import_shims/studio/util/tests/test_keyword_sub_utils.py create mode 100644 import_shims/studio/util/tests/test_memcache.py create mode 100644 import_shims/studio/util/tests/test_milestones_helpers.py create mode 100644 import_shims/studio/util/tests/test_organizations_helpers.py create mode 100644 import_shims/studio/util/tests/test_password_policy_validators.py create mode 100644 import_shims/studio/util/tests/test_sandboxing.py create mode 100644 import_shims/studio/util/tests/test_string_utils.py create mode 100644 import_shims/studio/util/url.py create mode 100644 import_shims/studio/util/validate_on_save.py create mode 100644 import_shims/studio/util/views.py create mode 100644 import_shims/studio/xblock_django/__init__.py create mode 100644 import_shims/studio/xblock_django/admin.py create mode 100644 import_shims/studio/xblock_django/api.py create mode 100644 import_shims/studio/xblock_django/management/__init__.py create mode 100644 import_shims/studio/xblock_django/management/commands/__init__.py create mode 100644 import_shims/studio/xblock_django/management/commands/ensure_indexes.py create mode 100644 import_shims/studio/xblock_django/models.py create mode 100644 import_shims/studio/xblock_django/tests/__init__.py create mode 100644 import_shims/studio/xblock_django/tests/test_api.py create mode 100644 import_shims/studio/xblock_django/tests/test_user_service.py create mode 100644 import_shims/studio/xblock_django/user_service.py diff --git a/cms/devstack.yml b/cms/devstack.yml index 2833419d1af..2167b0c0758 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 2ff60fc6564..2579a6cdee0 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 acadff7df8f..b37c067939b 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 1933a75fdf4..f62e74d9e44 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 0a8f1db9bf2..4f88fa104f2 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 304a2c5cd06..b125ff704fb 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 85511a0a8e5..a9899935908 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 2e891d2ba24..cf570c7fcf6 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 e758c71610e..92e75ae1a22 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 b1db7761a2e..bea95bc619f 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 1896c60c08d..865ad760bc1 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 91eb078c9a8..e566c8a16c8 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 53548f5fee4..276f858a53c 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 dce70be31a3..a17a4cf34bc 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 b40d4f1b27c..d37a77bc406 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 651412db91a..37fae029260 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 cc22e9d8172..d37ddb68231 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 fc8a91060cb..f8fadc33c52 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 c381a3c118d..b819d504ffc 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 a96eb4c02b4..e80e506404a 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 f9f494d24ce..deaab43e116 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 679ed9e39e6..74ed0f6d32d 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 70c261b21bb..f3877649165 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 a28940d435e..c6deba4d682 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 3520a6592a1..210c8f0bcb1 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 561468e476d..c92928808b6 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 020be9654b5..192280682a3 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 f8bc06d1a26..887a245ea3c 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 85fbbc0d38f..e968fd8caea 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 be9dc5c30cf..0c9dc771a78 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 5f46a5f1c41..aed8c315ef8 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 b49edef6e73..a714cc545d4 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 0bfe3488b5e..7974041b563 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 3c5b18ce15f..7b16ba6d36a 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 4ea8e3a3279..a04cf8ec282 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 5ddf06d948e..dde19152d79 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 ccc04088c11..afb4b7c9558 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 f04818e08e8..85d451fb6f3 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 b33b44307c0..90528c05faa 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 eb4b234e40c..9fd2734b676 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 dddfd0cfb4d..c3923470612 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 2c51df68677..bf563b412bb 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 83f7703f6a3..839005ceb95 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 a4ba2a9a40c..204c8d0a1f4 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 cb203132d4a..0b9a38543a0 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 04000259bb7..89f6bab2786 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 638faaea5ee..81b1f813da2 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 4462f7d88fe..b6fd4a54742 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 7b03b0b225a..11438ae3e47 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 e410399c4e5..fa7cff61cdc 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 1dbefda6e27..872922a7f0d 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 4a3bf1cec8f..4b36da92124 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 ec6b86e906d..4ac5f6cf760 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 9e07f057487..bb80d7fa897 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 278787855d4..c24d3fa0441 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 cd11613c765..f2fd6e8c2d3 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 292fb71326c..75ad02cc698 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 ed8707395ac..ddf1c8b64dc 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 bd212b1e560..96d3f68012f 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 1b7fabe6536..6aabcbd781b 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 ba03a735be9..efff1760f9e 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 2ba55b7cf8c..90ce580450c 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 51a1a826c99..c0ccf75122a 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 f191acfc755..b6bd83add2e 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 eea7d68139a..378d03dd6a9 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 b0fc143d070..3af7087d24f 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 d00b9d46392..c6e0cabbcd3 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 46e9363fc4d..5b607eb6035 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 4bf60e6e305..4905e90bb84 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 faea3a70e63..78493ce8571 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 06727c17be0..80f08170672 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 c15965385ee..6200aa8e1ed 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 4ee6520bb05..207966960ea 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 d34407a7f73..3cc7ff00dfd 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 dfd32fdca16..cd3e5d5884b 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 402121e7411..4a9a2f71501 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 daff45b4434..b40518b7d35 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 10eb1125428..62a6e8aa985 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 6aa54f0b849..00647134600 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 1fa9f754947..98c999fb7c5 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 f5d18281e95..628e374856e 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 99aede0ad86..a3bd2151f09 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 0539804ce1c..ab1a55e609a 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 215447d856d..79d41d63383 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 4b33d18c400..40f1d017996 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 126b941834e..579ad6e597c 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 cfd2fbf442c..067e4ac510b 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 670831fbda8..41e8277dc7a 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 1193e16827a..de2559d31dd 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 d5b602b946c..10dc44d8364 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> <%block name="bodyclass">is-signedin course view-checklists</%block> diff --git a/cms/templates/course_outline.html b/cms/templates/course_outline.html index 2de25636101..1be2997a434 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 88d03079c4f..8e91704d781 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 %> <h3 class="title"> diff --git a/cms/urls.py b/cms/urls.py index 0fc4f44351d..a03fca8039e 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -44,7 +44,7 @@ LIBRARY_KEY_PATTERN = r'(?P<library_key_string>library-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 00000000000..e69de29bb2d diff --git a/common/djangoapps/course_action_state/models.py b/common/djangoapps/course_action_state/models.py index 2867ddf8a1c..47c194ca413 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 68fc954ce40..cdda2aa62b4 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 b0e26b85d58..5292677ea41 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 3138ea989ca..56b41001dab 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 2dce97f412c..8da8167edef 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 e0420ea199a..39cf5de2f11 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 7bca76cd210..c237b15223c 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 4510fd4eeca..f3c73657a2a 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 349efb8a3f2..9bcba6ec2f0 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 8a079f9bbd2..e1eba7eeec3 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 7dd28e36fdd..a95e5de5aaa 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 e8d963e986d..caeebb7097c 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 dbd7c0bb0d7..ee3974dff90 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 d0b8c91aa64..b71e87db1e4 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 199dcdb4b24..a0e5ed5ffc9 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 6730d426004..679f3c568eb 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 f6977ef558e..590d577c624 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 c1c8fbe3925..8e3937ef141 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 7e01196f10b..3f190340b69 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 7ac79c3089a..5c2f9fdc1e8 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 b0541eae403..c3639273992 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 e3f630c3493..1f81a238e90 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 50a8d9a5258..0b88b896c8b 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 3b76a5ec17f..6965a457fbf 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 7e1e6e489bf..fb9663dadd4 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 f00f0cc6627..0b97ce463a3 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 4041f02bc24..23f3b341cf7 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 cda3bb602e4..18bafa56796 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 984b7464013..78e326bf826 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 3a7084c4e91..a64d6d25bb3 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 c1e9a70b348..d3ac3e0c3bb 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 4195e4a208a..a12aa5b179d 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 81e02f9e86c..7fb0133e672 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 8a3c80b1ff2..8495e907432 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 2d3724ce2fc..48d7e7f4d12 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 b3028db152f..934a781bf18 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 4879723ffe8..1c75c1eaea4 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 7465cee637c..8a4278cd017 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 b1a91ac7206..1bf380a4516 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 0b4594e7cff..3d1e5822f55 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 8c82533ad89..ae9ed7705e3 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 1acdf2a8cd9..a5a2a575b0e 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 77aca11ec15..54121ac0919 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 88eec2c7185..8435240b8a8 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 c21d273e41b..c246a37f4db 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 38c1f45f5e8..3ecf9c0c4b8 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 ab9b546b8b4..b9e382242d1 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 610f495d816..6ccdcef7489 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 83287fc4dd4..92ef89cb840 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 1215972b281..21c476098c1 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 6375e30c51c..91957b81392 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 9e49ce19dc9..ee1291ed692 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 ac450db2c1e..4c7319155c0 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 c29b17d0fe1..64684b9c6da 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 eda3ad5dcbb..4a7306a3dc3 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 a1a5c4de5be..9c0e2208fce 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 b835cac4778..a9c1d534985 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 4faffa9aac2..5caa86e6d95 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 1f53ea0efd5..e5309cf7172 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 450665fff17..bbb12fde4f1 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 680667bd3d8..6680df6736c 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 1fdcc98eb18..af096a8d9a3 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 6c7afddbc67..9b8985767a3 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 e8144af8faa..d57c260729f 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 80e2315dc8c..fe8259d928a 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 ff025428c98..616341c2d59 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 b7ce3a5bd11..a2b11e77843 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 d2820a2170e..23b015506b9 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 c2572f56782..bf7040a0a97 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 aa9c38fa517..d473bddba38 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 664eddbfe5d..d46ee93afe9 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 20fc611fdb7..31d287086bb 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 6a27f2dd3b6..c74b3b05686 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 6959a032a14..3b4c1d7aaec 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 3fc3dae83b7..95d757aa3cd 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 1aed1c96c43..9c4180be027 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 9afc3f667c7..794e530d9b6 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 1dc88542712..3660c171bc6 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 8dabcbcf5ff..80d4e892873 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 88c51698b64..9353e6397a9 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 940c249662c..db07ee76236 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 a632f7af75a..c54433a0888 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 c49721e226c..1bdfaee558e 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 51afefac8af..aceb9b6acc6 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 ecf4a8ef373..90f9ff98ac8 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 4a62a02c544..eff31878a5b 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 f6d291314d1..14f3a39316e 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 b5c5ac10580..ffe0f2c9f20 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 9433022edf0..37596f41626 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 e46b9a3acc9..ace0c997552 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 e4f7a17268b..1d1e2b2893a 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 51ab00825cd..efd8a1b686c 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 b0a51e1848e..43c2c34dbe7 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 868e0161c83..bcb2b7d3e5a 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 858536e0ff7..3704a96c63b 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 5adac7bc58a..5ff02f2a544 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 5efa5962bca..8146962aff0 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 0e43043fd90..8de105237af 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 67c340b13c1..00edc920eec 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 c3b5e218be5..33c7b17c737 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 921d64869ab..9b0bdf72b35 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 da63d5a0639..6511ef95cbc 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 b3357387583..40a565e39cf 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 3992cf3e6c7..761cc0d1da8 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 b61822a1589..a760f28789a 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 236ba998e71..109789188e0 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 d532ab0ac55..8767810a236 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 40376dc4a65..ce3124ca9c7 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 af90a8376a8..b881207b87e 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 2cd3fbdafe8..4a1700a8b33 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 b24a226b352..ed174e4a8c9 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 46f1bc3f0e0..54e0652ea08 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 06ab5893af2..3de35177464 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 9400e93523f..e497d6bf5d3 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 0e1f5df5f4d..21431784def 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 02cd5729fdf..e437a1bc0ca 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 ed895af31a2..3f555117989 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, '<div class="prerequisites">') @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, '<li class="course-item">') - @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 d7017d3bbaf..339ede82e55 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 55e1e2497a1..cc6fefc59f2 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 39d9abe85dd..17b8d99da06 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 5568a297b57..75a913c9843 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 64185229d1a..501a2dec83e 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 8f2be6d6009..f6da4da2b3a 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 d88fe4c48f9..b60180275f0 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 d133c10a263..dcc2964a8f1 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 ab9d3e42be4..89f13f5bbb4 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 db55f2c9fe9..3f05e01d29a 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 52c49ea092f..7b0ab3469c5 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 40fc9ca3c6c..be657e35a31 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 59d909f3c91..b2deff2a2b0 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 1cee572d43e..406044fc728 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 108a993f32a..13a5304dd9e 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 19587fa8c36..ddd75d23d23 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 92686f31c6b..46144f3b047 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 6a94eb9e444..0023ee36c00 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 43d63f5670e..adb27137f3b 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 fc574761557..7a5cf16ce9e 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 18924f21ce8..fd96aa88e74 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 6a06a86d461..44960b3b789 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 0f518a96287..f460e216d40 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 ad9bae8d0af..bf383d7d455 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 3502170a04c..3e44d85a6c0 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 313ac55a035..49f9c86923e 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 605864a3501..1b069443cad 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 14e8c830700..ed7a1bc9f65 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 942dedc189f..37437b05810 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 eacab0a07ea..756fe8d7caf 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 b28f810df6d..c22da772b73 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 293ae3a00ba..514a82b3735 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 0c09e94cb9c..df3ecd9848d 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 5355af0a8c5..6d2b347913f 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 096621508bd..c7967aa2e27 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 725ff441f1d..7fb37b4d156 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 2ae657a668e..6d21542681e 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 83b4552e8bc..6c6b7dcdcf5 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 19493cbdff0..811be519630 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 e629a2a01b1..0e54714b22c 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 55b6cf194c5..e4e43f283a1 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 564750e0bfc..63ad2bf8cbd 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 afb057a9e72..b7cb5ea1a92 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 c9b28286dd7..1eabc7fd2cc 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 01e47076fa6..12d2f2fe203 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 f9c1d8c0a6c..3ff7b8b7d10 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 de2da31874d..876ae969f91 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 782e805de4f..a182a669d98 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 d9d945ddd87..766b1e6736e 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 7579b5e0cea..e40be8132b2 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 c7721fa0785..29a02b6aea0 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 7d18e64e7e3..ada897d320f 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 7bc3248161e..642d24d57dc 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 dbe8082cc56..4448c2d3509 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 b6c3afae105..cfdd9899112 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 d123bf3855e..4a90ef174f0 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/(?P<backend>lti)/$', lti_login_and_complete_view), url(r'^auth/idp_redirect/(?P<provider_slug>[\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 f1d0d306b9c..c1b52b0305b 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 baec3bbb2f1..5647584baff 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 07687eae989..5aaa12ecd58 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 0e8564ea609..a490777c0f2 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 a73b06e0137..62582c3b7f9 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 f3fa95e7119..e758c422dd5 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 6e8abb96cb3..4bdc1627b1a 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 9bcbf6ffae0..b55cc7b34db 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 2cf19ca9a47..09d795f24cb 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 c1fad8838cb..81b0b74f879 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 7de0cda2f75..62f910b9cd5 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 5afc38660b2..b1e50e589dc 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 af52b2ff919..5de5669b118 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 77b3afc87cc..db7762919b8 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 a543acbadf9..8f213a157e4 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 67cd9d33fed..20fd1004edb 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 ab085567926..47f25899567 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 dd975e3b2c1..419c4461ba5 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 534323c83ea..87c84cd60de 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 5709b539352..b9597b47532 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 640f55e73e6..dd84673d2f6 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 c9cb595b75c..14a8cc8bb68 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 99782fac1f0..813c0691dcd 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 cd1cc9ec395..c70b948f285 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 97a08f7ea44..ea60a5def57 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 73e18eb89b7..5d87292a5e6 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 3218f51708d..194f59e5028 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 80b0c384f32..b9b0295c419 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 8e42299d69d..fa99ece3330 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 7bb263c237f..a2589208906 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 90c537929da..1326ccc5484 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 109fba50874..0a3ef652604 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 50ceea67f29..08590fbdb8d 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 a2dcb797e22..20578c94fc1 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 da9dc92bd7d..9c935e72d2b 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 cca096dda16..62dd1e534c5 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 24c949e6c4a..9c48fa8dede 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 ae368330b89..e652c52cb14 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 87b39098374..49872c54c6c 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 ecad99bf847..d7c1faf00bf 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 bd03d2676e0..21a8950b754 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 c591ce03616..163683ab0c3 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 4b59c38af22..68499af1c01 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 2a41eb86f18..c47e10f7c9c 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 f09757677ae..be41454b8ff 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 b3589b78c8b..d3b4209eddf 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 605d2201652..3f65a538aca 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 bc0e0de8932..872c8909d7d 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 1544a69ef34..a8104e867d1 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 887830f92b6..1846fd8ba84 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 9a8f2b8d684..5445993068f 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 472ebb13559..b8a9203022d 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 46278f72a57..f866ed85566 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 9ead26e911d..e47dc509160 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 00000000000..8b5980fa172 --- /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 00000000000..cd11c98f47e --- /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 00000000000..ee7e3c4ad07 --- /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 00000000000..701aad3144c --- /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 00000000000..91c1a4c0b58 --- /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 00000000000..740708aa001 --- /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 00000000000..f5c4a4ee4c5 --- /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 00000000000..929ba70dc0a --- /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 00000000000..74250a451c5 --- /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 00000000000..f2d7673d36b --- /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 00000000000..0862592a3c2 --- /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 00000000000..a5f733294cb --- /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 00000000000..ff3fd85be38 --- /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 00000000000..9996d6823b9 --- /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 00000000000..61912ad20c7 --- /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 00000000000..626c496187b --- /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 00000000000..ee1496ee9ad --- /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 00000000000..a67d9e8599f --- /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 00000000000..840f2e75567 --- /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 00000000000..d470938c204 --- /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 00000000000..ce1857f3d85 --- /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 00000000000..7298d7bd70a --- /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 00000000000..32bcb47fd91 --- /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 00000000000..4e8f1c34811 --- /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 00000000000..d2d30d40d08 --- /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 00000000000..fbda5cc65f5 --- /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 00000000000..66909845fb2 --- /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 00000000000..8af9addfb38 --- /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 00000000000..e1971cbd67e --- /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 00000000000..a43cf8ff09f --- /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 00000000000..8946feafc07 --- /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 00000000000..2ca90ecffa7 --- /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 00000000000..0e2cf327c19 --- /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 00000000000..f94dff6239c --- /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 00000000000..34b539091c1 --- /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 00000000000..faf3c0b56d7 --- /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 00000000000..78198ced742 --- /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 00000000000..cf0592a314b --- /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 00000000000..5f82c23ee37 --- /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 00000000000..80e98d5ef66 --- /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 00000000000..8e6bbd05a5e --- /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 00000000000..e8e6a9585be --- /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 00000000000..fc5884bb1f1 --- /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 00000000000..45bd12618d6 --- /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 00000000000..13f52e735fe --- /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 00000000000..3bdfa7163b1 --- /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 00000000000..70d804c7d56 --- /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 00000000000..5f736d44b1f --- /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 00000000000..cc2df58af94 --- /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 00000000000..bef6e0c52e1 --- /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 00000000000..08081a35734 --- /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 00000000000..9c377d18a55 --- /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 00000000000..7689d9ccbeb --- /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 00000000000..fd4dbd708d3 --- /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 00000000000..13f5d5c6358 --- /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 00000000000..ed28d10b371 --- /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 00000000000..0e0c962370d --- /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 00000000000..77949967797 --- /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 00000000000..26cf1e48ffa --- /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 00000000000..6b58a24af64 --- /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 00000000000..36040ac2792 --- /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 00000000000..23a5da7ca85 --- /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 00000000000..1a078a755e2 --- /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 00000000000..858d32fad42 --- /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 00000000000..e57a7f6e29c --- /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 00000000000..be749668149 --- /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 00000000000..97c1078c411 --- /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 00000000000..a241173b35e --- /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 00000000000..afb1aa3677a --- /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 00000000000..ed1028e4352 --- /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 00000000000..b780ffd340a --- /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 00000000000..4bf4ce91844 --- /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 00000000000..c235280da53 --- /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 00000000000..4951f52e81f --- /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 00000000000..74a9116932c --- /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 00000000000..6206589364d --- /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 00000000000..0e80b27782a --- /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 00000000000..bd3cd2e159b --- /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 00000000000..924ba91ec48 --- /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 00000000000..f48e6c05414 --- /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 00000000000..fd13639c7e2 --- /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 00000000000..a97f94831a5 --- /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 00000000000..70597a699a3 --- /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 00000000000..5a13d08f261 --- /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 00000000000..f5472b0bfba --- /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 00000000000..58ce46f399c --- /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 00000000000..2f1eddb7574 --- /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 00000000000..7921410e6ae --- /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 00000000000..e0e640ec692 --- /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 00000000000..3157baeb4da --- /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 00000000000..54b77ea8472 --- /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 00000000000..cac8c0d18a0 --- /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 00000000000..720e7ea8423 --- /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 00000000000..7d448a557ed --- /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 00000000000..3ac1769d0b3 --- /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 00000000000..69627fdcec4 --- /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 00000000000..63888425eec --- /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 00000000000..eb768f48a88 --- /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 00000000000..e1ace4626bf --- /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 00000000000..cd5b2133709 --- /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 00000000000..6204abf5737 --- /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 00000000000..d4a2a909415 --- /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 00000000000..832a85d03b1 --- /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 00000000000..dd18a84c971 --- /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 00000000000..b42cf2b33d4 --- /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 00000000000..165f1918a97 --- /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 00000000000..21022051c34 --- /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 00000000000..9d843a710f0 --- /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 00000000000..63b5b06ed96 --- /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 00000000000..60e92c12fb4 --- /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 00000000000..972ce7f4e0f --- /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 00000000000..44ebc7b31a1 --- /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 00000000000..5ac14853a06 --- /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 00000000000..cc717ada1f4 --- /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 00000000000..cf1245c0e8b --- /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 00000000000..c4c5061af23 --- /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 00000000000..8e0a97af8cd --- /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 00000000000..c2bd84fc0d4 --- /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 00000000000..b35860319d4 --- /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 00000000000..b88a92bf1c3 --- /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 00000000000..fddfe4309b6 --- /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 00000000000..02d67e09bc6 --- /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 00000000000..1e472a8c840 --- /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 00000000000..0b6f3a109cb --- /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 00000000000..f9eadb7c83c --- /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 00000000000..264a03c94c4 --- /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 00000000000..89fc5fdac92 --- /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 00000000000..c3b21aa5cf6 --- /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 00000000000..f17224ffcfe --- /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 00000000000..134fc543448 --- /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 00000000000..f5e73645d2d --- /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 00000000000..1a975f86462 --- /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 00000000000..5a6abb78b57 --- /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 00000000000..991505cce58 --- /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 00000000000..32fd8e15cb2 --- /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 00000000000..ec6e1c90c7d --- /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 00000000000..66285099be5 --- /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 00000000000..66b45f6014c --- /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 00000000000..11a028503a6 --- /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 00000000000..db8390d4840 --- /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 00000000000..4ae80fd70f8 --- /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 00000000000..77c538a8f85 --- /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 00000000000..3fcadcd2cd8 --- /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 00000000000..c2c2e86438e --- /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 00000000000..554f7300972 --- /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 00000000000..11446e4743f --- /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 00000000000..ffa4ae4acc1 --- /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 00000000000..f296a087db1 --- /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 00000000000..07002a42042 --- /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 00000000000..7bf9fc5ef5e --- /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 00000000000..996cfe30109 --- /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 00000000000..82b050a9679 --- /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 00000000000..8c1b30260d1 --- /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 00000000000..dec38af30dd --- /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 00000000000..49200a64394 --- /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 00000000000..e9a5f5e56c9 --- /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 00000000000..a8bd5647963 --- /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 00000000000..8eea4d4bc67 --- /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 00000000000..7a39f4b1a74 --- /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 00000000000..637d9b349ea --- /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 00000000000..62c35378a8c --- /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 00000000000..d65baf16510 --- /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 00000000000..3cf2563810c --- /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 00000000000..1e59dae51e4 --- /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 00000000000..ac2684d7147 --- /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 00000000000..40e9e42460b --- /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 00000000000..02da10e0343 --- /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 00000000000..ec3a26452f6 --- /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 00000000000..868d0efa0f4 --- /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 00000000000..2eabd768f0a --- /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 00000000000..ba15fd119b3 --- /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 00000000000..44d4ef720b1 --- /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 00000000000..11c6f9943f0 --- /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 00000000000..cf97b1f89c8 --- /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 00000000000..d1c126d342c --- /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 00000000000..2d3c117990b --- /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 00000000000..0467632cb3d --- /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 00000000000..eacbe8f2ae4 --- /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 00000000000..4a63a99b3d2 --- /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 00000000000..852fb4d5cf6 --- /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 00000000000..2619f93d53f --- /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 00000000000..ebdb78821e1 --- /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 00000000000..a56f7022b47 --- /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 00000000000..55240506cff --- /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 00000000000..d587bf0b9b9 --- /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 00000000000..594fa9866bf --- /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 00000000000..21bee3437c5 --- /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 00000000000..3528d5d4a58 --- /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 00000000000..fd219186356 --- /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 00000000000..8c8980f0197 --- /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 00000000000..e718be3881b --- /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 00000000000..a2cd949a406 --- /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 00000000000..7adbabdb2b0 --- /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 00000000000..4e188c23768 --- /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 00000000000..798753615ad --- /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 00000000000..6ece16501fa --- /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 00000000000..a84da9ee228 --- /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 00000000000..18c19d988af --- /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 00000000000..2233cab3b55 --- /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 00000000000..5a5a4443245 --- /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 00000000000..501ced05f31 --- /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 00000000000..e70908c9451 --- /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 00000000000..ef7e02f4856 --- /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 00000000000..df77e14f035 --- /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 00000000000..4996711fa6a --- /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 00000000000..0f02453a55f --- /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 00000000000..1eabc8a86a4 --- /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 00000000000..52b63ed5ad8 --- /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 00000000000..84956cfa5a0 --- /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 00000000000..22f79f231c2 --- /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 00000000000..fc3872961e0 --- /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 00000000000..97c9709669c --- /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 00000000000..55958ad7fc7 --- /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 00000000000..379e9e2cdb8 --- /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 00000000000..979ba20da5e --- /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 00000000000..18e1bc948d0 --- /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 00000000000..98268c92500 --- /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 00000000000..1bd3cc7bc78 --- /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 00000000000..7aab3a9ca47 --- /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 00000000000..a3cdc2be0e1 --- /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 00000000000..f86e17ea62e --- /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 00000000000..e82cbb3be30 --- /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 00000000000..f0eedcfd61f --- /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 00000000000..0a6302c7e03 --- /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 00000000000..2ec9cab7ed3 --- /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 00000000000..a68bf834714 --- /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 00000000000..358ef19b7e2 --- /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 00000000000..2286cc19630 --- /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 00000000000..1a753b64afc --- /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 00000000000..8633561cceb --- /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 00000000000..0ea750287ee --- /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 00000000000..031d3ae3181 --- /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 00000000000..89520150e37 --- /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 00000000000..c297bff8f9b --- /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 00000000000..5fae240c85d --- /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 00000000000..c3dc1adeef6 --- /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 00000000000..e1376df3ddd --- /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 00000000000..021f807ef70 --- /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 00000000000..4393e675897 --- /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 00000000000..2749bf8941d --- /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 00000000000..5ce225f1581 --- /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 00000000000..558a9806434 --- /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 00000000000..81211747271 --- /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 00000000000..6701b7c1797 --- /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 00000000000..df95f86f627 --- /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 00000000000..7220e2241ea --- /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 00000000000..3a7bad8e5d4 --- /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 00000000000..046acef654f --- /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 00000000000..b3df5bac884 --- /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 00000000000..0a51f06edf6 --- /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 00000000000..e1985a09a6e --- /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 00000000000..fe43dd29ea7 --- /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 00000000000..aa52e8b3c3f --- /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 00000000000..3b088fcb69b --- /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 00000000000..52c33c9838d --- /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 00000000000..cf90e5378a6 --- /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 00000000000..cd9d11aee8d --- /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 00000000000..f2309a6801c --- /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 00000000000..f45f518e7fe --- /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 00000000000..421f50e7f27 --- /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 00000000000..968e52bc344 --- /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 00000000000..450f7e08eec --- /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 00000000000..5351f214773 --- /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 00000000000..93c4d7decc9 --- /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 00000000000..3cc825af631 --- /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 00000000000..f2aefb6dfb4 --- /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 00000000000..9c624d61a3e --- /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 00000000000..a4db8d0f89d --- /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 00000000000..9567ab38db7 --- /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 00000000000..284a2a84e92 --- /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 00000000000..0dc19c9a523 --- /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 00000000000..b638f83c12a --- /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 00000000000..a047baef510 --- /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 00000000000..083b728c32a --- /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 00000000000..1077a81183a --- /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 00000000000..287d2d7891b --- /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 00000000000..90b8f5ba862 --- /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 00000000000..89295ed9feb --- /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 00000000000..0396b32170a --- /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 00000000000..45b81081e21 --- /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 00000000000..e89e2221dc9 --- /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 00000000000..da0df0db054 --- /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 00000000000..fe33312f92d --- /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 00000000000..4a76d7a61db --- /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 00000000000..5658fb74e61 --- /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 00000000000..4af8e2de498 --- /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 00000000000..c6749d0c92d --- /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 00000000000..61e6172f3e6 --- /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 00000000000..b2642844dad --- /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 00000000000..bd2cd69a189 --- /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 00000000000..f5bb381982b --- /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 00000000000..6ed0440f37c --- /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 00000000000..96cda2b33f4 --- /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 00000000000..78a62fb3538 --- /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 00000000000..a2c8ace2ae6 --- /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 00000000000..76a5191e6b3 --- /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 00000000000..24db8b9672f --- /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 00000000000..ff3972ca1fa --- /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 00000000000..ed0e3fec877 --- /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 00000000000..8eeeec85935 --- /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 00000000000..7d136ed7193 --- /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 00000000000..c3d02a143b3 --- /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 00000000000..78d3fa4ec24 --- /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 00000000000..aab2f7c868b --- /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 00000000000..8a4f828b00d --- /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 00000000000..51140ff94f8 --- /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 00000000000..8b4b5f047e4 --- /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 00000000000..7d2f455821b --- /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 00000000000..a705bea8b58 --- /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 00000000000..f4c28ac66df --- /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 00000000000..c143f50f3e1 --- /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 00000000000..3bc1f69b4f9 --- /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 00000000000..0e570c1dbb8 --- /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 00000000000..0915817ceb8 --- /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 00000000000..93458850d49 --- /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 00000000000..9eb48285f0f --- /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 00000000000..3461df4f986 --- /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 00000000000..0620f66ca8d --- /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 00000000000..819290c6065 --- /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 00000000000..f5b0698a8b3 --- /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 00000000000..e6d7cbabaff --- /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 00000000000..c13138da3e3 --- /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 00000000000..4e795e2758d --- /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 00000000000..8032b59e56f --- /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 00000000000..41522c71c0b --- /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 00000000000..75074f6cea7 --- /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 00000000000..b63b46d7c67 --- /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 00000000000..450672740cd --- /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 00000000000..d5583c578b6 --- /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 00000000000..b44f93722b0 --- /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 00000000000..4163a7218e5 --- /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 00000000000..3d7efb2a6ab --- /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 00000000000..7d0a5e5fe7c --- /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 00000000000..c2bb6bafd21 --- /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 00000000000..0410eba60f1 --- /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 00000000000..7fcd05af8ec --- /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 00000000000..7462689750f --- /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 00000000000..c37caf7efde --- /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 00000000000..9bd2a4809bb --- /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 00000000000..75ca4722fcf --- /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 00000000000..4958acbf6e0 --- /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 00000000000..51c59adaa60 --- /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 00000000000..cfb50432ad9 --- /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 00000000000..961ed414b05 --- /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 00000000000..5e8b652401f --- /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 00000000000..6980f31a3aa --- /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 00000000000..2604974c84a --- /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 00000000000..7f2a2451f3c --- /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 00000000000..97ee0a875ac --- /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 00000000000..8e438686d9c --- /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 00000000000..8fb4d26ea5b --- /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 00000000000..1fa8d8bc6ce --- /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 00000000000..8711134250e --- /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 00000000000..37687efd355 --- /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 00000000000..217298de7b7 --- /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 00000000000..b291576db7b --- /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 00000000000..67611a4804b --- /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 00000000000..f6f453ef695 --- /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 00000000000..5bddef3d4a7 --- /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 00000000000..daf51b8cb27 --- /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 00000000000..b35811c2a3c --- /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 00000000000..b4baccf4408 --- /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 00000000000..3fe4338cb7d --- /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 00000000000..6bf70dd0625 --- /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 00000000000..1e237adb1bc --- /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 00000000000..8b5980fa172 --- /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 00000000000..cd11c98f47e --- /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 00000000000..ee7e3c4ad07 --- /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 00000000000..701aad3144c --- /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 00000000000..91c1a4c0b58 --- /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 00000000000..740708aa001 --- /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 00000000000..f5c4a4ee4c5 --- /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 00000000000..929ba70dc0a --- /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 00000000000..74250a451c5 --- /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 00000000000..f2d7673d36b --- /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 00000000000..0862592a3c2 --- /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 00000000000..a5f733294cb --- /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 00000000000..ff3fd85be38 --- /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 00000000000..9996d6823b9 --- /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 00000000000..61912ad20c7 --- /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 00000000000..626c496187b --- /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 00000000000..ee1496ee9ad --- /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 00000000000..a67d9e8599f --- /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 00000000000..840f2e75567 --- /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 00000000000..d470938c204 --- /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 00000000000..ce1857f3d85 --- /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 00000000000..7298d7bd70a --- /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 00000000000..32bcb47fd91 --- /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 00000000000..4e8f1c34811 --- /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 00000000000..d2d30d40d08 --- /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 00000000000..fbda5cc65f5 --- /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 00000000000..66909845fb2 --- /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 00000000000..8af9addfb38 --- /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 00000000000..e1971cbd67e --- /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 00000000000..a43cf8ff09f --- /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 00000000000..8946feafc07 --- /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 00000000000..2ca90ecffa7 --- /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 00000000000..0e2cf327c19 --- /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 00000000000..f94dff6239c --- /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 00000000000..34b539091c1 --- /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 00000000000..faf3c0b56d7 --- /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 00000000000..78198ced742 --- /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 00000000000..cf0592a314b --- /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 00000000000..5f82c23ee37 --- /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 00000000000..80e98d5ef66 --- /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 00000000000..8e6bbd05a5e --- /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 00000000000..e8e6a9585be --- /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 00000000000..fc5884bb1f1 --- /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 00000000000..45bd12618d6 --- /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 00000000000..13f52e735fe --- /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 00000000000..3bdfa7163b1 --- /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 00000000000..70d804c7d56 --- /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 00000000000..5f736d44b1f --- /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 00000000000..cc2df58af94 --- /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 00000000000..bef6e0c52e1 --- /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 00000000000..08081a35734 --- /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 00000000000..9c377d18a55 --- /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 00000000000..7689d9ccbeb --- /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 00000000000..fd4dbd708d3 --- /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 00000000000..13f5d5c6358 --- /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 00000000000..ed28d10b371 --- /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 00000000000..0e0c962370d --- /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 00000000000..77949967797 --- /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 00000000000..26cf1e48ffa --- /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 00000000000..6b58a24af64 --- /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 00000000000..36040ac2792 --- /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 00000000000..23a5da7ca85 --- /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 00000000000..1a078a755e2 --- /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 00000000000..858d32fad42 --- /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 00000000000..e57a7f6e29c --- /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 00000000000..be749668149 --- /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 00000000000..97c1078c411 --- /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 00000000000..a241173b35e --- /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 00000000000..afb1aa3677a --- /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 00000000000..ed1028e4352 --- /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 00000000000..b780ffd340a --- /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 00000000000..4bf4ce91844 --- /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 00000000000..c235280da53 --- /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 00000000000..4951f52e81f --- /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 00000000000..74a9116932c --- /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 00000000000..6206589364d --- /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 00000000000..0e80b27782a --- /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 00000000000..bd3cd2e159b --- /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 00000000000..924ba91ec48 --- /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 00000000000..f48e6c05414 --- /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 00000000000..fd13639c7e2 --- /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 00000000000..a97f94831a5 --- /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 00000000000..70597a699a3 --- /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 00000000000..5a13d08f261 --- /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 00000000000..f5472b0bfba --- /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 00000000000..58ce46f399c --- /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 00000000000..2f1eddb7574 --- /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 00000000000..7921410e6ae --- /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 00000000000..e0e640ec692 --- /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 00000000000..3157baeb4da --- /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 00000000000..54b77ea8472 --- /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 00000000000..cac8c0d18a0 --- /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 00000000000..720e7ea8423 --- /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 00000000000..7d448a557ed --- /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 00000000000..3ac1769d0b3 --- /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 00000000000..69627fdcec4 --- /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 00000000000..63888425eec --- /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 00000000000..eb768f48a88 --- /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 00000000000..e1ace4626bf --- /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 00000000000..cd5b2133709 --- /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 00000000000..6204abf5737 --- /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 00000000000..d4a2a909415 --- /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 00000000000..832a85d03b1 --- /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 00000000000..dd18a84c971 --- /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 00000000000..b42cf2b33d4 --- /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 00000000000..165f1918a97 --- /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 00000000000..21022051c34 --- /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 00000000000..9d843a710f0 --- /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 00000000000..63b5b06ed96 --- /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 00000000000..60e92c12fb4 --- /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 00000000000..972ce7f4e0f --- /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 00000000000..44ebc7b31a1 --- /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 00000000000..5ac14853a06 --- /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 00000000000..cc717ada1f4 --- /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 00000000000..cf1245c0e8b --- /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 00000000000..c4c5061af23 --- /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 00000000000..8e0a97af8cd --- /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 00000000000..c2bd84fc0d4 --- /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 00000000000..b35860319d4 --- /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 00000000000..b88a92bf1c3 --- /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 00000000000..fddfe4309b6 --- /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 00000000000..02d67e09bc6 --- /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 00000000000..1e472a8c840 --- /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 00000000000..0b6f3a109cb --- /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 00000000000..f9eadb7c83c --- /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 00000000000..264a03c94c4 --- /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 00000000000..89fc5fdac92 --- /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 00000000000..c3b21aa5cf6 --- /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 00000000000..f17224ffcfe --- /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 00000000000..134fc543448 --- /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 00000000000..f5e73645d2d --- /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 00000000000..1a975f86462 --- /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 00000000000..5a6abb78b57 --- /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 00000000000..991505cce58 --- /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 00000000000..32fd8e15cb2 --- /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 00000000000..ec6e1c90c7d --- /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 00000000000..66285099be5 --- /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 00000000000..66b45f6014c --- /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 00000000000..11a028503a6 --- /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 00000000000..db8390d4840 --- /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 00000000000..4ae80fd70f8 --- /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 00000000000..77c538a8f85 --- /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 00000000000..3fcadcd2cd8 --- /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 00000000000..c2c2e86438e --- /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 00000000000..554f7300972 --- /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 00000000000..11446e4743f --- /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 00000000000..ffa4ae4acc1 --- /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 00000000000..f296a087db1 --- /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 00000000000..07002a42042 --- /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 00000000000..7bf9fc5ef5e --- /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 00000000000..996cfe30109 --- /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 00000000000..82b050a9679 --- /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 00000000000..8c1b30260d1 --- /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 00000000000..dec38af30dd --- /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 00000000000..49200a64394 --- /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 00000000000..e9a5f5e56c9 --- /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 00000000000..a8bd5647963 --- /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 00000000000..8eea4d4bc67 --- /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 00000000000..7a39f4b1a74 --- /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 00000000000..637d9b349ea --- /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 00000000000..62c35378a8c --- /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 00000000000..d65baf16510 --- /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 00000000000..3cf2563810c --- /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 00000000000..1e59dae51e4 --- /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 00000000000..ac2684d7147 --- /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 00000000000..40e9e42460b --- /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 00000000000..02da10e0343 --- /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 00000000000..ec3a26452f6 --- /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 00000000000..868d0efa0f4 --- /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 00000000000..2eabd768f0a --- /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 00000000000..ba15fd119b3 --- /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 00000000000..44d4ef720b1 --- /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 00000000000..11c6f9943f0 --- /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 00000000000..cf97b1f89c8 --- /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 00000000000..d1c126d342c --- /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 00000000000..2d3c117990b --- /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 00000000000..0467632cb3d --- /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 00000000000..eacbe8f2ae4 --- /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 00000000000..4a63a99b3d2 --- /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 00000000000..852fb4d5cf6 --- /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 00000000000..2619f93d53f --- /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 00000000000..ebdb78821e1 --- /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 00000000000..a56f7022b47 --- /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 00000000000..55240506cff --- /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 00000000000..d587bf0b9b9 --- /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 00000000000..594fa9866bf --- /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 00000000000..21bee3437c5 --- /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 00000000000..3528d5d4a58 --- /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 00000000000..fd219186356 --- /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 00000000000..8c8980f0197 --- /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 00000000000..e718be3881b --- /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 00000000000..a2cd949a406 --- /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 00000000000..7adbabdb2b0 --- /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 00000000000..4e188c23768 --- /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 00000000000..798753615ad --- /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 00000000000..6ece16501fa --- /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 00000000000..a84da9ee228 --- /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 00000000000..18c19d988af --- /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 00000000000..2233cab3b55 --- /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 00000000000..5a5a4443245 --- /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 00000000000..501ced05f31 --- /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 00000000000..e70908c9451 --- /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 00000000000..ef7e02f4856 --- /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 00000000000..df77e14f035 --- /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 00000000000..4996711fa6a --- /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 00000000000..0f02453a55f --- /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 00000000000..1eabc8a86a4 --- /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 00000000000..52b63ed5ad8 --- /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 00000000000..84956cfa5a0 --- /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 00000000000..22f79f231c2 --- /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 00000000000..fc3872961e0 --- /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 00000000000..97c9709669c --- /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 00000000000..55958ad7fc7 --- /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 00000000000..379e9e2cdb8 --- /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 00000000000..979ba20da5e --- /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 00000000000..18e1bc948d0 --- /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 00000000000..98268c92500 --- /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 00000000000..1bd3cc7bc78 --- /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 00000000000..7aab3a9ca47 --- /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 00000000000..a3cdc2be0e1 --- /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 00000000000..f86e17ea62e --- /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 00000000000..e82cbb3be30 --- /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 00000000000..f0eedcfd61f --- /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 00000000000..0a6302c7e03 --- /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 00000000000..2ec9cab7ed3 --- /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 00000000000..a68bf834714 --- /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 00000000000..358ef19b7e2 --- /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 00000000000..2286cc19630 --- /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 00000000000..1a753b64afc --- /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 00000000000..8633561cceb --- /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 00000000000..0ea750287ee --- /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 00000000000..031d3ae3181 --- /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 00000000000..89520150e37 --- /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 00000000000..c297bff8f9b --- /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 00000000000..5fae240c85d --- /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 00000000000..c3dc1adeef6 --- /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 00000000000..e1376df3ddd --- /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 00000000000..021f807ef70 --- /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 00000000000..4393e675897 --- /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 00000000000..2749bf8941d --- /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 00000000000..5ce225f1581 --- /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 00000000000..558a9806434 --- /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 00000000000..81211747271 --- /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 00000000000..6701b7c1797 --- /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 00000000000..df95f86f627 --- /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 00000000000..7220e2241ea --- /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 00000000000..3a7bad8e5d4 --- /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 00000000000..046acef654f --- /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 00000000000..b3df5bac884 --- /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 00000000000..0a51f06edf6 --- /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 00000000000..e1985a09a6e --- /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 00000000000..fe43dd29ea7 --- /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 00000000000..aa52e8b3c3f --- /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 00000000000..3b088fcb69b --- /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 00000000000..52c33c9838d --- /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 00000000000..cf90e5378a6 --- /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 00000000000..cd9d11aee8d --- /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 00000000000..f2309a6801c --- /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 00000000000..f45f518e7fe --- /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 00000000000..421f50e7f27 --- /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 00000000000..968e52bc344 --- /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 00000000000..450f7e08eec --- /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 00000000000..5351f214773 --- /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 00000000000..93c4d7decc9 --- /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 00000000000..3cc825af631 --- /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 00000000000..f2aefb6dfb4 --- /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 00000000000..9c624d61a3e --- /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 00000000000..a4db8d0f89d --- /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 00000000000..9567ab38db7 --- /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 00000000000..284a2a84e92 --- /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 00000000000..0dc19c9a523 --- /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 00000000000..b638f83c12a --- /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 00000000000..a047baef510 --- /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 00000000000..083b728c32a --- /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 00000000000..1077a81183a --- /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 00000000000..287d2d7891b --- /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 00000000000..90b8f5ba862 --- /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 00000000000..89295ed9feb --- /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 00000000000..0396b32170a --- /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 00000000000..45b81081e21 --- /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 00000000000..e89e2221dc9 --- /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 00000000000..da0df0db054 --- /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 00000000000..fe33312f92d --- /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 00000000000..4a76d7a61db --- /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 00000000000..5658fb74e61 --- /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 00000000000..4af8e2de498 --- /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 00000000000..c6749d0c92d --- /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 00000000000..61e6172f3e6 --- /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 00000000000..b2642844dad --- /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 00000000000..bd2cd69a189 --- /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 00000000000..f5bb381982b --- /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 00000000000..6ed0440f37c --- /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 00000000000..96cda2b33f4 --- /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 00000000000..78a62fb3538 --- /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 00000000000..a2c8ace2ae6 --- /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 00000000000..76a5191e6b3 --- /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 00000000000..24db8b9672f --- /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 00000000000..ff3972ca1fa --- /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 00000000000..ed0e3fec877 --- /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 00000000000..8eeeec85935 --- /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 00000000000..7d136ed7193 --- /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 00000000000..c3d02a143b3 --- /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 00000000000..78d3fa4ec24 --- /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 00000000000..aab2f7c868b --- /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 00000000000..8a4f828b00d --- /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 00000000000..51140ff94f8 --- /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 00000000000..8b4b5f047e4 --- /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 00000000000..7d2f455821b --- /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 00000000000..a705bea8b58 --- /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 00000000000..f4c28ac66df --- /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 00000000000..c143f50f3e1 --- /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 00000000000..3bc1f69b4f9 --- /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 00000000000..0e570c1dbb8 --- /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 00000000000..0915817ceb8 --- /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 00000000000..93458850d49 --- /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 00000000000..9eb48285f0f --- /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 00000000000..3461df4f986 --- /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 00000000000..0620f66ca8d --- /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 00000000000..819290c6065 --- /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 00000000000..f5b0698a8b3 --- /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 00000000000..e6d7cbabaff --- /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 00000000000..c13138da3e3 --- /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 00000000000..4e795e2758d --- /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 00000000000..8032b59e56f --- /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 00000000000..41522c71c0b --- /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 00000000000..75074f6cea7 --- /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 00000000000..b63b46d7c67 --- /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 00000000000..450672740cd --- /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 00000000000..d5583c578b6 --- /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 00000000000..b44f93722b0 --- /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 00000000000..4163a7218e5 --- /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 00000000000..3d7efb2a6ab --- /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 00000000000..7d0a5e5fe7c --- /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 00000000000..c2bb6bafd21 --- /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 00000000000..0410eba60f1 --- /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 00000000000..7fcd05af8ec --- /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 00000000000..7462689750f --- /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 00000000000..c37caf7efde --- /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 00000000000..9bd2a4809bb --- /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 00000000000..75ca4722fcf --- /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 00000000000..4958acbf6e0 --- /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 00000000000..51c59adaa60 --- /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 00000000000..cfb50432ad9 --- /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 00000000000..961ed414b05 --- /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 00000000000..5e8b652401f --- /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 00000000000..6980f31a3aa --- /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 00000000000..2604974c84a --- /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 00000000000..7f2a2451f3c --- /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 00000000000..97ee0a875ac --- /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 00000000000..8e438686d9c --- /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 00000000000..8fb4d26ea5b --- /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 00000000000..1fa8d8bc6ce --- /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 00000000000..8711134250e --- /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 00000000000..37687efd355 --- /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 00000000000..217298de7b7 --- /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 00000000000..b291576db7b --- /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 00000000000..67611a4804b --- /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 00000000000..f6f453ef695 --- /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 00000000000..5bddef3d4a7 --- /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 00000000000..daf51b8cb27 --- /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 00000000000..b35811c2a3c --- /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 00000000000..b4baccf4408 --- /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 00000000000..3fe4338cb7d --- /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 00000000000..6bf70dd0625 --- /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 00000000000..1e237adb1bc --- /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 f0b8b5e0830..974c5e1539e 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 fbec7ed5460..71492b73412 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 9019679b662..563eb8293ee 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 85fcda289e7..b5e8b5b4325 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 406e7533024..70d78da97df 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 0ccd3058e05..9b73829e73e 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 f871f61d1a2..4af4c58adb6 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 cd70fd8cec4..b7f13d0f7cf 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 a4520a3d666..ec9cfa61dd3 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 e1e0793f626..e532240dfea 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 d9c39edb512..a02de897970 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, '<div class="courses no-course-discovery"') - @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': True}) def test_course_discovery_on(self): @@ -236,7 +236,7 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): self.assertContains(response, '<aside aria-label="Refine Your Search" class="search-facets phone-menu">') self.assertContains(response, '<div class="courses"') - @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_cards_sorted_by_default_sorting(self): @@ -261,7 +261,7 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): self.assertEqual(context['courses'][1].id, self.starting_later.id) self.assertEqual(context['courses'][2].id, self.course_with_default_start_date.id) - @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_SORTING_BY_START_DATE': False}) @patch.dict('django.conf.settings.FEATURES', {'ENABLE_COURSE_DISCOVERY': False}) @@ -294,7 +294,7 @@ class IndexPageProgramsTests(SiteMixin, ModuleStoreTestCase): """ def test_get_programs_with_type_called(self): views = [ - (reverse('root'), 'student.views.management.get_programs_with_type'), + (reverse('root'), 'common.djangoapps.student.views.management.get_programs_with_type'), (reverse('courses'), 'lms.djangoapps.courseware.views.views.get_programs_with_type'), ] for url, dotted_path in views: diff --git a/lms/djangoapps/branding/tests/test_views.py b/lms/djangoapps/branding/tests/test_views.py index e5720585152..44244967328 100644 --- a/lms/djangoapps/branding/tests/test_views.py +++ b/lms/djangoapps/branding/tests/test_views.py @@ -18,7 +18,7 @@ from openedx.core.djangoapps.lang_pref.api import released_languages from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme_context from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt @@ -280,7 +280,7 @@ class TestIndex(SiteMixin, TestCase): """ Set up a user """ super(TestIndex, self).setUp() - patcher = mock.patch("student.models.tracker") + patcher = mock.patch("common.djangoapps.student.models.tracker") self.mock_tracker = patcher.start() self.user = UserFactory.create() self.user.set_password("password") diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index 1618324f30c..346a0c8b7cf 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -18,12 +18,12 @@ from django.views.decorators.csrf import ensure_csrf_cookie import lms.djangoapps.branding.api as branding_api import lms.djangoapps.courseware.views.views as courseware_views -import student.views -from edxmako.shortcuts import marketing_link, render_to_response +from common.djangoapps.student import views as student_views +from common.djangoapps.edxmako.shortcuts import marketing_link, render_to_response from openedx.core.djangoapps.lang_pref.api import released_languages from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from util.cache import cache_if_anonymous -from util.json_request import JsonResponse +from common.djangoapps.util.cache import cache_if_anonymous +from common.djangoapps.util.json_request import JsonResponse log = logging.getLogger(__name__) @@ -68,7 +68,7 @@ def index(request): # marketing and edge are enabled try: - return student.views.index(request, user=request.user) + return student_views.index(request, user=request.user) except NoReverseMatch: log.error( 'https is not a registered namespace Request from {}'.format(domain), diff --git a/lms/djangoapps/bulk_email/models.py b/lms/djangoapps/bulk_email/models.py index 9e15719569c..7a16c9bcc19 100644 --- a/lms/djangoapps/bulk_email/models.py +++ b/lms/djangoapps/bulk_email/models.py @@ -15,16 +15,16 @@ from opaque_keys.edx.django.models import CourseKeyField from six import text_type from six.moves import zip -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.course_groups.cohorts import get_cohort_by_name from openedx.core.djangoapps.course_groups.models import CourseUserGroup from openedx.core.djangoapps.enrollments.api import validate_course_mode from openedx.core.djangoapps.enrollments.errors import CourseModeNotFoundError from openedx.core.lib.html_to_text import html_to_text from openedx.core.lib.mail_utils import wrap_message -from student.roles import CourseInstructorRole, CourseStaffRole -from util.keyword_substitution import substitute_keywords_with_data -from util.query import use_read_replica_if_available +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.util.keyword_substitution import substitute_keywords_with_data +from common.djangoapps.util.query import use_read_replica_if_available log = logging.getLogger(__name__) diff --git a/lms/djangoapps/bulk_email/signals.py b/lms/djangoapps/bulk_email/signals.py index 319110d04f0..56956d5e672 100644 --- a/lms/djangoapps/bulk_email/signals.py +++ b/lms/djangoapps/bulk_email/signals.py @@ -6,7 +6,7 @@ Signal handlers for the bulk_email app from django.dispatch import receiver from openedx.core.djangoapps.user_api.accounts.signals import USER_RETIRE_MAILINGS -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from .models import Optout diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index f85c15387d6..ef2b21aa3da 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -52,8 +52,8 @@ from lms.djangoapps.instructor_task.subtasks import ( ) from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.lib.courses import course_image_url -from util.date_utils import get_default_time_display -from util.string_utils import _has_non_ascii_characters +from common.djangoapps.util.date_utils import get_default_time_display +from common.djangoapps.util.string_utils import _has_non_ascii_characters log = logging.getLogger('edx.celery.task') diff --git a/lms/djangoapps/bulk_email/tests/test_course_optout.py b/lms/djangoapps/bulk_email/tests/test_course_optout.py index 1d3db1e60a7..a24968089bc 100644 --- a/lms/djangoapps/bulk_email/tests/test_course_optout.py +++ b/lms/djangoapps/bulk_email/tests/test_course_optout.py @@ -18,8 +18,8 @@ from six import text_type from lms.djangoapps.bulk_email.models import BulkEmailFlag from lms.djangoapps.bulk_email.policies import CourseEmailOptout -from student.models import CourseEnrollment -from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index 4b4e07d2045..bb9be7344c3 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -23,16 +23,16 @@ from mock import Mock, patch from ..models import BulkEmailFlag, Optout from lms.djangoapps.bulk_email.tasks import _get_course_email_context, _get_source_address -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.tests.factories import InstructorFactory, StaffFactory from lms.djangoapps.instructor_task.subtasks import update_subtask_status from openedx.core.djangoapps.course_groups.cohorts import add_user_to_cohort from openedx.core.djangoapps.course_groups.models import CourseCohort from openedx.core.djangoapps.enrollments.api import update_enrollment -from student.models import CourseEnrollment -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +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 CourseFactory diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index 6cb7eac4815..9de1cb4dcfa 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -30,7 +30,7 @@ from lms.djangoapps.instructor_task.subtasks import ( initialize_subtask_info, update_subtask_status ) -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 ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/bulk_email/tests/test_models.py b/lms/djangoapps/bulk_email/tests/test_models.py index 2bff0faa91d..5c9a83aac76 100644 --- a/lms/djangoapps/bulk_email/tests/test_models.py +++ b/lms/djangoapps/bulk_email/tests/test_models.py @@ -23,9 +23,9 @@ from lms.djangoapps.bulk_email.models import ( CourseEmailTemplate, Optout, ) -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.course_groups.models import CourseCohort -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/bulk_email/tests/test_signals.py b/lms/djangoapps/bulk_email/tests/test_signals.py index 29c905ff817..58bff499108 100644 --- a/lms/djangoapps/bulk_email/tests/test_signals.py +++ b/lms/djangoapps/bulk_email/tests/test_signals.py @@ -13,7 +13,7 @@ from six import text_type from lms.djangoapps.bulk_email.models import BulkEmailFlag, Optout from lms.djangoapps.bulk_email.signals import force_optout_all -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 ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/bulk_email/tests/test_views.py b/lms/djangoapps/bulk_email/tests/test_views.py index 5190ebe34c4..67f556117e4 100644 --- a/lms/djangoapps/bulk_email/tests/test_views.py +++ b/lms/djangoapps/bulk_email/tests/test_views.py @@ -15,7 +15,7 @@ from six import text_type from lms.djangoapps.discussion.notification_prefs.views import UsernameCipher from openedx.core.lib.tests import attr -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 diff --git a/lms/djangoapps/bulk_email/views.py b/lms/djangoapps/bulk_email/views.py index 30a15d102a5..2336912d34d 100644 --- a/lms/djangoapps/bulk_email/views.py +++ b/lms/djangoapps/bulk_email/views.py @@ -12,7 +12,7 @@ from django.http import Http404 from lms.djangoapps.bulk_email.models import Optout from lms.djangoapps.courseware.courses import get_course_by_id -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.discussion.notification_prefs.views import ( UsernameCipher, UsernameDecryptionException, diff --git a/lms/djangoapps/bulk_enroll/tests/test_views.py b/lms/djangoapps/bulk_enroll/tests/test_views.py index 13ed78ea638..724f4d108bc 100644 --- a/lms/djangoapps/bulk_enroll/tests/test_views.py +++ b/lms/djangoapps/bulk_enroll/tests/test_views.py @@ -21,8 +21,8 @@ from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase from openedx.core.djangoapps.course_groups.cohorts import get_cohort_id from openedx.core.djangoapps.course_groups.tests.helpers import config_course_cohorts from openedx.core.djangoapps.site_configuration.helpers import get_value as get_site_value -from student.models import ENROLLED_TO_UNENROLLED, UNENROLLED_TO_ENROLLED, CourseEnrollment, ManualEnrollmentAudit -from student.tests.factories import UserFactory +from common.djangoapps.student.models import ENROLLED_TO_UNENROLLED, UNENROLLED_TO_ENROLLED, CourseEnrollment, ManualEnrollmentAudit +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/bulk_enroll/views.py b/lms/djangoapps/bulk_enroll/views.py index 746ac09ae66..a20ced46bab 100644 --- a/lms/djangoapps/bulk_enroll/views.py +++ b/lms/djangoapps/bulk_enroll/views.py @@ -20,7 +20,7 @@ from openedx.core.djangoapps.course_groups.models import CourseUserGroup from openedx.core.djangoapps.enrollments.views import EnrollmentUserThrottle from openedx.core.lib.api.authentication import BearerAuthentication from openedx.core.lib.api.permissions import IsStaff -from util.disable_rate_limit import can_disable_rate_limit +from common.djangoapps.util.disable_rate_limit import can_disable_rate_limit @can_disable_rate_limit diff --git a/lms/djangoapps/ccx/api/v0/tests/test_views.py b/lms/djangoapps/ccx/api/v0/tests/test_views.py index 77e3d74c77e..b11bb2f9502 100644 --- a/lms/djangoapps/ccx/api/v0/tests/test_views.py +++ b/lms/djangoapps/ccx/api/v0/tests/test_views.py @@ -30,9 +30,9 @@ from lms.djangoapps.ccx.utils import ccx_course as ccx_course_cm from lms.djangoapps.courseware import courses from lms.djangoapps.instructor.access import allow_access, list_with_level from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params -from student.models import CourseEnrollment -from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory USER_PASSWORD = 'test' diff --git a/lms/djangoapps/ccx/api/v0/views.py b/lms/djangoapps/ccx/api/v0/views.py index cecf7aa2358..4ceadc74a37 100644 --- a/lms/djangoapps/ccx/api/v0/views.py +++ b/lms/djangoapps/ccx/api/v0/views.py @@ -27,8 +27,8 @@ from lms.djangoapps.ccx.utils import add_master_course_staff_to_ccx, assign_staf from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.lib.api import authentication, permissions -from student.models import CourseEnrollment -from student.roles import CourseCcxCoachRole +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseCcxCoachRole from xmodule.modulestore.django import SignalHandler from .paginators import CCXAPIPagination diff --git a/lms/djangoapps/ccx/plugins.py b/lms/djangoapps/ccx/plugins.py index 73539f2b427..3cf16d47b51 100644 --- a/lms/djangoapps/ccx/plugins.py +++ b/lms/djangoapps/ccx/plugins.py @@ -6,7 +6,7 @@ Registers the CCX feature for the edX platform. from django.conf import settings from django.utils.translation import ugettext_noop -from student.roles import CourseCcxCoachRole +from common.djangoapps.student.roles import CourseCcxCoachRole from xmodule.tabs import CourseTab from .permissions import VIEW_CCX_COACH_DASHBOARD diff --git a/lms/djangoapps/ccx/tests/factories.py b/lms/djangoapps/ccx/tests/factories.py index dc3ce3fa7c3..b622a99e4af 100644 --- a/lms/djangoapps/ccx/tests/factories.py +++ b/lms/djangoapps/ccx/tests/factories.py @@ -7,7 +7,7 @@ from factory import Sequence, SubFactory from factory.django import DjangoModelFactory from lms.djangoapps.ccx.models import CustomCourseForEdX -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory # pylint: disable=missing-class-docstring diff --git a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py index 0ea38a0ffa1..518e8d6f497 100644 --- a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py +++ b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py @@ -12,7 +12,7 @@ from ccx_keys.locator import CCXLocator from six.moves import range, zip_longest from lms.djangoapps.ccx.models import CustomCourseForEdX -from student.tests.factories import AdminFactory, UserFactory +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/ccx/tests/test_field_override_performance.py b/lms/djangoapps/ccx/tests/test_field_override_performance.py index 14c0ecda177..ffd0238d569 100644 --- a/lms/djangoapps/ccx/tests/test_field_override_performance.py +++ b/lms/djangoapps/ccx/tests/test_field_override_performance.py @@ -30,8 +30,8 @@ from lms.djangoapps.courseware.field_overrides import OverrideFieldData from openedx.core.djangoapps.content.block_structure.api import get_course_in_cache from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES from openedx.features.content_type_gating.models import ContentTypeGatingConfig -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_MONGO_MODULESTORE, TEST_DATA_SPLIT_MODULESTORE, @@ -76,7 +76,7 @@ class FieldOverridePerformanceTestCase(FieldOverrideTestMixin, ProceduralCourseT messages = FallbackStorage(self.request) self.request._messages = messages # pylint: disable=protected-access - patcher = mock.patch('edxmako.request_context.get_current_request', return_value=self.request) + patcher = mock.patch('common.djangoapps.edxmako.request_context.get_current_request', return_value=self.request) patcher.start() self.addCleanup(patcher.stop) self.course = None diff --git a/lms/djangoapps/ccx/tests/test_models.py b/lms/djangoapps/ccx/tests/test_models.py index af778b0a2e9..66a46222525 100644 --- a/lms/djangoapps/ccx/tests/test_models.py +++ b/lms/djangoapps/ccx/tests/test_models.py @@ -9,8 +9,8 @@ from datetime import datetime, timedelta import ddt from pytz import utc -from student.roles import CourseCcxCoachRole -from student.tests.factories import AdminFactory +from common.djangoapps.student.roles import CourseCcxCoachRole +from common.djangoapps.student.tests.factories import AdminFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls diff --git a/lms/djangoapps/ccx/tests/test_overrides.py b/lms/djangoapps/ccx/tests/test_overrides.py index 5a6d9f21980..98b19a9e68c 100644 --- a/lms/djangoapps/ccx/tests/test_overrides.py +++ b/lms/djangoapps/ccx/tests/test_overrides.py @@ -20,7 +20,7 @@ from lms.djangoapps.ccx.overrides import override_field_for_ccx from lms.djangoapps.ccx.tests.utils import flatten, iter_blocks from lms.djangoapps.courseware.field_overrides import OverrideFieldData from lms.djangoapps.courseware.tests.test_field_overrides import inject_field_overrides -from student.tests.factories import AdminFactory +from common.djangoapps.student.tests.factories import AdminFactory 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/ccx/tests/test_tasks.py b/lms/djangoapps/ccx/tests/test_tasks.py index b5b4824017c..ae468bcc0ce 100644 --- a/lms/djangoapps/ccx/tests/test_tasks.py +++ b/lms/djangoapps/ccx/tests/test_tasks.py @@ -12,8 +12,8 @@ from ccx_keys.locator import CCXLocator from lms.djangoapps.ccx.tasks import send_ccx_course_published from lms.djangoapps.ccx.tests.factories import CcxFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.roles import CourseCcxCoachRole -from student.tests.factories import AdminFactory +from common.djangoapps.student.roles import CourseCcxCoachRole +from common.djangoapps.student.tests.factories import AdminFactory from xmodule.modulestore.django import SignalHandler from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/ccx/tests/test_utils.py b/lms/djangoapps/ccx/tests/test_utils.py index d69784d089e..12ff664e5d2 100644 --- a/lms/djangoapps/ccx/tests/test_utils.py +++ b/lms/djangoapps/ccx/tests/test_utils.py @@ -13,9 +13,9 @@ from lms.djangoapps.ccx.tests.factories import CcxFactory from lms.djangoapps.ccx.tests.utils import CcxTestCase from lms.djangoapps.ccx.utils import add_master_course_staff_to_ccx, ccx_course, remove_master_course_staff_from_ccx from lms.djangoapps.instructor.access import list_with_level -from student.models import CourseEnrollment, CourseEnrollmentException -from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole -from student.tests.factories import AdminFactory +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentException +from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole +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, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/ccx/tests/test_views.py b/lms/djangoapps/ccx/tests/test_views.py index b661693fff2..cf4abb44f21 100644 --- a/lms/djangoapps/ccx/tests/test_views.py +++ b/lms/djangoapps/ccx/tests/test_views.py @@ -27,7 +27,7 @@ from lms.djangoapps.courseware.tabs import get_course_tab_list from lms.djangoapps.courseware.tests.factories import StudentModuleFactory from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase from lms.djangoapps.courseware.testutils import FieldOverrideTestMixin -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.ccx.models import CustomCourseForEdX from lms.djangoapps.ccx.overrides import get_override_for_ccx, override_field_for_ccx from lms.djangoapps.ccx.tests.factories import CcxFactory @@ -40,9 +40,9 @@ from lms.djangoapps.instructor.access import allow_access, list_with_level from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.django_comment_common.models import FORUM_ROLE_ADMINISTRATOR from openedx.core.djangoapps.django_comment_common.utils import are_permissions_roles_seeded -from student.models import CourseEnrollment, CourseEnrollmentAllowed -from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole -from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed +from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ( diff --git a/lms/djangoapps/ccx/tests/utils.py b/lms/djangoapps/ccx/tests/utils.py index 2f8f928c1ad..b123dc82d86 100644 --- a/lms/djangoapps/ccx/tests/utils.py +++ b/lms/djangoapps/ccx/tests/utils.py @@ -12,8 +12,8 @@ from six.moves import range from lms.djangoapps.ccx.overrides import override_field_for_ccx from lms.djangoapps.ccx.tests.factories import CcxFactory from openedx.core.djangoapps.ace_common.tests.mixins import EmailTemplateTagMixin -from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole -from student.tests.factories import UserFactory +from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.tests.factories import 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 CourseFactory, ItemFactory diff --git a/lms/djangoapps/ccx/utils.py b/lms/djangoapps/ccx/utils.py index 35bc237526f..34a849ccf9a 100644 --- a/lms/djangoapps/ccx/utils.py +++ b/lms/djangoapps/ccx/utils.py @@ -27,8 +27,8 @@ from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params, from lms.djangoapps.instructor.views.api import _split_input_list from lms.djangoapps.instructor.views.tools import get_student_from_identifier from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment, CourseEnrollmentException -from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentException +from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole log = logging.getLogger("edx.ccx") diff --git a/lms/djangoapps/ccx/views.py b/lms/djangoapps/ccx/views.py index 768e967bf4f..7b83c0f729b 100644 --- a/lms/djangoapps/ccx/views.py +++ b/lms/djangoapps/ccx/views.py @@ -27,7 +27,7 @@ from django.views.decorators.csrf import ensure_csrf_cookie from opaque_keys.edx.keys import CourseKey from lms.djangoapps.courseware.courses import get_course_by_id -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.ccx.models import CustomCourseForEdX from lms.djangoapps.ccx.overrides import ( bulk_delete_ccx_override_fields, @@ -54,8 +54,8 @@ from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params from lms.djangoapps.instructor.views.gradebook_api import get_grade_book_page from openedx.core.djangoapps.django_comment_common.models import FORUM_ROLE_ADMINISTRATOR, assign_role from openedx.core.djangoapps.django_comment_common.utils import seed_permissions_roles -from student.models import CourseEnrollment -from student.roles import CourseCcxCoachRole +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseCcxCoachRole from xmodule.modulestore.django import SignalHandler log = logging.getLogger(__name__) diff --git a/lms/djangoapps/certificates/admin.py b/lms/djangoapps/certificates/admin.py index 5a1967a811f..01b3c4981bb 100644 --- a/lms/djangoapps/certificates/admin.py +++ b/lms/djangoapps/certificates/admin.py @@ -19,7 +19,7 @@ from lms.djangoapps.certificates.models import ( CertificateTemplateAsset, GeneratedCertificate ) -from util.organizations_helpers import get_organizations +from common.djangoapps.util.organizations_helpers import get_organizations class CertificateTemplateForm(forms.ModelForm): diff --git a/lms/djangoapps/certificates/api.py b/lms/djangoapps/certificates/api.py index 76b3f2f0746..42343da8842 100644 --- a/lms/djangoapps/certificates/api.py +++ b/lms/djangoapps/certificates/api.py @@ -32,7 +32,7 @@ from lms.djangoapps.certificates.queue import XQueueCertInterface from lms.djangoapps.instructor.access import list_with_level from openedx.core.djangoapps.certificates.api import certificates_viewable_for_course from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from util.organizations_helpers import get_course_organization_id +from common.djangoapps.util.organizations_helpers import get_course_organization_id from xmodule.modulestore.django import modulestore log = logging.getLogger("edx.certificate") diff --git a/lms/djangoapps/certificates/apis/v0/tests/test_views.py b/lms/djangoapps/certificates/apis/v0/tests/test_views.py index b99eebdf154..dee9b063d48 100644 --- a/lms/djangoapps/certificates/apis/v0/tests/test_views.py +++ b/lms/djangoapps/certificates/apis/v0/tests/test_views.py @@ -15,14 +15,14 @@ from mock import patch from rest_framework import status from rest_framework.test import APITestCase -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.apis.v0.views import CertificatesDetailView, CertificatesListView 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 openedx.core.djangoapps.user_api.tests.factories import UserPreferenceFactory 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 SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/certificates/models.py b/lms/djangoapps/certificates/models.py index 7e076234322..82a79c68c93 100644 --- a/lms/djangoapps/certificates/models.py +++ b/lms/djangoapps/certificates/models.py @@ -71,12 +71,12 @@ from simple_history.models import HistoricalRecords from lms.djangoapps.badges.events.course_complete import course_badge_check from lms.djangoapps.badges.events.course_meta import completion_check, course_group_check -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.instructor_task.models import InstructorTask from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.signals.signals import COURSE_CERT_AWARDED, COURSE_CERT_CHANGED, COURSE_CERT_REVOKED from openedx.core.djangoapps.xmodule_django.models import NoneToEmptyManager -from util.milestones_helpers import fulfill_course_milestone, is_prerequisite_courses_enabled +from common.djangoapps.util.milestones_helpers import fulfill_course_milestone, is_prerequisite_courses_enabled LOGGER = logging.getLogger(__name__) @@ -248,7 +248,7 @@ class GeneratedCertificate(models.Model): """ # Import here instead of top of file since this module gets imported before # the course_modes app is loaded, resulting in a Django deprecation warning. - from course_modes.models import CourseMode + from common.djangoapps.course_modes.models import CourseMode # Only returns eligible certificates. This should be used in # preference to the default `objects` manager in most cases. @@ -619,7 +619,7 @@ def certificate_status(generated_certificate): """ # Import here instead of top of file since this module gets imported before # the course_modes app is loaded, resulting in a Django deprecation warning. - from course_modes.models import CourseMode + from common.djangoapps.course_modes.models import CourseMode if generated_certificate: cert_status = { @@ -650,7 +650,7 @@ def certificate_info_for_user(user, course_id, grade, user_is_whitelisted, user_ """ Returns the certificate info for a user for grade report. """ - from student.models import CourseEnrollment + from common.djangoapps.student.models import CourseEnrollment certificate_is_delivered = 'N' certificate_type = 'N/A' @@ -704,7 +704,7 @@ class ExampleCertificateSet(TimeStampedModel): """ # Import here instead of top of file since this module gets imported before # the course_modes app is loaded, resulting in a Django deprecation warning. - from course_modes.models import CourseMode + from common.djangoapps.course_modes.models import CourseMode cert_set = cls.objects.create(course_key=course_key) ExampleCertificate.objects.bulk_create([ diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index d917161ae45..2f9f6175745 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -16,7 +16,7 @@ from lxml.etree import ParserError, XMLSyntaxError from requests.auth import HTTPBasicAuth from capa.xqueue_interface import XQueueInterface, make_hashkey, make_xheader -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateStatuses as status from lms.djangoapps.certificates.models import ( CertificateWhitelist, @@ -26,7 +26,7 @@ from lms.djangoapps.certificates.models import ( ) from lms.djangoapps.grades.api import CourseGradeFactory from lms.djangoapps.verify_student.services import IDVerificationService -from student.models import CourseEnrollment, UserProfile +from common.djangoapps.student.models import CourseEnrollment, UserProfile from xmodule.modulestore.django import modulestore LOGGER = logging.getLogger(__name__) diff --git a/lms/djangoapps/certificates/signals.py b/lms/djangoapps/certificates/signals.py index ef7c6dbfb6f..eb0edf3e4e0 100644 --- a/lms/djangoapps/certificates/signals.py +++ b/lms/djangoapps/certificates/signals.py @@ -9,7 +9,7 @@ import six from django.db.models.signals import post_save from django.dispatch import receiver -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import ( CertificateGenerationCourseSetting, CertificateStatuses, @@ -27,7 +27,7 @@ from openedx.core.djangoapps.signals.signals import ( COURSE_GRADE_NOW_PASSED, LEARNER_NOW_VERIFIED ) -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment log = logging.getLogger(__name__) CERTIFICATE_DELAY_SECONDS = 2 diff --git a/lms/djangoapps/certificates/tests/factories.py b/lms/djangoapps/certificates/tests/factories.py index c1dc63aedd9..f15f7cc6fa5 100644 --- a/lms/djangoapps/certificates/tests/factories.py +++ b/lms/djangoapps/certificates/tests/factories.py @@ -12,7 +12,7 @@ from lms.djangoapps.certificates.models import ( CertificateWhitelist, GeneratedCertificate ) -from student.models import LinkedInAddToProfileConfiguration +from common.djangoapps.student.models import LinkedInAddToProfileConfiguration class GeneratedCertificateFactory(DjangoModelFactory): diff --git a/lms/djangoapps/certificates/tests/test_api.py b/lms/djangoapps/certificates/tests/test_api.py index 1eb58fbf4f1..7bfe45b548c 100644 --- a/lms/djangoapps/certificates/tests/test_api.py +++ b/lms/djangoapps/certificates/tests/test_api.py @@ -19,8 +19,8 @@ from mock import patch from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import CourseLocator -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 import api as certs_api from lms.djangoapps.certificates.models import ( CertificateGenerationConfiguration, @@ -34,9 +34,9 @@ from lms.djangoapps.certificates.tests.factories import CertificateInvalidationF from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory from lms.djangoapps.grades.tests.utils import mock_passing_grade from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration -from student.models import CourseEnrollment -from student.tests.factories import UserFactory -from util.testing import EventTestMixin +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.testing import EventTestMixin from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/certificates/tests/test_cert_management.py b/lms/djangoapps/certificates/tests/test_cert_management.py index a09020f6424..61b4b27fbdb 100644 --- a/lms/djangoapps/certificates/tests/test_cert_management.py +++ b/lms/djangoapps/certificates/tests/test_cert_management.py @@ -13,10 +13,10 @@ from six.moves import range from lms.djangoapps.badges.events.course_complete import get_completion_badge from lms.djangoapps.badges.models import BadgeAssertion from lms.djangoapps.badges.tests.factories import BadgeAssertionFactory, CourseCompleteImageConfigurationFactory -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.tests.utils import mock_passing_grade -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, check_mongo_calls diff --git a/lms/djangoapps/certificates/tests/test_create_fake_cert.py b/lms/djangoapps/certificates/tests/test_create_fake_cert.py index 2cc8561b2dd..adc0a910696 100644 --- a/lms/djangoapps/certificates/tests/test_create_fake_cert.py +++ b/lms/djangoapps/certificates/tests/test_create_fake_cert.py @@ -9,7 +9,7 @@ from opaque_keys.edx.locator import CourseLocator from six import text_type from lms.djangoapps.certificates.models import GeneratedCertificate -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class CreateFakeCertTest(TestCase): diff --git a/lms/djangoapps/certificates/tests/test_models.py b/lms/djangoapps/certificates/tests/test_models.py index 6c8f6811257..7a6f1466c30 100644 --- a/lms/djangoapps/certificates/tests/test_models.py +++ b/lms/djangoapps/certificates/tests/test_models.py @@ -26,7 +26,7 @@ from lms.djangoapps.certificates.models import ( from lms.djangoapps.certificates.tests.factories import CertificateInvalidationFactory, GeneratedCertificateFactory from lms.djangoapps.instructor_task.tests.factories import InstructorTaskFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/certificates/tests/test_queue.py b/lms/djangoapps/certificates/tests/test_queue.py index 52f10ef0837..f008f4c9718 100644 --- a/lms/djangoapps/certificates/tests/test_queue.py +++ b/lms/djangoapps/certificates/tests/test_queue.py @@ -23,7 +23,7 @@ from testfixtures import LogCapture # and verify that items are being correctly added to the queue # in our `XQueueCertInterface` implementation. from capa.xqueue_interface import XQueueInterface -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.models import ( CertificateStatuses, ExampleCertificate, @@ -34,7 +34,7 @@ from lms.djangoapps.certificates.queue import LOGGER, XQueueCertInterface from lms.djangoapps.certificates.tests.factories import CertificateWhitelistFactory, GeneratedCertificateFactory from lms.djangoapps.grades.tests.utils import mock_passing_grade from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory -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/certificates/tests/test_services.py b/lms/djangoapps/certificates/tests/test_services.py index 0b608f083f0..4a84fb62bcf 100644 --- a/lms/djangoapps/certificates/tests/test_services.py +++ b/lms/djangoapps/certificates/tests/test_services.py @@ -6,7 +6,7 @@ Unit Tests for the Certificate service from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from lms.djangoapps.certificates.services import CertificateService from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory -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/certificates/tests/test_signals.py b/lms/djangoapps/certificates/tests/test_signals.py index b95058cb820..b776a750c96 100644 --- a/lms/djangoapps/certificates/tests/test_signals.py +++ b/lms/djangoapps/certificates/tests/test_signals.py @@ -9,7 +9,7 @@ import mock import six 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.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/certificates/tests/test_support_views.py b/lms/djangoapps/certificates/tests/test_support_views.py index a47df6a8eee..937eb25b250 100644 --- a/lms/djangoapps/certificates/tests/test_support_views.py +++ b/lms/djangoapps/certificates/tests/test_support_views.py @@ -20,9 +20,9 @@ from lms.djangoapps.certificates.models import CertificateInvalidation, Certific from lms.djangoapps.certificates.tests.factories import CertificateInvalidationFactory from lms.djangoapps.grades.tests.utils import mock_passing_grade from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory -from student.models import CourseEnrollment -from student.roles import GlobalStaff, SupportStaffRole -from student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import GlobalStaff, SupportStaffRole +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -314,7 +314,7 @@ class CertificateRegenerateTests(CertificateSupportTestCase): self.cert.save() with mock_passing_grade(percent=0.75): - with patch('course_modes.models.CourseMode.mode_for_course') as mock_mode_for_course: + with patch('common.djangoapps.course_modes.models.CourseMode.mode_for_course') as mock_mode_for_course: mock_mode_for_course.return_value = 'honor' api.regenerate_user_certificates(self.student, self.course.id, course=self.course) diff --git a/lms/djangoapps/certificates/tests/test_tasks.py b/lms/djangoapps/certificates/tests/test_tasks.py index ac596fc7cd4..31a4db4324c 100644 --- a/lms/djangoapps/certificates/tests/test_tasks.py +++ b/lms/djangoapps/certificates/tests/test_tasks.py @@ -10,7 +10,7 @@ from opaque_keys.edx.keys import CourseKey from lms.djangoapps.certificates.tasks import generate_certificate from lms.djangoapps.verify_student.models import IDVerificationAttempt -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/lms/djangoapps/certificates/tests/test_views.py b/lms/djangoapps/certificates/tests/test_views.py index a823d1c5d7c..39edc36e31c 100644 --- a/lms/djangoapps/certificates/tests/test_views.py +++ b/lms/djangoapps/certificates/tests/test_views.py @@ -24,7 +24,7 @@ from lms.djangoapps.certificates.models import ( ) from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -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/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index fa1d47d88e4..66585326532 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -16,7 +16,7 @@ from django.urls import reverse from mock import patch from urllib.parse import urlencode -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from edx_toggles.toggles import WaffleSwitch from edx_toggles.toggles.testutils import override_waffle_switch from lms.djangoapps.badges.events.course_complete import get_completion_badge @@ -50,11 +50,11 @@ from openedx.core.djangoapps.site_configuration.tests.test_util import ( from openedx.core.djangolib.js_utils import js_escaped_string from openedx.core.djangolib.testing.utils import CacheIsolationTestCase from openedx.core.lib.tests.assertions.events import assert_event_matches -from student.roles import CourseStaffRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from track.tests import EventTrackingTestCase -from util import organizations_helpers as organizations_api -from util.date_utils import strftime_localized +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.track.tests import EventTrackingTestCase +from common.djangoapps.util import organizations_helpers as organizations_api +from common.djangoapps.util.date_utils import strftime_localized from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/certificates/tests/tests.py b/lms/djangoapps/certificates/tests/tests.py index f3c7b87f9e5..13fa74c92c6 100644 --- a/lms/djangoapps/certificates/tests/tests.py +++ b/lms/djangoapps/certificates/tests/tests.py @@ -20,9 +20,9 @@ from lms.djangoapps.certificates.models import ( certificate_status_for_student ) from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory -from student.models import CourseEnrollment -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.milestones_helpers import milestones_achieved_by_user, set_prerequisite_courses +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.milestones_helpers import milestones_achieved_by_user, set_prerequisite_courses from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/certificates/views/support.py b/lms/djangoapps/certificates/views/support.py index 01b75f3630d..c8a35380013 100644 --- a/lms/djangoapps/certificates/views/support.py +++ b/lms/djangoapps/certificates/views/support.py @@ -24,8 +24,8 @@ from lms.djangoapps.certificates.models import CertificateInvalidation from lms.djangoapps.certificates.permissions import GENERATE_ALL_CERTIFICATES, VIEW_ALL_CERTIFICATES from lms.djangoapps.instructor_task.api import generate_certificates_for_students from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.models import CourseEnrollment, User -from util.json_request import JsonResponse +from common.djangoapps.student.models import CourseEnrollment, User +from common.djangoapps.util.json_request import JsonResponse from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py index d6991e5edc0..26f8e7f0333 100644 --- a/lms/djangoapps/certificates/views/webview.py +++ b/lms/djangoapps/certificates/views/webview.py @@ -23,8 +23,8 @@ from opaque_keys.edx.keys import CourseKey from lms.djangoapps.badges.events.course_complete import get_completion_badge from lms.djangoapps.badges.utils import badges_enabled -from edxmako.shortcuts import render_to_response -from edxmako.template import Template +from common.djangoapps.edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.template import Template from lms.djangoapps.certificates.api import ( emit_certificate_event, get_active_web_certificate, @@ -47,10 +47,10 @@ from openedx.core.djangoapps.certificates.api import certificates_viewable_for_c from openedx.core.djangoapps.lang_pref.api import get_closest_released_language from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.lib.courses import course_image_url -from student.models import LinkedInAddToProfileConfiguration -from util import organizations_helpers as organization_api -from util.date_utils import strftime_localized -from util.views import handle_500 +from common.djangoapps.student.models import LinkedInAddToProfileConfiguration +from common.djangoapps.util import organizations_helpers as organization_api +from common.djangoapps.util.date_utils import strftime_localized +from common.djangoapps.util.views import handle_500 log = logging.getLogger(__name__) _ = translation.ugettext diff --git a/lms/djangoapps/certificates/views/xqueue.py b/lms/djangoapps/certificates/views/xqueue.py index 449bf70f942..d700e8d7837 100644 --- a/lms/djangoapps/certificates/views/xqueue.py +++ b/lms/djangoapps/certificates/views/xqueue.py @@ -21,8 +21,8 @@ from lms.djangoapps.certificates.models import ( GeneratedCertificate, certificate_status_for_student ) -from util.json_request import JsonResponse, JsonResponseBadRequest -from util.request_rate_limiter import BadRequestRateLimiter +from common.djangoapps.util.json_request import JsonResponse, JsonResponseBadRequest +from common.djangoapps.util.request_rate_limiter import BadRequestRateLimiter from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/lms/djangoapps/commerce/api/v0/tests/test_views.py b/lms/djangoapps/commerce/api/v0/tests/test_views.py index 3fa30d5e5cc..36904bb7af7 100644 --- a/lms/djangoapps/commerce/api/v0/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v0/tests/test_views.py @@ -15,13 +15,13 @@ from django.test import TestCase from django.test.utils import override_settings from django.urls import reverse, reverse_lazy -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 openedx.core.djangoapps.enrollments.api import get_enrollment from openedx.core.lib.django_test_client_utils import get_absolute_url -from student.models import CourseEnrollment -from student.tests.tests import EnrollmentEventTestMixin +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.tests import EnrollmentEventTestMixin 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/commerce/api/v0/views.py b/lms/djangoapps/commerce/api/v0/views.py index bf51afdea05..754d289dc68 100644 --- a/lms/djangoapps/commerce/api/v0/views.py +++ b/lms/djangoapps/commerce/api/v0/views.py @@ -15,18 +15,18 @@ from rest_framework.status import HTTP_406_NOT_ACCEPTABLE, HTTP_409_CONFLICT from rest_framework.views import APIView from six import text_type -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware import courses -from entitlements.models import CourseEntitlement +from common.djangoapps.entitlements.models import CourseEntitlement from openedx.core.djangoapps.commerce.utils import ecommerce_api_client from openedx.core.djangoapps.embargo import api as embargo_api from openedx.core.djangoapps.enrollments.api import add_enrollment from openedx.core.djangoapps.enrollments.views import EnrollmentCrossDomainSessionAuth from openedx.core.djangoapps.user_api.preferences.api import update_email_opt_in from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser -from student.models import CourseEnrollment -from student.signals import SAILTHRU_AUDIT_PURCHASE -from util.json_request import JsonResponse +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.signals import SAILTHRU_AUDIT_PURCHASE +from common.djangoapps.util.json_request import JsonResponse from ...constants import Messages from ...http import DetailResponse diff --git a/lms/djangoapps/commerce/api/v1/models.py b/lms/djangoapps/commerce/api/v1/models.py index 9c910c17cfc..8c484c5e5a4 100644 --- a/lms/djangoapps/commerce/api/v1/models.py +++ b/lms/djangoapps/commerce/api/v1/models.py @@ -9,7 +9,7 @@ from django.db import transaction 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.verify_student.models import VerificationDeadline from openedx.core.djangoapps.content.course_overviews.models import CourseOverview diff --git a/lms/djangoapps/commerce/api/v1/serializers.py b/lms/djangoapps/commerce/api/v1/serializers.py index 82091e8b223..f882cd461c9 100644 --- a/lms/djangoapps/commerce/api/v1/serializers.py +++ b/lms/djangoapps/commerce/api/v1/serializers.py @@ -10,7 +10,7 @@ from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from rest_framework import serializers -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from xmodule.modulestore.django import modulestore from .models import UNDEFINED, Course diff --git a/lms/djangoapps/commerce/api/v1/tests/test_models.py b/lms/djangoapps/commerce/api/v1/tests/test_models.py index 29e8b18efda..ff2b3e3d95f 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_models.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_models.py @@ -4,7 +4,7 @@ import ddt from django.test import TestCase -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from ..models import Course diff --git a/lms/djangoapps/commerce/api/v1/tests/test_views.py b/lms/djangoapps/commerce/api/v1/tests/test_views.py index 2981d987d5a..1155dbf90c3 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_views.py @@ -15,9 +15,9 @@ from django.test.utils import override_settings from django.urls import reverse, reverse_lazy from rest_framework.utils.encoders import JSONEncoder -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.verify_student.models import VerificationDeadline -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/commerce/api/v1/views.py b/lms/djangoapps/commerce/api/v1/views.py index e92c8f70275..4ea967bf6c2 100644 --- a/lms/djangoapps/commerce/api/v1/views.py +++ b/lms/djangoapps/commerce/api/v1/views.py @@ -15,10 +15,10 @@ from rest_framework.permissions import IsAuthenticated from rest_framework.views import APIView from openedx.core.lib.api.authentication import BearerAuthentication -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.commerce.utils import ecommerce_api_client from openedx.core.lib.api.mixins import PutAsCreateMixin -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse from ...utils import is_account_activation_requirement_disabled from .models import Course diff --git a/lms/djangoapps/commerce/http.py b/lms/djangoapps/commerce/http.py index 35e4063087a..01e19bb1e8c 100644 --- a/lms/djangoapps/commerce/http.py +++ b/lms/djangoapps/commerce/http.py @@ -3,7 +3,7 @@ from rest_framework.status import HTTP_200_OK, HTTP_500_INTERNAL_SERVER_ERROR -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse class DetailResponse(JsonResponse): diff --git a/lms/djangoapps/commerce/management/commands/create_orders_for_old_enterprise_course_enrollment.py b/lms/djangoapps/commerce/management/commands/create_orders_for_old_enterprise_course_enrollment.py index 31157ac4360..839a5fbd6a8 100644 --- a/lms/djangoapps/commerce/management/commands/create_orders_for_old_enterprise_course_enrollment.py +++ b/lms/djangoapps/commerce/management/commands/create_orders_for_old_enterprise_course_enrollment.py @@ -18,10 +18,10 @@ from requests import Timeout from slumber.exceptions import HttpServerError, SlumberBaseException from enterprise.models import EnterpriseCourseEnrollment -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from openedx.core.djangoapps.commerce.utils import ecommerce_api_client -from util.query import use_read_replica_if_available +from common.djangoapps.util.query import use_read_replica_if_available User = get_user_model() diff --git a/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py b/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py index 1a8b0c15690..edb0abab619 100644 --- a/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py +++ b/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py @@ -10,8 +10,8 @@ from django.utils.six import StringIO from mock import patch from six.moves import range -from course_modes.models import CourseMode -from student.tests.factories import UserFactory, CourseEnrollmentFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.student.tests.factories import UserFactory, CourseEnrollmentFactory from openedx.core.djangoapps.credit.tests.test_api import TEST_ECOMMERCE_WORKER from openedx.core.djangolib.testing.utils import skip_unless_lms from openedx.features.enterprise_support.tests.factories import ( diff --git a/lms/djangoapps/commerce/signals.py b/lms/djangoapps/commerce/signals.py index d847758cd7e..9ba69c9f729 100644 --- a/lms/djangoapps/commerce/signals.py +++ b/lms/djangoapps/commerce/signals.py @@ -10,7 +10,7 @@ from django.contrib.auth.models import AnonymousUser from django.dispatch import receiver from openedx.core.djangoapps.commerce.utils import is_commerce_service_configured -from student.signals import REFUND_ORDER +from common.djangoapps.student.signals import REFUND_ORDER from .utils import refund_seat diff --git a/lms/djangoapps/commerce/tests/__init__.py b/lms/djangoapps/commerce/tests/__init__.py index 1c584e7530a..69d0ea84afe 100644 --- a/lms/djangoapps/commerce/tests/__init__.py +++ b/lms/djangoapps/commerce/tests/__init__.py @@ -10,7 +10,7 @@ from freezegun import freeze_time from openedx.core.djangoapps.commerce.utils import ecommerce_api_client from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory JSON = 'application/json' TEST_PUBLIC_URL_ROOT = 'http://www.example.com' diff --git a/lms/djangoapps/commerce/tests/test_signals.py b/lms/djangoapps/commerce/tests/test_signals.py index 0917c94e124..f938c9272dd 100644 --- a/lms/djangoapps/commerce/tests/test_signals.py +++ b/lms/djangoapps/commerce/tests/test_signals.py @@ -18,9 +18,9 @@ from opaque_keys.edx.keys import CourseKey from requests import Timeout from six.moves.urllib.parse import urljoin -from course_modes.models import CourseMode -from student.signals import REFUND_ORDER -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.course_modes.models import CourseMode +from common.djangoapps.student.signals import REFUND_ORDER +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from ..models import CommerceConfiguration from ..utils import _generate_refund_notification_body, _send_refund_notification, create_zendesk_ticket diff --git a/lms/djangoapps/commerce/tests/test_utils.py b/lms/djangoapps/commerce/tests/test_utils.py index 45f4283b9f1..32faf2e6477 100644 --- a/lms/djangoapps/commerce/tests/test_utils.py +++ b/lms/djangoapps/commerce/tests/test_utils.py @@ -14,20 +14,20 @@ from opaque_keys.edx.locator import CourseLocator from six.moves.urllib.parse import urlencode 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.commerce.models import CommerceConfiguration from lms.djangoapps.commerce.utils import EcommerceService, refund_entitlement, refund_seat from openedx.core.djangolib.testing.utils import skip_unless_lms from openedx.core.lib.log_utils import audit_log -from student.models import CourseEnrollment -from student.tests.factories import TEST_PASSWORD, UserFactory +from common.djangoapps.student.models import CourseEnrollment +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 # 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 common.djangoapps.entitlements.tests.factories import CourseEntitlementFactory def update_commerce_config(enabled=False, checkout_page='/test_basket/add/'): diff --git a/lms/djangoapps/commerce/tests/test_views.py b/lms/djangoapps/commerce/tests/test_views.py index 22637c80801..2230ac8a772 100644 --- a/lms/djangoapps/commerce/tests/test_views.py +++ b/lms/djangoapps/commerce/tests/test_views.py @@ -1,6 +1,6 @@ """ Tests for commerce views. """ -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class UserMixin(object): diff --git a/lms/djangoapps/commerce/utils.py b/lms/djangoapps/commerce/utils.py index ab5679a1490..5037a535b89 100644 --- a/lms/djangoapps/commerce/utils.py +++ b/lms/djangoapps/commerce/utils.py @@ -14,11 +14,11 @@ from django.utils.translation import ugettext as _ from opaque_keys.edx.keys import CourseKey from six.moves.urllib.parse import urlencode, urljoin -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.commerce.utils import ecommerce_api_client, is_commerce_service_configured from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.theming import helpers as theming_helpers -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from .models import CommerceConfiguration diff --git a/lms/djangoapps/course_api/api.py b/lms/djangoapps/course_api/api.py index 86aa3c9d39c..86c9fe6ba8a 100644 --- a/lms/djangoapps/course_api/api.py +++ b/lms/djangoapps/course_api/api.py @@ -21,8 +21,8 @@ from lms.djangoapps.courseware.courses import ( from opaque_keys.edx.django.models import CourseKeyField from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.lib.api.view_utils import LazySequence -from student.models import CourseAccessRole -from student.roles import GlobalStaff +from common.djangoapps.student.models import CourseAccessRole +from common.djangoapps.student.roles import GlobalStaff from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError diff --git a/lms/djangoapps/course_api/blocks/permissions.py b/lms/djangoapps/course_api/blocks/permissions.py index 3d0e2c46703..391ede90cfd 100644 --- a/lms/djangoapps/course_api/blocks/permissions.py +++ b/lms/djangoapps/course_api/blocks/permissions.py @@ -8,8 +8,8 @@ from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.access_response import AccessResponse from lms.djangoapps.courseware.access_utils import ACCESS_DENIED, ACCESS_GRANTED, check_public_access from lms.djangoapps.courseware.courses import get_course -from student.models import CourseEnrollment -from student.roles import CourseStaffRole +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseStaffRole from xmodule.course_module import COURSE_VISIBILITY_PUBLIC diff --git a/lms/djangoapps/course_api/blocks/tests/test_api.py b/lms/djangoapps/course_api/blocks/tests/test_api.py index ba73088ca13..f738fd09bf5 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_api.py +++ b/lms/djangoapps/course_api/blocks/tests/test_api.py @@ -10,12 +10,12 @@ import six from django.test.client import RequestFactory from edx_toggles.toggles.testutils import override_waffle_switch from mock import patch -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 SampleCourseFactory, check_mongo_calls from xmodule.modulestore.tests.sample_courses import BlockInfo - from openedx.core.djangoapps.content.block_structure.api import clear_course_from_cache from openedx.core.djangoapps.content.block_structure.config import STORAGE_BACKING_FOR_CACHE, waffle_switch diff --git a/lms/djangoapps/course_api/blocks/tests/test_forms.py b/lms/djangoapps/course_api/blocks/tests/test_forms.py index 62a8692b4f0..47d23c8342f 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_forms.py +++ b/lms/djangoapps/course_api/blocks/tests/test_forms.py @@ -11,8 +11,8 @@ from opaque_keys.edx.locator import CourseLocator from rest_framework.exceptions import PermissionDenied from openedx.core.djangoapps.util.test_forms import FormTestMixin -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 SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/course_api/blocks/tests/test_serializers.py b/lms/djangoapps/course_api/blocks/tests/test_serializers.py index 5c71cba275f..f0a28fbce97 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_serializers.py +++ b/lms/djangoapps/course_api/blocks/tests/test_serializers.py @@ -8,8 +8,8 @@ from mock import MagicMock from lms.djangoapps.course_blocks.api import get_course_block_access_transformers, get_course_blocks from openedx.core.djangoapps.content.block_structure.transformers import BlockStructureTransformers -from student.roles import CourseStaffRole -from student.tests.factories import UserFactory +from common.djangoapps.student.roles import CourseStaffRole +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 ToyCourseFactory diff --git a/lms/djangoapps/course_api/blocks/tests/test_views.py b/lms/djangoapps/course_api/blocks/tests/test_views.py index 77e72212cb3..71410c64fee 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_views.py +++ b/lms/djangoapps/course_api/blocks/tests/test_views.py @@ -12,8 +12,8 @@ from django.conf import settings from django.urls import reverse from opaque_keys.edx.locator import CourseLocator -from student.models import CourseEnrollment -from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import ToyCourseFactory diff --git a/lms/djangoapps/course_api/blocks/transformers/milestones.py b/lms/djangoapps/course_api/blocks/transformers/milestones.py index 7b203745b5a..218913ca6c2 100644 --- a/lms/djangoapps/course_api/blocks/transformers/milestones.py +++ b/lms/djangoapps/course_api/blocks/transformers/milestones.py @@ -11,8 +11,8 @@ from edx_proctoring.api import get_attempt_status_summary from edx_proctoring.exceptions import ProctoredExamNotFoundException from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer -from student.models import EntranceExamConfiguration -from util import milestones_helpers +from common.djangoapps.student.models import EntranceExamConfiguration +from common.djangoapps.util import milestones_helpers log = logging.getLogger(__name__) diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py index 0d67aedade4..0bddc353117 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py @@ -11,7 +11,7 @@ from xblock.core import XBlock from lms.djangoapps.course_api.blocks.transformers.block_completion import BlockCompletionTransformer from lms.djangoapps.course_blocks.api import get_course_blocks from lms.djangoapps.course_blocks.transformers.tests.helpers import ModuleStoreTestCase, TransformerRegistryTestMixin -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py index bbede2ede2c..c44ccd9863c 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py @@ -13,7 +13,7 @@ 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.transformers import BlockStructureTransformers from openedx.core.lib.gating import api as gating_api -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from ..milestones import MilestonesAndSpecialExamsTransformer diff --git a/lms/djangoapps/course_api/permissions.py b/lms/djangoapps/course_api/permissions.py index 50790c11c90..99fafdd74b9 100644 --- a/lms/djangoapps/course_api/permissions.py +++ b/lms/djangoapps/course_api/permissions.py @@ -3,7 +3,7 @@ Course API Authorization functions """ -from student.roles import GlobalStaff +from common.djangoapps.student.roles import GlobalStaff def can_view_courses_for_username(requesting_user, target_username): diff --git a/lms/djangoapps/course_api/tests/mixins.py b/lms/djangoapps/course_api/tests/mixins.py index c32bb21be6e..349193775b7 100644 --- a/lms/djangoapps/course_api/tests/mixins.py +++ b/lms/djangoapps/course_api/tests/mixins.py @@ -5,7 +5,7 @@ Common mixins for Course API Tests from datetime import datetime -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import ToyCourseFactory TEST_PASSWORD = u'edx' diff --git a/lms/djangoapps/course_api/tests/test_forms.py b/lms/djangoapps/course_api/tests/test_forms.py index 1ecaa48ebd2..100d2de23ff 100644 --- a/lms/djangoapps/course_api/tests/test_forms.py +++ b/lms/djangoapps/course_api/tests/test_forms.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import AnonymousUser from django.http import QueryDict from openedx.core.djangoapps.util.test_forms import FormTestMixin -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/course_api/tests/test_views.py b/lms/djangoapps/course_api/tests/test_views.py index 2369b622360..43d019ad808 100644 --- a/lms/djangoapps/course_api/tests/test_views.py +++ b/lms/djangoapps/course_api/tests/test_views.py @@ -20,15 +20,15 @@ from search.tests.tests import TEST_INDEX_NAME from search.tests.utils import SearcherMixin 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 opaque_keys.edx.locator import LibraryLocator from openedx.core.lib.api.view_utils import LazySequence from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_duration_limits.models import CourseDurationLimitConfig -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 xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/course_blocks/transformers/library_content.py b/lms/djangoapps/course_blocks/transformers/library_content.py index 6123f9f178c..da56dc81b95 100644 --- a/lms/djangoapps/course_blocks/transformers/library_content.py +++ b/lms/djangoapps/course_blocks/transformers/library_content.py @@ -14,7 +14,7 @@ from openedx.core.djangoapps.content.block_structure.transformer import ( BlockStructureTransformer, FilteringTransformerMixin ) -from track import contexts +from common.djangoapps.track import contexts from xmodule.library_content_module import LibraryContentBlock from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/course_blocks/transformers/tests/helpers.py b/lms/djangoapps/course_blocks/transformers/tests/helpers.py index 605c5d70723..8028d34691b 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/helpers.py +++ b/lms/djangoapps/course_blocks/transformers/tests/helpers.py @@ -7,11 +7,11 @@ import six from six.moves import range from mock import patch -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.access import has_access from openedx.core.djangoapps.content.block_structure.tests.helpers import clear_registered_transformers_cache from openedx.core.djangoapps.content.block_structure.transformers import BlockStructureTransformers -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/course_blocks/transformers/tests/test_library_content.py b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py index bb3cbad872c..2910d783a06 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py @@ -8,7 +8,7 @@ import mock from openedx.core.djangoapps.content.block_structure.api import clear_course_from_cache from openedx.core.djangoapps.content.block_structure.transformers import BlockStructureTransformers -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from ...api import get_course_blocks from ..library_content import ContentLibraryTransformer, ContentLibraryOrderTransformer diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py index ab1b8698420..fdca09e317a 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py @@ -11,7 +11,7 @@ import pytz from lms.djangoapps.course_blocks.transformers.load_override_data import REQUESTED_FIELDS, OverrideDataTransformer from lms.djangoapps.courseware.student_field_overrides import get_override_for_user, override_field_for_user from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import ToyCourseFactory diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py index f48a9c51d0a..1274caf2204 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py @@ -7,7 +7,7 @@ import ddt import openedx.core.djangoapps.user_api.course_tag.api as course_tag_api from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from xmodule.modulestore.tests.factories import check_mongo_calls from xmodule.partitions.partitions import Group, UserPartition from xmodule.partitions.partitions_service import get_user_partition_groups diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py index 6847582c13e..5be604e9db4 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py @@ -13,14 +13,14 @@ import six from six.moves import range from mock import patch -from course_modes.tests.factories import CourseModeFactory +from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.course_groups.cohorts import add_user_to_cohort from openedx.core.djangoapps.course_groups.partition_scheme import CohortPartitionScheme from openedx.core.djangoapps.course_groups.tests.helpers import CohortFactory, config_course_cohorts from openedx.core.djangoapps.course_groups.views import link_cohort_to_partition_group from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.content_type_gating.partitions import create_content_gating_partition -from student.tests.factories import CourseEnrollmentFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from xmodule.modulestore.tests.factories import CourseFactory from xmodule.partitions.partitions import Group, UserPartition diff --git a/lms/djangoapps/course_goals/api.py b/lms/djangoapps/course_goals/api.py index 608e9cf8eb9..7e5d7e04a8b 100644 --- a/lms/djangoapps/course_goals/api.py +++ b/lms/djangoapps/course_goals/api.py @@ -8,7 +8,7 @@ from opaque_keys.edx.keys import CourseKey from rest_framework.reverse import reverse from six import text_type -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.features.course_experience import ENABLE_COURSE_GOALS from . import models diff --git a/lms/djangoapps/course_goals/handlers.py b/lms/djangoapps/course_goals/handlers.py index 3baff2e5564..9ca3db95755 100644 --- a/lms/djangoapps/course_goals/handlers.py +++ b/lms/djangoapps/course_goals/handlers.py @@ -8,8 +8,8 @@ from django.db import models from django.dispatch import receiver import six -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 from .api import add_course_goal, remove_course_goal from .models import GOAL_KEY_CHOICES diff --git a/lms/djangoapps/course_goals/tests/test_api.py b/lms/djangoapps/course_goals/tests/test_api.py index 8240f60a311..53fb021cf64 100644 --- a/lms/djangoapps/course_goals/tests/test_api.py +++ b/lms/djangoapps/course_goals/tests/test_api.py @@ -10,8 +10,8 @@ from django.urls import reverse from rest_framework.test import APIClient from lms.djangoapps.course_goals.models import CourseGoal -from student.models import CourseEnrollment -from track.tests import EventTrackingTestCase +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.track.tests import EventTrackingTestCase from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/course_goals/views.py b/lms/djangoapps/course_goals/views.py index c98ff66aadc..ebd5baafd8a 100644 --- a/lms/djangoapps/course_goals/views.py +++ b/lms/djangoapps/course_goals/views.py @@ -15,7 +15,7 @@ from rest_framework.authentication import SessionAuthentication from rest_framework.response import Response from openedx.core.lib.api.permissions import IsStaffOrOwner -from track import segment +from common.djangoapps.track import segment from .api import get_course_goal_options from .models import GOAL_KEY_CHOICES, CourseGoal diff --git a/lms/djangoapps/course_home_api/course_metadata/v1/tests/test_views.py b/lms/djangoapps/course_home_api/course_metadata/v1/tests/test_views.py index 4f6a2d4c6e5..af35a99efd8 100644 --- a/lms/djangoapps/course_home_api/course_metadata/v1/tests/test_views.py +++ b/lms/djangoapps/course_home_api/course_metadata/v1/tests/test_views.py @@ -7,10 +7,10 @@ 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 student.tests.factories import UserFactory +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory @ddt.ddt diff --git a/lms/djangoapps/course_home_api/course_metadata/v1/views.py b/lms/djangoapps/course_home_api/course_metadata/v1/views.py index 348c495172d..5398b9561cf 100644 --- a/lms/djangoapps/course_home_api/course_metadata/v1/views.py +++ b/lms/djangoapps/course_home_api/course_metadata/v1/views.py @@ -7,7 +7,7 @@ from rest_framework.response import Response from opaque_keys.edx.keys import CourseKey -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.masquerade import setup_masquerade from lms.djangoapps.courseware.tabs import get_course_tab_list diff --git a/lms/djangoapps/course_home_api/dates/v1/tests/test_views.py b/lms/djangoapps/course_home_api/dates/v1/tests/test_views.py index 0ad6288e27e..cc3975396d5 100644 --- a/lms/djangoapps/course_home_api/dates/v1/tests/test_views.py +++ b/lms/djangoapps/course_home_api/dates/v1/tests/test_views.py @@ -7,13 +7,13 @@ from datetime import datetime import ddt from django.urls import reverse -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.course_home_api.tests.utils import BaseCourseHomeTests from lms.djangoapps.course_home_api.toggles import COURSE_HOME_MICROFRONTEND, COURSE_HOME_MICROFRONTEND_DATES_TAB from lms.djangoapps.experiments.testutils import override_experiment_waffle_flag from openedx.features.content_type_gating.models import ContentTypeGatingConfig -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment @ddt.ddt diff --git a/lms/djangoapps/course_home_api/outline/v1/tests/test_views.py b/lms/djangoapps/course_home_api/outline/v1/tests/test_views.py index 683c49958d5..4d3a2cfc093 100644 --- a/lms/djangoapps/course_home_api/outline/v1/tests/test_views.py +++ b/lms/djangoapps/course_home_api/outline/v1/tests/test_views.py @@ -10,7 +10,7 @@ from django.conf import settings from django.urls import reverse from mock import Mock, patch -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.course_home_api.tests.utils import BaseCourseHomeTests from lms.djangoapps.course_home_api.toggles import COURSE_HOME_MICROFRONTEND, COURSE_HOME_MICROFRONTEND_OUTLINE_TAB @@ -18,8 +18,8 @@ from lms.djangoapps.experiments.testutils import override_experiment_waffle_flag from openedx.core.djangoapps.user_api.preferences.api import set_user_preference from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactory from openedx.features.course_experience import COURSE_ENABLE_UNENROLLED_ACCESS_FLAG, ENABLE_COURSE_GOALS -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.course_module import COURSE_VISIBILITY_PUBLIC, COURSE_VISIBILITY_PUBLIC_OUTLINE from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/course_home_api/outline/v1/views.py b/lms/djangoapps/course_home_api/outline/v1/views.py index 344cd73b9e0..f79730a01e4 100644 --- a/lms/djangoapps/course_home_api/outline/v1/views.py +++ b/lms/djangoapps/course_home_api/outline/v1/views.py @@ -17,7 +17,7 @@ from rest_framework.response import Response from completion.exceptions import UnavailableCompletionData from completion.utilities import get_key_to_last_completed_block -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.course_goals.api import (add_course_goal, get_course_goal, get_course_goal_text, has_course_goal_permission, valid_course_goals_ordered) from lms.djangoapps.course_home_api.outline.v1.serializers import OutlineTabSerializer @@ -38,7 +38,7 @@ from openedx.features.course_experience.utils import get_course_outline_block_tr from openedx.features.course_experience.views.latest_update import LatestUpdateFragmentView from openedx.features.course_experience.views.welcome_message import PREFERENCE_KEY, WelcomeMessageFragmentView from openedx.features.discounts.utils import generate_offer_html -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.course_module import COURSE_VISIBILITY_PUBLIC, COURSE_VISIBILITY_PUBLIC_OUTLINE from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/course_home_api/progress/v1/tests/test_views.py b/lms/djangoapps/course_home_api/progress/v1/tests/test_views.py index 9b1f27683a1..b5427cddc6b 100644 --- a/lms/djangoapps/course_home_api/progress/v1/tests/test_views.py +++ b/lms/djangoapps/course_home_api/progress/v1/tests/test_views.py @@ -5,14 +5,14 @@ Tests for Progress Tab API in the Course Home API import ddt from django.urls import reverse -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.course_home_api.tests.utils import BaseCourseHomeTests from lms.djangoapps.course_home_api.toggles import COURSE_HOME_MICROFRONTEND from lms.djangoapps.verify_student.models import ManualVerification from openedx.core.djangoapps.user_api.preferences.api import 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 CREDIT_SUPPORT_URL = 'https://support.edx.org/hc/en-us/sections/115004154688-Purchasing-Academic-Credit' diff --git a/lms/djangoapps/course_home_api/progress/v1/views.py b/lms/djangoapps/course_home_api/progress/v1/views.py index e90e62a67b7..c7f7936ddf5 100644 --- a/lms/djangoapps/course_home_api/progress/v1/views.py +++ b/lms/djangoapps/course_home_api/progress/v1/views.py @@ -11,7 +11,7 @@ from opaque_keys.edx.keys import CourseKey from lms.djangoapps.course_home_api.progress.v1.serializers import ProgressTabSerializer -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from lms.djangoapps.course_api.blocks.transformers.blocks_api import BlocksAPITransformer from lms.djangoapps.courseware.context_processor import user_timezone_locale_prefs from lms.djangoapps.courseware.courses import get_course_with_access, get_studio_url diff --git a/lms/djangoapps/course_home_api/tests/utils.py b/lms/djangoapps/course_home_api/tests/utils.py index 1bbcb3891c4..0144f7c96bf 100644 --- a/lms/djangoapps/course_home_api/tests/utils.py +++ b/lms/djangoapps/course_home_api/tests/utils.py @@ -7,8 +7,8 @@ import unittest from datetime import datetime from django.conf import settings -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.helpers import MasqueradeMixin from lms.djangoapps.verify_student.models import VerificationDeadline from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory diff --git a/lms/djangoapps/course_wiki/middleware.py b/lms/djangoapps/course_wiki/middleware.py index 828103a00ff..5bbbd23245a 100644 --- a/lms/djangoapps/course_wiki/middleware.py +++ b/lms/djangoapps/course_wiki/middleware.py @@ -14,7 +14,7 @@ from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.courses import get_course_overview_with_access, get_course_with_access from openedx.core.lib.request_utils import course_id_from_url from openedx.features.enterprise_support.api import get_enterprise_consent_url -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class WikiAccessMiddleware(MiddlewareMixin): diff --git a/lms/djangoapps/course_wiki/tests/test_access.py b/lms/djangoapps/course_wiki/tests/test_access.py index c79c555877e..3013081a076 100644 --- a/lms/djangoapps/course_wiki/tests/test_access.py +++ b/lms/djangoapps/course_wiki/tests/test_access.py @@ -10,7 +10,7 @@ from lms.djangoapps.course_wiki import settings from lms.djangoapps.course_wiki.utils import course_wiki_slug, user_is_article_course_staff from lms.djangoapps.course_wiki.views import get_or_create_root from lms.djangoapps.courseware.tests.factories import InstructorFactory, StaffFactory -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/course_wiki/tests/test_tab.py b/lms/djangoapps/course_wiki/tests/test_tab.py index 4fb9b12e29f..5e77397dadf 100644 --- a/lms/djangoapps/course_wiki/tests/test_tab.py +++ b/lms/djangoapps/course_wiki/tests/test_tab.py @@ -7,7 +7,7 @@ from django.conf import settings from django.test.client import RequestFactory from lms.djangoapps.courseware.tabs import get_course_tab_list -from student.tests.factories import AdminFactory, UserFactory +from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index 6277b627e6d..ed389ca575a 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -46,9 +46,9 @@ from lms.djangoapps.ccx.models import CustomCourseForEdX from lms.djangoapps.mobile_api.models import IgnoreMobileAvailableFlagConfig from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.features.course_duration_limits.access import check_course_expired -from student import auth -from student.models import CourseEnrollmentAllowed -from student.roles import ( +from common.djangoapps.student import auth +from common.djangoapps.student.models import CourseEnrollmentAllowed +from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseCcxCoachRole, CourseInstructorRole, @@ -58,8 +58,8 @@ from student.roles import ( OrgStaffRole, SupportStaffRole ) -from util import milestones_helpers as milestones_helpers -from util.milestones_helpers import ( +from common.djangoapps.util import milestones_helpers as milestones_helpers +from common.djangoapps.util.milestones_helpers import ( any_unfulfilled_milestones, get_pre_requisite_courses_not_completed, is_prerequisite_courses_enabled diff --git a/lms/djangoapps/courseware/access_utils.py b/lms/djangoapps/courseware/access_utils.py index 17534049eab..2529f80c09e 100644 --- a/lms/djangoapps/courseware/access_utils.py +++ b/lms/djangoapps/courseware/access_utils.py @@ -23,8 +23,8 @@ from openedx.features.course_experience import ( COURSE_PRE_START_ACCESS_FLAG, COURSE_ENABLE_UNENROLLED_ACCESS_FLAG, ) -from student.models import CourseEnrollment -from student.roles import CourseBetaTesterRole +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseBetaTesterRole from xmodule.util.xmodule_django import get_current_request_hostname from xmodule.course_module import COURSE_VISIBILITY_PUBLIC diff --git a/lms/djangoapps/courseware/course_tools.py b/lms/djangoapps/courseware/course_tools.py index 54c0d81651c..5b0207acf7a 100644 --- a/lms/djangoapps/courseware/course_tools.py +++ b/lms/djangoapps/courseware/course_tools.py @@ -10,10 +10,10 @@ from crum import get_current_request from django.conf import settings from django.utils.translation import ugettext as _ from django.urls import reverse -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.utils import verified_upgrade_deadline_link from openedx.features.course_experience.course_tools import CourseTool -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from openedx.core.djangoapps.content.course_overviews.models import CourseOverview diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index 36aea94adfc..a63a479e50e 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -44,7 +44,7 @@ from lms.djangoapps.courseware.date_summary import ( from lms.djangoapps.courseware.masquerade import check_content_start_date_for_masquerade_user from lms.djangoapps.courseware.model_data import FieldDataCache from lms.djangoapps.courseware.module_render import get_module -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from lms.djangoapps.courseware.access_utils import ( check_authentication, check_enrollment, @@ -59,9 +59,9 @@ from openedx.core.lib.api.view_utils import LazySequence from openedx.features.course_duration_limits.access import AuditExpiredError from openedx.features.course_experience import RELATIVE_DATES_FLAG from openedx.features.course_experience.utils import is_block_structure_complete_for_assignments -from static_replace import replace_static_urls +from common.djangoapps.static_replace import replace_static_urls from lms.djangoapps.survey.utils import SurveyRequiredAccessError, check_survey_required_and_unanswered -from util.date_utils import strftime_localized +from common.djangoapps.util.date_utils import strftime_localized from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.x_module import STUDENT_VIEW diff --git a/lms/djangoapps/courseware/date_summary.py b/lms/djangoapps/courseware/date_summary.py index 7ec0c406bdd..2269c16bb21 100644 --- a/lms/djangoapps/courseware/date_summary.py +++ b/lms/djangoapps/courseware/date_summary.py @@ -19,7 +19,7 @@ from django.utils.translation import ugettext_lazy from lazy import lazy from pytz import utc -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.api import get_active_web_certificate from lms.djangoapps.courseware.utils import verified_upgrade_deadline_link, can_show_verified_upgrade from lms.djangoapps.verify_student.models import VerificationDeadline @@ -29,7 +29,7 @@ from openedx.core.djangoapps.certificates.api import can_show_certificate_availa from openedx.core.djangolib.markup import HTML, Text from openedx.features.course_duration_limits.access import get_user_course_expiration_date from openedx.features.course_experience import RELATIVE_DATES_FLAG, UPGRADE_DEADLINE_MESSAGE, CourseHomeMessages -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from .context_processor import user_timezone_locale_prefs diff --git a/lms/djangoapps/courseware/entrance_exams.py b/lms/djangoapps/courseware/entrance_exams.py index 8ff5dd97534..40724d2027d 100644 --- a/lms/djangoapps/courseware/entrance_exams.py +++ b/lms/djangoapps/courseware/entrance_exams.py @@ -6,8 +6,8 @@ This file contains all entrance exam related utils/logic. from opaque_keys.edx.keys import UsageKey from lms.djangoapps.courseware.access import has_access -from student.models import EntranceExamConfiguration -from util.milestones_helpers import get_required_content +from common.djangoapps.student.models import EntranceExamConfiguration +from common.djangoapps.util.milestones_helpers import get_required_content from openedx.core.toggles import ENTRANCE_EXAMS from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/courseware/masquerade.py b/lms/djangoapps/courseware/masquerade.py index 66a216eef93..1de5d26c699 100644 --- a/lms/djangoapps/courseware/masquerade.py +++ b/lms/djangoapps/courseware/masquerade.py @@ -20,15 +20,15 @@ from pytz import utc from web_fragments.fragment import Fragment from xblock.runtime import KeyValueStore -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.util.user_messages import PageLevelMessages from openedx.core.djangolib.markup import HTML from openedx.features.content_type_gating.helpers import CONTENT_GATING_PARTITION_ID from openedx.features.content_type_gating.helpers import FULL_ACCESS from openedx.features.content_type_gating.helpers import LIMITED_ACCESS -from student.models import CourseEnrollment -from student.role_helpers import has_staff_roles -from util.json_request import JsonResponse, expect_json +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.role_helpers import has_staff_roles +from common.djangoapps.util.json_request import JsonResponse, expect_json from xmodule.modulestore.django import modulestore from xmodule.partitions.partitions import ENROLLMENT_TRACK_PARTITION_ID from xmodule.partitions.partitions import NoSuchUserPartitionGroupError diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 39bd0f47eff..ae163ec85f4 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -44,7 +44,7 @@ from xblock.exceptions import NoSuchHandlerError, NoSuchViewError from xblock.reference.plugins import FSService from xblock.runtime import KvsFieldData -import static_replace +from common.djangoapps import static_replace from capa.xqueue_interface import XQueueInterface from lms.djangoapps.courseware.access import get_user_role, has_access from lms.djangoapps.courseware.entrance_exams import user_can_skip_entrance_exam, user_has_passed_entrance_exam @@ -55,7 +55,7 @@ from lms.djangoapps.courseware.masquerade import ( setup_masquerade ) from lms.djangoapps.courseware.model_data import DjangoKeyValueStore, FieldDataCache -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from lms.djangoapps.courseware.field_overrides import OverrideFieldData from lms.djangoapps.courseware.services import UserStateService from lms.djangoapps.grades.api import GradesUtilService @@ -88,12 +88,12 @@ from openedx.core.lib.xblock_utils import wrap_xblock from openedx.features.course_duration_limits.access import course_expiration_wrapper from openedx.features.discounts.utils import offer_banner_wrapper from openedx.features.content_type_gating.services import ContentTypeGatingService -from student.models import anonymous_id_for_user, user_by_anonymous_id -from student.roles import CourseBetaTesterRole -from track import contexts -from util import milestones_helpers -from util.json_request import JsonResponse -from xblock_django.user_service import DjangoXBlockUserService +from common.djangoapps.student.models import anonymous_id_for_user, user_by_anonymous_id +from common.djangoapps.student.roles import CourseBetaTesterRole +from common.djangoapps.track import contexts +from common.djangoapps.util import milestones_helpers +from common.djangoapps.util.json_request import JsonResponse +from common.djangoapps.xblock_django.user_service import DjangoXBlockUserService from xmodule.contentstore.django import contentstore from xmodule.error_module import ErrorDescriptor, NonStaffErrorDescriptor from xmodule.exceptions import NotFoundError, ProcessingError @@ -133,10 +133,10 @@ def make_track_function(request): Make a tracking function that logs what happened. For use in ModuleSystem. ''' - import track.views + from common.djangoapps.track import views as track_views def function(event_type, event): - return track.views.server_track(request, event_type, event, page='x_module') + return track_views.server_track(request, event_type, event, page='x_module') return function diff --git a/lms/djangoapps/courseware/rules.py b/lms/djangoapps/courseware/rules.py index 5360e795786..3a3aec44bbd 100644 --- a/lms/djangoapps/courseware/rules.py +++ b/lms/djangoapps/courseware/rules.py @@ -16,10 +16,10 @@ from opaque_keys.edx.django.models import CourseKeyField from opaque_keys.edx.keys import CourseKey, UsageKey from xblock.core import XBlock -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 CourseAccessRole, CourseEnrollment -from student.roles import CourseRole, OrgRole +from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment +from common.djangoapps.student.roles import CourseRole, OrgRole from xmodule.course_module import CourseDescriptor from xmodule.error_module import ErrorDescriptor from xmodule.x_module import XModule diff --git a/lms/djangoapps/courseware/services.py b/lms/djangoapps/courseware/services.py index 32f21a79959..1fac7359bd3 100644 --- a/lms/djangoapps/courseware/services.py +++ b/lms/djangoapps/courseware/services.py @@ -8,7 +8,7 @@ import json from django.contrib.auth.models import User from lms.djangoapps.courseware.models import StudentModule -from student.models import get_user_by_username_or_email +from common.djangoapps.student.models import get_user_by_username_or_email class UserStateService(object): diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index e97fc920695..8013b33c426 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -15,7 +15,7 @@ from lms.djangoapps.course_home_api.toggles import course_home_mfe_dates_tab_is_ from lms.djangoapps.course_home_api.utils import get_microfrontend_url from openedx.core.lib.course_tabs import CourseTabPluginManager from openedx.features.course_experience import RELATIVE_DATES_FLAG, DISABLE_UNIFIED_COURSE_TAB_FLAG, default_course_url_name -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment from xmodule.tabs import CourseTab, CourseTabList, course_reverse_func_from_name_func, key_checker diff --git a/lms/djangoapps/courseware/tests/factories.py b/lms/djangoapps/courseware/tests/factories.py index 4e0cafada16..7bb2b72fa1d 100644 --- a/lms/djangoapps/courseware/tests/factories.py +++ b/lms/djangoapps/courseware/tests/factories.py @@ -16,7 +16,7 @@ from lms.djangoapps.courseware.models import ( XModuleStudentPrefsField, XModuleUserStateSummaryField ) -from student.roles import ( +from common.djangoapps.student.roles import ( CourseBetaTesterRole, CourseInstructorRole, CourseStaffRole, @@ -25,8 +25,8 @@ from student.roles import ( OrgStaffRole ) # Imported to re-export -from student.tests.factories import UserFactory # Imported to re-export -from student.tests.factories import UserProfileFactory as StudentUserProfileFactory +from common.djangoapps.student.tests.factories import UserFactory # Imported to re-export +from common.djangoapps.student.tests.factories import UserProfileFactory as StudentUserProfileFactory # TODO fix this (course_id and location are invalid names as constants, and course_id should really be COURSE_KEY) # pylint: disable=invalid-name diff --git a/lms/djangoapps/courseware/tests/helpers.py b/lms/djangoapps/courseware/tests/helpers.py index d5c50044d4e..9aecfc19470 100644 --- a/lms/djangoapps/courseware/tests/helpers.py +++ b/lms/djangoapps/courseware/tests/helpers.py @@ -19,7 +19,7 @@ from six import text_type from six.moves import range from xblock.field_data import DictFieldData -from edxmako.shortcuts import render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_string from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.utils import verified_upgrade_deadline_link from lms.djangoapps.courseware.masquerade import MasqueradeView @@ -28,9 +28,9 @@ from lms.djangoapps.lms_xblock.field_data import LmsFieldData from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.lib.url_utils import quote_slashes from openedx.features.course_duration_limits.access import EXPIRATION_DATE_FORMAT_STR -from student.models import CourseEnrollment, Registration -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.date_utils import strftime_localized +from common.djangoapps.student.models import CourseEnrollment, Registration +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.date_utils import strftime_localized from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/courseware/tests/test_about.py b/lms/djangoapps/courseware/tests/test_about.py index e11e32d9b49..a06ab37ad3a 100644 --- a/lms/djangoapps/courseware/tests/test_about.py +++ b/lms/djangoapps/courseware/tests/test_about.py @@ -18,16 +18,16 @@ from mock import patch from six import text_type from waffle.testutils import override_switch -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.ccx.tests.factories import CcxFactory from openedx.features.course_experience import COURSE_ENABLE_UNENROLLED_ACCESS_FLAG from openedx.features.course_experience.waffle import ENABLE_COURSE_ABOUT_SIDEBAR_HTML from openedx.features.course_experience.waffle import WAFFLE_NAMESPACE as COURSE_EXPERIENCE_WAFFLE_NAMESPACE -from student.models import CourseEnrollment -from student.tests.factories import AdminFactory, CourseEnrollmentAllowedFactory, UserFactory -from track.tests import EventTrackingTestCase -from util.milestones_helpers import get_prerequisite_courses_display, set_prerequisite_courses +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentAllowedFactory, UserFactory +from common.djangoapps.track.tests import EventTrackingTestCase +from common.djangoapps.util.milestones_helpers import get_prerequisite_courses_display, set_prerequisite_courses from xmodule.course_module import ( CATALOG_VISIBILITY_ABOUT, CATALOG_VISIBILITY_NONE, diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index 3dc4c18d60a..adfb0dadadd 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -34,15 +34,15 @@ from lms.djangoapps.ccx.models import CustomCourseForEdX from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES from openedx.features.content_type_gating.models import ContentTypeGatingConfig -from student.models import CourseEnrollment -from student.roles import CourseCcxCoachRole, CourseStaffRole -from student.tests.factories import ( +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseCcxCoachRole, CourseStaffRole +from common.djangoapps.student.tests.factories import ( AdminFactory, AnonymousUserFactory, CourseEnrollmentAllowedFactory, CourseEnrollmentFactory ) -from util.milestones_helpers import fulfill_course_milestone, set_prerequisite_courses +from common.djangoapps.util.milestones_helpers import fulfill_course_milestone, set_prerequisite_courses from xmodule.course_module import ( CATALOG_VISIBILITY_ABOUT, CATALOG_VISIBILITY_CATALOG_AND_ABOUT, diff --git a/lms/djangoapps/courseware/tests/test_comprehensive_theming.py b/lms/djangoapps/courseware/tests/test_comprehensive_theming.py index cb223ca35fd..0e8279c0f06 100644 --- a/lms/djangoapps/courseware/tests/test_comprehensive_theming.py +++ b/lms/djangoapps/courseware/tests/test_comprehensive_theming.py @@ -6,7 +6,7 @@ from django.contrib import staticfiles from django.test import TestCase from path import Path -import edxmako +from common.djangoapps import edxmako from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme from openedx.core.lib.tempdir import create_symlink, delete_symlink, mkdtemp_clean diff --git a/lms/djangoapps/courseware/tests/test_context_processor.py b/lms/djangoapps/courseware/tests/test_context_processor.py index 57ac32419c1..23fb17e348b 100644 --- a/lms/djangoapps/courseware/tests/test_context_processor.py +++ b/lms/djangoapps/courseware/tests/test_context_processor.py @@ -8,7 +8,7 @@ from mock import Mock from lms.djangoapps.courseware.context_processor import user_timezone_locale_prefs from openedx.core.djangoapps.user_api.preferences.api import set_user_preference -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/lms/djangoapps/courseware/tests/test_course_info.py b/lms/djangoapps/courseware/tests/test_course_info.py index d82a001de8a..004cc138644 100644 --- a/lms/djangoapps/courseware/tests/test_course_info.py +++ b/lms/djangoapps/courseware/tests/test_course_info.py @@ -25,9 +25,9 @@ from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_experience import DISABLE_UNIFIED_COURSE_TAB_FLAG from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseTestConsentRequired from pyquery import PyQuery as pq -from student.models import CourseEnrollment -from student.tests.factories import AdminFactory -from util.date_utils import strftime_localized +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import AdminFactory +from common.djangoapps.util.date_utils import strftime_localized from xmodule.modulestore.tests.django_utils import ( TEST_DATA_MIXED_MODULESTORE, TEST_DATA_SPLIT_MODULESTORE, @@ -128,7 +128,7 @@ class CourseInfoTestCase(EnterpriseTestConsentRequired, LoginEnrollmentTestCase, self.assertRedirects(response, expected_url) @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 the student dashboard, not a 404, even if the localized date is unicode diff --git a/lms/djangoapps/courseware/tests/test_course_tools.py b/lms/djangoapps/courseware/tests/test_course_tools.py index 5c8a0d60c51..3574aab2ba2 100644 --- a/lms/djangoapps/courseware/tests/test_course_tools.py +++ b/lms/djangoapps/courseware/tests/test_course_tools.py @@ -10,15 +10,15 @@ import pytz from django.test import RequestFactory 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 edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.courseware.course_tools import FinancialAssistanceTool, VerifiedUpgradeTool from lms.djangoapps.courseware.models import DynamicUpgradeDeadlineConfiguration from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.schedules.config import CREATE_SCHEDULE_WAFFLE_FLAG from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory -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/courseware/tests/test_courses.py b/lms/djangoapps/courseware/tests/test_courses.py index 35a8ec72053..b6cfe05e8d7 100644 --- a/lms/djangoapps/courseware/tests/test_courses.py +++ b/lms/djangoapps/courseware/tests/test_courses.py @@ -41,7 +41,7 @@ from lms.djangoapps.courseware.module_render import get_module_for_descriptor from lms.djangoapps.courseware.courseware_access_exception import CoursewareAccessException from openedx.core.djangolib.testing.utils import get_mock_request from openedx.core.lib.courses import course_image_url -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import _get_modulestore_branch_setting, modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/courseware/tests/test_credit_requirements.py b/lms/djangoapps/courseware/tests/test_credit_requirements.py index e33b99e5945..01abec92257 100644 --- a/lms/djangoapps/courseware/tests/test_credit_requirements.py +++ b/lms/djangoapps/courseware/tests/test_credit_requirements.py @@ -9,10 +9,10 @@ from django.conf import settings from django.urls import reverse from mock import patch -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.credit import api as credit_api from openedx.core.djangoapps.credit.models import CreditCourse -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/courseware/tests/test_date_summary.py b/lms/djangoapps/courseware/tests/test_date_summary.py index 9b745050ff6..f079b0ee410 100644 --- a/lms/djangoapps/courseware/tests/test_date_summary.py +++ b/lms/djangoapps/courseware/tests/test_date_summary.py @@ -14,8 +14,8 @@ from edx_toggles.toggles.testutils import override_waffle_flag from mock import patch 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 freezegun import freeze_time from lms.djangoapps.commerce.models import CommerceConfiguration from lms.djangoapps.course_home_api.toggles import COURSE_HOME_MICROFRONTEND, COURSE_HOME_MICROFRONTEND_DATES_TAB @@ -50,7 +50,7 @@ from openedx.features.course_experience import ( UPGRADE_DEADLINE_MESSAGE, CourseHomeMessages ) -from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, 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/courseware/tests/test_discussion_xblock.py b/lms/djangoapps/courseware/tests/test_discussion_xblock.py index c4063cea1b4..de24678b7bc 100644 --- a/lms/djangoapps/courseware/tests/test_discussion_xblock.py +++ b/lms/djangoapps/courseware/tests/test_discussion_xblock.py @@ -21,7 +21,7 @@ from xblock.field_data import DictFieldData from lms.djangoapps.course_api.blocks.tests.helpers import deserialize_usage_key from lms.djangoapps.courseware.module_render import get_module_for_descriptor_internal from lms.djangoapps.courseware.tests.helpers import XModuleRenderingTestBase -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xblock_discussion import DiscussionXBlock, loader from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/lms/djangoapps/courseware/tests/test_entrance_exam.py b/lms/djangoapps/courseware/tests/test_entrance_exam.py index 89b7721d9a1..891a0d436db 100644 --- a/lms/djangoapps/courseware/tests/test_entrance_exam.py +++ b/lms/djangoapps/courseware/tests/test_entrance_exam.py @@ -23,9 +23,9 @@ from lms.djangoapps.courseware.tests.factories import InstructorFactory, Request from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase from openedx.core.djangolib.testing.utils import get_mock_request from openedx.features.course_experience import DISABLE_COURSE_OUTLINE_PAGE_FLAG, DISABLE_UNIFIED_COURSE_TAB_FLAG -from student.models import CourseEnrollment -from student.tests.factories import AnonymousUserFactory, CourseEnrollmentFactory -from util.milestones_helpers import ( +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import AnonymousUserFactory, CourseEnrollmentFactory +from common.djangoapps.util.milestones_helpers import ( add_course_content_milestone, add_course_milestone, add_milestone, @@ -476,7 +476,7 @@ class EntranceExamTestCases(LoginEnrollmentTestCase, ModuleStoreTestCase, Milest """ self._assert_chapter_loaded(self.course, self.chapter) - @patch('util.milestones_helpers.get_required_content', Mock(return_value=['a value'])) + @patch('common.djangoapps.util.milestones_helpers.get_required_content', Mock(return_value=['a value'])) def test_courseware_page_access_with_staff_user_without_passing_entrance_exam(self): """ Test courseware access page without passing entrance exam but with staff user diff --git a/lms/djangoapps/courseware/tests/test_favicon.py b/lms/djangoapps/courseware/tests/test_favicon.py index c1373710a82..a799acc47b4 100644 --- a/lms/djangoapps/courseware/tests/test_favicon.py +++ b/lms/djangoapps/courseware/tests/test_favicon.py @@ -6,7 +6,7 @@ Tests of the courseware favicon from django.test import TestCase from django.test.utils import override_settings -from util.testing import UrlResetMixin +from common.djangoapps.util.testing import UrlResetMixin class FaviconTestCase(UrlResetMixin, TestCase): diff --git a/lms/djangoapps/courseware/tests/test_i18n.py b/lms/djangoapps/courseware/tests/test_i18n.py index 31e3318015b..b3e6cff5e11 100644 --- a/lms/djangoapps/courseware/tests/test_i18n.py +++ b/lms/djangoapps/courseware/tests/test_i18n.py @@ -16,7 +16,7 @@ from django.utils import translation from openedx.core.djangoapps.dark_lang.models import DarkLangConfig from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory class BaseI18nTestCase(CacheIsolationTestCase): diff --git a/lms/djangoapps/courseware/tests/test_masquerade.py b/lms/djangoapps/courseware/tests/test_masquerade.py index 5db5dee3f0f..f1721b0e66d 100644 --- a/lms/djangoapps/courseware/tests/test_masquerade.py +++ b/lms/djangoapps/courseware/tests/test_masquerade.py @@ -31,8 +31,8 @@ from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration from openedx.core.djangoapps.user_api.preferences.api import get_user_preference, set_user_preference from openedx.features.course_experience import DISABLE_UNIFIED_COURSE_TAB_FLAG -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 SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/courseware/tests/test_model_data.py b/lms/djangoapps/courseware/tests/test_model_data.py index 1ce7b2d404c..19f01d181dd 100644 --- a/lms/djangoapps/courseware/tests/test_model_data.py +++ b/lms/djangoapps/courseware/tests/test_model_data.py @@ -23,7 +23,7 @@ from lms.djangoapps.courseware.models import ( from lms.djangoapps.courseware.tests.factories import StudentInfoFactory from lms.djangoapps.courseware.tests.factories import StudentModuleFactory as cmfStudentModuleFactory from lms.djangoapps.courseware.tests.factories import StudentPrefsFactory, UserStateSummaryFactory, course_id, location -from student.tests.factories import UserFactory +from common.djangoapps.student.tests.factories import UserFactory def mock_field(scope, name): diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index 809a7ca0bd5..84ccba08331 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -17,7 +17,7 @@ from bson import ObjectId from capa.tests.response_xml_factory import OptionResponseXMLFactory from completion import waffle as completion_waffle from completion.models import BlockCompletion -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 AnonymousUser from django.http import Http404, HttpResponse @@ -47,6 +47,8 @@ from xblock.fields import ScopeIds from xblock.runtime import DictKeyValueStore, KvsFieldData, Runtime from xblock.test.tools import TestRuntime +from capa.tests.response_xml_factory import OptionResponseXMLFactory +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware import module_render as render from lms.djangoapps.courseware.access_response import AccessResponse from lms.djangoapps.courseware.courses import get_course_info_section, get_course_with_access @@ -71,9 +73,9 @@ from openedx.core.djangoapps.oauth_dispatch.tests.factories import AccessTokenFa from openedx.core.lib.courses import course_image_url from openedx.core.lib.gating import api as gating_api from openedx.core.lib.url_utils import quote_slashes -from student.models import CourseEnrollment, anonymous_id_for_user +from common.djangoapps.student.models import CourseEnrollment, anonymous_id_for_user from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory -from xblock_django.models import XBlockConfiguration +from common.djangoapps.xblock_django.models import XBlockConfiguration from xmodule.capa_module import ProblemBlock from xmodule.html_module import AboutBlock, CourseInfoBlock, HtmlBlock, StaticTabBlock from xmodule.lti_module import LTIDescriptor @@ -2016,7 +2018,7 @@ class TestAnonymousStudentId(SharedModuleStoreTestCase, LoginEnrollmentTestCase) ) -@patch('track.views.eventtracker', autospec=True) +@patch('common.djangoapps.track.views.eventtracker', autospec=True) class TestModuleTrackingContext(SharedModuleStoreTestCase): """ Ensure correct tracking information is included in events emitted during XBlock callback handling. diff --git a/lms/djangoapps/courseware/tests/test_navigation.py b/lms/djangoapps/courseware/tests/test_navigation.py index 032eb9733bb..cdbc7c8c06f 100644 --- a/lms/djangoapps/courseware/tests/test_navigation.py +++ b/lms/djangoapps/courseware/tests/test_navigation.py @@ -16,7 +16,7 @@ from edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase from openedx.features.course_experience import DISABLE_COURSE_OUTLINE_PAGE_FLAG -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/courseware/tests/test_rules.py b/lms/djangoapps/courseware/tests/test_rules.py index 808761303b3..f08c94470e4 100644 --- a/lms/djangoapps/courseware/tests/test_rules.py +++ b/lms/djangoapps/courseware/tests/test_rules.py @@ -8,9 +8,9 @@ import six from django.test import TestCase from opaque_keys.edx.locator import CourseLocator -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 @ddt.ddt diff --git a/lms/djangoapps/courseware/tests/test_services.py b/lms/djangoapps/courseware/tests/test_services.py index 47ec2bff451..af90d8518bb 100644 --- a/lms/djangoapps/courseware/tests/test_services.py +++ b/lms/djangoapps/courseware/tests/test_services.py @@ -84,7 +84,7 @@ class TestUserStateService(ModuleStoreTestCase): Scenario: Given a user and a problem or block Then create a student module entry for the user - If the state is obtained from student module service + If the state is obtained from common.djangoapps.student module service Then the state is equal to previously created student module state """ self._create_student_module(expected_state) diff --git a/lms/djangoapps/courseware/tests/test_split_module.py b/lms/djangoapps/courseware/tests/test_split_module.py index 30666980dee..4dce78c5e27 100644 --- a/lms/djangoapps/courseware/tests/test_split_module.py +++ b/lms/djangoapps/courseware/tests/test_split_module.py @@ -11,7 +11,7 @@ from six import text_type from lms.djangoapps.courseware.model_data import FieldDataCache from lms.djangoapps.courseware.module_render import get_module_for_descriptor from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactory -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, ItemFactory from xmodule.partitions.partitions import Group, UserPartition diff --git a/lms/djangoapps/courseware/tests/test_submitting_problems.py b/lms/djangoapps/courseware/tests/test_submitting_problems.py index 7e9fcdaa9b7..86671db0d44 100644 --- a/lms/djangoapps/courseware/tests/test_submitting_problems.py +++ b/lms/djangoapps/courseware/tests/test_submitting_problems.py @@ -28,7 +28,7 @@ from capa.tests.response_xml_factory import ( OptionResponseXMLFactory, SchematicResponseXMLFactory ) -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.courseware.models import BaseStudentModuleHistory, StudentModule from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase from lms.djangoapps.grades.api import CourseGradeFactory, task_compute_all_grades_for_course @@ -36,7 +36,7 @@ from openedx.core.djangoapps.credit.api import get_credit_requirement_status, se from openedx.core.djangoapps.credit.models import CreditCourse, CreditProvider from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactory from openedx.core.lib.url_utils import quote_slashes -from student.models import CourseEnrollment, anonymous_id_for_user +from common.djangoapps.student.models import CourseEnrollment, anonymous_id_for_user 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/lms/djangoapps/courseware/tests/test_tabs.py b/lms/djangoapps/courseware/tests/test_tabs.py index 526bf14483c..7e726fafcf0 100644 --- a/lms/djangoapps/courseware/tests/test_tabs.py +++ b/lms/djangoapps/courseware/tests/test_tabs.py @@ -29,9 +29,9 @@ from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase from lms.djangoapps.courseware.views.views import StaticCourseTabView, get_static_tab_fragment from openedx.core.djangolib.testing.utils import get_mock_request from openedx.features.course_experience import DISABLE_UNIFIED_COURSE_TAB_FLAG -from student.models import CourseEnrollment -from student.tests.factories import UserFactory -from util.milestones_helpers import ( +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.milestones_helpers import ( add_course_content_milestone, add_course_milestone, add_milestone, @@ -734,7 +734,7 @@ class ProgressTestCase(TabTestCase): invalid_dict_tab=None, ) - @patch('student.models.CourseEnrollment.is_enrolled') + @patch('common.djangoapps.student.models.CourseEnrollment.is_enrolled') def test_progress(self, is_enrolled): is_enrolled.return_value = True self.course.hide_progress_tab = False @@ -834,7 +834,7 @@ class DiscussionLinkTestCase(TabTestCase): self.course.discussion_link = discussion_link_in_course discussion_tab = xmodule_tabs.CourseTabList.get_discussion(self.course) user = self.create_mock_user(is_staff=is_staff, is_enrolled=is_enrolled) - with patch('student.models.CourseEnrollment.is_enrolled') as check_is_enrolled: + with patch('common.djangoapps.student.models.CourseEnrollment.is_enrolled') as check_is_enrolled: check_is_enrolled.return_value = is_enrolled self.assertEqual( ( @@ -910,7 +910,7 @@ class DatesTabTestCase(TabListTestCase): """Test cases for dates tab""" @patch('lms.djangoapps.courseware.tabs.RELATIVE_DATES_FLAG') - @patch('student.models.CourseEnrollment.is_enrolled') + @patch('common.djangoapps.student.models.CourseEnrollment.is_enrolled') def test_dates_tab_disabled_if_unenrolled(self, is_enrolled, mock_flag): mock_flag.is_enabled().return_value = True tab = DatesTab({'type': DatesTab.type, 'name': 'dates'}) diff --git a/lms/djangoapps/courseware/tests/test_view_authentication.py b/lms/djangoapps/courseware/tests/test_view_authentication.py index 88a9dee22ac..b28da2c6e88 100644 --- a/lms/djangoapps/courseware/tests/test_view_authentication.py +++ b/lms/djangoapps/courseware/tests/test_view_authentication.py @@ -22,7 +22,7 @@ from lms.djangoapps.courseware.tests.factories import ( ) from lms.djangoapps.courseware.tests.helpers import CourseAccessTestMixin, LoginEnrollmentTestCase from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseTestConsentRequired -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 7efe81977d5..8145a8f8947 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -38,8 +38,8 @@ from xblock.fields import Scope, String import lms.djangoapps.courseware.views.views as views 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 freezegun import freeze_time from lms.djangoapps.certificates import api as certs_api from lms.djangoapps.certificates.models import ( @@ -88,12 +88,12 @@ from openedx.features.course_experience import ( ) from openedx.features.course_experience.tests.views.helpers import add_course_mode from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseTestConsentRequired -from student.models import CourseEnrollment -from student.roles import CourseStaffRole -from student.tests.factories import TEST_PASSWORD, AdminFactory, CourseEnrollmentFactory, UserFactory -from util.tests.test_date_utils import fake_pgettext, fake_ugettext -from util.url import reload_django_url_config -from util.views import ensure_valid_course_key +from common.djangoapps.student.models import CourseEnrollment +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import TEST_PASSWORD, AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.tests.test_date_utils import fake_pgettext, fake_ugettext +from common.djangoapps.util.url import reload_django_url_config +from common.djangoapps.util.views import ensure_valid_course_key from xmodule.course_module import COURSE_VISIBILITY_PRIVATE, COURSE_VISIBILITY_PUBLIC, COURSE_VISIBILITY_PUBLIC_OUTLINE from xmodule.graders import ShowCorrectness from xmodule.modulestore import ModuleStoreEnum @@ -1134,10 +1134,10 @@ class StartDateTests(ModuleStoreTestCase): """ return self.client.get(reverse('about_course', args=[six.text_type(course_key)])) - @patch('util.date_utils.pgettext', fake_pgettext(translations={ + @patch('common.djangoapps.util.date_utils.pgettext', fake_pgettext(translations={ ("abbreviated month name", "Sep"): "SEPTEMBER", })) - @patch('util.date_utils.ugettext', fake_ugettext(translations={ + @patch('common.djangoapps.util.date_utils.ugettext', fake_ugettext(translations={ "SHORT_DATE_FORMAT": "%Y-%b-%d", })) def test_format_localized_in_studio_course(self): diff --git a/lms/djangoapps/courseware/testutils.py b/lms/djangoapps/courseware/testutils.py index a7613585eb2..6aa84692888 100644 --- a/lms/djangoapps/courseware/testutils.py +++ b/lms/djangoapps/courseware/testutils.py @@ -14,7 +14,7 @@ from six.moves.urllib.parse import urlencode from lms.djangoapps.courseware.field_overrides import OverrideModulestoreFieldData from lms.djangoapps.courseware.url_helpers import get_redirect_url from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, check_mongo_calls diff --git a/lms/djangoapps/courseware/utils.py b/lms/djangoapps/courseware/utils.py index 439c2e98873..1e677eba528 100644 --- a/lms/djangoapps/courseware/utils.py +++ b/lms/djangoapps/courseware/utils.py @@ -7,7 +7,7 @@ from django.conf import settings from lms.djangoapps.commerce.utils import EcommerceService from pytz import utc -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from xmodule.partitions.partitions import ENROLLMENT_TRACK_PARTITION_ID from xmodule.partitions.partitions_service import PartitionService diff --git a/lms/djangoapps/courseware/views/index.py b/lms/djangoapps/courseware/views/index.py index 9ddac75e298..ec0f119c10c 100644 --- a/lms/djangoapps/courseware/views/index.py +++ b/lms/djangoapps/courseware/views/index.py @@ -27,7 +27,7 @@ from opaque_keys.edx.keys import CourseKey, UsageKey from six.moves import urllib from web_fragments.fragment import Fragment -from edxmako.shortcuts import render_to_response, render_to_string +from common.djangoapps.edxmako.shortcuts import render_to_response, render_to_string from lms.djangoapps.courseware.exceptions import CourseAccessRedirect, Redirect from lms.djangoapps.experiments.utils import get_experiment_user_metadata_context from lms.djangoapps.gating.api import get_entrance_exam_score_ratio, get_entrance_exam_usage_key @@ -47,8 +47,8 @@ from openedx.features.course_experience import ( from openedx.features.course_experience.urls import COURSE_HOME_VIEW_NAME from openedx.features.course_experience.views.course_sock import CourseSockFragmentView from openedx.features.enterprise_support.api import data_sharing_consent_required -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 from xmodule.modulestore.django import modulestore from xmodule.x_module import PUBLIC_VIEW, STUDENT_VIEW diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index 438ebd0845e..297a9b7dc25 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -48,8 +48,8 @@ from six import text_type from web_fragments.fragment import Fragment from lms.djangoapps.survey import views as survey_views -from course_modes.models import CourseMode, get_course_prices -from edxmako.shortcuts import marketing_link, render_to_response, render_to_string +from common.djangoapps.course_modes.models import CourseMode, get_course_prices +from common.djangoapps.edxmako.shortcuts import marketing_link, render_to_response, render_to_string from lms.djangoapps.edxnotes.helpers import is_feature_enabled from lms.djangoapps.ccx.custom_exception import CCXLocatorValidationException from lms.djangoapps.certificates import api as certs_api @@ -118,12 +118,12 @@ from openedx.features.course_experience.views.course_dates import CourseDatesFra 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 openedx.features.enterprise_support.api import data_sharing_consent_required -from student.models import CourseEnrollment, UserTestGroup -from track import segment -from util.cache import cache, cache_if_anonymous -from util.db import outer_atomic -from util.milestones_helpers import get_prerequisite_courses_display -from util.views import ensure_valid_course_key, ensure_valid_usage_key +from common.djangoapps.student.models import CourseEnrollment, UserTestGroup +from common.djangoapps.track import segment +from common.djangoapps.util.cache import cache, cache_if_anonymous +from common.djangoapps.util.db import outer_atomic +from common.djangoapps.util.milestones_helpers import get_prerequisite_courses_display +from common.djangoapps.util.views import ensure_valid_course_key, ensure_valid_usage_key from xmodule.course_module import COURSE_VISIBILITY_PUBLIC, COURSE_VISIBILITY_PUBLIC_OUTLINE from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem diff --git a/lms/djangoapps/dashboard/sysadmin.py b/lms/djangoapps/dashboard/sysadmin.py index 38bd6a97e69..dc26b0e4668 100644 --- a/lms/djangoapps/dashboard/sysadmin.py +++ b/lms/djangoapps/dashboard/sysadmin.py @@ -28,14 +28,14 @@ from path import Path as path from six import StringIO, text_type import lms.djangoapps.dashboard.git_import as git_import -import track.views +from common.djangoapps.track import views as track_views from lms.djangoapps.dashboard.git_import import GitImportError from lms.djangoapps.dashboard.models import CourseImportLog -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.courseware.courses import get_course_by_id from openedx.core.djangolib.markup import HTML -from student.models import CourseEnrollment, Registration, UserProfile -from student.roles import CourseInstructorRole, CourseStaffRole +from common.djangoapps.student.models import CourseEnrollment, Registration, UserProfile +from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) @@ -176,7 +176,7 @@ class Users(SysadminDashboardView): if not request.user.is_staff: raise Http404 action = request.POST.get('action', '') - track.views.server_track(request, action, {}, page='user_sysdashboard') + track_views.server_track(request, action, {}, page='user_sysdashboard') if action == 'create_user': uname = request.POST.get('student_uname', '').strip() @@ -332,7 +332,7 @@ class Courses(SysadminDashboardView): raise Http404 action = request.POST.get('action', '') - track.views.server_track(request, action, {}, + track_views.server_track(request, action, {}, page='courses_sysdashboard') courses = {course.id: course for course in self.get_courses()} diff --git a/lms/djangoapps/dashboard/tests/test_sysadmin.py b/lms/djangoapps/dashboard/tests/test_sysadmin.py index 280cb24769e..4ba4c8a3478 100644 --- a/lms/djangoapps/dashboard/tests/test_sysadmin.py +++ b/lms/djangoapps/dashboard/tests/test_sysadmin.py @@ -24,9 +24,9 @@ from six.moves import range from lms.djangoapps.dashboard.git_import import GitImportErrorNoDir from lms.djangoapps.dashboard.models import CourseImportLog from openedx.core.djangolib.markup import Text -from student.roles import CourseStaffRole, GlobalStaff -from student.tests.factories import UserFactory -from util.date_utils import DEFAULT_DATE_TIME_FORMAT, get_time_display +from common.djangoapps.student.roles import CourseStaffRole, GlobalStaff +from common.djangoapps.student.tests.factories import UserFactory +from common.djangoapps.util.date_utils import DEFAULT_DATE_TIME_FORMAT, get_time_display from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.mongo_connection import MONGO_HOST, MONGO_PORT_NUM diff --git a/lms/djangoapps/debug/views.py b/lms/djangoapps/debug/views.py index 8096867435d..7bf403fd72b 100644 --- a/lms/djangoapps/debug/views.py +++ b/lms/djangoapps/debug/views.py @@ -10,7 +10,7 @@ from django.utils.html import escape from django.views.decorators.csrf import ensure_csrf_cookie from codejail.safe_exec import safe_exec -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from openedx.core.djangolib.markup import HTML diff --git a/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py b/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py index ab2f621e53f..efea25403c4 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py +++ b/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py @@ -14,8 +14,8 @@ from opaque_keys.edx.locator import CourseLocator from lms.djangoapps.discussion.django_comment_client.base.views import add_truncated_title_to_event_data from lms.djangoapps.discussion.django_comment_client.permissions import get_team from lms.djangoapps.discussion.django_comment_client.utils import get_cached_discussion_id_map_by_course_id -from track.transformers import EventTransformer, EventTransformerRegistry -from track.views.segmentio import BI_SCREEN_VIEWED_EVENT_NAME, FORUM_THREAD_VIEWED_EVENT_LABEL +from common.djangoapps.track.transformers import EventTransformer, EventTransformerRegistry +from common.djangoapps.track.views.segmentio import BI_SCREEN_VIEWED_EVENT_NAME, FORUM_THREAD_VIEWED_EVENT_LABEL def _get_string(dictionary, key, del_if_bad=True): diff --git a/lms/djangoapps/discussion/django_comment_client/base/tests.py b/lms/djangoapps/discussion/django_comment_client/base/tests.py index b09e3017393..1aefa55f20a 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/tests.py +++ b/lms/djangoapps/discussion/django_comment_client/base/tests.py @@ -21,8 +21,8 @@ from six import text_type from six.moves import range from common.test.utils import MockSignalHandlerMixin, 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.discussion.django_comment_client.base import views from lms.djangoapps.discussion.django_comment_client.tests.group_id import ( CohortedTopicGroupIdTestMixin, @@ -48,12 +48,12 @@ from openedx.core.djangoapps.django_comment_common.utils import ( ) from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES from openedx.core.lib.teams_config import TeamsConfig -from student.roles import CourseStaffRole, UserBasedRole -from student.tests.factories import CourseAccessRoleFactory, CourseEnrollmentFactory, UserFactory -from track.middleware import TrackMiddleware -from track.views import segmentio -from track.views.tests.base import SEGMENTIO_TEST_USER_ID, SegmentIOTrackingTestCaseBase -from util.testing import UrlResetMixin +from common.djangoapps.student.roles import CourseStaffRole, UserBasedRole +from common.djangoapps.student.tests.factories import CourseAccessRoleFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.track.middleware import TrackMiddleware +from common.djangoapps.track.views import segmentio +from common.djangoapps.track.views.tests.base import SEGMENTIO_TEST_USER_ID, SegmentIOTrackingTestCaseBase +from common.djangoapps.util.testing import UrlResetMixin from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase @@ -239,7 +239,7 @@ class ViewsTestCaseMixin(object): # Patch the comment client user save method so it does not try # to create a new cc user when creating a django user - with patch('student.models.cc.User.save'): + with patch('common.djangoapps.student.models.cc.User.save'): uname = 'student' email = 'student@edx.org' self.password = 'test' @@ -462,7 +462,7 @@ class ViewsTestCase( # Patch the comment client user save method so it does not try # to create a new cc user when creating a django user - with patch('student.models.cc.User.save'): + with patch('common.djangoapps.student.models.cc.User.save'): uname = 'student' email = 'student@edx.org' self.password = 'test' @@ -2050,7 +2050,7 @@ class ForumThreadViewedEventTransformerTestCase(ForumsEnableMixin, UrlResetMixin DUMMY_CATEGORY_ID = 'i4x-edx-dummy-commentable-id' DUMMY_THREAD_ID = 'dummy_thread_id' - @mock.patch.dict("student.models.settings.FEATURES", {"ENABLE_DISCUSSION_SERVICE": True}) + @mock.patch.dict("common.djangoapps.student.models.settings.FEATURES", {"ENABLE_DISCUSSION_SERVICE": True}) def setUp(self): super(ForumThreadViewedEventTransformerTestCase, self).setUp() self.courses_by_store = { diff --git a/lms/djangoapps/discussion/django_comment_client/base/views.py b/lms/djangoapps/discussion/django_comment_client/base/views.py index 505cda2841e..5ccbf1c0da7 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/views.py +++ b/lms/djangoapps/discussion/django_comment_client/base/views.py @@ -57,7 +57,7 @@ from openedx.core.djangoapps.django_comment_common.signals import ( thread_voted ) from openedx.core.djangoapps.django_comment_common.utils import ThreadContext -from util.file import store_uploaded_file +from common.djangoapps.util.file import store_uploaded_file log = logging.getLogger(__name__) diff --git a/lms/djangoapps/discussion/django_comment_client/tests/group_id.py b/lms/djangoapps/discussion/django_comment_client/tests/group_id.py index 9c305cd8acc..574d91479b4 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/group_id.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/group_id.py @@ -4,8 +4,8 @@ import json import re -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.teams.tests.factories import CourseTeamFactory from openedx.core.djangoapps.django_comment_common.models import CourseDiscussionSettings from openedx.core.djangoapps.django_comment_common.utils import set_course_discussion_settings diff --git a/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py b/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py index 90a0624592d..11aa4c76966 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py @@ -19,8 +19,8 @@ from pytz import UTC from six import text_type import lms.djangoapps.discussion.django_comment_client.utils as utils -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.tabs import get_course_tab_list from lms.djangoapps.courseware.tests.factories import InstructorFactory from lms.djangoapps.discussion.django_comment_client.constants import TYPE_ENTRY, TYPE_SUBCATEGORY @@ -47,8 +47,8 @@ from openedx.core.djangoapps.django_comment_common.utils import ( set_course_discussion_settings ) from openedx.core.djangoapps.util.testing import ContentGroupTestCase -from student.roles import CourseStaffRole -from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.roles import CourseStaffRole +from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase diff --git a/lms/djangoapps/discussion/django_comment_client/tests/utils.py b/lms/djangoapps/discussion/django_comment_client/tests/utils.py index 600ea776a6a..f27129badb4 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/utils.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/utils.py @@ -13,8 +13,8 @@ from openedx.core.djangoapps.django_comment_common.utils import ( set_course_discussion_settings ) from openedx.core.lib.teams_config import TeamsConfig -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 import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/lms/djangoapps/discussion/django_comment_client/utils.py b/lms/djangoapps/discussion/django_comment_client/utils.py index a5cfa2a0627..c58b1c387ec 100644 --- a/lms/djangoapps/discussion/django_comment_client/utils.py +++ b/lms/djangoapps/discussion/django_comment_client/utils.py @@ -37,8 +37,8 @@ from openedx.core.djangoapps.django_comment_common.models import ( ) from openedx.core.djangoapps.django_comment_common.utils import get_course_discussion_settings from openedx.core.lib.cache_utils import request_cached -from student.models import get_user_by_username_or_email -from student.roles import GlobalStaff +from common.djangoapps.student.models import get_user_by_username_or_email +from common.djangoapps.student.roles import GlobalStaff from xmodule.modulestore.django import modulestore from xmodule.partitions.partitions import ENROLLMENT_TRACK_PARTITION_ID from xmodule.partitions.partitions_service import PartitionService diff --git a/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py b/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py index e7212790533..156b5e1777e 100644 --- a/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py +++ b/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py @@ -9,7 +9,7 @@ Enrollments. from django.core.management.base import BaseCommand from openedx.core.djangoapps.django_comment_common.models import assign_default_role_on_enrollment -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class Command(BaseCommand): diff --git a/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py b/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py index 154147cdfea..246dad152a8 100644 --- a/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py +++ b/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py @@ -9,7 +9,7 @@ Enrollments. from django.core.management.base import BaseCommand from openedx.core.djangoapps.django_comment_common.models import assign_default_role_on_enrollment -from student.models import CourseEnrollment +from common.djangoapps.student.models import CourseEnrollment class Command(BaseCommand): diff --git a/lms/djangoapps/discussion/notification_prefs/tests.py b/lms/djangoapps/discussion/notification_prefs/tests.py index d86d8871c6b..e826ebe5ad2 100644 --- a/lms/djangoapps/discussion/notification_prefs/tests.py +++ b/lms/djangoapps/discussion/notification_prefs/tests.py @@ -22,8 +22,8 @@ from lms.djangoapps.discussion.notification_prefs.views import ( set_subscription ) from openedx.core.djangoapps.user_api.models import UserPreference -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 @override_settings(SECRET_KEY="test secret key") diff --git a/lms/djangoapps/discussion/notification_prefs/views.py b/lms/djangoapps/discussion/notification_prefs/views.py index 20e631bbf60..c2f9d9ad592 100644 --- a/lms/djangoapps/discussion/notification_prefs/views.py +++ b/lms/djangoapps/discussion/notification_prefs/views.py @@ -22,7 +22,7 @@ from django.views.decorators.http import require_GET, require_POST import six from six import text_type -from edxmako.shortcuts import render_to_response +from common.djangoapps.edxmako.shortcuts import render_to_response from lms.djangoapps.discussion.notification_prefs import NOTIFICATION_PREF_KEY from openedx.core.djangoapps.user_api.models import UserPreference from openedx.core.djangoapps.user_api.preferences.api import delete_user_preference diff --git a/lms/djangoapps/discussion/rest_api/serializers.py b/lms/djangoapps/discussion/rest_api/serializers.py index 414c9bdc372..d39237c9700 100644 --- a/lms/djangoapps/discussion/rest_api/serializers.py +++ b/lms/djangoapps/discussion/rest_api/serializers.py @@ -34,7 +34,7 @@ from openedx.core.djangoapps.django_comment_common.models import ( Role ) from openedx.core.djangoapps.django_comment_common.utils import get_course_discussion_settings -from student.models import get_user_by_username_or_email +from common.djangoapps.student.models import get_user_by_username_or_email def get_context(course, request, thread=None): diff --git a/lms/djangoapps/discussion/rest_api/tests/test_api.py b/lms/djangoapps/discussion/rest_api/tests/test_api.py index c993890b728..df7c838d76f 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_api.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_api.py @@ -56,8 +56,8 @@ from openedx.core.djangoapps.django_comment_common.models import ( Role ) from openedx.core.lib.exceptions import CourseNotFoundError, PageNotFoundError -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 import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase diff --git a/lms/djangoapps/discussion/rest_api/tests/test_serializers.py b/lms/djangoapps/discussion/rest_api/tests/test_serializers.py index a4b8d1a6019..80c105708a2 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_serializers.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_serializers.py @@ -29,8 +29,8 @@ from openedx.core.djangoapps.django_comment_common.models import ( FORUM_ROLE_STUDENT, Role ) -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 import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/lms/djangoapps/discussion/rest_api/tests/test_views.py b/lms/djangoapps/discussion/rest_api/tests/test_views.py index 8029dd11733..232f361c526 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_views.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_views.py @@ -19,8 +19,8 @@ from six.moves import range from six.moves.urllib.parse import urlparse 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.discussion.django_comment_client.tests.utils import ( ForumsEnableMixin, config_course_discussions, @@ -41,9 +41,9 @@ 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.djangoapps.user_api.accounts.image_helpers import get_profile_image_storage from openedx.core.djangoapps.user_api.models import RetirementState, UserRetirementStatus -from student.models import get_retired_username_by_username -from student.tests.factories import CourseEnrollmentFactory, SuperuserFactory, UserFactory -from util.testing import PatchMediaTypeMixin, UrlResetMixin +from common.djangoapps.student.models import get_retired_username_by_username +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, SuperuserFactory, UserFactory +from common.djangoapps.util.testing import PatchMediaTypeMixin, UrlResetMixin from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/discussion/rest_api/views.py b/lms/djangoapps/discussion/rest_api/views.py index 30864c31f8f..339a7c4675a 100644 --- a/lms/djangoapps/discussion/rest_api/views.py +++ b/lms/djangoapps/discussion/rest_api/views.py @@ -60,7 +60,7 @@ from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiv from openedx.core.lib.api.parsers import MergePatchParser from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin, view_auth_classes -from util.json_request import JsonResponse +from common.djangoapps.util.json_request import JsonResponse from xmodule.modulestore.django import modulestore log = logging.getLogger(__name__) diff --git a/lms/djangoapps/discussion/tasks.py b/lms/djangoapps/discussion/tasks.py index a0101e85b46..8c6c8d5a7a6 100644 --- a/lms/djangoapps/discussion/tasks.py +++ b/lms/djangoapps/discussion/tasks.py @@ -29,7 +29,7 @@ from openedx.core.djangoapps.ace_common.template_context import get_base_templat from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.django_comment_common.models import DiscussionsIdMapping 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/lms/djangoapps/discussion/tests/test_tasks.py b/lms/djangoapps/discussion/tests/test_tasks.py index 5f828b102af..c1264c04566 100644 --- a/lms/djangoapps/discussion/tests/test_tasks.py +++ b/lms/djangoapps/discussion/tests/test_tasks.py @@ -25,7 +25,7 @@ from openedx.core.djangoapps.django_comment_common.models import ForumsConfig from openedx.core.djangoapps.django_comment_common.signals import comment_created from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory from openedx.core.lib.celery.task_utils import emulate_http_request -from student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase NOW = datetime.utcnow() @@ -78,7 +78,7 @@ class TaskTestCase(ModuleStoreTestCase): # Patch the comment client user save method so it does not try # to create a new cc user when creating a django user - with mock.patch('student.models.cc.User.save'): + with mock.patch('common.djangoapps.student.models.cc.User.save'): cls.thread_author = UserFactory( username='thread_author', password='password', diff --git a/lms/djangoapps/discussion/tests/test_views.py b/lms/djangoapps/discussion/tests/test_views.py index 872b643f1fa..3e67c281e7c 100644 --- a/lms/djangoapps/discussion/tests/test_views.py +++ b/lms/djangoapps/discussion/tests/test_views.py @@ -20,8 +20,8 @@ from mock import ANY, Mock, call, patch 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 lms.djangoapps.courseware.exceptions import CourseAccessRedirect from lms.djangoapps.discussion import views from lms.djangoapps.discussion.django_comment_client.constants import TYPE_ENTRY, TYPE_SUBCATEGORY @@ -56,9 +56,9 @@ from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES from openedx.core.lib.teams_config import TeamsConfig from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseTestConsentRequired -from student.roles import CourseStaffRole, UserBasedRole -from student.tests.factories import CourseEnrollmentFactory, UserFactory -from util.testing import EventTestMixin, UrlResetMixin +from common.djangoapps.student.roles import CourseStaffRole, UserBasedRole +from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory +from common.djangoapps.util.testing import EventTestMixin, UrlResetMixin from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ( @@ -89,7 +89,7 @@ class ViewsExceptionTestCase(UrlResetMixin, ModuleStoreTestCase): # Patch the comment client user save method so it does not try # to create a new cc user when creating a django user - with patch('student.models.cc.User.save'): + with patch('common.djangoapps.student.models.cc.User.save'): uname = 'student' email = 'student@edx.org' password = 'test' @@ -108,8 +108,8 @@ class ViewsExceptionTestCase(UrlResetMixin, ModuleStoreTestCase): config.enabled = True config.save() - @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_user_profile_exception(self, mock_threads, mock_from_django_user): # Mock the code that makes the HTTP requests to the cs_comment_service app @@ -125,8 +125,8 @@ class ViewsExceptionTestCase(UrlResetMixin, ModuleStoreTestCase): response = self.client.get(url) self.assertEqual(response.status_code, 404) - @patch('student.models.cc.User.from_django_user') - @patch('student.models.cc.User.subscribed_threads') + @patch('common.djangoapps.student.models.cc.User.from_django_user') + @patch('common.djangoapps.student.models.cc.User.subscribed_threads') def test_user_followed_threads_exception(self, mock_threads, mock_from_django_user): # Mock the code that makes the HTTP requests to the cs_comment_service app @@ -1654,7 +1654,7 @@ class ForumDiscussionXSSTestCase(ForumsEnableMixin, UrlResetMixin, ModuleStoreTe self.assertTrue(self.client.login(username=username, password=password)) @ddt.data('"><script>alert(1)</script>', '<script>alert(1)</script>', '</script><script>alert(1)</script>') - @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('"><script>alert(1)</script>', '<script>alert(1)</script>', '</script><script>alert(1)</script>') - @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 ffe9166589f..f28488e78af 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 0fab13d329a..277ac8ca059 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 beee9f368f4..c6dec5e647b 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 d83faf288e6..f9074b633d0 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 5123c84235a..012503e873a 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 82b86553945..0625919a131 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 d21c2d0e94d..4e604d3c467 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 68ef58ccd35..8a472a2877f 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 81052d9cb68..645be723626 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 1b9ee6d6f83..0540a65c8a7 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 f3479754231..9459b263e4f 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 e5945dd5aa1..101369e8ac1 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 597f8b9991f..c83bc77d752 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 b38f49cfdd8..a18a51fd51d 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 caa6eacb0f6..3d26c0d8060 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 50c9a104eb5..a1ba0d21ec1 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 9ee405f5fa8..a8d2d898914 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 f98b89ba2d8..99d86e282d3 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 42c99fe5d6f..bb773a4aaf4 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 3c2de86d1de..f8ef149e482 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 6f55ab177c0..e4eb6729659 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 f08a05b3f77..3a2bc8de732 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 12e86c09d1f..7ca5fb9dad5 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 c50e2bbac69..fd3a60ee0ba 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 7d4a56aca8f..9ff5b72f7af 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 05b97cacd58..c94098844e7 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 695737e2c75..f0967fa510c 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 14b46691df4..d1cfe7e025c 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 0fab8487bab..4e75b3cb3bc 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 9c89bf4d945..d6de94533b9 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 4c2fd9af507..bdf9bba1a18 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 887f0f50221..b56f69f9111 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 50e82cad28e..35b6047c2f0 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 cbd517f9c19..a2dafd3e6e3 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 17146e1cc66..2e362b3c66c 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 b426b37d10d..e966671a3dd 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 fdcc3069eb9..f6f488e0e7c 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 ae1815b0927..675ee26d541 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 6a97ef9496c..681d022e422 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 bf6c08e73f0..b305a6cc2fc 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 bf8fd188aff..3b867ca75e2 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 4ced0b961af..c410729a0a1 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 2a071f6ba56..44fc05ffee1 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 5da2fea458e..99c934412d2 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 3474c85a42d..a434dc24af9 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 6e94df67419..c3390b716a6 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 50b7dd087dd..13e95d2288f 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 4e3180f1556..a3c38d7e05c 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 fbb431b4014..5ea7bde8b68 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 74a821236f4..d36049f1a27 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 4e611cacd39..22e19aff6ad 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 c5ed16a1b8f..12b49c59008 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 118c6de830f..4bb6c613794 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 1c2a72cdb33..473878dcdf4 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 0597f1cd12a..36600486faa 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 bb70ad370f3..72fc6bb5254 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 cfe5ee09e21..bae4f632cfa 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 b78ef1ee6a9..84b37612b50 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 368acba6e0f..c83b81c0c5f 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 02175fe9873..00ae66ae212 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 9febba7ccc9..5c653fae222 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 2a65e8509e1..87ca8297aac 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 19fe30496f1..77873d8833d 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 1dd932e10c4..0c2b227af7a 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 ca8a4f0293c..9a20ecdcbe1 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 5ad8e053151..5e3ad50821a 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 177e310d742..e7eb12d234e 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 7cbc0987f59..562cfa03d37 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 6d9c9a1725d..e600d722089 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 f2a847a14df..5d7c633e06d 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 b4023cc8cca..363ff20d0ef 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 beb55083a4b..dc96edc541d 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 2533d5c745e..d5ca3b7b264 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 0b46c5ad7fa..16c7dd00c98 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 0d1024dd061..26ab42fc747 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 047beacf6a3..04250be8f90 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 c22db99a8f2..3b2b8c9588a 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 dadb72844f3..911b64a702c 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 b0b4729c228..b8e0fa5592d 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 5e8d3d9473e..65a6998f96a 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 1724e44a7dd..d1bd5c62eb0 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 8a9afdb1eed..07de2e8e916 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 f68ec11d168..47dbefdf59a 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 9e5776c9d21..be41f14fea9 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 e78f7cabe08..fc6fd4ef242 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 2f9a90630b1..5fd342708a6 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 4ebb770940b..e2d2d5a47fd 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 2d27052c01c..8af51b17493 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 e77f970c08d..db6c6724e8b 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 f08b191939b..a24078cb569 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 70514373d97..18bbfbfbbc4 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 c31ffe36c2f..cc0f4cac55a 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 8c982482572..6fc387d2fad 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 90401f2b286..0b083434a58 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 942d913b04b..5192bfaf6f4 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 73979f0e285..3ff26f99a6c 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 f24bcfe503d..cc10a368b7a 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 02d73c1c288..3157ad62c92 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 9f1fb4364c4..835099a75d7 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 8e305672e34..afd582cfd96 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 0e8734a4760..f344e5b3a29 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 94a152b6da5..d8e0f8226ca 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 03af0f2545f..5430aa1ef59 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 4ff60cab460..96bea4ec66d 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 fb3292d42b2..00b931bf792 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 cc17988c633..fd3fdd6feba 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 c443c037308..43c61e222f9 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 c71d692e02a..543139c8c82 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 a5dcf74fc45..606f3b15688 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 c71bd259cfc..80841ae9784 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 e138a69e24e..a0f4c17b761 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 5857f576dba..e3595faf58c 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 fa717478714..0bd26226d78 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 b426d9d79eb..f7164df2479 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 00d7e30a7e1..7ba683a6b4d 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 8ea752f1846..1de02c032e9 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 dadb1bfae48..c990c08431e 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 2081b7a8453..0c02ff3ea83 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 828e1b1a313..f5c7f5cdae0 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 05a25affec2..7eb80b1d7cf 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 cd64c8278c5..45ed4e6f079 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 1fef90518fe..2089df1737d 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 972de646f68..e3dff71ee6c 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 7f07687f0d8..20686ee2197 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 644c6a57477..3f849e297e1 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 d9ff099b5c3..76d317d1e9f 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 a7ba2ce764b..91ed05e3b2f 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 22ccf609cce..8d0d9a40cdf 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 6247c9e5383..840df93a360 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 c0b00543fd1..20812ddd137 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 8a7b20946b7..6019551b5ee 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 7a63d3f3b82..8401546df85 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 fef11fdc77c..50063d1dbf6 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 7240cf26584..b505af2655c 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 d6511a82e9b..a5b56ff3395 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 ef81f1d58ce..3f949746d09 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 ecf618e62ed..df332fc3312 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 13424eedf43..80d2c833594 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 6c6313af487..32e620be2c5 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 9dfa57a15bc..4fb87ebac53 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 0966a40ec5d..ff73e3b1e60 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 3e3ac1bb332..5d0021d4685 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 9918e25e3c0..dd928d92ee9 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 68c37312bca..779a05ed78a 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 80d263e068e..143f3548a61 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 c23f7ddb2e4..f3690f0bbb3 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 1b206d0bd0c..1fdc9a60cf8 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 078deb5c32d..28a878812c9 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 2c8bb5251e9..7f362e5806a 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 cb0839b0d09..2d82796237c 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 4fc18db8de6..337b32d406f 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 a0b99fa33f8..50fa17b8a44 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 e3de6e73fcb..809da1c7853 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 6b31a9ca8c9..5172ab84a57 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 073b6b5cbff..2728e32faf0 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 3014f79a439..13e242e36cb 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 de81a441707..eb35d0d107b 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 71492302cef..4126bacc6cf 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 4f9ed841083..0ed1c116c1a 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 0f53be6faba..259eeb01217 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 666b9e6e1ce..b0181efaa30 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 c85704026ea..cd2ac26bdfb 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 8a3ec881f91..35445b5cbca 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 7b2e950eedd..964fe38c05e 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 5cfa3667e6d..c88dc6758c1 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 9264bc512f4..4f53cb90797 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 98ac86e4381..e7a9eb95de5 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 e565644b099..a57df2321ab 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 081e241f22a..9ced28e260b 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 e889ad708b5..e6ec9d043a6 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 063162b1fd8..9303b7e9c95 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 ced14284828..ae4ffec876f 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 be12b7fffc3..1191d51ea71 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 c3af0917d72..654b9b1926f 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 e4a1f485ed8..39c703bf925 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 d107ba67fe6..2d9bc09f144 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 a340968019a..9adb9bf0523 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 a4ca870a71a..81403620196 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 c84f3134bbf..7e3aded42a6 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 cab4720a5fb..6c2f16e963a 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 9cbb67e65a1..ba2ca578d57 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 dd48b3e0267..21ccda2df5d 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 186a98d759d..5572bd1ddff 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 769228ef17c..8dc01e8024c 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 f08323b7523..44b0c53280f 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 2a1d0f23266..3cacfbc6ef2 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 f6641039322..c5d7fb1cd40 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 7982d964607..ab0bea3b487 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 c65cfcc921b..a59b5a81003 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 852dde71b43..e3cec0f5590 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 210d4192c30..ea16908892f 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 8c1d564769a..12bca477884 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 8c1ebd83b7d..c09acc06d84 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 dbae15c386b..52074318732 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 18ba42a71be..1ccf50a965f 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" %></%def> <%! -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 2721a6bd27b..063dea1bcf6 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 62f4b81bb86..230122bcd11 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 254bf81f394..621f92584b2 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 143fe657e18..8e95f78df7a 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 23ae661f7c6..4321b6e453e 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 %> <div class="financial-assistance-wrapper"> diff --git a/lms/templates/main.html b/lms/templates/main.html index 93b02c71841..14b02024c31 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 %> <!DOCTYPE html> diff --git a/lms/templates/page_banner.html b/lms/templates/page_banner.html index 2b8139e8345..1ecebd5ab0d 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 f8ae07a9822..9f2705a9b8a 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 64d48f6b328..0a57eb59ab6 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 3ab766ebe57..b90707bafda 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 e79933cd071..085e604ad7f 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 2bff54cf3aa..b569798a954 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 bc6dfe32415..e2d392a488b 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 f326021c90f..aab2126e120 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 8d9c6e61447..3111f983560 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 60e7808dfb6..e304569c844 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 337bbfbb321..591d8712517 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 6e3edc4bf5b..e0c9b631f06 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 f612f31716f..2f824d2a743 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 c5ce3cbe078..3e2dbbfdf35 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 fdc9166bd62..b25860e6d6e 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 db135b68bb2..b0dd06563d6 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 6a3f44ad52c..393762797da 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 e906a91722d..0cfc3606541 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 7fe7f300e7c..5fd497da037 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 fd00c1bf918..e60e11014b4 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 6eb5015e3ef..ee4de81e827 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 e7ceef8e533..93e1d3339b5 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 f0216de2da5..c2f2c10d889 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 2d4b8f8f39b..cfeeb008dbd 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 a215de6e1c5..514cf122ac2 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 50437b368e4..08f2b0062e9 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 0ae6dec6313..cbaefaf8756 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 ba47c71d3ef..4e705a3928d 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 cc41ed263ca..c0369b0fad0 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 3073e3845f5..5c0f4323b4d 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 05bb64cb224..5b140cc65b7 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 e89ad72dd6d..8a5793832a4 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 306b2423d6c..5d2a4373833 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 90e961ce64d..c21799477c6 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 7bfb5dc1f23..cbcfe971995 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 4200d151167..18875e94161 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 5dd6165a0f1..f01d531b090 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 69e18fd26e6..498db690197 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 ff810fff5b9..21ab1d68d08 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 5d8a7a1eda4..80987ec2271 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 b6a26900d6e..d0e5f050194 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 20aa79f01d2..458a19fe231 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 16599da3783..fe17c954bb3 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 09f41b2e8b7..efefac6f0f7 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 39c616a9648..d0d2d1b1536 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 040a6ff4343..1596f6cb451 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 554f0a36d34..cb9545b23b8 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 e84b66a7683..fa1a6e437d0 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 adc479db636..a6c3e4e3f70 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 4cf4549d909..57ebd3244e2 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 be2b61129c0..04f1b9705e1 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 311be58cc06..de34014efe5 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 ef927306ef6..d4a750ab4c5 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 3586f571fc3..da9cd6ea863 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 4806f81f3a3..c77866b1481 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 e19fcfa3d34..2e11ebf00c2 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 9433021ee8f..967c9725f2d 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 2ff76a31b07..6277ff3f6f9 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 d273bdfb1d3..6499dd29ecd 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 1aebc7ff63e..8332b30f2c0 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 69bc5f71a14..2eafd477e3d 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 a48ffa16821..cb233954f11 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 9c940379832..a5da6cf3dda 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 202389f8d64..50f183f086b 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 275174bc4b1..e7fdf6c28b7 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 dffbad0b475..e4989ff2355 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 4552dbd53e8..76d61d2f494 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 8f09c721611..37531ce46bc 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 a8df58793ce..e80b24e7877 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 efd2709ead5..55d8ab091ea 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 f00338e8e4b..d8f2594a09a 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 7369163b1a4..7c9a73ad000 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 d996754d71d..10dd306f6e6 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 b15578e33e3..b08600f9cd0 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 ac4e982cfae..874b3272058 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 fe9bdb4faf8..5fa8635e51a 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 ee46fc31fc1..a71aeed556a 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 448f50a52da..aaa4bfcba66 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 566f5fe1ed9..b23915b6634 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 8a1c7750ab5..17739a61d12 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 040791e750f..6e2ec5710b6 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 a74047a71b3..0cdc6f331bc 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 e9a6bfa49fb..38c2eedabf2 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 ea5dc5c46d8..efd8b12e96c 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 f0d8878e8df..e9758b6abb3 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 33ab1a9bc1d..34aa8758caa 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 dabb861ee85..c328ce06291 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 bdba4cf0bcc..6697db4d307 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 0c699836dbf..f71946a5149 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 682e0d77dd4..0984c7422ec 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 6a1be45f0bb..57ef0f89770 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 af34319718e..9a3eacb56ee 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 98d7cbe563b..437c71107f7 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 fe1405cefdc..a0ca20aa0a1 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 b80c613f3a4..64167c9b269 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 4e183b971fb..4a08ef29e89 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 771d7b94c08..82db02e2892 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 d3db2e0d470..1e01febf3fa 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 7176710fbf6..5a6504ae366 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 af26a93f4e3..00dae55c8f4 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 3a0d0ef886d..ffb0f873b07 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 13184ae2cd9..c3b5aa264a1 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 97af88ecda8..f5cf4aa823c 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 4e01e5752f7..13233fd8952 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 48fe29cc4e9..3e2351f47d0 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 b6283b9b286..583067efa8c 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 1f26a5efdb3..ca1e4472743 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 1ee0691cabc..0bfb3a840d4 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 965e0a1d3e1..c2e07c6fcb9 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 99a4a67db7d..04d3a58e9b7 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 e375fcff9ae..8169dd4c539 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 913c5d41a89..fb3c68ba2b3 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 69173cf9f09..f12bd0a2e7d 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 4b4bca8c06f..e33c6c20cda 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 5576dada759..70965a08b46 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 0a2b0fc2d6f..bc759464213 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 0926927da32..1f3aabbd6e0 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 1dce15546d0..8b1d2498386 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 4474d5feb69..cc2b6ff4814 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 a7ce38f88d8..52dd962ee05 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 f49293f6a53..e3a04451726 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 dae80821842..09ef4cc9fd9 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 fb30694b537..4aa119cc3d5 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 f7d13ab8a3a..d7f060a5678 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 1538342ded2..c9b361cd079 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 94ae1bcc3f6..520aca2770e 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 77cfe2d16df..3ff9c3b3a16 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 3d2711c0a34..f3c96d6535e 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 282e91b84c5..26e8f182455 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 124ba1f4a0a..ff8ca7c34b1 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 1c4168dbe8b..1349605023b 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 e83a2b38b8f..edbc54297f6 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 52f3e47384b..aec1e4451eb 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 87991682fab..803b2d27d5d 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 1084ca942cd..97eff107b17 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 117fa438e9a..eb5a8839c2c 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 8c61eab1606..001827ecb40 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 48f885c4050..89af8f2c1b9 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 f9cd0af0bfd..af7c4e6dda5 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 62d341c8a67..276f16e4f25 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 40128af60aa..a21fa88fd88 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 bdf7cd8aeb1..390e16bf8bf 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 f40a0da71f4..fa1b30d9cfd 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 7d20969953e..9dab0717b10 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 f0eac87b1cf..bc3f1789d52 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 fb9b6715b0a..5d42a89547e 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 b64abff7d5b..c216a0ac55a 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 16cc0e8a60b..44d6cf2bf73 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 ab44772a3bb..88e557fd5eb 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 bdd09135824..72b69b99ed6 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 f1778123cf6..840028988c6 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 79432fd45a3..b1e7d73a612 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 0d6849d07db..f789f1eea75 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 dad9eb76e1c..ad04da509fc 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 0719ebe2178..27ea1bdc1f6 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 cd115cd8fe5..37496fa6206 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 a038b1f245d..b7529633b91 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 7851cf1af6f..7fc084e0744 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 7dcb7bd47b6..6cf88028939 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 b55da7368e0..61fe608b005 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 98597af5760..6fae0b2f901 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 94d3eba39a6..0944ec82342 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 46e5dcfc39e..4c0a37108a4 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 2a966f48c94..01359e6630b 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 927ee7dc7db..95bb3d568db 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 673a6e7db02..ca2e28f7c80 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 3b3915a0f46..c52b198b31b 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 2ed1de98b5d..942d5eb4868 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 33b6ceb7500..19bd64665b9 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 b1413bd2151..ff8a18fa137 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 55c578e260f..70fe3bb0696 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 361ce05700e..4206647d6d2 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 8098f92a536..1b458316875 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 7e95cf803ba..b1eee633f40 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 309d588a1da..93678ddea4f 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 37400f42f99..d00cd769177 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 3634c1f0639..12d18e3e63d 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 159084b7ee0..8afb2190422 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 ed34799ed36..95f11d1241e 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 d2f767e920a..74aae437d9b 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 cfc2f5846d5..5a0e83062d9 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 6e4a9a8bc35..11c7d258a29 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 3c8ad242192..255265f7635 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 25a9002e213..b9dd29b1752 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 47f0b89e176..06363fa7fca 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 76990c3b8d0..cf6f8548ed1 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 18674b186d6..db72b485421 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 fbc7ce53448..01e2e302a32 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 d7020e55dce..84304665aed 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 99886392a53..91233681ac5 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 8a5cc6d78fc..a59da6d128d 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 2ba360ab899..651ff7bb6d3 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 593a83a15ff..2ca881337ca 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 494a6045681..947a98c3dae 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 7d60e1392b1..2cfe51bd75a 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 24178f4aad3..3ab1637c024 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 8bfd6ab2b98..ffb2240fee4 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 ffcf9635270..26dfb7cd57b 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 0960106d06a..5b54362365d 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 441921c360a..651156ba942 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 7666494ccfe..2335743df21 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 0b97ea7c177..8a500bb2b60 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 882ec05df52..9f364ef0a66 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 5ff6492000a..5ceb73504b3 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 3c362b470d3..20d7196d874 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 38b5f34074a..2f025f7816a 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 49cd95f31bb..3e35247e2bb 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 c92a6a0b9be..17d6204735d 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 edf1d56951f..a5afd95357a 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 b2cb8fb1557..031ca12ab16 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 be69cb31b49..21d706a9df9 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 df889079bcb..b15b651a647 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 95633d643a0..8cc9f6ca2ab 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 39c913b1c25..003e4e5ac32 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 e9074ad58ca..19783a3908b 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 dfd54b1dd3c..4c66d633ae8 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 796a237bf9b..0a46337aeff 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 c8c205f2e2f..32b121dce91 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 4f02167bf5f..095e7c40ce3 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 dc1bd336d3f..d280aa100bc 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 0e07f526496..0c0c801857c 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 d238374b8c0..f38a85be47a 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 fd4ff6c1e2e..c2a56794965 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 6722abfb9e0..527f9cf8d97 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 fe1f51a6fba..6c4a5385c5e 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 930d3d80ab5..a35b9d7464f 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 2326e209af9..b0c0bb4fec0 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 77369ddee00..0394ac677c2 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 3daf966a282..faa0baae428 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 e58aa32ac48..c60b6ad8a3c 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 658f050b98d..3de4d021831 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 88a6988b8db..7acf0e5e5d0 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 585b047ba35..3a3c740e5b9 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 a6f6781b5f0..fb8455b66dc 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 8f621b5856b..b872f18f408 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 d05d46f0e57..00cc1724c17 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 2da1d5128f2..98c042b6369 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 fdd208ee76f..795e61d74fe 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 65ec4b3bca6..7e801fa2677 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 5c02e87ccac..e38700c7eee 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 db81ed41b6a..5bd34bb8728 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 1a71adcd66b..5c727ac54ae 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 a865d8a6207..ab5e6b13ee8 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 8dd8b012a2c..6c11abb92a9 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 0adf7a1e89f..b9113290c1a 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 0072a69612d..20f9470c159 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 a3e4d4389d1..c75b93b947c 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 5acb6dc4e46..f5af09d5e48 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 bebdb7079d2..78e439742bc 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 edbf2dd07e3..f495eb3ea3e 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 d1c32b761d4..5e2671ea933 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 dfb2477d849..a7fb935642f 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 c139015b946..bf29aa650ab 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 ae06fd29958..a095ad04816 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 036029ec95f..5d7fe587ed0 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 9ca8331779b..e1487f6ac00 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 e79963b0fe0..7ba7eaf9ef9 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 1288d202e32..8e7efcb0936 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 da29f4200eb..9bf92678a63 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 22e188a9031..0352a91725e 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 838d22fbc38..9238caaea3d 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 febe4a6d960..ceaff8ffb82 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 d41203c1703..7d7f472aea5 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 d47dd29fc69..5519961c0db 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 9916adc7bf5..453ff006132 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 ddd82ec5bee..ec1c9792aa1 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 ae4bdf53c1d..b45f4d5c68b 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 3c8b106f82f..27a38eb5a61 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 4acbc4d299e..ca7dcaa460e 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 170bde10a9c..e8ed1b1230c 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 %> <li class="controls--account"> diff --git a/openedx/features/learner_profile/tests/views/test_learner_profile.py b/openedx/features/learner_profile/tests/views/test_learner_profile.py index 64e841e2829..1863e56f359 100644 --- a/openedx/features/learner_profile/tests/views/test_learner_profile.py +++ b/openedx/features/learner_profile/tests/views/test_learner_profile.py @@ -13,7 +13,7 @@ from django.urls import reverse from edx_toggles.toggles.testutils import override_waffle_flag from opaque_keys.edx.locator import CourseLocator -from course_modes.models import CourseMode +from common.djangoapps.course_modes.models import CourseMode from lms.djangoapps.certificates.api import is_passing_status from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from lms.envs.test import CREDENTIALS_PUBLIC_SERVICE_URL @@ -21,8 +21,8 @@ from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.features.learner_profile.toggles import REDIRECT_TO_PROFILE_MICROFRONTEND from openedx.features.learner_profile.views.learner_profile import learner_profile_context -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/openedx/features/learner_profile/views/learner_profile.py b/openedx/features/learner_profile/views/learner_profile.py index 6be0cf68b56..807ad82c80e 100644 --- a/openedx/features/learner_profile/views/learner_profile.py +++ b/openedx/features/learner_profile/views/learner_profile.py @@ -13,7 +13,7 @@ from django.views.decorators.http import require_http_methods from django_countries import countries from lms.djangoapps.badges.utils import badges_enabled -from edxmako.shortcuts import marketing_link +from common.djangoapps.edxmako.shortcuts import marketing_link from openedx.core.djangoapps.credentials.utils import get_credentials_records_url from openedx.core.djangoapps.programs.models import ProgramsApiConfig from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers @@ -23,7 +23,7 @@ from openedx.core.djangoapps.user_api.preferences.api import get_user_preference from openedx.core.djangolib.markup import HTML, Text from openedx.features.learner_profile.toggles import should_redirect_to_profile_microfrontend from openedx.features.learner_profile.views.learner_achievements import LearnerAchievementsFragmentView -from student.models import User +from common.djangoapps.student.models import User @login_required diff --git a/openedx/tests/completion_integration/test_models.py b/openedx/tests/completion_integration/test_models.py index 8bf85f85649..6de84230c26 100644 --- a/openedx/tests/completion_integration/test_models.py +++ b/openedx/tests/completion_integration/test_models.py @@ -14,7 +14,7 @@ from opaque_keys.edx.keys import CourseKey, UsageKey from six.moves import range, zip 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 SELECT = 1 UPDATE = 1 diff --git a/openedx/tests/completion_integration/test_services.py b/openedx/tests/completion_integration/test_services.py index 6dfa658afb5..dcdc07e37c4 100644 --- a/openedx/tests/completion_integration/test_services.py +++ b/openedx/tests/completion_integration/test_services.py @@ -11,7 +11,7 @@ from opaque_keys.edx.keys import CourseKey from six.moves import range 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.library_tools import LibraryToolsService from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase, TEST_DATA_SPLIT_MODULESTORE from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, LibraryFactory diff --git a/openedx/tests/completion_integration/test_views.py b/openedx/tests/completion_integration/test_views.py index fa3fdde5e7d..2ffcd873444 100644 --- a/openedx/tests/completion_integration/test_views.py +++ b/openedx/tests/completion_integration/test_views.py @@ -13,7 +13,7 @@ from edx_toggles.toggles.testutils import override_waffle_switch from rest_framework.test import APIClient 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 import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/openedx/tests/settings.py b/openedx/tests/settings.py index f3531473fc2..80534cc629a 100644 --- a/openedx/tests/settings.py +++ b/openedx/tests/settings.py @@ -10,11 +10,6 @@ import tempfile from django.utils.translation import ugettext_lazy as _ from path import Path -# TODO: Remove the rest of the sys.path modification here and in (cms|lms)/envs/common.py -REPO_ROOT = Path(__file__).abspath().dirname().dirname().dirname() # /edx-platform/ -sys.path.append(REPO_ROOT / 'common' / 'djangoapps') -sys.path.append(REPO_ROOT / 'import_shims' / 'lms') - ALL_LANGUAGES = [] BLOCK_STRUCTURES_SETTINGS = dict( @@ -72,12 +67,12 @@ INSTALLED_APPS = ( 'edxval', 'lms.djangoapps.courseware', 'lms.djangoapps.instructor_task', - 'student', + 'common.djangoapps.student', 'openedx.core.djangoapps.site_configuration', 'lms.djangoapps.grades.apps.GradesConfig', 'lms.djangoapps.certificates.apps.CertificatesConfig', 'openedx.core.djangoapps.user_api', - 'course_modes.apps.CourseModesConfig', + 'common.djangoapps.course_modes.apps.CourseModesConfig', 'lms.djangoapps.verify_student.apps.VerifyStudentConfig', 'openedx.core.djangoapps.content_libraries', 'openedx.core.djangoapps.dark_lang', @@ -102,7 +97,7 @@ INSTALLED_APPS = ( # Django 1.11 demands to have imported models supported by installed apps. 'completion', - 'entitlements', + 'common.djangoapps.entitlements', 'organizations', ) diff --git a/pylintrc b/pylintrc index 8ca77c0a5d2..6f914cc425f 100644 --- a/pylintrc +++ b/pylintrc @@ -71,7 +71,8 @@ ignore = ,.git,.tox,migrations,node_modules,.pycharm_helpers persistent = yes load-plugins = edx_lint.pylint,pylint_django,pylint_celery -init-hook = "import sys; sys.path.extend(['import_shims/lms', 'import_shims/studio', 'common/djangoapps'])" +init-hook = "import sys; sys.path.extend(['import_shims/lms', 'import_shims/studio'])" +ignore-patterns = **/import_shims/**/*.py [MESSAGES CONTROL] enable = @@ -464,4 +465,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# 1c68aee72f4071c31e5303be5610497ef5e64b7c +# 09e2946a83274f8dccbac8e284d7b1cf381fa31b diff --git a/pylintrc_tweaks b/pylintrc_tweaks index b3feedfaa17..eebf6203e79 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -1,7 +1,11 @@ # pylintrc tweaks for use with edx_lint. [MASTER] ignore+ = ,.git,.tox,migrations,node_modules,.pycharm_helpers -init-hook="import sys; sys.path.extend(['import_shims/lms', 'import_shims/studio', 'common/djangoapps'])" +# 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 +init-hook="import sys; sys.path.extend(['import_shims/lms', 'import_shims/studio'])" +ignore-patterns=**/import_shims/**/*.py [MESSAGES CONTROL] disable+ = diff --git a/scripts/xsslint_config.py b/scripts/xsslint_config.py index beb11e55d66..b45684cb78f 100644 --- a/scripts/xsslint_config.py +++ b/scripts/xsslint_config.py @@ -29,6 +29,7 @@ SKIP_DIRS = ( 'spec', 'test_root', 'vendor', + 'import_shims', ) diff --git a/themes/edx.org/lms/templates/dashboard.html b/themes/edx.org/lms/templates/dashboard.html index f0f40fd117e..ae75ebce28b 100644 --- a/themes/edx.org/lms/templates/dashboard.html +++ b/themes/edx.org/lms/templates/dashboard.html @@ -11,17 +11,17 @@ from datetime import datetime, timedelta from django.utils import timezone from django.utils.translation import ugettext as _ from django.template import RequestContext -from third_party_auth import pipeline +from common.djangoapps.third_party_auth import pipeline from django.urls import reverse -from util.date_utils import strftime_localized +from common.djangoapps.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.theming import helpers as theming_helpers from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string from openedx.core.djangolib.markup import HTML, Text -from entitlements.models import CourseEntitlement -from student.models import CourseEnrollment +from common.djangoapps.entitlements.models import CourseEntitlement +from common.djangoapps.student.models import CourseEnrollment %> <% diff --git a/themes/stanford-style/lms/templates/register-form.html b/themes/stanford-style/lms/templates/register-form.html index 735f48df384..ce3234f5fb9 100644 --- a/themes/stanford-style/lms/templates/register-form.html +++ b/themes/stanford-style/lms/templates/register-form.html @@ -1,11 +1,11 @@ ## xss-lint: disable=mako-missing-default <%! -import third_party_auth +from common.djangoapps import third_party_auth import six -from third_party_auth import pipeline, provider +from common.djangoapps.third_party_auth import pipeline, provider from django.utils.translation import ugettext as _ from django_countries import countries -from student.models import UserProfile +from common.djangoapps.student.models import UserProfile %> <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }"> -- GitLab