From d890f065072dd9d461e2a1a621aa1291ee01addd Mon Sep 17 00:00:00 2001 From: Muhammad Umar Khan <42294172+mumarkhan999@users.noreply.github.com> Date: Mon, 20 Jun 2022 16:03:48 +0500 Subject: [PATCH] Revert "refactor: move xmodule folder to root" --- .coveragerc | 2 +- .coveragerc-local | 1 - .eslintignore | 14 ++-- .github/CODEOWNERS | 2 +- .github/actions/verify-tests-count/action.yml | 2 +- .github/workflows/pylint-checks.yml | 2 - .github/workflows/unit-test-shards.json | 6 -- .github/workflows/unit-tests.yml | 1 - .stylelintignore | 2 +- cms/static/cms/js/require-config.js | 2 +- cms/static/xmodule_js | 2 +- common/lib/xmodule/setup.py | 69 ++++++++++++++++++ .../test_files/formularesponse_with_hint.xml | 45 ++++++++++++ .../test_files/stringresponse_with_hint.xml | 25 +++++++ .../xmodule/test_files/symbolicresponse.xml | 26 +++++++ .../lib/xmodule/xmodule}/README.rst | 0 .../lib/xmodule/xmodule}/__init__.py | 0 .../xmodule/xmodule}/annotatable_module.py | 0 .../lib/xmodule/xmodule}/annotator_mixin.py | 0 .../public/js/library_content_edit.js | 0 .../public/js/library_content_reset.js | 0 .../LibrarySourcedBlockPicker.jsx | 0 .../public/js/library_source_block.js | 0 .../assets/library_source_block/style.css | 0 .../public/js/split_test_author_view.js | 0 .../split_test/public/js/split_test_staff.js | 0 .../public/js/split_test_student.js | 0 .../public/js/vertical_student_view.js | 2 +- .../xmodule}/assets/word_cloud/.eslintrc.js | 0 .../xmodule}/assets/word_cloud/.gitignore | 0 .../word_cloud/src/js/d3.layout.cloud.js | 0 .../assets/word_cloud/src/js/d3.min.js | 0 .../assets/word_cloud/src/js/word_cloud.js | 0 .../word_cloud/src/js/word_cloud_main.js | 0 .../assets/word_cloud/webpack.config.js | 0 .../xmodule/xmodule}/assetstore/__init__.py | 0 .../xmodule/xmodule}/assetstore/assetmgr.py | 0 .../xmodule}/assetstore/tests/__init__.py | 0 .../xmodule}/assetstore/tests/assets.xsd | 0 .../assetstore/tests/test_asset_xml.py | 0 .../xmodule/xmodule}/block_metadata_utils.py | 0 .../lib/xmodule/xmodule}/capa_module.py | 0 .../xmodule/xmodule}/conditional_module.py | 0 .../xmodule/xmodule}/contentstore/__init__.py | 0 .../xmodule/xmodule}/contentstore/content.py | 0 .../xmodule/xmodule}/contentstore/django.py | 0 .../xmodule/xmodule}/contentstore/mongo.py | 0 .../xmodule/xmodule}/contentstore/utils.py | 0 .../xmodule/xmodule}/course_metadata_utils.py | 0 .../lib/xmodule/xmodule}/course_module.py | 2 +- .../xmodule}/css/annotatable/display.scss | 0 .../xmodule/xmodule}/css/capa/display.scss | 0 .../xmodule}/css/codemirror/codemirror.scss | 0 .../lib/xmodule/xmodule}/css/editor/edit.scss | 0 .../xmodule/xmodule}/css/html/display.scss | 0 .../lib/xmodule/xmodule}/css/html/edit.scss | 0 .../lib/xmodule/xmodule}/css/lti/lti.scss | 0 .../xmodule/xmodule}/css/poll/display.scss | 0 .../xmodule/xmodule}/css/problem/edit.scss | 0 .../xmodule}/css/sequence/display.scss | 0 .../xmodule/xmodule}/css/tabs/codemirror.scss | 0 .../lib/xmodule/xmodule}/css/tabs/tabs.scss | 0 .../xmodule}/css/video/accessible_menu.scss | 0 .../xmodule/xmodule}/css/video/display.scss | 0 .../xmodule}/css/word_cloud/display.scss | 0 .../lib/xmodule/xmodule}/data.py | 0 .../decisions/0001-move-due-dates-to-db.rst | 0 .../0002-remove-mongodb-dependency.rst | 0 .../lib/xmodule/xmodule}/editing_module.py | 0 .../lib/xmodule/xmodule}/edxnotes_utils.py | 0 .../lib/xmodule/xmodule}/error_module.py | 0 .../lib/xmodule/xmodule}/errortracker.py | 0 .../lib/xmodule/xmodule}/exceptions.py | 0 .../lib/xmodule/xmodule}/fields.py | 0 .../lib/xmodule/xmodule}/graders.py | 0 .../lib/xmodule/xmodule}/hidden_module.py | 0 .../lib/xmodule/xmodule}/html_checker.py | 0 .../lib/xmodule/xmodule}/html_module.py | 0 .../js/RequireJS-namespace-undefine.js | 1 + common/lib/xmodule/xmodule/js/common_static | 1 + .../xmodule}/js/fixtures/annotatable.html | 0 .../js/fixtures/checkbox_problem.html | 0 .../js/fixtures/codeinput_problem.html | 0 .../XXXXXXXXT114-V015600_0_.m3u8 | 0 .../XXXXXXXXT114-V015600_0_0.ts | Bin .../XXXXXXXXT114-V015600_0_1.ts | Bin .../XXXXXXXXT114-V015600_0_2.ts | Bin .../XXXXXXXXT114-V015600_1_.m3u8 | 0 .../XXXXXXXXT114-V015600_1_0.ts | Bin .../XXXXXXXXT114-V015600_1_1.ts | Bin .../XXXXXXXXT114-V015600_1_2.ts | Bin .../XXXXXXXXT114-V015600_2_.m3u8 | 0 .../XXXXXXXXT114-V015600_2_0.ts | Bin .../XXXXXXXXT114-V015600_2_1.ts | Bin .../XXXXXXXXT114-V015600_2_2.ts | Bin .../XXXXXXXXT114-V015600_3_.m3u8 | 0 .../XXXXXXXXT114-V015600_3_0.ts | Bin .../XXXXXXXXT114-V015600_3_1.ts | Bin .../XXXXXXXXT114-V015600_3_2.ts | Bin .../XXXXXXXXT114-V015600_4_.m3u8 | 0 .../XXXXXXXXT114-V015600_4_0.ts | Bin .../XXXXXXXXT114-V015600_4_1.ts | Bin .../XXXXXXXXT114-V015600_4_2.ts | Bin .../xmodule/xmodule}/js/fixtures/hls/hls.m3u8 | 0 .../js/fixtures/html-edit-visual.html | 0 .../xmodule}/js/fixtures/html-editor-raw.html | 0 .../xmodule}/js/fixtures/imageinput.html | 0 .../js/fixtures/imageinput.underscore | 0 .../xmodule/xmodule}/js/fixtures/items.json | 0 .../xmodule}/js/fixtures/jsinput_problem.html | 0 .../lib/xmodule/xmodule}/js/fixtures/lti.html | 0 .../js/fixtures/matlabinput_problem.html | 0 .../xmodule/xmodule}/js/fixtures/poster.jpg | Bin .../js/fixtures/problem-with-markdown.html | 0 .../js/fixtures/problem-without-markdown.html | 0 .../xmodule/xmodule}/js/fixtures/problem.html | 0 .../xmodule}/js/fixtures/problem_content.html | 0 .../js/fixtures/problem_content_1240.html | 0 .../js/fixtures/radiobutton_problem.html | 0 .../xmodule}/js/fixtures/sequence.html | 0 .../js/fixtures/split_test_staff.html | 0 .../xmodule}/js/fixtures/tabs-edit.html | 0 .../lib/xmodule/xmodule}/js/fixtures/test.mp4 | Bin .../lib/xmodule/xmodule}/js/fixtures/test.ogv | Bin .../xmodule/xmodule}/js/fixtures/test.webm | Bin .../xmodule/xmodule}/js/fixtures/video.html | 0 .../xmodule}/js/fixtures/video_all.html | 0 .../js/fixtures/video_autoadvance.html | 0 .../fixtures/video_autoadvance_disabled.html | 0 .../xmodule}/js/fixtures/video_hls.html | 0 .../xmodule}/js/fixtures/video_html5.html | 0 .../js/fixtures/video_no_captions.html | 0 .../js/fixtures/video_with_bumper.html | 0 .../js/fixtures/video_yt_multiple.html | 0 .../js/fixtures/youtube_iframe_api.js | 0 .../lib/xmodule/xmodule}/js/karma_runner.js | 0 .../xmodule}/js/karma_runner_webpack.js | 52 ++++++------- .../xmodule/xmodule}/js/karma_xmodule.conf.js | 0 .../xmodule}/js/karma_xmodule_webpack.conf.js | 0 .../xmodule/xmodule}/js/libpeerconnection.log | 0 .../js/public/js/library_content_edit.js | 0 .../js/public/js/split_test_author_view.js | 0 .../xmodule}/js/public/js/split_test_staff.js | 0 .../js/public/js/split_test_student.js | 0 .../js/public/js/vertical_student_view.js | 0 .../js/spec/annotatable/display_spec.js | 0 .../xmodule}/js/spec/capa/display_spec.js | 0 .../xmodule}/js/spec/capa/imageinput_spec.js | 0 .../xmodule}/js/spec/collapsible_spec.js | 0 .../lib/xmodule/xmodule}/js/spec/helper.js | 0 .../xmodule}/js/spec/html/edit_spec.js | 0 .../xmodule}/js/spec/main_requirejs.js | 0 .../xmodule}/js/spec/problem/edit_spec.js | 0 .../js/spec/problem/edit_spec_hint.js | 0 .../xmodule}/js/spec/sequence/display_spec.js | 0 .../js/spec/split_test/staff_view_spec.js | 0 .../lib/xmodule/xmodule}/js/spec/tabs/edit.js | 0 .../lib/xmodule/xmodule}/js/spec/time_spec.js | 0 .../js/spec/video/async_process_spec.js | 0 .../xmodule}/js/spec/video/completion_spec.js | 0 .../xmodule}/js/spec/video/events_spec.js | 0 .../xmodule}/js/spec/video/general_spec.js | 0 .../js/spec/video/html5_video_spec.js | 0 .../xmodule}/js/spec/video/initialize_spec.js | 0 .../xmodule}/js/spec/video/iterator_spec.js | 0 .../xmodule}/js/spec/video/resizer_spec.js | 0 .../xmodule}/js/spec/video/sjson_spec.js | 0 .../js/spec/video/video_autoadvance_spec.js | 0 .../js/spec/video/video_bumper_spec.js | 0 .../js/spec/video/video_caption_spec.js | 0 .../js/spec/video/video_context_menu_spec.js | 0 .../js/spec/video/video_control_spec.js | 0 .../video/video_events_bumper_plugin_spec.js | 0 .../js/spec/video/video_events_plugin_spec.js | 0 .../js/spec/video/video_focus_grabber_spec.js | 0 .../js/spec/video/video_full_screen_spec.js | 0 .../video/video_play_pause_control_spec.js | 0 .../spec/video/video_play_placeholder_spec.js | 0 .../video/video_play_skip_control_spec.js | 0 .../js/spec/video/video_player_spec.js | 0 .../js/spec/video/video_poster_spec.js | 0 .../spec/video/video_progress_slider_spec.js | 0 .../spec/video/video_quality_control_spec.js | 0 .../video/video_save_state_plugin_spec.js | 0 .../js/spec/video/video_skip_control_spec.js | 0 .../js/spec/video/video_speed_control_spec.js | 0 .../js/spec/video/video_storage_spec.js | 0 .../spec/video/video_volume_control_spec.js | 0 .../xmodule/xmodule}/js/spec/video_helper.js | 0 .../xmodule/xmodule}/js/spec/xmodule_spec.js | 0 .../xmodule}/js/src/annotatable/display.js | 0 .../xmodule/xmodule}/js/src/capa/.gitignore | 0 .../xmodule/xmodule}/js/src/capa/display.js | 0 .../xmodule}/js/src/capa/imageinput.js | 0 .../xmodule/xmodule}/js/src/capa/schematic.js | 0 .../xmodule/xmodule}/js/src/collapsible.js | 0 .../xmodule}/js/src/conditional/display.js | 0 .../xmodule}/js/src/discussion/display.js | 0 .../xmodule/xmodule}/js/src/html/display.js | 0 .../lib/xmodule/xmodule}/js/src/html/edit.js | 0 .../xmodule}/js/src/html/imageModal.js | 0 .../xmodule}/js/src/javascript_loader.js | 0 .../lib/xmodule/xmodule}/js/src/lti/lti.js | 0 .../xmodule/xmodule}/js/src/poll/.gitignore | 0 .../lib/xmodule/xmodule}/js/src/poll/poll.js | 0 .../xmodule/xmodule}/js/src/poll/poll_main.js | 0 .../xmodule}/js/src/problem/.gitignore | 0 .../xmodule/xmodule}/js/src/problem/edit.js | 0 .../xmodule/xmodule}/js/src/raw/edit/json.js | 0 .../xmodule}/js/src/raw/edit/metadata-only.js | 0 .../xmodule/xmodule}/js/src/raw/edit/xml.js | 0 .../xmodule}/js/src/sequence/display.js | 0 .../xmodule/xmodule}/js/src/sequence/edit.js | 0 .../xmodule}/js/src/tabs/tabs-aggregator.js | 0 .../lib/xmodule/xmodule}/js/src/time.js | 0 .../xmodule/xmodule}/js/src/vertical/edit.js | 0 .../xmodule}/js/src/video/00_async_process.js | 0 .../xmodule}/js/src/video/00_component.js | 0 .../xmodule/xmodule}/js/src/video/00_i18n.js | 0 .../xmodule}/js/src/video/00_iterator.js | 0 .../xmodule}/js/src/video/00_resizer.js | 0 .../xmodule/xmodule}/js/src/video/00_sjson.js | 0 .../xmodule}/js/src/video/00_video_storage.js | 0 .../xmodule}/js/src/video/01_initialize.js | 0 .../js/src/video/025_focus_grabber.js | 0 .../js/src/video/02_html5_hls_video.js | 0 .../xmodule}/js/src/video/02_html5_video.js | 0 .../js/src/video/035_video_accessible_menu.js | 0 .../xmodule}/js/src/video/03_video_player.js | 0 .../xmodule}/js/src/video/04_video_control.js | 0 .../js/src/video/04_video_full_screen.js | 0 .../js/src/video/05_video_quality_control.js | 0 .../js/src/video/06_video_progress_slider.js | 0 .../js/src/video/07_video_volume_control.js | 0 .../video/08_video_auto_advance_control.js | 0 .../js/src/video/08_video_speed_control.js | 0 .../js/src/video/095_video_context_menu.js | 0 .../xmodule}/js/src/video/09_bumper.js | 0 .../xmodule}/js/src/video/09_completion.js | 0 .../js/src/video/09_events_bumper_plugin.js | 0 .../xmodule}/js/src/video/09_events_plugin.js | 0 .../js/src/video/09_play_pause_control.js | 0 .../js/src/video/09_play_placeholder.js | 0 .../js/src/video/09_play_skip_control.js | 0 .../xmodule}/js/src/video/09_poster.js | 0 .../js/src/video/09_save_state_plugin.js | 0 .../xmodule}/js/src/video/09_skip_control.js | 0 .../xmodule}/js/src/video/09_video_caption.js | 0 .../xmodule}/js/src/video/10_commands.js | 0 .../xmodule/xmodule}/js/src/video/10_main.js | 0 .../lib/xmodule/xmodule}/js/src/xmodule.js | 0 .../xmodule}/library_content_module.py | 0 .../xmodule/xmodule}/library_root_xblock.py | 0 .../xmodule/xmodule}/library_sourced_block.py | 0 .../lib/xmodule/xmodule}/library_tools.py | 0 .../lib/xmodule/xmodule}/lti_2_util.py | 0 .../lib/xmodule/xmodule}/lti_module.py | 0 .../lib/xmodule/xmodule}/mako_module.py | 0 .../xmodule/xmodule}/modulestore/__init__.py | 0 .../xmodule/xmodule}/modulestore/django.py | 0 .../xmodule}/modulestore/docs/index.rst | 0 .../modulestore/docs/mixedmodulestore.rst | 0 .../xmodule}/modulestore/docs/overview.rst | 0 .../xmodule}/modulestore/docs/split-mongo.rst | 0 .../lib/xmodule/xmodule}/modulestore/draft.py | 0 .../modulestore/draft_and_published.py | 0 .../xmodule/xmodule}/modulestore/edit_info.py | 0 .../xmodule}/modulestore/exceptions.py | 0 .../xmodule}/modulestore/inheritance.py | 0 .../lib/xmodule/xmodule}/modulestore/mixed.py | 0 .../modulestore/modulestore_settings.py | 0 .../xmodule}/modulestore/mongo/__init__.py | 0 .../xmodule}/modulestore/mongo/base.py | 0 .../xmodule}/modulestore/mongo/draft.py | 0 .../modulestore/mongoengine_fields.py | 0 .../modulestore/perf_tests/__init__.py | 0 .../perf_tests/generate_asset_xml.py | 0 .../modulestore/perf_tests/generate_report.py | 0 .../perf_tests/test_asset_import_export.py | 2 +- .../xmodule/xmodule}/modulestore/search.py | 0 .../xmodule}/modulestore/split_migrator.py | 0 .../modulestore/split_mongo/__init__.py | 0 .../split_mongo/caching_descriptor_system.py | 0 .../split_mongo/definition_lazy_loader.py | 0 .../modulestore/split_mongo/id_manager.py | 0 .../split_mongo/mongo_connection.py | 2 +- .../xmodule}/modulestore/split_mongo/split.py | 4 +- .../modulestore/split_mongo/split_draft.py | 0 .../split_mongo/split_mongo_kvs.py | 0 .../xmodule}/modulestore/store_utilities.py | 0 .../xmodule}/modulestore/tests/__init__.py | 0 .../modulestore/tests/django_utils.py | 2 +- .../xmodule}/modulestore/tests/factories.py | 0 .../modulestore/tests/mongo_connection.py | 0 .../modulestore/tests/sample_courses.py | 0 .../modulestore/tests/test_abstraction.py | 0 .../xmodule}/modulestore/tests/test_asides.py | 0 .../modulestore/tests/test_assetstore.py | 0 .../modulestore/tests/test_contentstore.py | 2 +- .../test_cross_modulestore_import_export.py | 0 .../modulestore/tests/test_inheritance.py | 0 .../modulestore/tests/test_libraries.py | 0 .../tests/test_mixed_modulestore.py | 0 .../modulestore/tests/test_modulestore.py | 0 .../tests/test_modulestore_settings.py | 0 .../xmodule}/modulestore/tests/test_mongo.py | 2 +- .../tests/test_mongo_call_count.py | 0 .../modulestore/tests/test_publish.py | 0 .../modulestore/tests/test_semantics.py | 0 .../tests/test_split_copy_from_template.py | 0 .../modulestore/tests/test_split_migrator.py | 0 .../tests/test_split_modulestore.py | 5 ++ .../test_split_modulestore_bulk_operations.py | 0 .../test_split_mongo_mongo_connection.py | 0 .../tests/test_split_w_old_mongo.py | 0 .../modulestore/tests/test_store_utilities.py | 0 .../xmodule}/modulestore/tests/test_xml.py | 0 .../modulestore/tests/test_xml_importer.py | 0 .../xmodule}/modulestore/tests/utils.py | 0 .../lib/xmodule/xmodule}/modulestore/xml.py | 0 .../xmodule}/modulestore/xml_exporter.py | 0 .../xmodule}/modulestore/xml_importer.py | 0 .../lib/xmodule/xmodule}/mongo_utils.py | 0 .../xmodule/xmodule}/partitions/__init__.py | 0 .../enrollment_track_partition_generator.py | 0 .../xmodule/xmodule}/partitions/partitions.py | 0 .../xmodule}/partitions/partitions_service.py | 0 .../xmodule}/partitions/tests/__init__.py | 0 .../partitions/tests/test_partitions.py | 0 .../lib/xmodule/xmodule}/poll_module.py | 3 +- .../lib/xmodule/xmodule}/progress.py | 0 .../lib/xmodule/xmodule}/randomize_module.py | 0 .../lib/xmodule/xmodule}/raw_module.py | 0 .../lib/xmodule/xmodule}/seq_module.py | 5 +- .../lib/xmodule/xmodule}/services.py | 3 +- .../lib/xmodule/xmodule}/split_test_module.py | 0 .../lib/xmodule/xmodule}/static_content.py | 0 .../lib/xmodule/xmodule}/stringify.py | 0 .../lib/xmodule/xmodule}/studio_editable.py | 0 .../lib/xmodule/xmodule}/tabs.py | 0 .../lib/xmodule/xmodule}/template_module.py | 0 .../lib/xmodule/xmodule}/templates.py | 0 .../xmodule}/templates/about/overview.yaml | 0 .../xmodule}/templates/html/announcement.yaml | 0 .../xmodule}/templates/html/anon_user_id.yaml | 0 .../xmodule}/templates/html/iframe.yaml | 0 .../xmodule}/templates/html/latex_html.yaml | 0 .../xmodule/xmodule}/templates/html/raw.yaml | 0 .../templates/html/zooming_image.yaml | 0 .../library-sourced-block-studio-view.html | 0 .../templates/problem/blank_common.yaml | 0 .../problem/checkboxes_response.yaml | 0 .../problem/checkboxes_response_hint.yaml | 0 .../templates/problem/circuitschematic.yaml | 0 .../templates/problem/customgrader.yaml | 0 .../templates/problem/drag_and_drop.yaml | 0 .../templates/problem/formularesponse.yaml | 0 .../templates/problem/imageresponse.yaml | 0 .../templates/problem/jsinput_response.yaml | 0 .../templates/problem/latex_problem.yaml | 0 .../templates/problem/multiplechoice.yaml | 0 .../problem/multiplechoice_hint.yaml | 0 .../templates/problem/numericalresponse.yaml | 0 .../problem/numericalresponse_hint.yaml | 0 .../templates/problem/optionresponse.yaml | 0 .../problem/optionresponse_hint.yaml | 0 .../templates/problem/problem_with_hint.yaml | 0 .../problem/problem_with_hint_in_latex.yaml | 0 .../templates/problem/string_response.yaml | 0 .../problem/string_response_hint.yaml | 0 .../xmodule}/templates/test/announcement.yaml | 0 .../xmodule}/templates/test/anon_user_id.yaml | 0 .../xmodule}/templates/test/latex_html.yaml | 0 .../xmodule}/templates/test/somefile.notyaml | 0 .../templates/test/zooming_image.yaml | 0 .../lib/xmodule/xmodule}/tests/__init__.py | 8 +- .../xmodule/tests/data/xml-course-root | 1 + .../lib/xmodule/xmodule}/tests/helpers.py | 0 .../xmodule}/tests/rendering/__init__.py | 0 .../xmodule/xmodule}/tests/rendering/core.py | 0 .../xmodule}/tests/test_annotatable_module.py | 0 .../xmodule}/tests/test_annotator_mixin.py | 0 .../xmodule}/tests/test_capa_module.py | 2 +- .../xmodule}/tests/test_conditional.py | 0 .../xmodule/xmodule}/tests/test_content.py | 0 .../tests/test_course_metadata_utils.py | 0 .../xmodule}/tests/test_course_module.py | 0 .../tests/test_delay_between_attempts.py | 0 .../xmodule}/tests/test_editing_module.py | 0 .../xmodule}/tests/test_error_module.py | 2 + .../lib/xmodule/xmodule}/tests/test_export.py | 0 .../lib/xmodule/xmodule}/tests/test_fields.py | 0 .../test_files/test_tabseditingdescriptor.css | 0 .../test_tabseditingdescriptor.scss | 0 .../xmodule/xmodule}/tests/test_graders.py | 0 .../xmodule}/tests/test_html_module.py | 0 .../lib/xmodule/xmodule}/tests/test_import.py | 0 .../xmodule}/tests/test_import_static.py | 0 .../xmodule}/tests/test_library_content.py | 2 +- .../xmodule}/tests/test_library_root.py | 0 .../tests/test_library_sourced_block.py | 0 .../xmodule}/tests/test_library_tools.py | 0 .../xmodule/xmodule}/tests/test_lti20_unit.py | 0 .../xmodule/xmodule}/tests/test_lti_unit.py | 0 .../xmodule}/tests/test_mako_module.py | 0 .../xmodule}/tests/test_mongo_utils.py | 0 .../lib/xmodule/xmodule}/tests/test_poll.py | 0 .../xmodule/xmodule}/tests/test_progress.py | 0 .../xmodule}/tests/test_randomize_module.py | 0 .../xmodule}/tests/test_resource_templates.py | 0 .../xmodule/xmodule}/tests/test_sequence.py | 0 .../xmodule/xmodule}/tests/test_services.py | 0 .../xmodule}/tests/test_split_test_module.py | 0 .../xmodule/xmodule}/tests/test_stringify.py | 0 .../xmodule}/tests/test_studio_editable.py | 0 .../lib/xmodule/xmodule}/tests/test_tabs.py | 0 .../xmodule/xmodule}/tests/test_unit_block.py | 0 .../xmodule}/tests/test_util_duedate.py | 0 .../xmodule}/tests/test_utils_django.py | 0 .../test_utils_escape_html_characters.py | 0 .../xmodule/xmodule}/tests/test_validation.py | 0 .../xmodule/xmodule}/tests/test_vertical.py | 0 .../lib/xmodule/xmodule}/tests/test_video.py | 4 +- .../xmodule/xmodule}/tests/test_word_cloud.py | 0 .../xmodule/xmodule}/tests/test_xml_module.py | 0 .../xmodule/xmodule}/tests/xml/__init__.py | 0 .../xmodule/xmodule}/tests/xml/factories.py | 0 .../xmodule}/tests/xml/test_inheritance.py | 0 .../xmodule/xmodule}/tests/xml/test_policy.py | 0 .../lib/xmodule/xmodule}/timeinfo.py | 0 .../lib/xmodule/xmodule}/unit_block.py | 0 .../lib/xmodule/xmodule}/util/__init__.py | 0 .../lib/xmodule/xmodule}/util/duedate.py | 0 .../lib/xmodule/xmodule}/util/misc.py | 2 +- .../lib/xmodule/xmodule}/util/sandboxing.py | 0 .../xmodule/xmodule}/util/xmodule_django.py | 0 .../lib/xmodule/xmodule}/validation.py | 0 .../lib/xmodule/xmodule}/vertical_block.py | 0 .../xmodule/xmodule}/video_module/__init__.py | 0 .../xmodule}/video_module/bumper_utils.py | 0 .../video_module/transcripts_utils.py | 0 .../xmodule}/video_module/video_handlers.py | 0 .../xmodule}/video_module/video_module.py | 2 +- .../xmodule}/video_module/video_utils.py | 0 .../xmodule}/video_module/video_xfields.py | 0 .../lib/xmodule/xmodule}/word_cloud_module.py | 0 .../lib/xmodule/xmodule}/wrapper_module.py | 0 .../lib/xmodule/xmodule}/x_module.py | 9 ++- .../lib/xmodule/xmodule}/xml_module.py | 0 common/static/css/tinymce-studio-content.css | 2 +- docs/guides/conf.py | 4 +- docs/guides/docstrings/common_lib.rst | 1 + docs/guides/docstrings/docstrings.rst | 1 - docs/guides/testing/testing.rst | 10 +-- docs/swagger.yaml | 2 +- lms/djangoapps/ccx/tests/test_views.py | 4 +- .../course_home_api/progress/views.py | 2 +- lms/djangoapps/courseware/tests/helpers.py | 2 +- .../courseware/tests/test_entrance_exam.py | 6 +- .../courseware/tests/test_video_xml.py | 4 +- lms/djangoapps/grades/docs/background.rst | 18 ++--- .../v1/tests/test_grading_policy_view.py | 4 +- lms/djangoapps/grades/tests/base.py | 4 +- .../grades/tests/integration/test_problems.py | 4 +- .../instructor/tests/test_enrollment.py | 4 +- .../instructor_task/tests/test_base.py | 4 +- .../learner_dashboard/tests/test_programs.py | 4 +- lms/static/xmodule_js | 2 +- .../enrollment_track_partition_groups.py | 3 +- .../discussions/tests/test_tasks.py | 5 +- .../core/djangoapps/xblock/runtime/shims.py | 2 +- pavelib/assets.py | 4 +- pavelib/quality.py | 2 +- pavelib/utils/envs.py | 4 +- requirements/edx/base.in | 4 - requirements/edx/base.txt | 16 ++-- requirements/edx/development.txt | 15 +++- requirements/edx/local.in | 1 + requirements/edx/testing.txt | 15 +++- scripts/unit-tests.sh | 2 +- scripts/verify-dunder-init.sh | 10 +-- setup.py | 49 ------------- webpack-config/file-lists.js | 2 +- webpack.common.config.js | 15 ++-- xmodule/js/RequireJS-namespace-undefine.js | 1 - xmodule/js/common_static | 1 - xmodule/tests/data/xml-course-root | 1 - 487 files changed, 339 insertions(+), 216 deletions(-) create mode 100644 common/lib/xmodule/setup.py create mode 100644 common/lib/xmodule/test_files/formularesponse_with_hint.xml create mode 100644 common/lib/xmodule/test_files/stringresponse_with_hint.xml create mode 100644 common/lib/xmodule/test_files/symbolicresponse.xml rename {xmodule => common/lib/xmodule/xmodule}/README.rst (100%) rename {xmodule => common/lib/xmodule/xmodule}/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/annotatable_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/annotator_mixin.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/library_content/public/js/library_content_edit.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/library_content/public/js/library_content_reset.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/library_source_block/LibrarySourcedBlockPicker.jsx (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/library_source_block/public/js/library_source_block.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/library_source_block/style.css (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/split_test/public/js/split_test_author_view.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/split_test/public/js/split_test_staff.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/split_test/public/js/split_test_student.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/vertical/public/js/vertical_student_view.js (94%) rename {xmodule => common/lib/xmodule/xmodule}/assets/word_cloud/.eslintrc.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/word_cloud/.gitignore (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/word_cloud/src/js/d3.layout.cloud.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/word_cloud/src/js/d3.min.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/word_cloud/src/js/word_cloud.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/word_cloud/src/js/word_cloud_main.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assets/word_cloud/webpack.config.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/assetstore/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/assetstore/assetmgr.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/assetstore/tests/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/assetstore/tests/assets.xsd (100%) rename {xmodule => common/lib/xmodule/xmodule}/assetstore/tests/test_asset_xml.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/block_metadata_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/capa_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/conditional_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/contentstore/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/contentstore/content.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/contentstore/django.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/contentstore/mongo.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/contentstore/utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/course_metadata_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/course_module.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/css/annotatable/display.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/capa/display.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/codemirror/codemirror.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/editor/edit.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/html/display.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/html/edit.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/lti/lti.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/poll/display.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/problem/edit.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/sequence/display.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/tabs/codemirror.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/tabs/tabs.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/video/accessible_menu.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/video/display.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/css/word_cloud/display.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/data.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/docs/decisions/0001-move-due-dates-to-db.rst (100%) rename {xmodule => common/lib/xmodule/xmodule}/docs/decisions/0002-remove-mongodb-dependency.rst (100%) rename {xmodule => common/lib/xmodule/xmodule}/editing_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/edxnotes_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/error_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/errortracker.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/exceptions.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/fields.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/graders.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/hidden_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/html_checker.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/html_module.py (100%) create mode 120000 common/lib/xmodule/xmodule/js/RequireJS-namespace-undefine.js create mode 120000 common/lib/xmodule/xmodule/js/common_static rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/annotatable.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/checkbox_problem.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/codeinput_problem.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_.m3u8 (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_0.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_1.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_2.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_.m3u8 (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_0.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_1.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_2.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_.m3u8 (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_0.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_1.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_2.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_.m3u8 (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_0.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_1.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_2.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_.m3u8 (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_0.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_1.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_2.ts (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/hls/hls.m3u8 (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/html-edit-visual.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/html-editor-raw.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/imageinput.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/imageinput.underscore (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/items.json (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/jsinput_problem.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/lti.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/matlabinput_problem.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/poster.jpg (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/problem-with-markdown.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/problem-without-markdown.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/problem.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/problem_content.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/problem_content_1240.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/radiobutton_problem.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/sequence.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/split_test_staff.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/tabs-edit.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/test.mp4 (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/test.ogv (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/test.webm (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_all.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_autoadvance.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_autoadvance_disabled.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_hls.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_html5.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_no_captions.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_with_bumper.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/video_yt_multiple.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/fixtures/youtube_iframe_api.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/karma_runner.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/karma_runner_webpack.js (57%) rename {xmodule => common/lib/xmodule/xmodule}/js/karma_xmodule.conf.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/karma_xmodule_webpack.conf.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/libpeerconnection.log (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/public/js/library_content_edit.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/public/js/split_test_author_view.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/public/js/split_test_staff.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/public/js/split_test_student.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/public/js/vertical_student_view.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/annotatable/display_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/capa/display_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/capa/imageinput_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/collapsible_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/helper.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/html/edit_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/main_requirejs.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/problem/edit_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/problem/edit_spec_hint.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/sequence/display_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/split_test/staff_view_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/tabs/edit.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/time_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/async_process_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/completion_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/events_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/general_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/html5_video_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/initialize_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/iterator_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/resizer_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/sjson_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_autoadvance_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_bumper_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_caption_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_context_menu_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_control_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_events_bumper_plugin_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_events_plugin_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_focus_grabber_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_full_screen_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_play_pause_control_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_play_placeholder_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_play_skip_control_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_player_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_poster_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_progress_slider_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_quality_control_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_save_state_plugin_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_skip_control_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_speed_control_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_storage_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video/video_volume_control_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/video_helper.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/spec/xmodule_spec.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/annotatable/display.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/capa/.gitignore (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/capa/display.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/capa/imageinput.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/capa/schematic.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/collapsible.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/conditional/display.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/discussion/display.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/html/display.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/html/edit.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/html/imageModal.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/javascript_loader.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/lti/lti.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/poll/.gitignore (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/poll/poll.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/poll/poll_main.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/problem/.gitignore (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/problem/edit.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/raw/edit/json.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/raw/edit/metadata-only.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/raw/edit/xml.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/sequence/display.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/sequence/edit.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/tabs/tabs-aggregator.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/time.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/vertical/edit.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/00_async_process.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/00_component.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/00_i18n.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/00_iterator.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/00_resizer.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/00_sjson.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/00_video_storage.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/01_initialize.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/025_focus_grabber.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/02_html5_hls_video.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/02_html5_video.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/035_video_accessible_menu.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/03_video_player.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/04_video_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/04_video_full_screen.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/05_video_quality_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/06_video_progress_slider.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/07_video_volume_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/08_video_auto_advance_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/08_video_speed_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/095_video_context_menu.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_bumper.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_completion.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_events_bumper_plugin.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_events_plugin.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_play_pause_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_play_placeholder.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_play_skip_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_poster.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_save_state_plugin.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_skip_control.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/09_video_caption.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/10_commands.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/video/10_main.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/js/src/xmodule.js (100%) rename {xmodule => common/lib/xmodule/xmodule}/library_content_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/library_root_xblock.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/library_sourced_block.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/library_tools.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/lti_2_util.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/lti_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/mako_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/django.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/docs/index.rst (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/docs/mixedmodulestore.rst (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/docs/overview.rst (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/docs/split-mongo.rst (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/draft.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/draft_and_published.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/edit_info.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/exceptions.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/inheritance.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/mixed.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/modulestore_settings.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/mongo/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/mongo/base.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/mongo/draft.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/mongoengine_fields.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/perf_tests/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/perf_tests/generate_asset_xml.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/perf_tests/generate_report.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/perf_tests/test_asset_import_export.py (98%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/search.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_migrator.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/caching_descriptor_system.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/definition_lazy_loader.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/id_manager.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/mongo_connection.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/split.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/split_draft.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/split_mongo/split_mongo_kvs.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/store_utilities.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/django_utils.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/factories.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/mongo_connection.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/sample_courses.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_abstraction.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_asides.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_assetstore.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_contentstore.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_cross_modulestore_import_export.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_inheritance.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_libraries.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_mixed_modulestore.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_modulestore.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_modulestore_settings.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_mongo.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_mongo_call_count.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_publish.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_semantics.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_split_copy_from_template.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_split_migrator.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_split_modulestore.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_split_modulestore_bulk_operations.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_split_mongo_mongo_connection.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_split_w_old_mongo.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_store_utilities.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_xml.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/test_xml_importer.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/tests/utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/xml.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/xml_exporter.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/modulestore/xml_importer.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/mongo_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/partitions/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/partitions/enrollment_track_partition_generator.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/partitions/partitions.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/partitions/partitions_service.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/partitions/tests/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/partitions/tests/test_partitions.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/poll_module.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/progress.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/randomize_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/raw_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/seq_module.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/services.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/split_test_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/static_content.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/stringify.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/studio_editable.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tabs.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/template_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/about/overview.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/html/announcement.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/html/anon_user_id.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/html/iframe.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/html/latex_html.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/html/raw.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/html/zooming_image.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/library-sourced-block-studio-view.html (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/blank_common.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/checkboxes_response.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/checkboxes_response_hint.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/circuitschematic.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/customgrader.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/drag_and_drop.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/formularesponse.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/imageresponse.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/jsinput_response.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/latex_problem.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/multiplechoice.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/multiplechoice_hint.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/numericalresponse.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/numericalresponse_hint.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/optionresponse.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/optionresponse_hint.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/problem_with_hint.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/problem_with_hint_in_latex.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/string_response.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/problem/string_response_hint.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/test/announcement.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/test/anon_user_id.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/test/latex_html.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/test/somefile.notyaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/templates/test/zooming_image.yaml (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/__init__.py (99%) create mode 120000 common/lib/xmodule/xmodule/tests/data/xml-course-root rename {xmodule => common/lib/xmodule/xmodule}/tests/helpers.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/rendering/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/rendering/core.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_annotatable_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_annotator_mixin.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_capa_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_conditional.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_content.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_course_metadata_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_course_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_delay_between_attempts.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_editing_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_error_module.py (97%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_export.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_fields.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_files/test_tabseditingdescriptor.css (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_files/test_tabseditingdescriptor.scss (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_graders.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_html_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_import.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_import_static.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_library_content.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_library_root.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_library_sourced_block.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_library_tools.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_lti20_unit.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_lti_unit.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_mako_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_mongo_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_poll.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_progress.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_randomize_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_resource_templates.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_sequence.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_services.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_split_test_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_stringify.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_studio_editable.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_tabs.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_unit_block.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_util_duedate.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_utils_django.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_utils_escape_html_characters.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_validation.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_vertical.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_video.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_word_cloud.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/test_xml_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/xml/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/xml/factories.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/xml/test_inheritance.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/tests/xml/test_policy.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/timeinfo.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/unit_block.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/util/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/util/duedate.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/util/misc.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/util/sandboxing.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/util/xmodule_django.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/validation.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/vertical_block.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/video_module/__init__.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/video_module/bumper_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/video_module/transcripts_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/video_module/video_handlers.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/video_module/video_module.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/video_module/video_utils.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/video_module/video_xfields.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/word_cloud_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/wrapper_module.py (100%) rename {xmodule => common/lib/xmodule/xmodule}/x_module.py (99%) rename {xmodule => common/lib/xmodule/xmodule}/xml_module.py (100%) delete mode 120000 xmodule/js/RequireJS-namespace-undefine.js delete mode 120000 xmodule/js/common_static delete mode 120000 xmodule/tests/data/xml-course-root diff --git a/.coveragerc b/.coveragerc index 397a19c100..f50f1a0b5b 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,11 +5,11 @@ source = cms common/djangoapps common/lib/capa + common/lib/xmodule lms openedx pavelib scripts - xmodule omit = cms/envs/* diff --git a/.coveragerc-local b/.coveragerc-local index a651388835..e2342d8bda 100644 --- a/.coveragerc-local +++ b/.coveragerc-local @@ -10,7 +10,6 @@ source = openedx pavelib scripts - xmodule omit = cms/envs/* diff --git a/.eslintignore b/.eslintignore index 87fc6073da..60f59bde2a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -20,7 +20,7 @@ test_root/staticfiles common/static/xmodule -# Symlinks into xmodule/js +# Symlinks into common/lib/xmodule/xmodule/js cms/static/xmodule_js lms/static/xmodule_js @@ -50,6 +50,12 @@ common/lib/capa/capa/tests/test_files/js/test_problem_display.js common/lib/capa/capa/tests/test_files/js/test_problem_generator.js common/lib/capa/capa/tests/test_files/js/test_problem_grader.js common/lib/capa/capa/tests/test_files/js/xproblem.js +common/lib/xmodule/xmodule/js/spec/annotatable/display_spec.js +common/lib/xmodule/xmodule/js/spec/capa/display_spec.js +common/lib/xmodule/xmodule/js/spec/html/edit_spec.js +common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.js +common/lib/xmodule/xmodule/js/spec/problem/edit_spec.js +common/lib/xmodule/xmodule/js/spec/tabs/edit.js lms/static/js/spec/calculator_spec.js lms/static/js/spec/courseware_spec.js lms/static/js/spec/feedback_form_spec.js @@ -57,12 +63,6 @@ lms/static/js/spec/helper.js lms/static/js/spec/histogram_spec.js lms/static/js/spec/modules/tab_spec.js lms/static/js/spec/requirejs_spec.js -xmodule/js/spec/annotatable/display_spec.js -xmodule/js/spec/capa/display_spec.js -xmodule/js/spec/html/edit_spec.js -xmodule/js/spec/problem/edit_spec_hint.js -xmodule/js/spec/problem/edit_spec.js -xmodule/js/spec/tabs/edit.js !**/.eslintrc.js diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 05941dbaca..a8500e3b56 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,6 +3,7 @@ # Core common/djangoapps/student/ common/djangoapps/third_party_auth/ +common/lib/xmodule/xmodule/ lms/djangoapps/course_api/blocks lms/djangoapps/courseware/ lms/djangoapps/grades/ @@ -14,7 +15,6 @@ openedx/core/djangoapps/oauth_dispatch openedx/core/djangoapps/user_api/ openedx/core/djangoapps/user_authn/ openedx/features/course_experience/ -xmodule/ # Core Extensions common/lib/xmodule/xmodule/capa_module.py diff --git a/.github/actions/verify-tests-count/action.yml b/.github/actions/verify-tests-count/action.yml index d7229af505..6357a4158c 100644 --- a/.github/actions/verify-tests-count/action.yml +++ b/.github/actions/verify-tests-count/action.yml @@ -7,7 +7,7 @@ runs: shell: bash run: | echo "root_cms_unit_tests_count=$(pytest --collect-only --ds=cms.envs.test cms/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV - echo "root_lms_unit_tests_count=$(pytest --collect-only --ds=lms.envs.test lms/ openedx/ common/djangoapps/ common/lib/ xmodule/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV + echo "root_lms_unit_tests_count=$(pytest --collect-only --ds=lms.envs.test lms/ openedx/ common/djangoapps/ common/lib/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV - name: get GHA unit test paths shell: bash diff --git a/.github/workflows/pylint-checks.yml b/.github/workflows/pylint-checks.yml index f1e3d02bba..e64999afb4 100644 --- a/.github/workflows/pylint-checks.yml +++ b/.github/workflows/pylint-checks.yml @@ -26,8 +26,6 @@ jobs: path: "common" - module-name: cms path: "cms" - - module-name: xmodule - path: "xmodule" name: pylint ${{ matrix.module-name }} diff --git a/.github/workflows/unit-test-shards.json b/.github/workflows/unit-test-shards.json index 15d5ce270e..d106c71e04 100644 --- a/.github/workflows/unit-test-shards.json +++ b/.github/workflows/unit-test-shards.json @@ -270,11 +270,5 @@ "paths": [ "common/djangoapps/" ] - }, - "xmodule-1": { - "settings": "lms.envs.test", - "paths": [ - "xmodule/" - ] } } diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index dfe2412a24..21345cb320 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -32,7 +32,6 @@ jobs: "common-1", "common-2", "common-3", - "xmodule-1" ] diff --git a/.stylelintignore b/.stylelintignore index cd53bacf3c..d30a987fcd 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,4 +1,4 @@ -xmodule/css +common/lib/xmodule/xmodule/css common/static/sass/bourbon common/static/xmodule/modules/css common/test/test-theme diff --git a/cms/static/cms/js/require-config.js b/cms/static/cms/js/require-config.js index e6fbc304db..2b71ba3a4c 100644 --- a/cms/static/cms/js/require-config.js +++ b/cms/static/cms/js/require-config.js @@ -123,7 +123,7 @@ 'backbone.paginator': 'common/js/vendor/backbone.paginator', 'tinymce': 'js/vendor/tinymce/js/tinymce/tinymce.full.min', 'jquery.tinymce': 'js/vendor/tinymce/js/tinymce/jquery.tinymce.min', - 'xmodule': '/xmodule', + 'xmodule': '/xmodule/xmodule', 'xblock/cms.runtime.v1': 'cms/js/xblock/cms.runtime.v1', 'xblock': 'common/js/xblock', 'utility': 'js/src/utility', diff --git a/cms/static/xmodule_js b/cms/static/xmodule_js index 8e376468e6..6e6ff3566f 120000 --- a/cms/static/xmodule_js +++ b/cms/static/xmodule_js @@ -1 +1 @@ -../../xmodule/js \ No newline at end of file +../../common/lib/xmodule/xmodule/js/ \ No newline at end of file diff --git a/common/lib/xmodule/setup.py b/common/lib/xmodule/setup.py new file mode 100644 index 0000000000..951a206404 --- /dev/null +++ b/common/lib/xmodule/setup.py @@ -0,0 +1,69 @@ +# lint-amnesty, pylint: disable=missing-module-docstring + +from setuptools import find_packages, setup + +XBLOCKS = [ + "about = xmodule.html_module:AboutBlock", + "book = xmodule.template_module:TranslateCustomTagBlock", + "annotatable = xmodule.annotatable_module:AnnotatableBlock", + "chapter = xmodule.seq_module:SectionBlock", + "conditional = xmodule.conditional_module:ConditionalBlock", + "course = xmodule.course_module:CourseBlock", + "course_info = xmodule.html_module:CourseInfoBlock", + "customtag = xmodule.template_module:CustomTagBlock", + "custom_tag_template = xmodule.template_module:CustomTagTemplateBlock", + "discuss = xmodule.template_module:TranslateCustomTagBlock", + "error = xmodule.error_module:ErrorBlock", + "hidden = xmodule.hidden_module:HiddenDescriptor", + "html = xmodule.html_module:HtmlBlock", + "image = xmodule.template_module:TranslateCustomTagBlock", + "library = xmodule.library_root_xblock:LibraryRoot", + "library_content = xmodule.library_content_module:LibraryContentBlock", + "library_sourced = xmodule.library_sourced_block:LibrarySourcedBlock", + "lti = xmodule.lti_module:LTIBlock", + "nonstaff_error = xmodule.error_module:NonStaffErrorBlock", + "poll_question = xmodule.poll_module:PollBlock", + "problem = xmodule.capa_module:ProblemBlock", + "randomize = xmodule.randomize_module:RandomizeBlock", + "sequential = xmodule.seq_module:SequenceBlock", + "slides = xmodule.template_module:TranslateCustomTagBlock", + "split_test = xmodule.split_test_module:SplitTestBlock", + "static_tab = xmodule.html_module:StaticTabBlock", + "unit = xmodule.unit_block:UnitBlock", + "vertical = xmodule.vertical_block:VerticalBlock", + "video = xmodule.video_module:VideoBlock", + "videoalpha = xmodule.video_module:VideoBlock", + "videodev = xmodule.template_module:TranslateCustomTagBlock", + "word_cloud = xmodule.word_cloud_module:WordCloudBlock", + "wrapper = xmodule.wrapper_module:WrapperBlock", +] +XBLOCKS_ASIDES = [ + 'tagging_aside = cms.lib.xblock.tagging:StructuredTagsAside', +] + +setup( + name="XModule", + version="0.1.2", + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'setuptools', + 'docopt', + 'capa', + 'path.py', + 'webob', + 'edx-opaque-keys>=0.4.0', + ], + package_data={ + 'xmodule': ['js/module/*'], + }, + + # See https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins + # for a description of entry_points + entry_points={ + 'xblock.v1': XBLOCKS, + 'xblock_asides.v1': XBLOCKS_ASIDES, + 'console_scripts': [ + 'xmodule_assets = xmodule.static_content:main', + ], + }, +) diff --git a/common/lib/xmodule/test_files/formularesponse_with_hint.xml b/common/lib/xmodule/test_files/formularesponse_with_hint.xml new file mode 100644 index 0000000000..94d4ff9aa5 --- /dev/null +++ b/common/lib/xmodule/test_files/formularesponse_with_hint.xml @@ -0,0 +1,45 @@ + + + + +

Hints can be provided to students, based on the last response given, as well as the history of responses given. Here is an example of a hint produced by a Formula Response problem.

+ +

+What is the equation of the line which passess through ($x1,$y1) and +($x2,$y2)?

+ +

The correct answer is $answer. A common error is to invert the equation for the slope. Enter +$wrongans to see a hint.

+ +
+ + + + y = + + + + + You have inverted the slope in the question. + + + +
+ diff --git a/common/lib/xmodule/test_files/stringresponse_with_hint.xml b/common/lib/xmodule/test_files/stringresponse_with_hint.xml new file mode 100644 index 0000000000..86efdf0f18 --- /dev/null +++ b/common/lib/xmodule/test_files/stringresponse_with_hint.xml @@ -0,0 +1,25 @@ + +

Example: String Response Problem

+
+
+ + Which US state has Lansing as its capital? + + + + + + + + + The state capital of Wisconsin is Madison. + + + The state capital of Minnesota is St. Paul. + + + The state you are looking for is also known as the 'Great Lakes State' + + + +
diff --git a/common/lib/xmodule/test_files/symbolicresponse.xml b/common/lib/xmodule/test_files/symbolicresponse.xml new file mode 100644 index 0000000000..8443366ffe --- /dev/null +++ b/common/lib/xmodule/test_files/symbolicresponse.xml @@ -0,0 +1,26 @@ + + +

Example: Symbolic Math Response Problem

+ +

+A symbolic math response problem presents one or more symbolic math +input fields for input. Correctness of input is evaluated based on +the symbolic properties of the expression entered. The student enters +text, but sees a proper symbolic rendition of the entered formula, in +real time, next to the input box. +

+ +

This is a correct answer which may be entered below:

+

cos(theta)*[[1,0],[0,1]] + i*sin(theta)*[[0,1],[1,0]]

+ + Compute [mathjax] U = \exp\left( i \theta \left[ \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \right] \right) [/mathjax] + and give the resulting \(2 \times 2\) matrix.
+ Your input should be typed in as a list of lists, eg [[1,2],[3,4]].
+ [mathjax]U=[/mathjax] + + +
+
+ +
+
diff --git a/xmodule/README.rst b/common/lib/xmodule/xmodule/README.rst similarity index 100% rename from xmodule/README.rst rename to common/lib/xmodule/xmodule/README.rst diff --git a/xmodule/__init__.py b/common/lib/xmodule/xmodule/__init__.py similarity index 100% rename from xmodule/__init__.py rename to common/lib/xmodule/xmodule/__init__.py diff --git a/xmodule/annotatable_module.py b/common/lib/xmodule/xmodule/annotatable_module.py similarity index 100% rename from xmodule/annotatable_module.py rename to common/lib/xmodule/xmodule/annotatable_module.py diff --git a/xmodule/annotator_mixin.py b/common/lib/xmodule/xmodule/annotator_mixin.py similarity index 100% rename from xmodule/annotator_mixin.py rename to common/lib/xmodule/xmodule/annotator_mixin.py diff --git a/xmodule/assets/library_content/public/js/library_content_edit.js b/common/lib/xmodule/xmodule/assets/library_content/public/js/library_content_edit.js similarity index 100% rename from xmodule/assets/library_content/public/js/library_content_edit.js rename to common/lib/xmodule/xmodule/assets/library_content/public/js/library_content_edit.js diff --git a/xmodule/assets/library_content/public/js/library_content_reset.js b/common/lib/xmodule/xmodule/assets/library_content/public/js/library_content_reset.js similarity index 100% rename from xmodule/assets/library_content/public/js/library_content_reset.js rename to common/lib/xmodule/xmodule/assets/library_content/public/js/library_content_reset.js diff --git a/xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx b/common/lib/xmodule/xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx similarity index 100% rename from xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx rename to common/lib/xmodule/xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx diff --git a/xmodule/assets/library_source_block/public/js/library_source_block.js b/common/lib/xmodule/xmodule/assets/library_source_block/public/js/library_source_block.js similarity index 100% rename from xmodule/assets/library_source_block/public/js/library_source_block.js rename to common/lib/xmodule/xmodule/assets/library_source_block/public/js/library_source_block.js diff --git a/xmodule/assets/library_source_block/style.css b/common/lib/xmodule/xmodule/assets/library_source_block/style.css similarity index 100% rename from xmodule/assets/library_source_block/style.css rename to common/lib/xmodule/xmodule/assets/library_source_block/style.css diff --git a/xmodule/assets/split_test/public/js/split_test_author_view.js b/common/lib/xmodule/xmodule/assets/split_test/public/js/split_test_author_view.js similarity index 100% rename from xmodule/assets/split_test/public/js/split_test_author_view.js rename to common/lib/xmodule/xmodule/assets/split_test/public/js/split_test_author_view.js diff --git a/xmodule/assets/split_test/public/js/split_test_staff.js b/common/lib/xmodule/xmodule/assets/split_test/public/js/split_test_staff.js similarity index 100% rename from xmodule/assets/split_test/public/js/split_test_staff.js rename to common/lib/xmodule/xmodule/assets/split_test/public/js/split_test_staff.js diff --git a/xmodule/assets/split_test/public/js/split_test_student.js b/common/lib/xmodule/xmodule/assets/split_test/public/js/split_test_student.js similarity index 100% rename from xmodule/assets/split_test/public/js/split_test_student.js rename to common/lib/xmodule/xmodule/assets/split_test/public/js/split_test_student.js diff --git a/xmodule/assets/vertical/public/js/vertical_student_view.js b/common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js similarity index 94% rename from xmodule/assets/vertical/public/js/vertical_student_view.js rename to common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js index 8e18826b42..fa642df915 100644 --- a/xmodule/assets/vertical/public/js/vertical_student_view.js +++ b/common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js @@ -9,7 +9,7 @@ // to the server. import BookmarkButton from 'course_bookmarks/js/views/bookmark_button'; -import {markBlocksCompletedOnViewIfNeeded} from '../../../../../lms/static/completion/js/CompletionOnViewService.js'; +import {markBlocksCompletedOnViewIfNeeded} from '../../../../../../../../lms/static/completion/js/CompletionOnViewService.js'; var SEEN_COMPLETABLES = new Set(); diff --git a/xmodule/assets/word_cloud/.eslintrc.js b/common/lib/xmodule/xmodule/assets/word_cloud/.eslintrc.js similarity index 100% rename from xmodule/assets/word_cloud/.eslintrc.js rename to common/lib/xmodule/xmodule/assets/word_cloud/.eslintrc.js diff --git a/xmodule/assets/word_cloud/.gitignore b/common/lib/xmodule/xmodule/assets/word_cloud/.gitignore similarity index 100% rename from xmodule/assets/word_cloud/.gitignore rename to common/lib/xmodule/xmodule/assets/word_cloud/.gitignore diff --git a/xmodule/assets/word_cloud/src/js/d3.layout.cloud.js b/common/lib/xmodule/xmodule/assets/word_cloud/src/js/d3.layout.cloud.js similarity index 100% rename from xmodule/assets/word_cloud/src/js/d3.layout.cloud.js rename to common/lib/xmodule/xmodule/assets/word_cloud/src/js/d3.layout.cloud.js diff --git a/xmodule/assets/word_cloud/src/js/d3.min.js b/common/lib/xmodule/xmodule/assets/word_cloud/src/js/d3.min.js similarity index 100% rename from xmodule/assets/word_cloud/src/js/d3.min.js rename to common/lib/xmodule/xmodule/assets/word_cloud/src/js/d3.min.js diff --git a/xmodule/assets/word_cloud/src/js/word_cloud.js b/common/lib/xmodule/xmodule/assets/word_cloud/src/js/word_cloud.js similarity index 100% rename from xmodule/assets/word_cloud/src/js/word_cloud.js rename to common/lib/xmodule/xmodule/assets/word_cloud/src/js/word_cloud.js diff --git a/xmodule/assets/word_cloud/src/js/word_cloud_main.js b/common/lib/xmodule/xmodule/assets/word_cloud/src/js/word_cloud_main.js similarity index 100% rename from xmodule/assets/word_cloud/src/js/word_cloud_main.js rename to common/lib/xmodule/xmodule/assets/word_cloud/src/js/word_cloud_main.js diff --git a/xmodule/assets/word_cloud/webpack.config.js b/common/lib/xmodule/xmodule/assets/word_cloud/webpack.config.js similarity index 100% rename from xmodule/assets/word_cloud/webpack.config.js rename to common/lib/xmodule/xmodule/assets/word_cloud/webpack.config.js diff --git a/xmodule/assetstore/__init__.py b/common/lib/xmodule/xmodule/assetstore/__init__.py similarity index 100% rename from xmodule/assetstore/__init__.py rename to common/lib/xmodule/xmodule/assetstore/__init__.py diff --git a/xmodule/assetstore/assetmgr.py b/common/lib/xmodule/xmodule/assetstore/assetmgr.py similarity index 100% rename from xmodule/assetstore/assetmgr.py rename to common/lib/xmodule/xmodule/assetstore/assetmgr.py diff --git a/xmodule/assetstore/tests/__init__.py b/common/lib/xmodule/xmodule/assetstore/tests/__init__.py similarity index 100% rename from xmodule/assetstore/tests/__init__.py rename to common/lib/xmodule/xmodule/assetstore/tests/__init__.py diff --git a/xmodule/assetstore/tests/assets.xsd b/common/lib/xmodule/xmodule/assetstore/tests/assets.xsd similarity index 100% rename from xmodule/assetstore/tests/assets.xsd rename to common/lib/xmodule/xmodule/assetstore/tests/assets.xsd diff --git a/xmodule/assetstore/tests/test_asset_xml.py b/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py similarity index 100% rename from xmodule/assetstore/tests/test_asset_xml.py rename to common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py diff --git a/xmodule/block_metadata_utils.py b/common/lib/xmodule/xmodule/block_metadata_utils.py similarity index 100% rename from xmodule/block_metadata_utils.py rename to common/lib/xmodule/xmodule/block_metadata_utils.py diff --git a/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py similarity index 100% rename from xmodule/capa_module.py rename to common/lib/xmodule/xmodule/capa_module.py diff --git a/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py similarity index 100% rename from xmodule/conditional_module.py rename to common/lib/xmodule/xmodule/conditional_module.py diff --git a/xmodule/contentstore/__init__.py b/common/lib/xmodule/xmodule/contentstore/__init__.py similarity index 100% rename from xmodule/contentstore/__init__.py rename to common/lib/xmodule/xmodule/contentstore/__init__.py diff --git a/xmodule/contentstore/content.py b/common/lib/xmodule/xmodule/contentstore/content.py similarity index 100% rename from xmodule/contentstore/content.py rename to common/lib/xmodule/xmodule/contentstore/content.py diff --git a/xmodule/contentstore/django.py b/common/lib/xmodule/xmodule/contentstore/django.py similarity index 100% rename from xmodule/contentstore/django.py rename to common/lib/xmodule/xmodule/contentstore/django.py diff --git a/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py similarity index 100% rename from xmodule/contentstore/mongo.py rename to common/lib/xmodule/xmodule/contentstore/mongo.py diff --git a/xmodule/contentstore/utils.py b/common/lib/xmodule/xmodule/contentstore/utils.py similarity index 100% rename from xmodule/contentstore/utils.py rename to common/lib/xmodule/xmodule/contentstore/utils.py diff --git a/xmodule/course_metadata_utils.py b/common/lib/xmodule/xmodule/course_metadata_utils.py similarity index 100% rename from xmodule/course_metadata_utils.py rename to common/lib/xmodule/xmodule/course_metadata_utils.py diff --git a/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py similarity index 99% rename from xmodule/course_module.py rename to common/lib/xmodule/xmodule/course_module.py index 9926e13aeb..417b9060cc 100644 --- a/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -1072,7 +1072,7 @@ class CourseBlock( self._grading_policy = {} self.set_grading_policy(self.grading_policy) - if not self.discussion_topics: + if self.discussion_topics == {}: self.discussion_topics = {_('General'): {'id': self.location.html_id()}} try: diff --git a/xmodule/css/annotatable/display.scss b/common/lib/xmodule/xmodule/css/annotatable/display.scss similarity index 100% rename from xmodule/css/annotatable/display.scss rename to common/lib/xmodule/xmodule/css/annotatable/display.scss diff --git a/xmodule/css/capa/display.scss b/common/lib/xmodule/xmodule/css/capa/display.scss similarity index 100% rename from xmodule/css/capa/display.scss rename to common/lib/xmodule/xmodule/css/capa/display.scss diff --git a/xmodule/css/codemirror/codemirror.scss b/common/lib/xmodule/xmodule/css/codemirror/codemirror.scss similarity index 100% rename from xmodule/css/codemirror/codemirror.scss rename to common/lib/xmodule/xmodule/css/codemirror/codemirror.scss diff --git a/xmodule/css/editor/edit.scss b/common/lib/xmodule/xmodule/css/editor/edit.scss similarity index 100% rename from xmodule/css/editor/edit.scss rename to common/lib/xmodule/xmodule/css/editor/edit.scss diff --git a/xmodule/css/html/display.scss b/common/lib/xmodule/xmodule/css/html/display.scss similarity index 100% rename from xmodule/css/html/display.scss rename to common/lib/xmodule/xmodule/css/html/display.scss diff --git a/xmodule/css/html/edit.scss b/common/lib/xmodule/xmodule/css/html/edit.scss similarity index 100% rename from xmodule/css/html/edit.scss rename to common/lib/xmodule/xmodule/css/html/edit.scss diff --git a/xmodule/css/lti/lti.scss b/common/lib/xmodule/xmodule/css/lti/lti.scss similarity index 100% rename from xmodule/css/lti/lti.scss rename to common/lib/xmodule/xmodule/css/lti/lti.scss diff --git a/xmodule/css/poll/display.scss b/common/lib/xmodule/xmodule/css/poll/display.scss similarity index 100% rename from xmodule/css/poll/display.scss rename to common/lib/xmodule/xmodule/css/poll/display.scss diff --git a/xmodule/css/problem/edit.scss b/common/lib/xmodule/xmodule/css/problem/edit.scss similarity index 100% rename from xmodule/css/problem/edit.scss rename to common/lib/xmodule/xmodule/css/problem/edit.scss diff --git a/xmodule/css/sequence/display.scss b/common/lib/xmodule/xmodule/css/sequence/display.scss similarity index 100% rename from xmodule/css/sequence/display.scss rename to common/lib/xmodule/xmodule/css/sequence/display.scss diff --git a/xmodule/css/tabs/codemirror.scss b/common/lib/xmodule/xmodule/css/tabs/codemirror.scss similarity index 100% rename from xmodule/css/tabs/codemirror.scss rename to common/lib/xmodule/xmodule/css/tabs/codemirror.scss diff --git a/xmodule/css/tabs/tabs.scss b/common/lib/xmodule/xmodule/css/tabs/tabs.scss similarity index 100% rename from xmodule/css/tabs/tabs.scss rename to common/lib/xmodule/xmodule/css/tabs/tabs.scss diff --git a/xmodule/css/video/accessible_menu.scss b/common/lib/xmodule/xmodule/css/video/accessible_menu.scss similarity index 100% rename from xmodule/css/video/accessible_menu.scss rename to common/lib/xmodule/xmodule/css/video/accessible_menu.scss diff --git a/xmodule/css/video/display.scss b/common/lib/xmodule/xmodule/css/video/display.scss similarity index 100% rename from xmodule/css/video/display.scss rename to common/lib/xmodule/xmodule/css/video/display.scss diff --git a/xmodule/css/word_cloud/display.scss b/common/lib/xmodule/xmodule/css/word_cloud/display.scss similarity index 100% rename from xmodule/css/word_cloud/display.scss rename to common/lib/xmodule/xmodule/css/word_cloud/display.scss diff --git a/xmodule/data.py b/common/lib/xmodule/xmodule/data.py similarity index 100% rename from xmodule/data.py rename to common/lib/xmodule/xmodule/data.py diff --git a/xmodule/docs/decisions/0001-move-due-dates-to-db.rst b/common/lib/xmodule/xmodule/docs/decisions/0001-move-due-dates-to-db.rst similarity index 100% rename from xmodule/docs/decisions/0001-move-due-dates-to-db.rst rename to common/lib/xmodule/xmodule/docs/decisions/0001-move-due-dates-to-db.rst diff --git a/xmodule/docs/decisions/0002-remove-mongodb-dependency.rst b/common/lib/xmodule/xmodule/docs/decisions/0002-remove-mongodb-dependency.rst similarity index 100% rename from xmodule/docs/decisions/0002-remove-mongodb-dependency.rst rename to common/lib/xmodule/xmodule/docs/decisions/0002-remove-mongodb-dependency.rst diff --git a/xmodule/editing_module.py b/common/lib/xmodule/xmodule/editing_module.py similarity index 100% rename from xmodule/editing_module.py rename to common/lib/xmodule/xmodule/editing_module.py diff --git a/xmodule/edxnotes_utils.py b/common/lib/xmodule/xmodule/edxnotes_utils.py similarity index 100% rename from xmodule/edxnotes_utils.py rename to common/lib/xmodule/xmodule/edxnotes_utils.py diff --git a/xmodule/error_module.py b/common/lib/xmodule/xmodule/error_module.py similarity index 100% rename from xmodule/error_module.py rename to common/lib/xmodule/xmodule/error_module.py diff --git a/xmodule/errortracker.py b/common/lib/xmodule/xmodule/errortracker.py similarity index 100% rename from xmodule/errortracker.py rename to common/lib/xmodule/xmodule/errortracker.py diff --git a/xmodule/exceptions.py b/common/lib/xmodule/xmodule/exceptions.py similarity index 100% rename from xmodule/exceptions.py rename to common/lib/xmodule/xmodule/exceptions.py diff --git a/xmodule/fields.py b/common/lib/xmodule/xmodule/fields.py similarity index 100% rename from xmodule/fields.py rename to common/lib/xmodule/xmodule/fields.py diff --git a/xmodule/graders.py b/common/lib/xmodule/xmodule/graders.py similarity index 100% rename from xmodule/graders.py rename to common/lib/xmodule/xmodule/graders.py diff --git a/xmodule/hidden_module.py b/common/lib/xmodule/xmodule/hidden_module.py similarity index 100% rename from xmodule/hidden_module.py rename to common/lib/xmodule/xmodule/hidden_module.py diff --git a/xmodule/html_checker.py b/common/lib/xmodule/xmodule/html_checker.py similarity index 100% rename from xmodule/html_checker.py rename to common/lib/xmodule/xmodule/html_checker.py diff --git a/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py similarity index 100% rename from xmodule/html_module.py rename to common/lib/xmodule/xmodule/html_module.py diff --git a/common/lib/xmodule/xmodule/js/RequireJS-namespace-undefine.js b/common/lib/xmodule/xmodule/js/RequireJS-namespace-undefine.js new file mode 120000 index 0000000000..fa5392caaf --- /dev/null +++ b/common/lib/xmodule/xmodule/js/RequireJS-namespace-undefine.js @@ -0,0 +1 @@ +../../../../../common/static/js/RequireJS-namespace-undefine.js \ No newline at end of file diff --git a/common/lib/xmodule/xmodule/js/common_static b/common/lib/xmodule/xmodule/js/common_static new file mode 120000 index 0000000000..e5b87d710e --- /dev/null +++ b/common/lib/xmodule/xmodule/js/common_static @@ -0,0 +1 @@ +../../../../static/ \ No newline at end of file diff --git a/xmodule/js/fixtures/annotatable.html b/common/lib/xmodule/xmodule/js/fixtures/annotatable.html similarity index 100% rename from xmodule/js/fixtures/annotatable.html rename to common/lib/xmodule/xmodule/js/fixtures/annotatable.html diff --git a/xmodule/js/fixtures/checkbox_problem.html b/common/lib/xmodule/xmodule/js/fixtures/checkbox_problem.html similarity index 100% rename from xmodule/js/fixtures/checkbox_problem.html rename to common/lib/xmodule/xmodule/js/fixtures/checkbox_problem.html diff --git a/xmodule/js/fixtures/codeinput_problem.html b/common/lib/xmodule/xmodule/js/fixtures/codeinput_problem.html similarity index 100% rename from xmodule/js/fixtures/codeinput_problem.html rename to common/lib/xmodule/xmodule/js/fixtures/codeinput_problem.html diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_.m3u8 b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_.m3u8 similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_.m3u8 rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_.m3u8 diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_0.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_0.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_0.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_0.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_1.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_1.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_1.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_1.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_2.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_2.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_2.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_0_/XXXXXXXXT114-V015600_0_2.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_.m3u8 b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_.m3u8 similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_.m3u8 rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_.m3u8 diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_0.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_0.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_0.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_0.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_1.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_1.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_1.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_1.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_2.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_2.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_2.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_1_/XXXXXXXXT114-V015600_1_2.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_.m3u8 b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_.m3u8 similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_.m3u8 rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_.m3u8 diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_0.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_0.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_0.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_0.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_1.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_1.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_1.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_1.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_2.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_2.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_2.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_2_/XXXXXXXXT114-V015600_2_2.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_.m3u8 b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_.m3u8 similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_.m3u8 rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_.m3u8 diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_0.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_0.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_0.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_0.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_1.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_1.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_1.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_1.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_2.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_2.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_2.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_3_/XXXXXXXXT114-V015600_3_2.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_.m3u8 b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_.m3u8 similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_.m3u8 rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_.m3u8 diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_0.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_0.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_0.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_0.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_1.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_1.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_1.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_1.ts diff --git a/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_2.ts b/common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_2.ts similarity index 100% rename from xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_2.ts rename to common/lib/xmodule/xmodule/js/fixtures/hls/XXXXXXXXT114-V015600_4_/XXXXXXXXT114-V015600_4_2.ts diff --git a/xmodule/js/fixtures/hls/hls.m3u8 b/common/lib/xmodule/xmodule/js/fixtures/hls/hls.m3u8 similarity index 100% rename from xmodule/js/fixtures/hls/hls.m3u8 rename to common/lib/xmodule/xmodule/js/fixtures/hls/hls.m3u8 diff --git a/xmodule/js/fixtures/html-edit-visual.html b/common/lib/xmodule/xmodule/js/fixtures/html-edit-visual.html similarity index 100% rename from xmodule/js/fixtures/html-edit-visual.html rename to common/lib/xmodule/xmodule/js/fixtures/html-edit-visual.html diff --git a/xmodule/js/fixtures/html-editor-raw.html b/common/lib/xmodule/xmodule/js/fixtures/html-editor-raw.html similarity index 100% rename from xmodule/js/fixtures/html-editor-raw.html rename to common/lib/xmodule/xmodule/js/fixtures/html-editor-raw.html diff --git a/xmodule/js/fixtures/imageinput.html b/common/lib/xmodule/xmodule/js/fixtures/imageinput.html similarity index 100% rename from xmodule/js/fixtures/imageinput.html rename to common/lib/xmodule/xmodule/js/fixtures/imageinput.html diff --git a/xmodule/js/fixtures/imageinput.underscore b/common/lib/xmodule/xmodule/js/fixtures/imageinput.underscore similarity index 100% rename from xmodule/js/fixtures/imageinput.underscore rename to common/lib/xmodule/xmodule/js/fixtures/imageinput.underscore diff --git a/xmodule/js/fixtures/items.json b/common/lib/xmodule/xmodule/js/fixtures/items.json similarity index 100% rename from xmodule/js/fixtures/items.json rename to common/lib/xmodule/xmodule/js/fixtures/items.json diff --git a/xmodule/js/fixtures/jsinput_problem.html b/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html similarity index 100% rename from xmodule/js/fixtures/jsinput_problem.html rename to common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html diff --git a/xmodule/js/fixtures/lti.html b/common/lib/xmodule/xmodule/js/fixtures/lti.html similarity index 100% rename from xmodule/js/fixtures/lti.html rename to common/lib/xmodule/xmodule/js/fixtures/lti.html diff --git a/xmodule/js/fixtures/matlabinput_problem.html b/common/lib/xmodule/xmodule/js/fixtures/matlabinput_problem.html similarity index 100% rename from xmodule/js/fixtures/matlabinput_problem.html rename to common/lib/xmodule/xmodule/js/fixtures/matlabinput_problem.html diff --git a/xmodule/js/fixtures/poster.jpg b/common/lib/xmodule/xmodule/js/fixtures/poster.jpg similarity index 100% rename from xmodule/js/fixtures/poster.jpg rename to common/lib/xmodule/xmodule/js/fixtures/poster.jpg diff --git a/xmodule/js/fixtures/problem-with-markdown.html b/common/lib/xmodule/xmodule/js/fixtures/problem-with-markdown.html similarity index 100% rename from xmodule/js/fixtures/problem-with-markdown.html rename to common/lib/xmodule/xmodule/js/fixtures/problem-with-markdown.html diff --git a/xmodule/js/fixtures/problem-without-markdown.html b/common/lib/xmodule/xmodule/js/fixtures/problem-without-markdown.html similarity index 100% rename from xmodule/js/fixtures/problem-without-markdown.html rename to common/lib/xmodule/xmodule/js/fixtures/problem-without-markdown.html diff --git a/xmodule/js/fixtures/problem.html b/common/lib/xmodule/xmodule/js/fixtures/problem.html similarity index 100% rename from xmodule/js/fixtures/problem.html rename to common/lib/xmodule/xmodule/js/fixtures/problem.html diff --git a/xmodule/js/fixtures/problem_content.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html similarity index 100% rename from xmodule/js/fixtures/problem_content.html rename to common/lib/xmodule/xmodule/js/fixtures/problem_content.html diff --git a/xmodule/js/fixtures/problem_content_1240.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html similarity index 100% rename from xmodule/js/fixtures/problem_content_1240.html rename to common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html diff --git a/xmodule/js/fixtures/radiobutton_problem.html b/common/lib/xmodule/xmodule/js/fixtures/radiobutton_problem.html similarity index 100% rename from xmodule/js/fixtures/radiobutton_problem.html rename to common/lib/xmodule/xmodule/js/fixtures/radiobutton_problem.html diff --git a/xmodule/js/fixtures/sequence.html b/common/lib/xmodule/xmodule/js/fixtures/sequence.html similarity index 100% rename from xmodule/js/fixtures/sequence.html rename to common/lib/xmodule/xmodule/js/fixtures/sequence.html diff --git a/xmodule/js/fixtures/split_test_staff.html b/common/lib/xmodule/xmodule/js/fixtures/split_test_staff.html similarity index 100% rename from xmodule/js/fixtures/split_test_staff.html rename to common/lib/xmodule/xmodule/js/fixtures/split_test_staff.html diff --git a/xmodule/js/fixtures/tabs-edit.html b/common/lib/xmodule/xmodule/js/fixtures/tabs-edit.html similarity index 100% rename from xmodule/js/fixtures/tabs-edit.html rename to common/lib/xmodule/xmodule/js/fixtures/tabs-edit.html diff --git a/xmodule/js/fixtures/test.mp4 b/common/lib/xmodule/xmodule/js/fixtures/test.mp4 similarity index 100% rename from xmodule/js/fixtures/test.mp4 rename to common/lib/xmodule/xmodule/js/fixtures/test.mp4 diff --git a/xmodule/js/fixtures/test.ogv b/common/lib/xmodule/xmodule/js/fixtures/test.ogv similarity index 100% rename from xmodule/js/fixtures/test.ogv rename to common/lib/xmodule/xmodule/js/fixtures/test.ogv diff --git a/xmodule/js/fixtures/test.webm b/common/lib/xmodule/xmodule/js/fixtures/test.webm similarity index 100% rename from xmodule/js/fixtures/test.webm rename to common/lib/xmodule/xmodule/js/fixtures/test.webm diff --git a/xmodule/js/fixtures/video.html b/common/lib/xmodule/xmodule/js/fixtures/video.html similarity index 100% rename from xmodule/js/fixtures/video.html rename to common/lib/xmodule/xmodule/js/fixtures/video.html diff --git a/xmodule/js/fixtures/video_all.html b/common/lib/xmodule/xmodule/js/fixtures/video_all.html similarity index 100% rename from xmodule/js/fixtures/video_all.html rename to common/lib/xmodule/xmodule/js/fixtures/video_all.html diff --git a/xmodule/js/fixtures/video_autoadvance.html b/common/lib/xmodule/xmodule/js/fixtures/video_autoadvance.html similarity index 100% rename from xmodule/js/fixtures/video_autoadvance.html rename to common/lib/xmodule/xmodule/js/fixtures/video_autoadvance.html diff --git a/xmodule/js/fixtures/video_autoadvance_disabled.html b/common/lib/xmodule/xmodule/js/fixtures/video_autoadvance_disabled.html similarity index 100% rename from xmodule/js/fixtures/video_autoadvance_disabled.html rename to common/lib/xmodule/xmodule/js/fixtures/video_autoadvance_disabled.html diff --git a/xmodule/js/fixtures/video_hls.html b/common/lib/xmodule/xmodule/js/fixtures/video_hls.html similarity index 100% rename from xmodule/js/fixtures/video_hls.html rename to common/lib/xmodule/xmodule/js/fixtures/video_hls.html diff --git a/xmodule/js/fixtures/video_html5.html b/common/lib/xmodule/xmodule/js/fixtures/video_html5.html similarity index 100% rename from xmodule/js/fixtures/video_html5.html rename to common/lib/xmodule/xmodule/js/fixtures/video_html5.html diff --git a/xmodule/js/fixtures/video_no_captions.html b/common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html similarity index 100% rename from xmodule/js/fixtures/video_no_captions.html rename to common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html diff --git a/xmodule/js/fixtures/video_with_bumper.html b/common/lib/xmodule/xmodule/js/fixtures/video_with_bumper.html similarity index 100% rename from xmodule/js/fixtures/video_with_bumper.html rename to common/lib/xmodule/xmodule/js/fixtures/video_with_bumper.html diff --git a/xmodule/js/fixtures/video_yt_multiple.html b/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html similarity index 100% rename from xmodule/js/fixtures/video_yt_multiple.html rename to common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html diff --git a/xmodule/js/fixtures/youtube_iframe_api.js b/common/lib/xmodule/xmodule/js/fixtures/youtube_iframe_api.js similarity index 100% rename from xmodule/js/fixtures/youtube_iframe_api.js rename to common/lib/xmodule/xmodule/js/fixtures/youtube_iframe_api.js diff --git a/xmodule/js/karma_runner.js b/common/lib/xmodule/xmodule/js/karma_runner.js similarity index 100% rename from xmodule/js/karma_runner.js rename to common/lib/xmodule/xmodule/js/karma_runner.js diff --git a/xmodule/js/karma_runner_webpack.js b/common/lib/xmodule/xmodule/js/karma_runner_webpack.js similarity index 57% rename from xmodule/js/karma_runner_webpack.js rename to common/lib/xmodule/xmodule/js/karma_runner_webpack.js index 5bca3b6868..b3adb36878 100644 --- a/xmodule/js/karma_runner_webpack.js +++ b/common/lib/xmodule/xmodule/js/karma_runner_webpack.js @@ -1,33 +1,33 @@ -import '../../common/static/js/src/ajax_prefix.js'; -import '../../common/static/common/js/vendor/underscore.js'; -import '../../common/static/common/js/vendor/backbone.js'; -import '../../common/static/js/vendor/CodeMirror/codemirror.js'; -import '../../common/static/js/vendor/draggabilly.js'; -import '../../common/static/common/js/vendor/jquery.js'; -import '../../common/static/common/js/vendor/jquery-migrate.js'; -import '../../common/static/js/vendor/jquery.cookie.js'; -import '../../common/static/js/vendor/jquery.leanModal.js'; -import '../../common/static/js/vendor/jquery.timeago.js'; -import '../../common/static/js/vendor/jquery-ui.min.js'; -import '../../common/static/js/vendor/jquery.ui.draggable.js'; -import '../../common/static/js/vendor/json2.js'; -// import '../../common/static/common/js/vendor/moment-with-locales.js'; -import '../../common/static/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js'; -import '../../common/static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js'; -import '../../common/static/js/src/accessibility_tools.js'; -import '../../common/static/js/src/logger.js'; -import '../../common/static/js/src/utility.js'; -import '../../common/static/js/test/add_ajax_prefix.js'; -import '../../common/static/js/test/i18n.js'; -import '../../common/static/common/js/vendor/hls.js'; +import '../../../../static/js/src/ajax_prefix.js'; +import '../../../../static/common/js/vendor/underscore.js'; +import '../../../../static/common/js/vendor/backbone.js'; +import '../../../../static/js/vendor/CodeMirror/codemirror.js'; +import '../../../../static/js/vendor/draggabilly.js'; +import '../../../../static/common/js/vendor/jquery.js'; +import '../../../../static/common/js/vendor/jquery-migrate.js'; +import '../../../../static/js/vendor/jquery.cookie.js'; +import '../../../../static/js/vendor/jquery.leanModal.js'; +import '../../../../static/js/vendor/jquery.timeago.js'; +import '../../../../static/js/vendor/jquery-ui.min.js'; +import '../../../../static/js/vendor/jquery.ui.draggable.js'; +import '../../../../static/js/vendor/json2.js'; +// import '../../../../static/common/js/vendor/moment-with-locales.js'; +import '../../../../static/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js'; +import '../../../../static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js'; +import '../../../../static/js/src/accessibility_tools.js'; +import '../../../../static/js/src/logger.js'; +import '../../../../static/js/src/utility.js'; +import '../../../../static/js/test/add_ajax_prefix.js'; +import '../../../../static/js/test/i18n.js'; +import '../../../../static/common/js/vendor/hls.js'; import '../assets/vertical/public/js/vertical_student_view.js'; -import '../../common/static/js/vendor/jasmine-imagediff.js'; -import '../../common/static/common/js/spec_helpers/jasmine-waituntil.js'; -import '../../common/static/common/js/spec_helpers/jasmine-extensions.js'; -import '../../common/static/common/js/vendor/sinon.js'; +import '../../../../static/js/vendor/jasmine-imagediff.js'; +import '../../../../static/common/js/spec_helpers/jasmine-waituntil.js'; +import '../../../../static/common/js/spec_helpers/jasmine-extensions.js'; +import '../../../../static/common/js/vendor/sinon.js'; // These libraries are used by the tests (and the code under test) // but not explicitly imported diff --git a/xmodule/js/karma_xmodule.conf.js b/common/lib/xmodule/xmodule/js/karma_xmodule.conf.js similarity index 100% rename from xmodule/js/karma_xmodule.conf.js rename to common/lib/xmodule/xmodule/js/karma_xmodule.conf.js diff --git a/xmodule/js/karma_xmodule_webpack.conf.js b/common/lib/xmodule/xmodule/js/karma_xmodule_webpack.conf.js similarity index 100% rename from xmodule/js/karma_xmodule_webpack.conf.js rename to common/lib/xmodule/xmodule/js/karma_xmodule_webpack.conf.js diff --git a/xmodule/js/libpeerconnection.log b/common/lib/xmodule/xmodule/js/libpeerconnection.log similarity index 100% rename from xmodule/js/libpeerconnection.log rename to common/lib/xmodule/xmodule/js/libpeerconnection.log diff --git a/xmodule/js/public/js/library_content_edit.js b/common/lib/xmodule/xmodule/js/public/js/library_content_edit.js similarity index 100% rename from xmodule/js/public/js/library_content_edit.js rename to common/lib/xmodule/xmodule/js/public/js/library_content_edit.js diff --git a/xmodule/js/public/js/split_test_author_view.js b/common/lib/xmodule/xmodule/js/public/js/split_test_author_view.js similarity index 100% rename from xmodule/js/public/js/split_test_author_view.js rename to common/lib/xmodule/xmodule/js/public/js/split_test_author_view.js diff --git a/xmodule/js/public/js/split_test_staff.js b/common/lib/xmodule/xmodule/js/public/js/split_test_staff.js similarity index 100% rename from xmodule/js/public/js/split_test_staff.js rename to common/lib/xmodule/xmodule/js/public/js/split_test_staff.js diff --git a/xmodule/js/public/js/split_test_student.js b/common/lib/xmodule/xmodule/js/public/js/split_test_student.js similarity index 100% rename from xmodule/js/public/js/split_test_student.js rename to common/lib/xmodule/xmodule/js/public/js/split_test_student.js diff --git a/xmodule/js/public/js/vertical_student_view.js b/common/lib/xmodule/xmodule/js/public/js/vertical_student_view.js similarity index 100% rename from xmodule/js/public/js/vertical_student_view.js rename to common/lib/xmodule/xmodule/js/public/js/vertical_student_view.js diff --git a/xmodule/js/spec/annotatable/display_spec.js b/common/lib/xmodule/xmodule/js/spec/annotatable/display_spec.js similarity index 100% rename from xmodule/js/spec/annotatable/display_spec.js rename to common/lib/xmodule/xmodule/js/spec/annotatable/display_spec.js diff --git a/xmodule/js/spec/capa/display_spec.js b/common/lib/xmodule/xmodule/js/spec/capa/display_spec.js similarity index 100% rename from xmodule/js/spec/capa/display_spec.js rename to common/lib/xmodule/xmodule/js/spec/capa/display_spec.js diff --git a/xmodule/js/spec/capa/imageinput_spec.js b/common/lib/xmodule/xmodule/js/spec/capa/imageinput_spec.js similarity index 100% rename from xmodule/js/spec/capa/imageinput_spec.js rename to common/lib/xmodule/xmodule/js/spec/capa/imageinput_spec.js diff --git a/xmodule/js/spec/collapsible_spec.js b/common/lib/xmodule/xmodule/js/spec/collapsible_spec.js similarity index 100% rename from xmodule/js/spec/collapsible_spec.js rename to common/lib/xmodule/xmodule/js/spec/collapsible_spec.js diff --git a/xmodule/js/spec/helper.js b/common/lib/xmodule/xmodule/js/spec/helper.js similarity index 100% rename from xmodule/js/spec/helper.js rename to common/lib/xmodule/xmodule/js/spec/helper.js diff --git a/xmodule/js/spec/html/edit_spec.js b/common/lib/xmodule/xmodule/js/spec/html/edit_spec.js similarity index 100% rename from xmodule/js/spec/html/edit_spec.js rename to common/lib/xmodule/xmodule/js/spec/html/edit_spec.js diff --git a/xmodule/js/spec/main_requirejs.js b/common/lib/xmodule/xmodule/js/spec/main_requirejs.js similarity index 100% rename from xmodule/js/spec/main_requirejs.js rename to common/lib/xmodule/xmodule/js/spec/main_requirejs.js diff --git a/xmodule/js/spec/problem/edit_spec.js b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.js similarity index 100% rename from xmodule/js/spec/problem/edit_spec.js rename to common/lib/xmodule/xmodule/js/spec/problem/edit_spec.js diff --git a/xmodule/js/spec/problem/edit_spec_hint.js b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.js similarity index 100% rename from xmodule/js/spec/problem/edit_spec_hint.js rename to common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.js diff --git a/xmodule/js/spec/sequence/display_spec.js b/common/lib/xmodule/xmodule/js/spec/sequence/display_spec.js similarity index 100% rename from xmodule/js/spec/sequence/display_spec.js rename to common/lib/xmodule/xmodule/js/spec/sequence/display_spec.js diff --git a/xmodule/js/spec/split_test/staff_view_spec.js b/common/lib/xmodule/xmodule/js/spec/split_test/staff_view_spec.js similarity index 100% rename from xmodule/js/spec/split_test/staff_view_spec.js rename to common/lib/xmodule/xmodule/js/spec/split_test/staff_view_spec.js diff --git a/xmodule/js/spec/tabs/edit.js b/common/lib/xmodule/xmodule/js/spec/tabs/edit.js similarity index 100% rename from xmodule/js/spec/tabs/edit.js rename to common/lib/xmodule/xmodule/js/spec/tabs/edit.js diff --git a/xmodule/js/spec/time_spec.js b/common/lib/xmodule/xmodule/js/spec/time_spec.js similarity index 100% rename from xmodule/js/spec/time_spec.js rename to common/lib/xmodule/xmodule/js/spec/time_spec.js diff --git a/xmodule/js/spec/video/async_process_spec.js b/common/lib/xmodule/xmodule/js/spec/video/async_process_spec.js similarity index 100% rename from xmodule/js/spec/video/async_process_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/async_process_spec.js diff --git a/xmodule/js/spec/video/completion_spec.js b/common/lib/xmodule/xmodule/js/spec/video/completion_spec.js similarity index 100% rename from xmodule/js/spec/video/completion_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/completion_spec.js diff --git a/xmodule/js/spec/video/events_spec.js b/common/lib/xmodule/xmodule/js/spec/video/events_spec.js similarity index 100% rename from xmodule/js/spec/video/events_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/events_spec.js diff --git a/xmodule/js/spec/video/general_spec.js b/common/lib/xmodule/xmodule/js/spec/video/general_spec.js similarity index 100% rename from xmodule/js/spec/video/general_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/general_spec.js diff --git a/xmodule/js/spec/video/html5_video_spec.js b/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js similarity index 100% rename from xmodule/js/spec/video/html5_video_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js diff --git a/xmodule/js/spec/video/initialize_spec.js b/common/lib/xmodule/xmodule/js/spec/video/initialize_spec.js similarity index 100% rename from xmodule/js/spec/video/initialize_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/initialize_spec.js diff --git a/xmodule/js/spec/video/iterator_spec.js b/common/lib/xmodule/xmodule/js/spec/video/iterator_spec.js similarity index 100% rename from xmodule/js/spec/video/iterator_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/iterator_spec.js diff --git a/xmodule/js/spec/video/resizer_spec.js b/common/lib/xmodule/xmodule/js/spec/video/resizer_spec.js similarity index 100% rename from xmodule/js/spec/video/resizer_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/resizer_spec.js diff --git a/xmodule/js/spec/video/sjson_spec.js b/common/lib/xmodule/xmodule/js/spec/video/sjson_spec.js similarity index 100% rename from xmodule/js/spec/video/sjson_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/sjson_spec.js diff --git a/xmodule/js/spec/video/video_autoadvance_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_autoadvance_spec.js similarity index 100% rename from xmodule/js/spec/video/video_autoadvance_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_autoadvance_spec.js diff --git a/xmodule/js/spec/video/video_bumper_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_bumper_spec.js similarity index 100% rename from xmodule/js/spec/video/video_bumper_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_bumper_spec.js diff --git a/xmodule/js/spec/video/video_caption_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js similarity index 100% rename from xmodule/js/spec/video/video_caption_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js diff --git a/xmodule/js/spec/video/video_context_menu_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_context_menu_spec.js similarity index 100% rename from xmodule/js/spec/video/video_context_menu_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_context_menu_spec.js diff --git a/xmodule/js/spec/video/video_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_control_spec.js similarity index 100% rename from xmodule/js/spec/video/video_control_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_control_spec.js diff --git a/xmodule/js/spec/video/video_events_bumper_plugin_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_events_bumper_plugin_spec.js similarity index 100% rename from xmodule/js/spec/video/video_events_bumper_plugin_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_events_bumper_plugin_spec.js diff --git a/xmodule/js/spec/video/video_events_plugin_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_events_plugin_spec.js similarity index 100% rename from xmodule/js/spec/video/video_events_plugin_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_events_plugin_spec.js diff --git a/xmodule/js/spec/video/video_focus_grabber_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_focus_grabber_spec.js similarity index 100% rename from xmodule/js/spec/video/video_focus_grabber_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_focus_grabber_spec.js diff --git a/xmodule/js/spec/video/video_full_screen_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_full_screen_spec.js similarity index 100% rename from xmodule/js/spec/video/video_full_screen_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_full_screen_spec.js diff --git a/xmodule/js/spec/video/video_play_pause_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_play_pause_control_spec.js similarity index 100% rename from xmodule/js/spec/video/video_play_pause_control_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_play_pause_control_spec.js diff --git a/xmodule/js/spec/video/video_play_placeholder_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_play_placeholder_spec.js similarity index 100% rename from xmodule/js/spec/video/video_play_placeholder_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_play_placeholder_spec.js diff --git a/xmodule/js/spec/video/video_play_skip_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_play_skip_control_spec.js similarity index 100% rename from xmodule/js/spec/video/video_play_skip_control_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_play_skip_control_spec.js diff --git a/xmodule/js/spec/video/video_player_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js similarity index 100% rename from xmodule/js/spec/video/video_player_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js diff --git a/xmodule/js/spec/video/video_poster_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_poster_spec.js similarity index 100% rename from xmodule/js/spec/video/video_poster_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_poster_spec.js diff --git a/xmodule/js/spec/video/video_progress_slider_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_progress_slider_spec.js similarity index 100% rename from xmodule/js/spec/video/video_progress_slider_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_progress_slider_spec.js diff --git a/xmodule/js/spec/video/video_quality_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js similarity index 100% rename from xmodule/js/spec/video/video_quality_control_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js diff --git a/xmodule/js/spec/video/video_save_state_plugin_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_save_state_plugin_spec.js similarity index 100% rename from xmodule/js/spec/video/video_save_state_plugin_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_save_state_plugin_spec.js diff --git a/xmodule/js/spec/video/video_skip_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_skip_control_spec.js similarity index 100% rename from xmodule/js/spec/video/video_skip_control_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_skip_control_spec.js diff --git a/xmodule/js/spec/video/video_speed_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js similarity index 100% rename from xmodule/js/spec/video/video_speed_control_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js diff --git a/xmodule/js/spec/video/video_storage_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_storage_spec.js similarity index 100% rename from xmodule/js/spec/video/video_storage_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_storage_spec.js diff --git a/xmodule/js/spec/video/video_volume_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_volume_control_spec.js similarity index 100% rename from xmodule/js/spec/video/video_volume_control_spec.js rename to common/lib/xmodule/xmodule/js/spec/video/video_volume_control_spec.js diff --git a/xmodule/js/spec/video_helper.js b/common/lib/xmodule/xmodule/js/spec/video_helper.js similarity index 100% rename from xmodule/js/spec/video_helper.js rename to common/lib/xmodule/xmodule/js/spec/video_helper.js diff --git a/xmodule/js/spec/xmodule_spec.js b/common/lib/xmodule/xmodule/js/spec/xmodule_spec.js similarity index 100% rename from xmodule/js/spec/xmodule_spec.js rename to common/lib/xmodule/xmodule/js/spec/xmodule_spec.js diff --git a/xmodule/js/src/annotatable/display.js b/common/lib/xmodule/xmodule/js/src/annotatable/display.js similarity index 100% rename from xmodule/js/src/annotatable/display.js rename to common/lib/xmodule/xmodule/js/src/annotatable/display.js diff --git a/xmodule/js/src/capa/.gitignore b/common/lib/xmodule/xmodule/js/src/capa/.gitignore similarity index 100% rename from xmodule/js/src/capa/.gitignore rename to common/lib/xmodule/xmodule/js/src/capa/.gitignore diff --git a/xmodule/js/src/capa/display.js b/common/lib/xmodule/xmodule/js/src/capa/display.js similarity index 100% rename from xmodule/js/src/capa/display.js rename to common/lib/xmodule/xmodule/js/src/capa/display.js diff --git a/xmodule/js/src/capa/imageinput.js b/common/lib/xmodule/xmodule/js/src/capa/imageinput.js similarity index 100% rename from xmodule/js/src/capa/imageinput.js rename to common/lib/xmodule/xmodule/js/src/capa/imageinput.js diff --git a/xmodule/js/src/capa/schematic.js b/common/lib/xmodule/xmodule/js/src/capa/schematic.js similarity index 100% rename from xmodule/js/src/capa/schematic.js rename to common/lib/xmodule/xmodule/js/src/capa/schematic.js diff --git a/xmodule/js/src/collapsible.js b/common/lib/xmodule/xmodule/js/src/collapsible.js similarity index 100% rename from xmodule/js/src/collapsible.js rename to common/lib/xmodule/xmodule/js/src/collapsible.js diff --git a/xmodule/js/src/conditional/display.js b/common/lib/xmodule/xmodule/js/src/conditional/display.js similarity index 100% rename from xmodule/js/src/conditional/display.js rename to common/lib/xmodule/xmodule/js/src/conditional/display.js diff --git a/xmodule/js/src/discussion/display.js b/common/lib/xmodule/xmodule/js/src/discussion/display.js similarity index 100% rename from xmodule/js/src/discussion/display.js rename to common/lib/xmodule/xmodule/js/src/discussion/display.js diff --git a/xmodule/js/src/html/display.js b/common/lib/xmodule/xmodule/js/src/html/display.js similarity index 100% rename from xmodule/js/src/html/display.js rename to common/lib/xmodule/xmodule/js/src/html/display.js diff --git a/xmodule/js/src/html/edit.js b/common/lib/xmodule/xmodule/js/src/html/edit.js similarity index 100% rename from xmodule/js/src/html/edit.js rename to common/lib/xmodule/xmodule/js/src/html/edit.js diff --git a/xmodule/js/src/html/imageModal.js b/common/lib/xmodule/xmodule/js/src/html/imageModal.js similarity index 100% rename from xmodule/js/src/html/imageModal.js rename to common/lib/xmodule/xmodule/js/src/html/imageModal.js diff --git a/xmodule/js/src/javascript_loader.js b/common/lib/xmodule/xmodule/js/src/javascript_loader.js similarity index 100% rename from xmodule/js/src/javascript_loader.js rename to common/lib/xmodule/xmodule/js/src/javascript_loader.js diff --git a/xmodule/js/src/lti/lti.js b/common/lib/xmodule/xmodule/js/src/lti/lti.js similarity index 100% rename from xmodule/js/src/lti/lti.js rename to common/lib/xmodule/xmodule/js/src/lti/lti.js diff --git a/xmodule/js/src/poll/.gitignore b/common/lib/xmodule/xmodule/js/src/poll/.gitignore similarity index 100% rename from xmodule/js/src/poll/.gitignore rename to common/lib/xmodule/xmodule/js/src/poll/.gitignore diff --git a/xmodule/js/src/poll/poll.js b/common/lib/xmodule/xmodule/js/src/poll/poll.js similarity index 100% rename from xmodule/js/src/poll/poll.js rename to common/lib/xmodule/xmodule/js/src/poll/poll.js diff --git a/xmodule/js/src/poll/poll_main.js b/common/lib/xmodule/xmodule/js/src/poll/poll_main.js similarity index 100% rename from xmodule/js/src/poll/poll_main.js rename to common/lib/xmodule/xmodule/js/src/poll/poll_main.js diff --git a/xmodule/js/src/problem/.gitignore b/common/lib/xmodule/xmodule/js/src/problem/.gitignore similarity index 100% rename from xmodule/js/src/problem/.gitignore rename to common/lib/xmodule/xmodule/js/src/problem/.gitignore diff --git a/xmodule/js/src/problem/edit.js b/common/lib/xmodule/xmodule/js/src/problem/edit.js similarity index 100% rename from xmodule/js/src/problem/edit.js rename to common/lib/xmodule/xmodule/js/src/problem/edit.js diff --git a/xmodule/js/src/raw/edit/json.js b/common/lib/xmodule/xmodule/js/src/raw/edit/json.js similarity index 100% rename from xmodule/js/src/raw/edit/json.js rename to common/lib/xmodule/xmodule/js/src/raw/edit/json.js diff --git a/xmodule/js/src/raw/edit/metadata-only.js b/common/lib/xmodule/xmodule/js/src/raw/edit/metadata-only.js similarity index 100% rename from xmodule/js/src/raw/edit/metadata-only.js rename to common/lib/xmodule/xmodule/js/src/raw/edit/metadata-only.js diff --git a/xmodule/js/src/raw/edit/xml.js b/common/lib/xmodule/xmodule/js/src/raw/edit/xml.js similarity index 100% rename from xmodule/js/src/raw/edit/xml.js rename to common/lib/xmodule/xmodule/js/src/raw/edit/xml.js diff --git a/xmodule/js/src/sequence/display.js b/common/lib/xmodule/xmodule/js/src/sequence/display.js similarity index 100% rename from xmodule/js/src/sequence/display.js rename to common/lib/xmodule/xmodule/js/src/sequence/display.js diff --git a/xmodule/js/src/sequence/edit.js b/common/lib/xmodule/xmodule/js/src/sequence/edit.js similarity index 100% rename from xmodule/js/src/sequence/edit.js rename to common/lib/xmodule/xmodule/js/src/sequence/edit.js diff --git a/xmodule/js/src/tabs/tabs-aggregator.js b/common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.js similarity index 100% rename from xmodule/js/src/tabs/tabs-aggregator.js rename to common/lib/xmodule/xmodule/js/src/tabs/tabs-aggregator.js diff --git a/xmodule/js/src/time.js b/common/lib/xmodule/xmodule/js/src/time.js similarity index 100% rename from xmodule/js/src/time.js rename to common/lib/xmodule/xmodule/js/src/time.js diff --git a/xmodule/js/src/vertical/edit.js b/common/lib/xmodule/xmodule/js/src/vertical/edit.js similarity index 100% rename from xmodule/js/src/vertical/edit.js rename to common/lib/xmodule/xmodule/js/src/vertical/edit.js diff --git a/xmodule/js/src/video/00_async_process.js b/common/lib/xmodule/xmodule/js/src/video/00_async_process.js similarity index 100% rename from xmodule/js/src/video/00_async_process.js rename to common/lib/xmodule/xmodule/js/src/video/00_async_process.js diff --git a/xmodule/js/src/video/00_component.js b/common/lib/xmodule/xmodule/js/src/video/00_component.js similarity index 100% rename from xmodule/js/src/video/00_component.js rename to common/lib/xmodule/xmodule/js/src/video/00_component.js diff --git a/xmodule/js/src/video/00_i18n.js b/common/lib/xmodule/xmodule/js/src/video/00_i18n.js similarity index 100% rename from xmodule/js/src/video/00_i18n.js rename to common/lib/xmodule/xmodule/js/src/video/00_i18n.js diff --git a/xmodule/js/src/video/00_iterator.js b/common/lib/xmodule/xmodule/js/src/video/00_iterator.js similarity index 100% rename from xmodule/js/src/video/00_iterator.js rename to common/lib/xmodule/xmodule/js/src/video/00_iterator.js diff --git a/xmodule/js/src/video/00_resizer.js b/common/lib/xmodule/xmodule/js/src/video/00_resizer.js similarity index 100% rename from xmodule/js/src/video/00_resizer.js rename to common/lib/xmodule/xmodule/js/src/video/00_resizer.js diff --git a/xmodule/js/src/video/00_sjson.js b/common/lib/xmodule/xmodule/js/src/video/00_sjson.js similarity index 100% rename from xmodule/js/src/video/00_sjson.js rename to common/lib/xmodule/xmodule/js/src/video/00_sjson.js diff --git a/xmodule/js/src/video/00_video_storage.js b/common/lib/xmodule/xmodule/js/src/video/00_video_storage.js similarity index 100% rename from xmodule/js/src/video/00_video_storage.js rename to common/lib/xmodule/xmodule/js/src/video/00_video_storage.js diff --git a/xmodule/js/src/video/01_initialize.js b/common/lib/xmodule/xmodule/js/src/video/01_initialize.js similarity index 100% rename from xmodule/js/src/video/01_initialize.js rename to common/lib/xmodule/xmodule/js/src/video/01_initialize.js diff --git a/xmodule/js/src/video/025_focus_grabber.js b/common/lib/xmodule/xmodule/js/src/video/025_focus_grabber.js similarity index 100% rename from xmodule/js/src/video/025_focus_grabber.js rename to common/lib/xmodule/xmodule/js/src/video/025_focus_grabber.js diff --git a/xmodule/js/src/video/02_html5_hls_video.js b/common/lib/xmodule/xmodule/js/src/video/02_html5_hls_video.js similarity index 100% rename from xmodule/js/src/video/02_html5_hls_video.js rename to common/lib/xmodule/xmodule/js/src/video/02_html5_hls_video.js diff --git a/xmodule/js/src/video/02_html5_video.js b/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js similarity index 100% rename from xmodule/js/src/video/02_html5_video.js rename to common/lib/xmodule/xmodule/js/src/video/02_html5_video.js diff --git a/xmodule/js/src/video/035_video_accessible_menu.js b/common/lib/xmodule/xmodule/js/src/video/035_video_accessible_menu.js similarity index 100% rename from xmodule/js/src/video/035_video_accessible_menu.js rename to common/lib/xmodule/xmodule/js/src/video/035_video_accessible_menu.js diff --git a/xmodule/js/src/video/03_video_player.js b/common/lib/xmodule/xmodule/js/src/video/03_video_player.js similarity index 100% rename from xmodule/js/src/video/03_video_player.js rename to common/lib/xmodule/xmodule/js/src/video/03_video_player.js diff --git a/xmodule/js/src/video/04_video_control.js b/common/lib/xmodule/xmodule/js/src/video/04_video_control.js similarity index 100% rename from xmodule/js/src/video/04_video_control.js rename to common/lib/xmodule/xmodule/js/src/video/04_video_control.js diff --git a/xmodule/js/src/video/04_video_full_screen.js b/common/lib/xmodule/xmodule/js/src/video/04_video_full_screen.js similarity index 100% rename from xmodule/js/src/video/04_video_full_screen.js rename to common/lib/xmodule/xmodule/js/src/video/04_video_full_screen.js diff --git a/xmodule/js/src/video/05_video_quality_control.js b/common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js similarity index 100% rename from xmodule/js/src/video/05_video_quality_control.js rename to common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js diff --git a/xmodule/js/src/video/06_video_progress_slider.js b/common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js similarity index 100% rename from xmodule/js/src/video/06_video_progress_slider.js rename to common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js diff --git a/xmodule/js/src/video/07_video_volume_control.js b/common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js similarity index 100% rename from xmodule/js/src/video/07_video_volume_control.js rename to common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js diff --git a/xmodule/js/src/video/08_video_auto_advance_control.js b/common/lib/xmodule/xmodule/js/src/video/08_video_auto_advance_control.js similarity index 100% rename from xmodule/js/src/video/08_video_auto_advance_control.js rename to common/lib/xmodule/xmodule/js/src/video/08_video_auto_advance_control.js diff --git a/xmodule/js/src/video/08_video_speed_control.js b/common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js similarity index 100% rename from xmodule/js/src/video/08_video_speed_control.js rename to common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js diff --git a/xmodule/js/src/video/095_video_context_menu.js b/common/lib/xmodule/xmodule/js/src/video/095_video_context_menu.js similarity index 100% rename from xmodule/js/src/video/095_video_context_menu.js rename to common/lib/xmodule/xmodule/js/src/video/095_video_context_menu.js diff --git a/xmodule/js/src/video/09_bumper.js b/common/lib/xmodule/xmodule/js/src/video/09_bumper.js similarity index 100% rename from xmodule/js/src/video/09_bumper.js rename to common/lib/xmodule/xmodule/js/src/video/09_bumper.js diff --git a/xmodule/js/src/video/09_completion.js b/common/lib/xmodule/xmodule/js/src/video/09_completion.js similarity index 100% rename from xmodule/js/src/video/09_completion.js rename to common/lib/xmodule/xmodule/js/src/video/09_completion.js diff --git a/xmodule/js/src/video/09_events_bumper_plugin.js b/common/lib/xmodule/xmodule/js/src/video/09_events_bumper_plugin.js similarity index 100% rename from xmodule/js/src/video/09_events_bumper_plugin.js rename to common/lib/xmodule/xmodule/js/src/video/09_events_bumper_plugin.js diff --git a/xmodule/js/src/video/09_events_plugin.js b/common/lib/xmodule/xmodule/js/src/video/09_events_plugin.js similarity index 100% rename from xmodule/js/src/video/09_events_plugin.js rename to common/lib/xmodule/xmodule/js/src/video/09_events_plugin.js diff --git a/xmodule/js/src/video/09_play_pause_control.js b/common/lib/xmodule/xmodule/js/src/video/09_play_pause_control.js similarity index 100% rename from xmodule/js/src/video/09_play_pause_control.js rename to common/lib/xmodule/xmodule/js/src/video/09_play_pause_control.js diff --git a/xmodule/js/src/video/09_play_placeholder.js b/common/lib/xmodule/xmodule/js/src/video/09_play_placeholder.js similarity index 100% rename from xmodule/js/src/video/09_play_placeholder.js rename to common/lib/xmodule/xmodule/js/src/video/09_play_placeholder.js diff --git a/xmodule/js/src/video/09_play_skip_control.js b/common/lib/xmodule/xmodule/js/src/video/09_play_skip_control.js similarity index 100% rename from xmodule/js/src/video/09_play_skip_control.js rename to common/lib/xmodule/xmodule/js/src/video/09_play_skip_control.js diff --git a/xmodule/js/src/video/09_poster.js b/common/lib/xmodule/xmodule/js/src/video/09_poster.js similarity index 100% rename from xmodule/js/src/video/09_poster.js rename to common/lib/xmodule/xmodule/js/src/video/09_poster.js diff --git a/xmodule/js/src/video/09_save_state_plugin.js b/common/lib/xmodule/xmodule/js/src/video/09_save_state_plugin.js similarity index 100% rename from xmodule/js/src/video/09_save_state_plugin.js rename to common/lib/xmodule/xmodule/js/src/video/09_save_state_plugin.js diff --git a/xmodule/js/src/video/09_skip_control.js b/common/lib/xmodule/xmodule/js/src/video/09_skip_control.js similarity index 100% rename from xmodule/js/src/video/09_skip_control.js rename to common/lib/xmodule/xmodule/js/src/video/09_skip_control.js diff --git a/xmodule/js/src/video/09_video_caption.js b/common/lib/xmodule/xmodule/js/src/video/09_video_caption.js similarity index 100% rename from xmodule/js/src/video/09_video_caption.js rename to common/lib/xmodule/xmodule/js/src/video/09_video_caption.js diff --git a/xmodule/js/src/video/10_commands.js b/common/lib/xmodule/xmodule/js/src/video/10_commands.js similarity index 100% rename from xmodule/js/src/video/10_commands.js rename to common/lib/xmodule/xmodule/js/src/video/10_commands.js diff --git a/xmodule/js/src/video/10_main.js b/common/lib/xmodule/xmodule/js/src/video/10_main.js similarity index 100% rename from xmodule/js/src/video/10_main.js rename to common/lib/xmodule/xmodule/js/src/video/10_main.js diff --git a/xmodule/js/src/xmodule.js b/common/lib/xmodule/xmodule/js/src/xmodule.js similarity index 100% rename from xmodule/js/src/xmodule.js rename to common/lib/xmodule/xmodule/js/src/xmodule.js diff --git a/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py similarity index 100% rename from xmodule/library_content_module.py rename to common/lib/xmodule/xmodule/library_content_module.py diff --git a/xmodule/library_root_xblock.py b/common/lib/xmodule/xmodule/library_root_xblock.py similarity index 100% rename from xmodule/library_root_xblock.py rename to common/lib/xmodule/xmodule/library_root_xblock.py diff --git a/xmodule/library_sourced_block.py b/common/lib/xmodule/xmodule/library_sourced_block.py similarity index 100% rename from xmodule/library_sourced_block.py rename to common/lib/xmodule/xmodule/library_sourced_block.py diff --git a/xmodule/library_tools.py b/common/lib/xmodule/xmodule/library_tools.py similarity index 100% rename from xmodule/library_tools.py rename to common/lib/xmodule/xmodule/library_tools.py diff --git a/xmodule/lti_2_util.py b/common/lib/xmodule/xmodule/lti_2_util.py similarity index 100% rename from xmodule/lti_2_util.py rename to common/lib/xmodule/xmodule/lti_2_util.py diff --git a/xmodule/lti_module.py b/common/lib/xmodule/xmodule/lti_module.py similarity index 100% rename from xmodule/lti_module.py rename to common/lib/xmodule/xmodule/lti_module.py diff --git a/xmodule/mako_module.py b/common/lib/xmodule/xmodule/mako_module.py similarity index 100% rename from xmodule/mako_module.py rename to common/lib/xmodule/xmodule/mako_module.py diff --git a/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py similarity index 100% rename from xmodule/modulestore/__init__.py rename to common/lib/xmodule/xmodule/modulestore/__init__.py diff --git a/xmodule/modulestore/django.py b/common/lib/xmodule/xmodule/modulestore/django.py similarity index 100% rename from xmodule/modulestore/django.py rename to common/lib/xmodule/xmodule/modulestore/django.py diff --git a/xmodule/modulestore/docs/index.rst b/common/lib/xmodule/xmodule/modulestore/docs/index.rst similarity index 100% rename from xmodule/modulestore/docs/index.rst rename to common/lib/xmodule/xmodule/modulestore/docs/index.rst diff --git a/xmodule/modulestore/docs/mixedmodulestore.rst b/common/lib/xmodule/xmodule/modulestore/docs/mixedmodulestore.rst similarity index 100% rename from xmodule/modulestore/docs/mixedmodulestore.rst rename to common/lib/xmodule/xmodule/modulestore/docs/mixedmodulestore.rst diff --git a/xmodule/modulestore/docs/overview.rst b/common/lib/xmodule/xmodule/modulestore/docs/overview.rst similarity index 100% rename from xmodule/modulestore/docs/overview.rst rename to common/lib/xmodule/xmodule/modulestore/docs/overview.rst diff --git a/xmodule/modulestore/docs/split-mongo.rst b/common/lib/xmodule/xmodule/modulestore/docs/split-mongo.rst similarity index 100% rename from xmodule/modulestore/docs/split-mongo.rst rename to common/lib/xmodule/xmodule/modulestore/docs/split-mongo.rst diff --git a/xmodule/modulestore/draft.py b/common/lib/xmodule/xmodule/modulestore/draft.py similarity index 100% rename from xmodule/modulestore/draft.py rename to common/lib/xmodule/xmodule/modulestore/draft.py diff --git a/xmodule/modulestore/draft_and_published.py b/common/lib/xmodule/xmodule/modulestore/draft_and_published.py similarity index 100% rename from xmodule/modulestore/draft_and_published.py rename to common/lib/xmodule/xmodule/modulestore/draft_and_published.py diff --git a/xmodule/modulestore/edit_info.py b/common/lib/xmodule/xmodule/modulestore/edit_info.py similarity index 100% rename from xmodule/modulestore/edit_info.py rename to common/lib/xmodule/xmodule/modulestore/edit_info.py diff --git a/xmodule/modulestore/exceptions.py b/common/lib/xmodule/xmodule/modulestore/exceptions.py similarity index 100% rename from xmodule/modulestore/exceptions.py rename to common/lib/xmodule/xmodule/modulestore/exceptions.py diff --git a/xmodule/modulestore/inheritance.py b/common/lib/xmodule/xmodule/modulestore/inheritance.py similarity index 100% rename from xmodule/modulestore/inheritance.py rename to common/lib/xmodule/xmodule/modulestore/inheritance.py diff --git a/xmodule/modulestore/mixed.py b/common/lib/xmodule/xmodule/modulestore/mixed.py similarity index 100% rename from xmodule/modulestore/mixed.py rename to common/lib/xmodule/xmodule/modulestore/mixed.py diff --git a/xmodule/modulestore/modulestore_settings.py b/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py similarity index 100% rename from xmodule/modulestore/modulestore_settings.py rename to common/lib/xmodule/xmodule/modulestore/modulestore_settings.py diff --git a/xmodule/modulestore/mongo/__init__.py b/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py similarity index 100% rename from xmodule/modulestore/mongo/__init__.py rename to common/lib/xmodule/xmodule/modulestore/mongo/__init__.py diff --git a/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py similarity index 100% rename from xmodule/modulestore/mongo/base.py rename to common/lib/xmodule/xmodule/modulestore/mongo/base.py diff --git a/xmodule/modulestore/mongo/draft.py b/common/lib/xmodule/xmodule/modulestore/mongo/draft.py similarity index 100% rename from xmodule/modulestore/mongo/draft.py rename to common/lib/xmodule/xmodule/modulestore/mongo/draft.py diff --git a/xmodule/modulestore/mongoengine_fields.py b/common/lib/xmodule/xmodule/modulestore/mongoengine_fields.py similarity index 100% rename from xmodule/modulestore/mongoengine_fields.py rename to common/lib/xmodule/xmodule/modulestore/mongoengine_fields.py diff --git a/xmodule/modulestore/perf_tests/__init__.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/__init__.py similarity index 100% rename from xmodule/modulestore/perf_tests/__init__.py rename to common/lib/xmodule/xmodule/modulestore/perf_tests/__init__.py diff --git a/xmodule/modulestore/perf_tests/generate_asset_xml.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py similarity index 100% rename from xmodule/modulestore/perf_tests/generate_asset_xml.py rename to common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py diff --git a/xmodule/modulestore/perf_tests/generate_report.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_report.py similarity index 100% rename from xmodule/modulestore/perf_tests/generate_report.py rename to common/lib/xmodule/xmodule/modulestore/perf_tests/generate_report.py diff --git a/xmodule/modulestore/perf_tests/test_asset_import_export.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py similarity index 98% rename from xmodule/modulestore/perf_tests/test_asset_import_export.py rename to common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py index 46ba1cb7aa..dad838bc27 100644 --- a/xmodule/modulestore/perf_tests/test_asset_import_export.py +++ b/common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py @@ -46,7 +46,7 @@ COURSE_DATA_DIR = TEST_DATA_ROOT / COURSE_NAME ASSET_XML_PATH = COURSE_DATA_DIR / AssetMetadata.EXPORTED_ASSET_DIR / AssetMetadata.EXPORTED_ASSET_FILENAME # Path where asset XML schema definition file is located. -ASSET_XSD_PATH = PLATFORM_ROOT / "xmodule" / "assetstore" / "tests" / ASSET_XSD_FILE +ASSET_XSD_PATH = PLATFORM_ROOT / "common" / "lib" / "xmodule" / "xmodule" / "assetstore" / "tests" / ASSET_XSD_FILE @ddt.ddt diff --git a/xmodule/modulestore/search.py b/common/lib/xmodule/xmodule/modulestore/search.py similarity index 100% rename from xmodule/modulestore/search.py rename to common/lib/xmodule/xmodule/modulestore/search.py diff --git a/xmodule/modulestore/split_migrator.py b/common/lib/xmodule/xmodule/modulestore/split_migrator.py similarity index 100% rename from xmodule/modulestore/split_migrator.py rename to common/lib/xmodule/xmodule/modulestore/split_migrator.py diff --git a/xmodule/modulestore/split_mongo/__init__.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py similarity index 100% rename from xmodule/modulestore/split_mongo/__init__.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py diff --git a/xmodule/modulestore/split_mongo/caching_descriptor_system.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py similarity index 100% rename from xmodule/modulestore/split_mongo/caching_descriptor_system.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py diff --git a/xmodule/modulestore/split_mongo/definition_lazy_loader.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py similarity index 100% rename from xmodule/modulestore/split_mongo/definition_lazy_loader.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py diff --git a/xmodule/modulestore/split_mongo/id_manager.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py similarity index 100% rename from xmodule/modulestore/split_mongo/id_manager.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py diff --git a/xmodule/modulestore/split_mongo/mongo_connection.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py similarity index 100% rename from xmodule/modulestore/split_mongo/mongo_connection.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py index 91b5e17b8a..8314fdaede 100644 --- a/xmodule/modulestore/split_mongo/mongo_connection.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py @@ -20,7 +20,6 @@ import pytz from mongodb_proxy import autoretry_read # Import this just to export it from pymongo.errors import DuplicateKeyError # pylint: disable=unused-import -from edx_django_utils.cache import RequestCache from common.djangoapps.split_modulestore_django.models import SplitModulestoreCourseIndex from xmodule.exceptions import HeartbeatFailure @@ -28,6 +27,7 @@ from xmodule.modulestore import BlockData from xmodule.modulestore.split_mongo import BlockKey from xmodule.mongo_utils import connect_to_mongodb, create_collection_index from openedx.core.lib.cache_utils import request_cached +from edx_django_utils.cache import RequestCache log = logging.getLogger(__name__) diff --git a/xmodule/modulestore/split_mongo/split.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py similarity index 99% rename from xmodule/modulestore/split_mongo/split.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/split.py index 2cd4605815..3ff9ebc38f 100644 --- a/xmodule/modulestore/split_mongo/split.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py @@ -2924,9 +2924,7 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase): :param force: if false, raises VersionConflictError if the current head of the course != the one identified by course_key """ - if (course_key.org is None or - get_library_or_course_attribute(course_key) is None or - course_key.run is None or course_key.branch is None): + if course_key.org is None or get_library_or_course_attribute(course_key) is None or course_key.run is None or course_key.branch is None: return None else: index_entry = self.get_course_index(course_key) diff --git a/xmodule/modulestore/split_mongo/split_draft.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py similarity index 100% rename from xmodule/modulestore/split_mongo/split_draft.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py diff --git a/xmodule/modulestore/split_mongo/split_mongo_kvs.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py similarity index 100% rename from xmodule/modulestore/split_mongo/split_mongo_kvs.py rename to common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py diff --git a/xmodule/modulestore/store_utilities.py b/common/lib/xmodule/xmodule/modulestore/store_utilities.py similarity index 100% rename from xmodule/modulestore/store_utilities.py rename to common/lib/xmodule/xmodule/modulestore/store_utilities.py diff --git a/xmodule/modulestore/tests/__init__.py b/common/lib/xmodule/xmodule/modulestore/tests/__init__.py similarity index 100% rename from xmodule/modulestore/tests/__init__.py rename to common/lib/xmodule/xmodule/modulestore/tests/__init__.py diff --git a/xmodule/modulestore/tests/django_utils.py b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py similarity index 99% rename from xmodule/modulestore/tests/django_utils.py rename to common/lib/xmodule/xmodule/modulestore/tests/django_utils.py index f5e6ffb348..d60efbc944 100644 --- a/xmodule/modulestore/tests/django_utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py @@ -288,7 +288,7 @@ class ModuleStoreIsolationMixin(CacheIsolationMixin, SignalIsolationMixin): # List of modulestore signals enabled for this test. Defaults to an empty # list. The list of signals available is found on the SignalHandler class, - # in /xmodule/modulestore/django.py + # in /common/lib/xmodule/xmodule/modulestore/xmodule_django.py # # You must use the signal itself, and not its name. So for example: # diff --git a/xmodule/modulestore/tests/factories.py b/common/lib/xmodule/xmodule/modulestore/tests/factories.py similarity index 100% rename from xmodule/modulestore/tests/factories.py rename to common/lib/xmodule/xmodule/modulestore/tests/factories.py diff --git a/xmodule/modulestore/tests/mongo_connection.py b/common/lib/xmodule/xmodule/modulestore/tests/mongo_connection.py similarity index 100% rename from xmodule/modulestore/tests/mongo_connection.py rename to common/lib/xmodule/xmodule/modulestore/tests/mongo_connection.py diff --git a/xmodule/modulestore/tests/sample_courses.py b/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py similarity index 100% rename from xmodule/modulestore/tests/sample_courses.py rename to common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py diff --git a/xmodule/modulestore/tests/test_abstraction.py b/common/lib/xmodule/xmodule/modulestore/tests/test_abstraction.py similarity index 100% rename from xmodule/modulestore/tests/test_abstraction.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_abstraction.py diff --git a/xmodule/modulestore/tests/test_asides.py b/common/lib/xmodule/xmodule/modulestore/tests/test_asides.py similarity index 100% rename from xmodule/modulestore/tests/test_asides.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_asides.py diff --git a/xmodule/modulestore/tests/test_assetstore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py similarity index 100% rename from xmodule/modulestore/tests/test_assetstore.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py diff --git a/xmodule/modulestore/tests/test_contentstore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py similarity index 99% rename from xmodule/modulestore/tests/test_contentstore.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py index b5d755a8be..b167bc221d 100644 --- a/xmodule/modulestore/tests/test_contentstore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py @@ -165,7 +165,7 @@ class TestContentstore(unittest.TestCase): fake_course = CourseLocator('test', 'fake', 'non') course_assets, count = self.contentstore.get_all_content_for_course(fake_course) assert count == 0 - assert not course_assets + assert course_assets == [] @ddt.data(True, False) def test_attrs(self, deprecated): diff --git a/xmodule/modulestore/tests/test_cross_modulestore_import_export.py b/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py similarity index 100% rename from xmodule/modulestore/tests/test_cross_modulestore_import_export.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py diff --git a/xmodule/modulestore/tests/test_inheritance.py b/common/lib/xmodule/xmodule/modulestore/tests/test_inheritance.py similarity index 100% rename from xmodule/modulestore/tests/test_inheritance.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_inheritance.py diff --git a/xmodule/modulestore/tests/test_libraries.py b/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py similarity index 100% rename from xmodule/modulestore/tests/test_libraries.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py diff --git a/xmodule/modulestore/tests/test_mixed_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py similarity index 100% rename from xmodule/modulestore/tests/test_mixed_modulestore.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py diff --git a/xmodule/modulestore/tests/test_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py similarity index 100% rename from xmodule/modulestore/tests/test_modulestore.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py diff --git a/xmodule/modulestore/tests/test_modulestore_settings.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py similarity index 100% rename from xmodule/modulestore/tests/test_modulestore_settings.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py diff --git a/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py similarity index 99% rename from xmodule/modulestore/tests/test_mongo.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index c4f61f1b05..cc2cca9c1b 100644 --- a/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -743,7 +743,7 @@ class TestMongoModuleStoreWithNoAssetCollection(TestMongoModuleStore): # lint-a courses = self.draft_store.get_courses() course = courses[0] # Confirm that no specified asset collection name means empty asset metadata. - assert not self.draft_store.get_all_asset_metadata(course.id, 'asset') + assert self.draft_store.get_all_asset_metadata(course.id, 'asset') == [] def test_no_asset_invalid_key(self): course_key = CourseLocator(org="edx3", course="test_course", run=None, deprecated=True) diff --git a/xmodule/modulestore/tests/test_mongo_call_count.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py similarity index 100% rename from xmodule/modulestore/tests/test_mongo_call_count.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py diff --git a/xmodule/modulestore/tests/test_publish.py b/common/lib/xmodule/xmodule/modulestore/tests/test_publish.py similarity index 100% rename from xmodule/modulestore/tests/test_publish.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_publish.py diff --git a/xmodule/modulestore/tests/test_semantics.py b/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py similarity index 100% rename from xmodule/modulestore/tests/test_semantics.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py diff --git a/xmodule/modulestore/tests/test_split_copy_from_template.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_copy_from_template.py similarity index 100% rename from xmodule/modulestore/tests/test_split_copy_from_template.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_split_copy_from_template.py diff --git a/xmodule/modulestore/tests/test_split_migrator.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py similarity index 100% rename from xmodule/modulestore/tests/test_split_migrator.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py diff --git a/xmodule/modulestore/tests/test_split_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py similarity index 99% rename from xmodule/modulestore/tests/test_split_modulestore.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py index 2e0ffcf481..4b6331589e 100644 --- a/xmodule/modulestore/tests/test_split_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py @@ -16,6 +16,7 @@ import ddt from ccx_keys.locator import CCXBlockUsageLocator from django.core.cache import InvalidCacheBackendError, caches from opaque_keys.edx.locator import BlockUsageLocator, CourseKey, CourseLocator, LocalId +from path import Path as path from xblock.fields import Reference, ReferenceList, ReferenceValueDict from openedx.core.djangolib.testing.utils import CacheIsolationMixin @@ -78,6 +79,10 @@ class SplitModuleTest(unittest.TestCase): 'OPTIONS': modulestore_options } + # don't create django dependency; so, duplicates common.py in envs + match = re.search(r'(.*?/common)(?:$|/)', path(__file__)) + COMMON_ROOT = match.group(1) + modulestore = None _date_field = Date() diff --git a/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py similarity index 100% rename from xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py diff --git a/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py similarity index 100% rename from xmodule/modulestore/tests/test_split_mongo_mongo_connection.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py diff --git a/xmodule/modulestore/tests/test_split_w_old_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py similarity index 100% rename from xmodule/modulestore/tests/test_split_w_old_mongo.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py diff --git a/xmodule/modulestore/tests/test_store_utilities.py b/common/lib/xmodule/xmodule/modulestore/tests/test_store_utilities.py similarity index 100% rename from xmodule/modulestore/tests/test_store_utilities.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_store_utilities.py diff --git a/xmodule/modulestore/tests/test_xml.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py similarity index 100% rename from xmodule/modulestore/tests/test_xml.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_xml.py diff --git a/xmodule/modulestore/tests/test_xml_importer.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py similarity index 100% rename from xmodule/modulestore/tests/test_xml_importer.py rename to common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py diff --git a/xmodule/modulestore/tests/utils.py b/common/lib/xmodule/xmodule/modulestore/tests/utils.py similarity index 100% rename from xmodule/modulestore/tests/utils.py rename to common/lib/xmodule/xmodule/modulestore/tests/utils.py diff --git a/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py similarity index 100% rename from xmodule/modulestore/xml.py rename to common/lib/xmodule/xmodule/modulestore/xml.py diff --git a/xmodule/modulestore/xml_exporter.py b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py similarity index 100% rename from xmodule/modulestore/xml_exporter.py rename to common/lib/xmodule/xmodule/modulestore/xml_exporter.py diff --git a/xmodule/modulestore/xml_importer.py b/common/lib/xmodule/xmodule/modulestore/xml_importer.py similarity index 100% rename from xmodule/modulestore/xml_importer.py rename to common/lib/xmodule/xmodule/modulestore/xml_importer.py diff --git a/xmodule/mongo_utils.py b/common/lib/xmodule/xmodule/mongo_utils.py similarity index 100% rename from xmodule/mongo_utils.py rename to common/lib/xmodule/xmodule/mongo_utils.py diff --git a/xmodule/partitions/__init__.py b/common/lib/xmodule/xmodule/partitions/__init__.py similarity index 100% rename from xmodule/partitions/__init__.py rename to common/lib/xmodule/xmodule/partitions/__init__.py diff --git a/xmodule/partitions/enrollment_track_partition_generator.py b/common/lib/xmodule/xmodule/partitions/enrollment_track_partition_generator.py similarity index 100% rename from xmodule/partitions/enrollment_track_partition_generator.py rename to common/lib/xmodule/xmodule/partitions/enrollment_track_partition_generator.py diff --git a/xmodule/partitions/partitions.py b/common/lib/xmodule/xmodule/partitions/partitions.py similarity index 100% rename from xmodule/partitions/partitions.py rename to common/lib/xmodule/xmodule/partitions/partitions.py diff --git a/xmodule/partitions/partitions_service.py b/common/lib/xmodule/xmodule/partitions/partitions_service.py similarity index 100% rename from xmodule/partitions/partitions_service.py rename to common/lib/xmodule/xmodule/partitions/partitions_service.py diff --git a/xmodule/partitions/tests/__init__.py b/common/lib/xmodule/xmodule/partitions/tests/__init__.py similarity index 100% rename from xmodule/partitions/tests/__init__.py rename to common/lib/xmodule/xmodule/partitions/tests/__init__.py diff --git a/xmodule/partitions/tests/test_partitions.py b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py similarity index 100% rename from xmodule/partitions/tests/test_partitions.py rename to common/lib/xmodule/xmodule/partitions/tests/test_partitions.py diff --git a/xmodule/poll_module.py b/common/lib/xmodule/xmodule/poll_module.py similarity index 99% rename from xmodule/poll_module.py rename to common/lib/xmodule/xmodule/poll_module.py index e8aebaf7d9..c48637d451 100644 --- a/xmodule/poll_module.py +++ b/common/lib/xmodule/xmodule/poll_module.py @@ -17,9 +17,9 @@ from pkg_resources import resource_string from web_fragments.fragment import Fragment from lxml import etree +from openedx.core.djangolib.markup import Text, HTML from xblock.core import XBlock from xblock.fields import Boolean, Dict, List, Scope, String # lint-amnesty, pylint: disable=wrong-import-order -from openedx.core.djangolib.markup import Text, HTML from xmodule.mako_module import MakoTemplateBlockBase from xmodule.stringify import stringify_children from xmodule.util.xmodule_django import add_webpack_to_fragment @@ -32,7 +32,6 @@ from xmodule.x_module import ( ) from xmodule.xml_module import XmlMixin - log = logging.getLogger(__name__) _ = lambda text: text diff --git a/xmodule/progress.py b/common/lib/xmodule/xmodule/progress.py similarity index 100% rename from xmodule/progress.py rename to common/lib/xmodule/xmodule/progress.py diff --git a/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py similarity index 100% rename from xmodule/randomize_module.py rename to common/lib/xmodule/xmodule/randomize_module.py diff --git a/xmodule/raw_module.py b/common/lib/xmodule/xmodule/raw_module.py similarity index 100% rename from xmodule/raw_module.py rename to common/lib/xmodule/xmodule/raw_module.py diff --git a/xmodule/seq_module.py b/common/lib/xmodule/xmodule/seq_module.py similarity index 99% rename from xmodule/seq_module.py rename to common/lib/xmodule/xmodule/seq_module.py index f8c4ce95b8..32edb0ae5b 100644 --- a/xmodule/seq_module.py +++ b/common/lib/xmodule/xmodule/seq_module.py @@ -9,8 +9,8 @@ import collections import json import logging from datetime import datetime -from functools import reduce from django.conf import settings +from functools import reduce from lxml import etree from opaque_keys.edx.keys import UsageKey @@ -613,8 +613,7 @@ class SequenceBlock( params = self._get_render_metadata(context, display_items, prereq_met, prereq_meta_info, banner_text, view, fragment) # lint-amnesty, pylint: disable=line-too-long if SHOW_PROGRESS_BAR.is_enabled() and getattr(settings, 'COMPLETION_AGGREGATOR_URL', ''): parent_block_id = self.get_parent().scope_ids.usage_id.block_id - params['chapter_completion_aggregator_url'] = '/'.join( - [settings.COMPLETION_AGGREGATOR_URL, str(self.course_id), parent_block_id]) + '/' + params['chapter_completion_aggregator_url'] = '/'.join([settings.COMPLETION_AGGREGATOR_URL, str(self.course_id), parent_block_id]) + '/' fragment.add_content(self.runtime.service(self, 'mako').render_template("seq_module.html", params)) self._capture_full_seq_item_metrics(display_items) diff --git a/xmodule/services.py b/common/lib/xmodule/xmodule/services.py similarity index 99% rename from xmodule/services.py rename to common/lib/xmodule/xmodule/services.py index 4c6ed49f40..a45ad61a44 100644 --- a/xmodule/services.py +++ b/common/lib/xmodule/xmodule/services.py @@ -11,15 +11,16 @@ from functools import partial from config_models.models import ConfigurationModel from django.conf import settings from edx_when.field_data import DateLookupFieldData +from xmodule.modulestore.django import modulestore from xblock.reference.plugins import Service from xblock.runtime import KvsFieldData -from xmodule.modulestore.django import modulestore from lms.djangoapps.courseware.field_overrides import OverrideFieldData from lms.djangoapps.courseware.model_data import DjangoKeyValueStore, FieldDataCache from lms.djangoapps.lms_xblock.field_data import LmsFieldData from lms.djangoapps.lms_xblock.models import XBlockAsidesConfig +from openedx.core.lib.courses import get_course_by_id log = logging.getLogger(__name__) diff --git a/xmodule/split_test_module.py b/common/lib/xmodule/xmodule/split_test_module.py similarity index 100% rename from xmodule/split_test_module.py rename to common/lib/xmodule/xmodule/split_test_module.py diff --git a/xmodule/static_content.py b/common/lib/xmodule/xmodule/static_content.py similarity index 100% rename from xmodule/static_content.py rename to common/lib/xmodule/xmodule/static_content.py diff --git a/xmodule/stringify.py b/common/lib/xmodule/xmodule/stringify.py similarity index 100% rename from xmodule/stringify.py rename to common/lib/xmodule/xmodule/stringify.py diff --git a/xmodule/studio_editable.py b/common/lib/xmodule/xmodule/studio_editable.py similarity index 100% rename from xmodule/studio_editable.py rename to common/lib/xmodule/xmodule/studio_editable.py diff --git a/xmodule/tabs.py b/common/lib/xmodule/xmodule/tabs.py similarity index 100% rename from xmodule/tabs.py rename to common/lib/xmodule/xmodule/tabs.py diff --git a/xmodule/template_module.py b/common/lib/xmodule/xmodule/template_module.py similarity index 100% rename from xmodule/template_module.py rename to common/lib/xmodule/xmodule/template_module.py diff --git a/xmodule/templates.py b/common/lib/xmodule/xmodule/templates.py similarity index 100% rename from xmodule/templates.py rename to common/lib/xmodule/xmodule/templates.py diff --git a/xmodule/templates/about/overview.yaml b/common/lib/xmodule/xmodule/templates/about/overview.yaml similarity index 100% rename from xmodule/templates/about/overview.yaml rename to common/lib/xmodule/xmodule/templates/about/overview.yaml diff --git a/xmodule/templates/html/announcement.yaml b/common/lib/xmodule/xmodule/templates/html/announcement.yaml similarity index 100% rename from xmodule/templates/html/announcement.yaml rename to common/lib/xmodule/xmodule/templates/html/announcement.yaml diff --git a/xmodule/templates/html/anon_user_id.yaml b/common/lib/xmodule/xmodule/templates/html/anon_user_id.yaml similarity index 100% rename from xmodule/templates/html/anon_user_id.yaml rename to common/lib/xmodule/xmodule/templates/html/anon_user_id.yaml diff --git a/xmodule/templates/html/iframe.yaml b/common/lib/xmodule/xmodule/templates/html/iframe.yaml similarity index 100% rename from xmodule/templates/html/iframe.yaml rename to common/lib/xmodule/xmodule/templates/html/iframe.yaml diff --git a/xmodule/templates/html/latex_html.yaml b/common/lib/xmodule/xmodule/templates/html/latex_html.yaml similarity index 100% rename from xmodule/templates/html/latex_html.yaml rename to common/lib/xmodule/xmodule/templates/html/latex_html.yaml diff --git a/xmodule/templates/html/raw.yaml b/common/lib/xmodule/xmodule/templates/html/raw.yaml similarity index 100% rename from xmodule/templates/html/raw.yaml rename to common/lib/xmodule/xmodule/templates/html/raw.yaml diff --git a/xmodule/templates/html/zooming_image.yaml b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml similarity index 100% rename from xmodule/templates/html/zooming_image.yaml rename to common/lib/xmodule/xmodule/templates/html/zooming_image.yaml diff --git a/xmodule/templates/library-sourced-block-studio-view.html b/common/lib/xmodule/xmodule/templates/library-sourced-block-studio-view.html similarity index 100% rename from xmodule/templates/library-sourced-block-studio-view.html rename to common/lib/xmodule/xmodule/templates/library-sourced-block-studio-view.html diff --git a/xmodule/templates/problem/blank_common.yaml b/common/lib/xmodule/xmodule/templates/problem/blank_common.yaml similarity index 100% rename from xmodule/templates/problem/blank_common.yaml rename to common/lib/xmodule/xmodule/templates/problem/blank_common.yaml diff --git a/xmodule/templates/problem/checkboxes_response.yaml b/common/lib/xmodule/xmodule/templates/problem/checkboxes_response.yaml similarity index 100% rename from xmodule/templates/problem/checkboxes_response.yaml rename to common/lib/xmodule/xmodule/templates/problem/checkboxes_response.yaml diff --git a/xmodule/templates/problem/checkboxes_response_hint.yaml b/common/lib/xmodule/xmodule/templates/problem/checkboxes_response_hint.yaml similarity index 100% rename from xmodule/templates/problem/checkboxes_response_hint.yaml rename to common/lib/xmodule/xmodule/templates/problem/checkboxes_response_hint.yaml diff --git a/xmodule/templates/problem/circuitschematic.yaml b/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml similarity index 100% rename from xmodule/templates/problem/circuitschematic.yaml rename to common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml diff --git a/xmodule/templates/problem/customgrader.yaml b/common/lib/xmodule/xmodule/templates/problem/customgrader.yaml similarity index 100% rename from xmodule/templates/problem/customgrader.yaml rename to common/lib/xmodule/xmodule/templates/problem/customgrader.yaml diff --git a/xmodule/templates/problem/drag_and_drop.yaml b/common/lib/xmodule/xmodule/templates/problem/drag_and_drop.yaml similarity index 100% rename from xmodule/templates/problem/drag_and_drop.yaml rename to common/lib/xmodule/xmodule/templates/problem/drag_and_drop.yaml diff --git a/xmodule/templates/problem/formularesponse.yaml b/common/lib/xmodule/xmodule/templates/problem/formularesponse.yaml similarity index 100% rename from xmodule/templates/problem/formularesponse.yaml rename to common/lib/xmodule/xmodule/templates/problem/formularesponse.yaml diff --git a/xmodule/templates/problem/imageresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml similarity index 100% rename from xmodule/templates/problem/imageresponse.yaml rename to common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml diff --git a/xmodule/templates/problem/jsinput_response.yaml b/common/lib/xmodule/xmodule/templates/problem/jsinput_response.yaml similarity index 100% rename from xmodule/templates/problem/jsinput_response.yaml rename to common/lib/xmodule/xmodule/templates/problem/jsinput_response.yaml diff --git a/xmodule/templates/problem/latex_problem.yaml b/common/lib/xmodule/xmodule/templates/problem/latex_problem.yaml similarity index 100% rename from xmodule/templates/problem/latex_problem.yaml rename to common/lib/xmodule/xmodule/templates/problem/latex_problem.yaml diff --git a/xmodule/templates/problem/multiplechoice.yaml b/common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml similarity index 100% rename from xmodule/templates/problem/multiplechoice.yaml rename to common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml diff --git a/xmodule/templates/problem/multiplechoice_hint.yaml b/common/lib/xmodule/xmodule/templates/problem/multiplechoice_hint.yaml similarity index 100% rename from xmodule/templates/problem/multiplechoice_hint.yaml rename to common/lib/xmodule/xmodule/templates/problem/multiplechoice_hint.yaml diff --git a/xmodule/templates/problem/numericalresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml similarity index 100% rename from xmodule/templates/problem/numericalresponse.yaml rename to common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml diff --git a/xmodule/templates/problem/numericalresponse_hint.yaml b/common/lib/xmodule/xmodule/templates/problem/numericalresponse_hint.yaml similarity index 100% rename from xmodule/templates/problem/numericalresponse_hint.yaml rename to common/lib/xmodule/xmodule/templates/problem/numericalresponse_hint.yaml diff --git a/xmodule/templates/problem/optionresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml similarity index 100% rename from xmodule/templates/problem/optionresponse.yaml rename to common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml diff --git a/xmodule/templates/problem/optionresponse_hint.yaml b/common/lib/xmodule/xmodule/templates/problem/optionresponse_hint.yaml similarity index 100% rename from xmodule/templates/problem/optionresponse_hint.yaml rename to common/lib/xmodule/xmodule/templates/problem/optionresponse_hint.yaml diff --git a/xmodule/templates/problem/problem_with_hint.yaml b/common/lib/xmodule/xmodule/templates/problem/problem_with_hint.yaml similarity index 100% rename from xmodule/templates/problem/problem_with_hint.yaml rename to common/lib/xmodule/xmodule/templates/problem/problem_with_hint.yaml diff --git a/xmodule/templates/problem/problem_with_hint_in_latex.yaml b/common/lib/xmodule/xmodule/templates/problem/problem_with_hint_in_latex.yaml similarity index 100% rename from xmodule/templates/problem/problem_with_hint_in_latex.yaml rename to common/lib/xmodule/xmodule/templates/problem/problem_with_hint_in_latex.yaml diff --git a/xmodule/templates/problem/string_response.yaml b/common/lib/xmodule/xmodule/templates/problem/string_response.yaml similarity index 100% rename from xmodule/templates/problem/string_response.yaml rename to common/lib/xmodule/xmodule/templates/problem/string_response.yaml diff --git a/xmodule/templates/problem/string_response_hint.yaml b/common/lib/xmodule/xmodule/templates/problem/string_response_hint.yaml similarity index 100% rename from xmodule/templates/problem/string_response_hint.yaml rename to common/lib/xmodule/xmodule/templates/problem/string_response_hint.yaml diff --git a/xmodule/templates/test/announcement.yaml b/common/lib/xmodule/xmodule/templates/test/announcement.yaml similarity index 100% rename from xmodule/templates/test/announcement.yaml rename to common/lib/xmodule/xmodule/templates/test/announcement.yaml diff --git a/xmodule/templates/test/anon_user_id.yaml b/common/lib/xmodule/xmodule/templates/test/anon_user_id.yaml similarity index 100% rename from xmodule/templates/test/anon_user_id.yaml rename to common/lib/xmodule/xmodule/templates/test/anon_user_id.yaml diff --git a/xmodule/templates/test/latex_html.yaml b/common/lib/xmodule/xmodule/templates/test/latex_html.yaml similarity index 100% rename from xmodule/templates/test/latex_html.yaml rename to common/lib/xmodule/xmodule/templates/test/latex_html.yaml diff --git a/xmodule/templates/test/somefile.notyaml b/common/lib/xmodule/xmodule/templates/test/somefile.notyaml similarity index 100% rename from xmodule/templates/test/somefile.notyaml rename to common/lib/xmodule/xmodule/templates/test/somefile.notyaml diff --git a/xmodule/templates/test/zooming_image.yaml b/common/lib/xmodule/xmodule/templates/test/zooming_image.yaml similarity index 100% rename from xmodule/templates/test/zooming_image.yaml rename to common/lib/xmodule/xmodule/templates/test/zooming_image.yaml diff --git a/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py similarity index 99% rename from xmodule/tests/__init__.py rename to common/lib/xmodule/xmodule/tests/__init__.py index 19f0718ab2..6b5f903553 100644 --- a/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -3,7 +3,7 @@ unittests for xmodule Run like this: - paver test_lib -l ./xmodule + paver test_lib -l common/lib/xmodule """ @@ -43,8 +43,8 @@ from openedx.core.lib.cache_utils import CacheService MODULE_DIR = path(__file__).dirname() # Location of common test DATA directory -# '../../common/test/data/' -DATA_DIR = MODULE_DIR.parent.parent / "common" / "test" / "data" +# '../../../../edx-platform/common/test/data/' +DATA_DIR = MODULE_DIR.parent.parent.parent.parent / "test" / "data" class TestModuleSystem(ModuleSystem): # pylint: disable=abstract-method @@ -84,7 +84,7 @@ class TestModuleSystem(ModuleSystem): # pylint: disable=abstract-method @property def resources_fs(self): - return Mock(name='TestModuleSystem.resources_fs', root_path='.') + return Mock(name='TestModuleSystem.resources_fs', root_path='.'), def __repr__(self): """ diff --git a/common/lib/xmodule/xmodule/tests/data/xml-course-root b/common/lib/xmodule/xmodule/tests/data/xml-course-root new file mode 120000 index 0000000000..83890f4542 --- /dev/null +++ b/common/lib/xmodule/xmodule/tests/data/xml-course-root @@ -0,0 +1 @@ +../../../../../test/data/ \ No newline at end of file diff --git a/xmodule/tests/helpers.py b/common/lib/xmodule/xmodule/tests/helpers.py similarity index 100% rename from xmodule/tests/helpers.py rename to common/lib/xmodule/xmodule/tests/helpers.py diff --git a/xmodule/tests/rendering/__init__.py b/common/lib/xmodule/xmodule/tests/rendering/__init__.py similarity index 100% rename from xmodule/tests/rendering/__init__.py rename to common/lib/xmodule/xmodule/tests/rendering/__init__.py diff --git a/xmodule/tests/rendering/core.py b/common/lib/xmodule/xmodule/tests/rendering/core.py similarity index 100% rename from xmodule/tests/rendering/core.py rename to common/lib/xmodule/xmodule/tests/rendering/core.py diff --git a/xmodule/tests/test_annotatable_module.py b/common/lib/xmodule/xmodule/tests/test_annotatable_module.py similarity index 100% rename from xmodule/tests/test_annotatable_module.py rename to common/lib/xmodule/xmodule/tests/test_annotatable_module.py diff --git a/xmodule/tests/test_annotator_mixin.py b/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py similarity index 100% rename from xmodule/tests/test_annotator_mixin.py rename to common/lib/xmodule/xmodule/tests/test_annotator_mixin.py diff --git a/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py similarity index 100% rename from xmodule/tests/test_capa_module.py rename to common/lib/xmodule/xmodule/tests/test_capa_module.py index 0f859300b2..41acc05a93 100644 --- a/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -28,11 +28,11 @@ from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from xblock.scorable import Score +import xmodule from capa import responsetypes from capa.correctmap import CorrectMap from capa.responsetypes import LoncapaProblemError, ResponseError, StudentInputError from capa.xqueue_interface import XQueueInterface -import xmodule from xmodule.capa_module import ComplexEncoder, ProblemBlock from xmodule.tests import DATA_DIR diff --git a/xmodule/tests/test_conditional.py b/common/lib/xmodule/xmodule/tests/test_conditional.py similarity index 100% rename from xmodule/tests/test_conditional.py rename to common/lib/xmodule/xmodule/tests/test_conditional.py diff --git a/xmodule/tests/test_content.py b/common/lib/xmodule/xmodule/tests/test_content.py similarity index 100% rename from xmodule/tests/test_content.py rename to common/lib/xmodule/xmodule/tests/test_content.py diff --git a/xmodule/tests/test_course_metadata_utils.py b/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py similarity index 100% rename from xmodule/tests/test_course_metadata_utils.py rename to common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py diff --git a/xmodule/tests/test_course_module.py b/common/lib/xmodule/xmodule/tests/test_course_module.py similarity index 100% rename from xmodule/tests/test_course_module.py rename to common/lib/xmodule/xmodule/tests/test_course_module.py diff --git a/xmodule/tests/test_delay_between_attempts.py b/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py similarity index 100% rename from xmodule/tests/test_delay_between_attempts.py rename to common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py diff --git a/xmodule/tests/test_editing_module.py b/common/lib/xmodule/xmodule/tests/test_editing_module.py similarity index 100% rename from xmodule/tests/test_editing_module.py rename to common/lib/xmodule/xmodule/tests/test_editing_module.py diff --git a/xmodule/tests/test_error_module.py b/common/lib/xmodule/xmodule/tests/test_error_module.py similarity index 97% rename from xmodule/tests/test_error_module.py rename to common/lib/xmodule/xmodule/tests/test_error_module.py index 162f82a26d..066f48aed7 100644 --- a/xmodule/tests/test_error_module.py +++ b/common/lib/xmodule/xmodule/tests/test_error_module.py @@ -5,7 +5,9 @@ Tests for ErrorBlock and NonStaffErrorBlock import unittest +import pytest from opaque_keys.edx.locator import CourseLocator +from xblock.test.tools import unabc from xmodule.error_module import ErrorBlock, NonStaffErrorBlock from xmodule.modulestore.xml import CourseLocationManager diff --git a/xmodule/tests/test_export.py b/common/lib/xmodule/xmodule/tests/test_export.py similarity index 100% rename from xmodule/tests/test_export.py rename to common/lib/xmodule/xmodule/tests/test_export.py diff --git a/xmodule/tests/test_fields.py b/common/lib/xmodule/xmodule/tests/test_fields.py similarity index 100% rename from xmodule/tests/test_fields.py rename to common/lib/xmodule/xmodule/tests/test_fields.py diff --git a/xmodule/tests/test_files/test_tabseditingdescriptor.css b/common/lib/xmodule/xmodule/tests/test_files/test_tabseditingdescriptor.css similarity index 100% rename from xmodule/tests/test_files/test_tabseditingdescriptor.css rename to common/lib/xmodule/xmodule/tests/test_files/test_tabseditingdescriptor.css diff --git a/xmodule/tests/test_files/test_tabseditingdescriptor.scss b/common/lib/xmodule/xmodule/tests/test_files/test_tabseditingdescriptor.scss similarity index 100% rename from xmodule/tests/test_files/test_tabseditingdescriptor.scss rename to common/lib/xmodule/xmodule/tests/test_files/test_tabseditingdescriptor.scss diff --git a/xmodule/tests/test_graders.py b/common/lib/xmodule/xmodule/tests/test_graders.py similarity index 100% rename from xmodule/tests/test_graders.py rename to common/lib/xmodule/xmodule/tests/test_graders.py diff --git a/xmodule/tests/test_html_module.py b/common/lib/xmodule/xmodule/tests/test_html_module.py similarity index 100% rename from xmodule/tests/test_html_module.py rename to common/lib/xmodule/xmodule/tests/test_html_module.py diff --git a/xmodule/tests/test_import.py b/common/lib/xmodule/xmodule/tests/test_import.py similarity index 100% rename from xmodule/tests/test_import.py rename to common/lib/xmodule/xmodule/tests/test_import.py diff --git a/xmodule/tests/test_import_static.py b/common/lib/xmodule/xmodule/tests/test_import_static.py similarity index 100% rename from xmodule/tests/test_import_static.py rename to common/lib/xmodule/xmodule/tests/test_import_static.py diff --git a/xmodule/tests/test_library_content.py b/common/lib/xmodule/xmodule/tests/test_library_content.py similarity index 100% rename from xmodule/tests/test_library_content.py rename to common/lib/xmodule/xmodule/tests/test_library_content.py index 3e1785746b..748a962f1d 100644 --- a/xmodule/tests/test_library_content.py +++ b/common/lib/xmodule/xmodule/tests/test_library_content.py @@ -3,8 +3,8 @@ Basic unit tests for LibraryContentBlock Higher-level tests are in `cms/djangoapps/contentstore/tests/test_libraries.py`. """ -from unittest.mock import MagicMock, Mock, patch import ddt +from unittest.mock import MagicMock, Mock, patch from bson.objectid import ObjectId from fs.memoryfs import MemoryFS diff --git a/xmodule/tests/test_library_root.py b/common/lib/xmodule/xmodule/tests/test_library_root.py similarity index 100% rename from xmodule/tests/test_library_root.py rename to common/lib/xmodule/xmodule/tests/test_library_root.py diff --git a/xmodule/tests/test_library_sourced_block.py b/common/lib/xmodule/xmodule/tests/test_library_sourced_block.py similarity index 100% rename from xmodule/tests/test_library_sourced_block.py rename to common/lib/xmodule/xmodule/tests/test_library_sourced_block.py diff --git a/xmodule/tests/test_library_tools.py b/common/lib/xmodule/xmodule/tests/test_library_tools.py similarity index 100% rename from xmodule/tests/test_library_tools.py rename to common/lib/xmodule/xmodule/tests/test_library_tools.py diff --git a/xmodule/tests/test_lti20_unit.py b/common/lib/xmodule/xmodule/tests/test_lti20_unit.py similarity index 100% rename from xmodule/tests/test_lti20_unit.py rename to common/lib/xmodule/xmodule/tests/test_lti20_unit.py diff --git a/xmodule/tests/test_lti_unit.py b/common/lib/xmodule/xmodule/tests/test_lti_unit.py similarity index 100% rename from xmodule/tests/test_lti_unit.py rename to common/lib/xmodule/xmodule/tests/test_lti_unit.py diff --git a/xmodule/tests/test_mako_module.py b/common/lib/xmodule/xmodule/tests/test_mako_module.py similarity index 100% rename from xmodule/tests/test_mako_module.py rename to common/lib/xmodule/xmodule/tests/test_mako_module.py diff --git a/xmodule/tests/test_mongo_utils.py b/common/lib/xmodule/xmodule/tests/test_mongo_utils.py similarity index 100% rename from xmodule/tests/test_mongo_utils.py rename to common/lib/xmodule/xmodule/tests/test_mongo_utils.py diff --git a/xmodule/tests/test_poll.py b/common/lib/xmodule/xmodule/tests/test_poll.py similarity index 100% rename from xmodule/tests/test_poll.py rename to common/lib/xmodule/xmodule/tests/test_poll.py diff --git a/xmodule/tests/test_progress.py b/common/lib/xmodule/xmodule/tests/test_progress.py similarity index 100% rename from xmodule/tests/test_progress.py rename to common/lib/xmodule/xmodule/tests/test_progress.py diff --git a/xmodule/tests/test_randomize_module.py b/common/lib/xmodule/xmodule/tests/test_randomize_module.py similarity index 100% rename from xmodule/tests/test_randomize_module.py rename to common/lib/xmodule/xmodule/tests/test_randomize_module.py diff --git a/xmodule/tests/test_resource_templates.py b/common/lib/xmodule/xmodule/tests/test_resource_templates.py similarity index 100% rename from xmodule/tests/test_resource_templates.py rename to common/lib/xmodule/xmodule/tests/test_resource_templates.py diff --git a/xmodule/tests/test_sequence.py b/common/lib/xmodule/xmodule/tests/test_sequence.py similarity index 100% rename from xmodule/tests/test_sequence.py rename to common/lib/xmodule/xmodule/tests/test_sequence.py diff --git a/xmodule/tests/test_services.py b/common/lib/xmodule/xmodule/tests/test_services.py similarity index 100% rename from xmodule/tests/test_services.py rename to common/lib/xmodule/xmodule/tests/test_services.py diff --git a/xmodule/tests/test_split_test_module.py b/common/lib/xmodule/xmodule/tests/test_split_test_module.py similarity index 100% rename from xmodule/tests/test_split_test_module.py rename to common/lib/xmodule/xmodule/tests/test_split_test_module.py diff --git a/xmodule/tests/test_stringify.py b/common/lib/xmodule/xmodule/tests/test_stringify.py similarity index 100% rename from xmodule/tests/test_stringify.py rename to common/lib/xmodule/xmodule/tests/test_stringify.py diff --git a/xmodule/tests/test_studio_editable.py b/common/lib/xmodule/xmodule/tests/test_studio_editable.py similarity index 100% rename from xmodule/tests/test_studio_editable.py rename to common/lib/xmodule/xmodule/tests/test_studio_editable.py diff --git a/xmodule/tests/test_tabs.py b/common/lib/xmodule/xmodule/tests/test_tabs.py similarity index 100% rename from xmodule/tests/test_tabs.py rename to common/lib/xmodule/xmodule/tests/test_tabs.py diff --git a/xmodule/tests/test_unit_block.py b/common/lib/xmodule/xmodule/tests/test_unit_block.py similarity index 100% rename from xmodule/tests/test_unit_block.py rename to common/lib/xmodule/xmodule/tests/test_unit_block.py diff --git a/xmodule/tests/test_util_duedate.py b/common/lib/xmodule/xmodule/tests/test_util_duedate.py similarity index 100% rename from xmodule/tests/test_util_duedate.py rename to common/lib/xmodule/xmodule/tests/test_util_duedate.py diff --git a/xmodule/tests/test_utils_django.py b/common/lib/xmodule/xmodule/tests/test_utils_django.py similarity index 100% rename from xmodule/tests/test_utils_django.py rename to common/lib/xmodule/xmodule/tests/test_utils_django.py diff --git a/xmodule/tests/test_utils_escape_html_characters.py b/common/lib/xmodule/xmodule/tests/test_utils_escape_html_characters.py similarity index 100% rename from xmodule/tests/test_utils_escape_html_characters.py rename to common/lib/xmodule/xmodule/tests/test_utils_escape_html_characters.py diff --git a/xmodule/tests/test_validation.py b/common/lib/xmodule/xmodule/tests/test_validation.py similarity index 100% rename from xmodule/tests/test_validation.py rename to common/lib/xmodule/xmodule/tests/test_validation.py diff --git a/xmodule/tests/test_vertical.py b/common/lib/xmodule/xmodule/tests/test_vertical.py similarity index 100% rename from xmodule/tests/test_vertical.py rename to common/lib/xmodule/xmodule/tests/test_vertical.py diff --git a/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py similarity index 99% rename from xmodule/tests/test_video.py rename to common/lib/xmodule/xmodule/tests/test_video.py index d82b43ecaf..8084aecdc7 100644 --- a/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -3,12 +3,12 @@ These test data read from xml, not from mongo. We have a ModuleStoreTestCase class defined in -xmodule/modulestore/tests/django_utils.py. You can +common/lib/xmodule/xmodule/modulestore/tests/django_utils.py. You can search for usages of this in the cms and lms tests for examples. You use this so that it will do things like point the modulestore setting to mongo, flush the contentstore before and after, load the templates, etc. You can then use the CourseFactory and XModuleItemFactory as defined -in xmodule/modulestore/tests/factories.py to create +in common/lib/xmodule/xmodule/modulestore/tests/factories.py to create the course, section, subsection, unit, etc. """ diff --git a/xmodule/tests/test_word_cloud.py b/common/lib/xmodule/xmodule/tests/test_word_cloud.py similarity index 100% rename from xmodule/tests/test_word_cloud.py rename to common/lib/xmodule/xmodule/tests/test_word_cloud.py diff --git a/xmodule/tests/test_xml_module.py b/common/lib/xmodule/xmodule/tests/test_xml_module.py similarity index 100% rename from xmodule/tests/test_xml_module.py rename to common/lib/xmodule/xmodule/tests/test_xml_module.py diff --git a/xmodule/tests/xml/__init__.py b/common/lib/xmodule/xmodule/tests/xml/__init__.py similarity index 100% rename from xmodule/tests/xml/__init__.py rename to common/lib/xmodule/xmodule/tests/xml/__init__.py diff --git a/xmodule/tests/xml/factories.py b/common/lib/xmodule/xmodule/tests/xml/factories.py similarity index 100% rename from xmodule/tests/xml/factories.py rename to common/lib/xmodule/xmodule/tests/xml/factories.py diff --git a/xmodule/tests/xml/test_inheritance.py b/common/lib/xmodule/xmodule/tests/xml/test_inheritance.py similarity index 100% rename from xmodule/tests/xml/test_inheritance.py rename to common/lib/xmodule/xmodule/tests/xml/test_inheritance.py diff --git a/xmodule/tests/xml/test_policy.py b/common/lib/xmodule/xmodule/tests/xml/test_policy.py similarity index 100% rename from xmodule/tests/xml/test_policy.py rename to common/lib/xmodule/xmodule/tests/xml/test_policy.py diff --git a/xmodule/timeinfo.py b/common/lib/xmodule/xmodule/timeinfo.py similarity index 100% rename from xmodule/timeinfo.py rename to common/lib/xmodule/xmodule/timeinfo.py diff --git a/xmodule/unit_block.py b/common/lib/xmodule/xmodule/unit_block.py similarity index 100% rename from xmodule/unit_block.py rename to common/lib/xmodule/xmodule/unit_block.py diff --git a/xmodule/util/__init__.py b/common/lib/xmodule/xmodule/util/__init__.py similarity index 100% rename from xmodule/util/__init__.py rename to common/lib/xmodule/xmodule/util/__init__.py diff --git a/xmodule/util/duedate.py b/common/lib/xmodule/xmodule/util/duedate.py similarity index 100% rename from xmodule/util/duedate.py rename to common/lib/xmodule/xmodule/util/duedate.py diff --git a/xmodule/util/misc.py b/common/lib/xmodule/xmodule/util/misc.py similarity index 100% rename from xmodule/util/misc.py rename to common/lib/xmodule/xmodule/util/misc.py index e7a308f85f..d6dda5aa51 100644 --- a/xmodule/util/misc.py +++ b/common/lib/xmodule/xmodule/util/misc.py @@ -5,11 +5,11 @@ Miscellaneous utility functions. import re +from xmodule.annotator_mixin import html_to_text from opaque_keys.edx.locator import ( CourseLocator, LibraryLocator, ) -from xmodule.annotator_mixin import html_to_text def escape_invalid_characters(name, invalid_char_list, replace_with='_'): diff --git a/xmodule/util/sandboxing.py b/common/lib/xmodule/xmodule/util/sandboxing.py similarity index 100% rename from xmodule/util/sandboxing.py rename to common/lib/xmodule/xmodule/util/sandboxing.py diff --git a/xmodule/util/xmodule_django.py b/common/lib/xmodule/xmodule/util/xmodule_django.py similarity index 100% rename from xmodule/util/xmodule_django.py rename to common/lib/xmodule/xmodule/util/xmodule_django.py diff --git a/xmodule/validation.py b/common/lib/xmodule/xmodule/validation.py similarity index 100% rename from xmodule/validation.py rename to common/lib/xmodule/xmodule/validation.py diff --git a/xmodule/vertical_block.py b/common/lib/xmodule/xmodule/vertical_block.py similarity index 100% rename from xmodule/vertical_block.py rename to common/lib/xmodule/xmodule/vertical_block.py diff --git a/xmodule/video_module/__init__.py b/common/lib/xmodule/xmodule/video_module/__init__.py similarity index 100% rename from xmodule/video_module/__init__.py rename to common/lib/xmodule/xmodule/video_module/__init__.py diff --git a/xmodule/video_module/bumper_utils.py b/common/lib/xmodule/xmodule/video_module/bumper_utils.py similarity index 100% rename from xmodule/video_module/bumper_utils.py rename to common/lib/xmodule/xmodule/video_module/bumper_utils.py diff --git a/xmodule/video_module/transcripts_utils.py b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py similarity index 100% rename from xmodule/video_module/transcripts_utils.py rename to common/lib/xmodule/xmodule/video_module/transcripts_utils.py diff --git a/xmodule/video_module/video_handlers.py b/common/lib/xmodule/xmodule/video_module/video_handlers.py similarity index 100% rename from xmodule/video_module/video_handlers.py rename to common/lib/xmodule/xmodule/video_module/video_handlers.py diff --git a/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py similarity index 99% rename from xmodule/video_module/video_module.py rename to common/lib/xmodule/xmodule/video_module/video_module.py index 82549ff40e..833c4af8fd 100644 --- a/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -955,7 +955,7 @@ class VideoBlock( course_id = getattr(id_generator, 'target_course_id', None) # Update the handout location with current course_id - if 'handout' in field_data and course_id: + if 'handout' in list(field_data.keys()) and course_id: handout_location = StaticContent.get_location_from_path(field_data['handout']) if isinstance(handout_location, AssetLocator): handout_new_location = StaticContent.compute_location(course_id, handout_location.path) diff --git a/xmodule/video_module/video_utils.py b/common/lib/xmodule/xmodule/video_module/video_utils.py similarity index 100% rename from xmodule/video_module/video_utils.py rename to common/lib/xmodule/xmodule/video_module/video_utils.py diff --git a/xmodule/video_module/video_xfields.py b/common/lib/xmodule/xmodule/video_module/video_xfields.py similarity index 100% rename from xmodule/video_module/video_xfields.py rename to common/lib/xmodule/xmodule/video_module/video_xfields.py diff --git a/xmodule/word_cloud_module.py b/common/lib/xmodule/xmodule/word_cloud_module.py similarity index 100% rename from xmodule/word_cloud_module.py rename to common/lib/xmodule/xmodule/word_cloud_module.py diff --git a/xmodule/wrapper_module.py b/common/lib/xmodule/xmodule/wrapper_module.py similarity index 100% rename from xmodule/wrapper_module.py rename to common/lib/xmodule/xmodule/wrapper_module.py diff --git a/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py similarity index 99% rename from xmodule/x_module.py rename to common/lib/xmodule/xmodule/x_module.py index 88027f9a98..adff5c8635 100644 --- a/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -2,6 +2,7 @@ import logging import os +import sys import time import warnings from collections import namedtuple @@ -34,6 +35,8 @@ from xblock.fields import ( from xblock.runtime import IdGenerator, IdReader, Runtime from xmodule import block_metadata_utils +from xmodule.errortracker import exc_info_to_str +from xmodule.exceptions import UndefinedContext from xmodule.fields import RelativeTime from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.util.xmodule_django import add_webpack_to_fragment @@ -1012,9 +1015,10 @@ class MetricsMixin: def render(self, block, view_name, context=None): # lint-amnesty, pylint: disable=missing-function-docstring start_time = time.time() - status = "success" try: + status = "success" return super().render(block, view_name, context=context) + except: status = "failure" raise @@ -1041,9 +1045,10 @@ class MetricsMixin: def handle(self, block, handler_name, request, suffix=''): # lint-amnesty, pylint: disable=missing-function-docstring start_time = time.time() - status = "success" try: + status = "success" return super().handle(block, handler_name, request, suffix=suffix) + except: status = "failure" raise diff --git a/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py similarity index 100% rename from xmodule/xml_module.py rename to common/lib/xmodule/xmodule/xml_module.py diff --git a/common/static/css/tinymce-studio-content.css b/common/static/css/tinymce-studio-content.css index 0411fd3ba9..c01f772e05 100644 --- a/common/static/css/tinymce-studio-content.css +++ b/common/static/css/tinymce-studio-content.css @@ -3,7 +3,7 @@ padding: 10px; background-color: #fff; /* keep font-family in sync with CUSTOM_FONTS constant in Html editor XModule - * (edx-platform/xmodule/js/src/html/edit.js) + * (edx-platform/common/lib/xmodule/xmodule/js/src/html/edit.js) * and with acceptance tests in cms/djangoapps/contentstore/features/html-editor.feature */ font-family: 'Open Sans', Verdana, Arial, Helvetica, sans-serif; diff --git a/docs/guides/conf.py b/docs/guides/conf.py index 09c64ffabf..e61fcd5f17 100644 --- a/docs/guides/conf.py +++ b/docs/guides/conf.py @@ -21,7 +21,7 @@ root = Path('../..').abspath() sys.path.insert(0, root) sys.path.append(root / "docs/guides") sys.path.append(root / "common/lib/capa") - +sys.path.append(root / "common/lib/xmodule") # Use a settings module that allows all LMS and Studio code to be imported # without errors. If running sphinx-apidoc, we already set a different @@ -222,9 +222,9 @@ autodoc_mock_imports = [ modules = { 'cms': 'cms', 'common/lib/capa/capa': 'common/lib/capa', + 'common/lib/xmodule/xmodule': 'common/lib/xmodule', 'lms': 'lms', 'openedx': 'openedx', - 'xmodule': 'xmodule', } diff --git a/docs/guides/docstrings/common_lib.rst b/docs/guides/docstrings/common_lib.rst index dcf884e56f..b874670166 100644 --- a/docs/guides/docstrings/common_lib.rst +++ b/docs/guides/docstrings/common_lib.rst @@ -9,3 +9,4 @@ out from edx-platform into separate packages at some point. :maxdepth: 2 common/lib/capa/modules + common/lib/xmodule/modules diff --git a/docs/guides/docstrings/docstrings.rst b/docs/guides/docstrings/docstrings.rst index 4862966fc4..bbd0418112 100644 --- a/docs/guides/docstrings/docstrings.rst +++ b/docs/guides/docstrings/docstrings.rst @@ -8,4 +8,3 @@ Python Docstrings common_index lms_index openedx/modules - xmodule/modules diff --git a/docs/guides/testing/testing.rst b/docs/guides/testing/testing.rst index f7a10787df..9baf24aee7 100644 --- a/docs/guides/testing/testing.rst +++ b/docs/guides/testing/testing.rst @@ -74,7 +74,7 @@ Test Locations located in ``common/lib/capa/capa/tests``. - Javascript unit tests: Located in ``spec`` folders. For example, - ``xmodule/js/spec`` and + ``common/lib/xmodule/xmodule/js/spec`` and ``{cms,lms}/static/js/spec`` For consistency, you should use the same directory structure for implementation and test. For example, the test for ``src/views/module.js`` should be written in @@ -122,7 +122,7 @@ Various ways to run tests using pytest:: For example, this command runs a single python unit test file:: - pytest xmodule/tests/test_stringify.py + pytest common/lib/xmodule/xmodule/tests/test_stringify.py Note - edx-platorm has multiple services (lms, cms) in it. The environment for each service is different enough that we run some tests in both environments in jenkins. To make sure tests will pass in each of these environments (especially for tests in "common" directory), you will need to test in each seperately. Add --rootdir flag at end of your pytest call and specify the env you are testing in:: @@ -133,7 +133,7 @@ Various tools like ddt create tests with very complex names, rather than figurin 1. Select tests to run based on their name, provide an expression to the `pytest -k option`_ which performs a substring match on test names:: - pytest xmodule/tests/test_stringify.py -k test_stringify + pytest common/lib/xmodule/xmodule/tests/test_stringify.py -k test_stringify .. _pytest -k option: https://docs.pytest.org/en/latest/example/markers.html#using-k-expr-to-select-tests-based-on-their-name .. _node ID: https://docs.pytest.org/en/latest/example/markers.html#node-id @@ -141,7 +141,7 @@ Various tools like ddt create tests with very complex names, rather than figurin 2. Alternatively, you can the get the name of all test methods in a class, file, or project, including all ddt.data variations, by running pytest with `--collectonly`:: - pytest xmodule/tests/test_stringify.py --collectonly + pytest common/lib/xmodule/xmodule/tests/test_stringify.py --collectonly Testing with migrations *********************** @@ -215,7 +215,7 @@ Use this command to generate an HTML report:: coverage html -The report is then saved in reports/xmodule/cover/index.html +The report is then saved in reports/common/lib/xmodule/cover/index.html To run tests for stub servers, for example for `YouTube stub server`_, you can run one of these commands:: diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 84929daead..8f4a796af6 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1345,7 +1345,7 @@ paths: percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection show_correctness: (str) a str representing whether to show the problem/practice scores based on due date ('always', 'never', 'past_due', values defined in - xmodule/modulestore/inheritance.py) + common/lib/xmodule/xmodule/modulestore/inheritance.py) show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str) the absolute path url to the Subsection enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) diff --git a/lms/djangoapps/ccx/tests/test_views.py b/lms/djangoapps/ccx/tests/test_views.py index c3c3f68a00..723fba2406 100644 --- a/lms/djangoapps/ccx/tests/test_views.py +++ b/lms/djangoapps/ccx/tests/test_views.py @@ -19,13 +19,13 @@ from django.utils.translation import gettext as _ from edx_django_utils.cache import RequestCache from opaque_keys.edx.keys import CourseKey from pytz import UTC -from capa.tests.response_xml_factory import StringResponseXMLFactory - from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, SampleCourseFactory from xmodule.x_module import XModuleMixin + +from capa.tests.response_xml_factory import StringResponseXMLFactory from common.djangoapps.edxmako.shortcuts import render_to_response from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole diff --git a/lms/djangoapps/course_home_api/progress/views.py b/lms/djangoapps/course_home_api/progress/views.py index dc0ea63525..4f9731b9b6 100644 --- a/lms/djangoapps/course_home_api/progress/views.py +++ b/lms/djangoapps/course_home_api/progress/views.py @@ -112,7 +112,7 @@ class ProgressTabView(RetrieveAPIView): possible: (float) number of possible points show_correctness: (str) a str representing whether to show the problem/practice scores based on due date ('always', 'never', 'past_due', values defined in - xmodule/modulestore/inheritance.py) + common/lib/xmodule/xmodule/modulestore/inheritance.py) show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer accessible to the learner due to a hide_after_due course team setting diff --git a/lms/djangoapps/courseware/tests/helpers.py b/lms/djangoapps/courseware/tests/helpers.py index b362ece11f..f5818f7734 100644 --- a/lms/djangoapps/courseware/tests/helpers.py +++ b/lms/djangoapps/courseware/tests/helpers.py @@ -57,7 +57,7 @@ class BaseTestXmodule(ModuleStoreTestCase): USER_COUNT = 2 COURSE_DATA = {} - # Data from YAML xmodule/templates/NAME/default.yaml + # Data from YAML common/lib/xmodule/xmodule/templates/NAME/default.yaml CATEGORY = "vertical" DATA = '' # METADATA must be overwritten for every instance that uses it. Otherwise, diff --git a/lms/djangoapps/courseware/tests/test_entrance_exam.py b/lms/djangoapps/courseware/tests/test_entrance_exam.py index 3075bb577c..ee07b3aa5f 100644 --- a/lms/djangoapps/courseware/tests/test_entrance_exam.py +++ b/lms/djangoapps/courseware/tests/test_entrance_exam.py @@ -7,6 +7,9 @@ from unittest.mock import patch from crum import set_current_request from django.urls import reverse from milestones.tests.utils import MilestonesTestCaseMixin +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory + from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.courseware.entrance_exams import ( course_has_entrance_exam, @@ -14,9 +17,6 @@ from lms.djangoapps.courseware.entrance_exams import ( user_can_skip_entrance_exam, user_has_passed_entrance_exam ) - -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from lms.djangoapps.courseware.model_data import FieldDataCache from lms.djangoapps.courseware.module_render import get_module, handle_xblock_callback, toc_for_course from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase diff --git a/lms/djangoapps/courseware/tests/test_video_xml.py b/lms/djangoapps/courseware/tests/test_video_xml.py index 046c564b41..a677b0673d 100644 --- a/lms/djangoapps/courseware/tests/test_video_xml.py +++ b/lms/djangoapps/courseware/tests/test_video_xml.py @@ -4,13 +4,13 @@ These test data read from xml, not from mongo. We have a ModuleStoreTestCase class defined in -xmodule/modulestore/tests/django_utils.py. +common/lib/xmodule/xmodule/modulestore/tests/django_utils.py. You can search for usages of this in the cms and lms tests for examples. You use this so that it will do things like point the modulestore setting to mongo, flush the contentstore before and after, load the templates, etc. You can then use the CourseFactory and XModuleItemFactory as defined in -xmodule/modulestore/tests/factories.py to create the +common/lib/xmodule/xmodule/modulestore/tests/factories.py to create the course, section, subsection, unit, etc. """ diff --git a/lms/djangoapps/grades/docs/background.rst b/lms/djangoapps/grades/docs/background.rst index a355094640..d3a292fe42 100644 --- a/lms/djangoapps/grades/docs/background.rst +++ b/lms/djangoapps/grades/docs/background.rst @@ -25,7 +25,7 @@ Terminology +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Assignment-Type Grade | Aggregated grade for an assignment category, like Homework or Final. Grading can be configured to drop the lowest n assignments when calculating an assignment-type grade - otherwise all assignments count equally (i.e. there is no weighting of assignments within an assignment category). The course grading policy specifies the minimum number of assignments expected for each category in advance. | +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Overall Percentage | Float value between 0 and 1 that marks the student's percentage for the course. This is calculated by weighing each assignment-type according to the rules specified in CourseDescriptor.grader. The grader is an `extensible interface `_, but the only rules currently used in practice are simple weight by assignment-type (e.g. 30% Final, 40% HW, etc.). The grader will return the actual percentage as a value between 0 and 1. The overall grade calculation process will then take this number and do a small bit of rounding up: round(actual_percent * 100 + 0.05) / 100. This is so that someone who has been scoring an 89.5% and has been seeing their average rounded to 90% on the progress page is not suddenly surprised at the end of the course. The denominator for this is based on the total possible at the end of the course, and does not adjust for unreleased assignments – getting a perfect score on your first homework may only give you a 4% overall percentage. | +| Overall Percentage | Float value between 0 and 1 that marks the student's percentage for the course. This is calculated by weighing each assignment-type according to the rules specified in CourseDescriptor.grader. The grader is an `extensible interface `_, but the only rules currently used in practice are simple weight by assignment-type (e.g. 30% Final, 40% HW, etc.). The grader will return the actual percentage as a value between 0 and 1. The overall grade calculation process will then take this number and do a small bit of rounding up: round(actual_percent * 100 + 0.05) / 100. This is so that someone who has been scoring an 89.5% and has been seeing their average rounded to 90% on the progress page is not suddenly surprised at the end of the course. The denominator for this is based on the total possible at the end of the course, and does not adjust for unreleased assignments – getting a perfect score on your first homework may only give you a 4% overall percentage. | +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Overall Grade | Letter grade based on CourseDescriptor.grade_cutoffs and the Overall Percentage (so after rounding up). | +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -55,7 +55,7 @@ The edX course is built as a hierarchical structure of `xBlocks `_ and specify the Pass / Fail threshold (for example, a minimum of 50/100 is required to Pass). - + - The Passing grade range can be further divided into letter grades, such as A, B, etc. - + Assignment Weights * Course teams set the `assignment types `_ used in the course, along with their weights and the number of allowed drops (number of assignments with the lowest grades that can be discarded in the final grade computation). Computation -* Although the platform provides support for custom `course graders `_, in practice, only the computation described here is used, as implemented by the `WeightedSubsectionsGrader `_. +* Although the platform provides support for custom `course graders `_, in practice, only the computation described here is used, as implemented by the `WeightedSubsectionsGrader `_. * The overall grade is the weighted sum of all assignment types in the course, allowing for droppable assignments. - Which subsections to drop are determined only after calculating each subsection's grade, as only the ones with the lowest grades are dropped. - + .. image:: images/background_overall_grade.png Assignment Grades @@ -173,7 +173,7 @@ Today, we support the following features to `adjust grades `_: +* In `Gradebook `_: - override a subsection grade for a learner - override subsection grades in bulk (master's track only) @@ -191,4 +191,4 @@ It is relevant to note that ORA2 has its own immutable data model and thus, an i * All scores and submissions are also immutable. -* So given a user's record, one can reliably determine the exact rubric it was evaluated against and its accurate score. +* So given a user's record, one can reliably determine the exact rubric it was evaluated against and its accurate score. \ No newline at end of file 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 c4ba94d946..440136c757 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 @@ -8,11 +8,11 @@ from datetime import datetime import ddt from django.urls import reverse from pytz import UTC -from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory - from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory + +from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from common.djangoapps.student.tests.factories import GlobalStaffFactory from common.djangoapps.student.tests.factories import StaffFactory from common.djangoapps.student.tests.factories import UserFactory diff --git a/lms/djangoapps/grades/tests/base.py b/lms/djangoapps/grades/tests/base.py index 747474a351..d50d77b643 100644 --- a/lms/djangoapps/grades/tests/base.py +++ b/lms/djangoapps/grades/tests/base.py @@ -4,10 +4,10 @@ Base file for Grades tests from crum import set_current_request -from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory - from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory + +from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.course_blocks.api import get_course_blocks diff --git a/lms/djangoapps/grades/tests/integration/test_problems.py b/lms/djangoapps/grades/tests/integration/test_problems.py index 92b6478c83..8fdf2fbf1e 100644 --- a/lms/djangoapps/grades/tests/integration/test_problems.py +++ b/lms/djangoapps/grades/tests/integration/test_problems.py @@ -5,8 +5,6 @@ import itertools import ddt import pytz from crum import set_current_request -from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory - from xmodule.graders import ProblemScore from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ( @@ -15,6 +13,8 @@ from xmodule.modulestore.tests.django_utils import ( from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.modulestore.tests.utils import TEST_DATA_DIR from xmodule.modulestore.xml_importer import import_course_from_xml + +from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.course_blocks.api import get_course_blocks diff --git a/lms/djangoapps/instructor/tests/test_enrollment.py b/lms/djangoapps/instructor/tests/test_enrollment.py index c5cc4989bb..1a56471dbd 100644 --- a/lms/djangoapps/instructor/tests/test_enrollment.py +++ b/lms/djangoapps/instructor/tests/test_enrollment.py @@ -9,7 +9,6 @@ from unittest.mock import patch import ddt import pytest -from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from ccx_keys.locator import CCXLocator from crum import set_current_request from django.conf import settings @@ -17,9 +16,10 @@ from django.utils.translation import get_language from django.utils.translation import override as override_language from opaque_keys.edx.locator import CourseLocator from submissions import api as sub_api - from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory + +from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory 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 diff --git a/lms/djangoapps/instructor_task/tests/test_base.py b/lms/djangoapps/instructor_task/tests/test_base.py index 14d4b0d040..61e0984cd2 100644 --- a/lms/djangoapps/instructor_task/tests/test_base.py +++ b/lms/djangoapps/instructor_task/tests/test_base.py @@ -13,17 +13,17 @@ from unittest.mock import Mock, patch from uuid import uuid4 import unicodecsv -from capa.tests.response_xml_factory import OptionResponseXMLFactory from celery.states import FAILURE, SUCCESS from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.urls import reverse from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locations import Location - from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory + +from capa.tests.response_xml_factory import OptionResponseXMLFactory from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from lms.djangoapps.courseware.model_data import StudentModule from lms.djangoapps.courseware.tests.tests import LoginEnrollmentTestCase diff --git a/lms/djangoapps/learner_dashboard/tests/test_programs.py b/lms/djangoapps/learner_dashboard/tests/test_programs.py index 6b2b160451..376276475d 100644 --- a/lms/djangoapps/learner_dashboard/tests/test_programs.py +++ b/lms/djangoapps/learner_dashboard/tests/test_programs.py @@ -14,10 +14,10 @@ from django.conf import settings from django.test import override_settings from django.urls import reverse, reverse_lazy from edx_toggles.toggles.testutils import override_waffle_flag - -from lti_consumer.models import LtiConfiguration from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory as ModuleStoreCourseFactory + +from lti_consumer.models import LtiConfiguration from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from lms.djangoapps.learner_dashboard.config.waffle import ENABLE_PROGRAM_TAB_VIEW from lms.djangoapps.program_enrollments.rest_api.v1.tests.test_views import ProgramCacheMixin diff --git a/lms/static/xmodule_js b/lms/static/xmodule_js index 8e376468e6..6e6ff3566f 120000 --- a/lms/static/xmodule_js +++ b/lms/static/xmodule_js @@ -1 +1 @@ -../../xmodule/js \ No newline at end of file +../../common/lib/xmodule/xmodule/js/ \ No newline at end of file diff --git a/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment_track_partition_groups.py b/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment_track_partition_groups.py index b8587e0f71..ec7c29f953 100644 --- a/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment_track_partition_groups.py +++ b/openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment_track_partition_groups.py @@ -44,8 +44,7 @@ class EnrollmentTrackPartitionGroupsOutlineProcessor(OutlineProcessor): self.user, partition_dict_key='id' ) - # TODO: fix type annotation: https://github.com/openedx/tcril-engineering/issues/313 - self.user_group = self.enrollment_track_groups.get(ENROLLMENT_TRACK_PARTITION_ID) # type: ignore + self.user_group = self.enrollment_track_groups.get(ENROLLMENT_TRACK_PARTITION_ID) def _is_user_excluded_by_partition_group(self, user_partition_groups): """ diff --git a/openedx/core/djangoapps/discussions/tests/test_tasks.py b/openedx/core/djangoapps/discussions/tests/test_tasks.py index 7d8e854181..b5aa7ff60c 100644 --- a/openedx/core/djangoapps/discussions/tests/test_tasks.py +++ b/openedx/core/djangoapps/discussions/tests/test_tasks.py @@ -4,13 +4,12 @@ Tests for discussions tasks. import ddt import mock +from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, ModuleStoreTestCase +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from openedx_events.learning.data import DiscussionTopicContext from openedx.core.djangoapps.discussions.tasks import update_discussions_settings_from_course -from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory - @ddt.ddt @mock.patch('openedx.core.djangoapps.discussions.tasks.DiscussionsConfiguration', mock.Mock()) diff --git a/openedx/core/djangoapps/xblock/runtime/shims.py b/openedx/core/djangoapps/xblock/runtime/shims.py index 516521d412..5225d249c5 100644 --- a/openedx/core/djangoapps/xblock/runtime/shims.py +++ b/openedx/core/djangoapps/xblock/runtime/shims.py @@ -90,7 +90,7 @@ class RuntimeShim: def can_execute_unsafe_code(self): """ Determine if capa problems in this context/course are allowed to run - unsafe code. See xmodule/util/sandboxing.py + unsafe code. See common/lib/xmodule/xmodule/util/sandboxing.py Seems only to be used by capa. """ diff --git a/pavelib/assets.py b/pavelib/assets.py index ad933de195..0f96b69779 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -376,7 +376,7 @@ class XModuleAssetsWatcher(PatternMatchingEventHandler): """ Register files with observer """ - observer.schedule(self, 'xmodule/', recursive=True) + observer.schedule(self, 'common/lib/xmodule/', recursive=True) @debounce() def on_any_event(self, event): @@ -889,7 +889,7 @@ def watch_assets(options): observer = Observer(timeout=wait) SassWatcher().register(observer, sass_directories) - XModuleSassWatcher().register(observer, ['xmodule/']) + XModuleSassWatcher().register(observer, ['common/lib/xmodule/']) XModuleAssetsWatcher().register(observer) print("Starting asset watcher...") diff --git a/pavelib/quality.py b/pavelib/quality.py index 2a5c686b62..9f233c8a70 100644 --- a/pavelib/quality.py +++ b/pavelib/quality.py @@ -203,7 +203,7 @@ def _count_pylint_violations(report_file): """ num_violations_report = 0 # An example string: - # xmodule/xmodule/tests/test_conditional.py:21: [C0111(missing-docstring), DummySystem] Missing docstring + # common/lib/xmodule/xmodule/tests/test_conditional.py:21: [C0111(missing-docstring), DummySystem] Missing docstring # More examples can be found in the unit tests for this method pylint_pattern = re.compile(r".(\d+):\ \[(\D\d+.+\]).") diff --git a/pavelib/utils/envs.py b/pavelib/utils/envs.py index 6881b0ea13..98f5abec40 100644 --- a/pavelib/utils/envs.py +++ b/pavelib/utils/envs.py @@ -189,8 +189,8 @@ class Env: REPO_ROOT / 'cms/static/karma_cms_squire.conf.js', REPO_ROOT / 'cms/static/karma_cms_webpack.conf.js', REPO_ROOT / 'lms/static/karma_lms.conf.js', - REPO_ROOT / 'xmodule/js/karma_xmodule.conf.js', - REPO_ROOT / 'xmodule/js/karma_xmodule_webpack.conf.js', + REPO_ROOT / 'common/lib/xmodule/xmodule/js/karma_xmodule.conf.js', + REPO_ROOT / 'common/lib/xmodule/xmodule/js/karma_xmodule_webpack.conf.js', REPO_ROOT / 'common/static/karma_common.conf.js', REPO_ROOT / 'common/static/karma_common_requirejs.conf.js', ] diff --git a/requirements/edx/base.in b/requirements/edx/base.in index feb21362a3..aa9097138e 100644 --- a/requirements/edx/base.in +++ b/requirements/edx/base.in @@ -69,7 +69,6 @@ django-user-tasks django-waffle django-webpack-loader # Used to wire webpack bundles into the django asset pipeline djangorestframework -docopt done-xblock edx-ace edx-api-doc-tools @@ -86,7 +85,6 @@ edx-drf-extensions edx-enterprise edx-milestones edx-name-affirmation -edx-opaque-keys edx-organizations edx-proctoring>=2.0.1 edx-proctoring-proctortrack==1.0.5 # Intentionally and permanently pinned to ensure code changes are reviewed @@ -126,7 +124,6 @@ openedx-calc # Library supporting mathematical calculatio openedx-events # Open edX Events from Hooks Extension Framework (OEP-50) openedx-filters # Open edX Filters from Hooks Extension Framework (OEP-50) ora2>=4.4.0 -path piexif # Exif image metadata manipulation, used in the profile_images app Pillow # Image manipulation library; used for course assets, profile images, invoice PDFs, etc. py2neo # Driver for converting Python modulestore structures to Neo4j's schema (for Coursegraph). @@ -166,7 +163,6 @@ staff-graded-xblock # An XBlock that allows for off-site bulk sc super-csv # Generic CSV processor unicodecsv # Easier support for CSV files with unicode text user-util # Functionality for retiring users (GDPR compliance) -webob web-fragments # Provides the ability to render fragments of web pages XBlock # Courseware component architecture xblock-utils # Provides utilities used by the Discussion XBlock diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 2ff008c96d..cdb67f4159 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -7,7 +7,9 @@ -e git+https://github.com/openedx/blockstore.git@1.2.1#egg=blockstore==1.2.1 # via -r requirements/edx/github.in -e common/lib/capa - # via -r requirements/edx/local.in + # via + # -r requirements/edx/local.in + # xmodule -e git+https://github.com/edx/codejail.git@3.1.3#egg=codejail==3.1.3 # via -r requirements/edx/github.in -e git+https://github.com/edx/django-wiki.git@1.1.0#egg=django-wiki @@ -24,6 +26,8 @@ # via -r requirements/edx/local.in -e git+https://github.com/edx-solutions/xblock-google-drive.git@2d176468e33c0713c911b563f8f65f7cf232f5b6#egg=xblock-google-drive # via -r requirements/edx/github.in +-e common/lib/xmodule + # via -r requirements/edx/local.in acid-xblock==0.2.1 # via -r requirements/edx/base.in aiohttp==3.8.1 @@ -405,7 +409,7 @@ djangorestframework==3.12.4 djangorestframework-xml==2.0.0 # via edx-enterprise docopt==0.6.2 - # via -r requirements/edx/base.in + # via xmodule docutils==0.17.1 # via # -c requirements/edx/../constraints.txt @@ -488,7 +492,6 @@ edx-name-affirmation==2.3.4 # via -r requirements/edx/base.in edx-opaque-keys[django]==2.3.0 # via - # -r requirements/edx/base.in # -r requirements/edx/paver.txt # edx-bulk-grades # edx-ccx-keys @@ -503,6 +506,7 @@ edx-opaque-keys[django]==2.3.0 # lti-consumer-xblock # openedx-events # ora2 + # xmodule edx-organizations==6.11.1 # via -r requirements/edx/base.in edx-proctoring==4.10.2 @@ -658,7 +662,6 @@ lti-consumer-xblock==4.1.1 lxml==4.9.0 # via # -r requirements/edx/base.in - # capa # edxval # lti-consumer-xblock # olxcleaner @@ -762,7 +765,6 @@ pansi==2020.7.3 # via py2neo path==16.4.0 # via - # -r requirements/edx/base.in # -r requirements/edx/paver.txt # edx-i18n-tools # path-py @@ -771,6 +773,7 @@ path-py==12.5.0 # edx-enterprise # ora2 # staff-graded-xblock + # xmodule paver==1.3.4 # via -r requirements/edx/paver.txt pbr==5.9.0 @@ -891,7 +894,6 @@ pytz==2022.1 # -r requirements/edx/base.in # babel # blockstore - # capa # celery # django # django-ses @@ -1111,8 +1113,8 @@ webencodings==0.5.1 # tinycss2 webob==1.8.7 # via - # -r requirements/edx/base.in # xblock + # xmodule wrapt==1.14.1 # via # -r requirements/edx/paver.txt diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 80334c1327..9104898b01 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -7,7 +7,9 @@ -e git+https://github.com/openedx/blockstore.git@1.2.1#egg=blockstore==1.2.1 # via -r requirements/edx/testing.txt -e common/lib/capa - # via -r requirements/edx/testing.txt + # via + # -r requirements/edx/testing.txt + # xmodule -e git+https://github.com/edx/codejail.git@3.1.3#egg=codejail==3.1.3 # via -r requirements/edx/testing.txt -e git+https://github.com/edx/django-wiki.git@1.1.0#egg=django-wiki @@ -24,6 +26,8 @@ # via -r requirements/edx/testing.txt -e git+https://github.com/edx-solutions/xblock-google-drive.git@2d176468e33c0713c911b563f8f65f7cf232f5b6#egg=xblock-google-drive # via -r requirements/edx/testing.txt +-e common/lib/xmodule + # via -r requirements/edx/testing.txt acid-xblock==0.2.1 # via -r requirements/edx/testing.txt aiohttp==3.8.1 @@ -508,7 +512,9 @@ djangorestframework-xml==2.0.0 # -r requirements/edx/testing.txt # edx-enterprise docopt==0.6.2 - # via -r requirements/edx/testing.txt + # via + # -r requirements/edx/testing.txt + # xmodule docutils==0.17.1 # via # -c requirements/edx/../constraints.txt @@ -618,6 +624,7 @@ edx-opaque-keys[django]==2.3.0 # lti-consumer-xblock # openedx-events # ora2 + # xmodule edx-organizations==6.11.1 # via -r requirements/edx/testing.txt edx-proctoring==4.10.2 @@ -859,7 +866,6 @@ lti-consumer-xblock==4.1.1 lxml==4.9.0 # via # -r requirements/edx/testing.txt - # capa # edxval # lti-consumer-xblock # olxcleaner @@ -1006,6 +1012,7 @@ path-py==12.5.0 # edx-enterprise # ora2 # staff-graded-xblock + # xmodule paver==1.3.4 # via -r requirements/edx/testing.txt pbr==5.9.0 @@ -1239,7 +1246,6 @@ pytz==2022.1 # -r requirements/edx/testing.txt # babel # blockstore - # capa # celery # django # django-ses @@ -1587,6 +1593,7 @@ webob==1.8.7 # via # -r requirements/edx/testing.txt # xblock + # xmodule wheel==0.37.1 # via # -r requirements/edx/pip-tools.txt diff --git a/requirements/edx/local.in b/requirements/edx/local.in index 2138207383..eb0165c473 100644 --- a/requirements/edx/local.in +++ b/requirements/edx/local.in @@ -1,5 +1,6 @@ # Python libraries to install that are local to the edx-platform repo -e . -e common/lib/capa +-e common/lib/xmodule -e openedx/core/lib/xblock_builtin/xblock_discussion diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 2b3f94364c..01e9bb2b9f 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -7,7 +7,9 @@ -e git+https://github.com/openedx/blockstore.git@1.2.1#egg=blockstore==1.2.1 # via -r requirements/edx/base.txt -e common/lib/capa - # via -r requirements/edx/base.txt + # via + # -r requirements/edx/base.txt + # xmodule -e git+https://github.com/edx/codejail.git@3.1.3#egg=codejail==3.1.3 # via -r requirements/edx/base.txt -e git+https://github.com/edx/django-wiki.git@1.1.0#egg=django-wiki @@ -24,6 +26,8 @@ # via -r requirements/edx/base.txt -e git+https://github.com/edx-solutions/xblock-google-drive.git@2d176468e33c0713c911b563f8f65f7cf232f5b6#egg=xblock-google-drive # via -r requirements/edx/base.txt +-e common/lib/xmodule + # via -r requirements/edx/base.txt acid-xblock==0.2.1 # via -r requirements/edx/base.txt aiohttp==3.8.1 @@ -493,7 +497,9 @@ djangorestframework-xml==2.0.0 # -r requirements/edx/base.txt # edx-enterprise docopt==0.6.2 - # via -r requirements/edx/base.txt + # via + # -r requirements/edx/base.txt + # xmodule docutils==0.17.1 # via # -c requirements/edx/../constraints.txt @@ -602,6 +608,7 @@ edx-opaque-keys[django]==2.3.0 # lti-consumer-xblock # openedx-events # ora2 + # xmodule edx-organizations==6.11.1 # via -r requirements/edx/base.txt edx-proctoring==4.10.2 @@ -821,7 +828,6 @@ lti-consumer-xblock==4.1.1 lxml==4.9.0 # via # -r requirements/edx/base.txt - # capa # edxval # lti-consumer-xblock # olxcleaner @@ -956,6 +962,7 @@ path-py==12.5.0 # edx-enterprise # ora2 # staff-graded-xblock + # xmodule paver==1.3.4 # via -r requirements/edx/base.txt pbr==5.9.0 @@ -1170,7 +1177,6 @@ pytz==2022.1 # -r requirements/edx/base.txt # babel # blockstore - # capa # celery # django # django-ses @@ -1472,6 +1478,7 @@ webob==1.8.7 # via # -r requirements/edx/base.txt # xblock + # xmodule wrapt==1.14.1 # via # -r requirements/edx/base.txt diff --git a/scripts/unit-tests.sh b/scripts/unit-tests.sh index d97ad929bd..c060d39a0a 100755 --- a/scripts/unit-tests.sh +++ b/scripts/unit-tests.sh @@ -116,7 +116,7 @@ case "${TEST_SUITE}" in mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib ;; [1-2]) - paver test_lib -l ./xmodule --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> common-tests.${SHARD}.log + paver test_lib -l common/lib/xmodule --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> common-tests.${SHARD}.log mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib.${SHARD} ;; 3|"noshard") diff --git a/scripts/verify-dunder-init.sh b/scripts/verify-dunder-init.sh index 907df34bb1..9c9fbb130a 100755 --- a/scripts/verify-dunder-init.sh +++ b/scripts/verify-dunder-init.sh @@ -35,14 +35,10 @@ exclude+='|^common/test/data/?.*$' # in each chlid directory). # However, we do NOT want to exclude the source directories *within* the sub-projects. # Example: -# * common/lib/capa -> EXCLUDE from check. -# * common/lib/capa/capa/safe_exec -> INCLUDE in check. +# * common/lib/xmodule -> EXCLUDE from check. +# * common/lib/xmodule/xmodule/modulestore -> INCLUDE in check. exclude+='|^common/lib$' -exclude+='|^common/lib/capa$' - -# xmodule data folder -exclude+='|^xmodule/tests/data/xml-course-root/capa$' -exclude+='|^xmodule/tests/data/xml-course-root/uploads/python_lib_zip$' +exclude+='|^common/lib/(capa|xmodule)$' # Docs, scripts. exclude+='|^docs/.*$' diff --git a/setup.py b/setup.py index 48ffd5847a..6b0a4cf7b2 100644 --- a/setup.py +++ b/setup.py @@ -4,46 +4,6 @@ Setup script for the Open edX package. from setuptools import setup -XBLOCKS = [ - "about = xmodule.html_module:AboutBlock", - "book = xmodule.template_module:TranslateCustomTagBlock", - "annotatable = xmodule.annotatable_module:AnnotatableBlock", - "chapter = xmodule.seq_module:SectionBlock", - "conditional = xmodule.conditional_module:ConditionalBlock", - "course = xmodule.course_module:CourseBlock", - "course_info = xmodule.html_module:CourseInfoBlock", - "customtag = xmodule.template_module:CustomTagBlock", - "custom_tag_template = xmodule.template_module:CustomTagTemplateBlock", - "discuss = xmodule.template_module:TranslateCustomTagBlock", - "error = xmodule.error_module:ErrorBlock", - "hidden = xmodule.hidden_module:HiddenDescriptor", - "html = xmodule.html_module:HtmlBlock", - "image = xmodule.template_module:TranslateCustomTagBlock", - "library = xmodule.library_root_xblock:LibraryRoot", - "library_content = xmodule.library_content_module:LibraryContentBlock", - "library_sourced = xmodule.library_sourced_block:LibrarySourcedBlock", - "lti = xmodule.lti_module:LTIBlock", - "nonstaff_error = xmodule.error_module:NonStaffErrorBlock", - "poll_question = xmodule.poll_module:PollBlock", - "problem = xmodule.capa_module:ProblemBlock", - "randomize = xmodule.randomize_module:RandomizeBlock", - "sequential = xmodule.seq_module:SequenceBlock", - "slides = xmodule.template_module:TranslateCustomTagBlock", - "split_test = xmodule.split_test_module:SplitTestBlock", - "static_tab = xmodule.html_module:StaticTabBlock", - "unit = xmodule.unit_block:UnitBlock", - "vertical = xmodule.vertical_block:VerticalBlock", - "video = xmodule.video_module:VideoBlock", - "videoalpha = xmodule.video_module:VideoBlock", - "videodev = xmodule.template_module:TranslateCustomTagBlock", - "word_cloud = xmodule.word_cloud_module:WordCloudBlock", - "wrapper = xmodule.wrapper_module:WrapperBlock", -] -XBLOCKS_ASIDES = [ - 'tagging_aside = cms.lib.xblock.tagging:StructuredTagsAside', -] - - setup( name="Open edX", version='0.13', @@ -55,11 +15,7 @@ setup( "cms", "lms", "openedx", - "xmodule", ], - package_data={ - 'xmodule': ['js/module/*'], - }, entry_points={ "openedx.course_tab": [ "ccx = lms.djangoapps.ccx.plugins:CcxCourseTab", @@ -181,10 +137,5 @@ setup( 'enrollment_track = xmodule.partitions.enrollment_track_partition_generator:create_enrollment_track_partition', # lint-amnesty, pylint: disable=line-too-long 'content_type_gating = openedx.features.content_type_gating.partitions:create_content_gating_partition' ], - 'xblock.v1': XBLOCKS, - 'xblock_asides.v1': XBLOCKS_ASIDES, - 'console_scripts': [ - 'xmodule_assets = xmodule.static_content:main', - ], } ) diff --git a/webpack-config/file-lists.js b/webpack-config/file-lists.js index 0ea827a106..ef553c3cf7 100644 --- a/webpack-config/file-lists.js +++ b/webpack-config/file-lists.js @@ -12,7 +12,7 @@ module.exports = { path.resolve(__dirname, '../common/static/common/js/components/utils/view_utils.js'), /descriptors\/js/, /modules\/js/, - /xmodule\/js\/src\//, + /common\/lib\/xmodule\/xmodule\/js\/src\//, path.resolve(__dirname, '../openedx/features/course_bookmarks/static/course_bookmarks/js/views/bookmark_button.js') ], diff --git a/webpack.common.config.js b/webpack.common.config.js index 77d3d62156..427528cff1 100644 --- a/webpack.common.config.js +++ b/webpack.common.config.js @@ -15,7 +15,7 @@ var filesWithRequireJSBlocks = [ path.resolve(__dirname, 'common/static/common/js/components/utils/view_utils.js'), /descriptors\/js/, /modules\/js/, - /xmodule\/js\/src\// + /common\/lib\/xmodule\/xmodule\/js\/src\// ]; var defineHeader = /\(function ?\(((define|require|requirejs|\$)(, )?)+\) ?\{/; @@ -72,7 +72,7 @@ module.exports = Merge.smart({ // Studio Import: './cms/static/js/features/import/factories/import.js', CourseOrLibraryListing: './cms/static/js/features_jsx/studio/CourseOrLibraryListing.jsx', - LibrarySourcedBlockPicker: './xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx', // eslint-disable-line max-len + LibrarySourcedBlockPicker: './common/lib/xmodule/xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx', // eslint-disable-line max-len 'js/factories/textbooks': './cms/static/js/factories/textbooks.js', 'js/factories/container': './cms/static/js/factories/container.js', 'js/factories/context_course': './cms/static/js/factories/context_course.js', @@ -115,8 +115,8 @@ module.exports = Merge.smart({ // Common ReactRenderer: './common/static/js/src/ReactRenderer.jsx', - XModuleShim: './xmodule/js/src/xmodule.js', - VerticalStudentView: './xmodule/assets/vertical/public/js/vertical_student_view.js', + XModuleShim: 'xmodule/js/src/xmodule.js', + VerticalStudentView: './common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js', commons: 'babel-polyfill' }, @@ -391,9 +391,9 @@ module.exports = Merge.smart({ 'cms/static/cms/js', 'cms/templates/js', 'lms/static', - path.resolve(__dirname), - 'xmodule/js/src', - 'xmodule/assets/word_cloud/src/js', + 'common/lib/xmodule', + 'common/lib/xmodule/xmodule/js/src', + 'common/lib/xmodule/xmodule/assets/word_cloud/src/js', 'common/static', 'common/static/coffee/src', 'common/static/common/js', @@ -437,3 +437,4 @@ module.exports = Merge.smart({ } }, {web: xmoduleJS}, workerConfig()); + diff --git a/xmodule/js/RequireJS-namespace-undefine.js b/xmodule/js/RequireJS-namespace-undefine.js deleted file mode 120000 index 0319865436..0000000000 --- a/xmodule/js/RequireJS-namespace-undefine.js +++ /dev/null @@ -1 +0,0 @@ -../../common/static/js/RequireJS-namespace-undefine.js \ No newline at end of file diff --git a/xmodule/js/common_static b/xmodule/js/common_static deleted file mode 120000 index 3dfdc86f31..0000000000 --- a/xmodule/js/common_static +++ /dev/null @@ -1 +0,0 @@ -../../common/static \ No newline at end of file diff --git a/xmodule/tests/data/xml-course-root b/xmodule/tests/data/xml-course-root deleted file mode 120000 index c48574555e..0000000000 --- a/xmodule/tests/data/xml-course-root +++ /dev/null @@ -1 +0,0 @@ -../../../common/test/data \ No newline at end of file