This was originally a separate plugin called openedx-olx-rest-api. It provides a Studio API that any user with course authoring permission can use to get the OLX of an individual XBlock or a unit. Without this, the only way to get an XBlock's OLX was to download the tarball of the entire course. Examples of usage (be logged in to Studio on devstack): Simple HTML XBlock: http://localhost:18010/api/olx-export/v1/xblock/block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4/ Exporting a unit: http://localhost:18010/api/olx-export/v1/xblock/block-v1:edX+DemoX+Demo_Course+type@vertical+block@134df56c516a4a0dbb24dd5facef746e/ Example output for an HTML block: { "root_block_id":"block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4", "blocks":{ "block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4":{ "olx":"<html display_name=\"Blank HTML Page\"><![CDATA[\n<p><strong>Welcome to the edX Demo Course Introduction.</strong></p>\n]]></html>\n" } } } The code is designed primarily for use when importing content into Blockstore. So it will: * Export HTML blocks as a combined OLX/HTML file, with the HTML in a CDATA section * Convert vertical blocks to unit blocks (unit is like a vertical but has no UI elements) * Detect static files (such as images) used by the XBlock and list the absolute URL of each static file in the "static_files": {...} JSON element for each XBlock that has at least one static file usage. This can handle static files that are in mongo ("contentstore" / "Files & Uploads") as well as files generated on-the-fly during OLX serialization via the export_fs API (mostly this is video transcripts).
113 lines
7.3 KiB
Python
113 lines
7.3 KiB
Python
"""
|
|
Setup script for the Open edX package.
|
|
"""
|
|
|
|
from setuptools import setup
|
|
|
|
setup(
|
|
name="Open edX",
|
|
version="0.11",
|
|
install_requires=["setuptools"],
|
|
requires=[],
|
|
# NOTE: These are not the names we should be installing. This tree should
|
|
# be reorganized to be a more conventional Python tree.
|
|
packages=[
|
|
"cms",
|
|
"lms",
|
|
"openedx",
|
|
],
|
|
entry_points={
|
|
"openedx.course_tab": [
|
|
"ccx = lms.djangoapps.ccx.plugins:CcxCourseTab",
|
|
"courseware = lms.djangoapps.courseware.tabs:CoursewareTab",
|
|
"course_info = lms.djangoapps.courseware.tabs:CourseInfoTab",
|
|
"discussion = lms.djangoapps.discussion.plugins:DiscussionTab",
|
|
"edxnotes = lms.djangoapps.edxnotes.plugins:EdxNotesTab",
|
|
"external_discussion = lms.djangoapps.courseware.tabs:ExternalDiscussionCourseTab",
|
|
"external_link = lms.djangoapps.courseware.tabs:ExternalLinkCourseTab",
|
|
"html_textbooks = lms.djangoapps.courseware.tabs:HtmlTextbookTabs",
|
|
"instructor = lms.djangoapps.instructor.views.instructor_dashboard:InstructorDashboardTab",
|
|
"pdf_textbooks = lms.djangoapps.courseware.tabs:PDFTextbookTabs",
|
|
"progress = lms.djangoapps.courseware.tabs:ProgressTab",
|
|
"static_tab = xmodule.tabs:StaticTab",
|
|
"syllabus = lms.djangoapps.courseware.tabs:SyllabusTab",
|
|
"teams = lms.djangoapps.teams.plugins:TeamsTab",
|
|
"textbooks = lms.djangoapps.courseware.tabs:TextbookTabs",
|
|
"wiki = lms.djangoapps.course_wiki.tab:WikiTab",
|
|
],
|
|
"openedx.course_tool": [
|
|
"course_bookmarks = openedx.features.course_bookmarks.plugins:CourseBookmarksTool",
|
|
"course_updates = openedx.features.course_experience.plugins:CourseUpdatesTool",
|
|
"course_reviews = openedx.features.course_experience.plugins:CourseReviewsTool",
|
|
"verified_upgrade = lms.djangoapps.courseware.course_tools:VerifiedUpgradeTool",
|
|
],
|
|
"openedx.user_partition_scheme": [
|
|
"random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme",
|
|
"cohort = openedx.core.djangoapps.course_groups.partition_scheme:CohortPartitionScheme",
|
|
"verification = openedx.core.djangoapps.user_api.partition_schemes:ReturnGroup1PartitionScheme",
|
|
"enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme",
|
|
"content_type_gate = openedx.features.content_type_gating.partitions:ContentTypeGatingPartitionScheme",
|
|
],
|
|
"openedx.block_structure_transformer": [
|
|
"library_content = lms.djangoapps.course_blocks.transformers.library_content:ContentLibraryTransformer",
|
|
"split_test = lms.djangoapps.course_blocks.transformers.split_test:SplitTestTransformer",
|
|
"start_date = lms.djangoapps.course_blocks.transformers.start_date:StartDateTransformer",
|
|
"user_partitions = lms.djangoapps.course_blocks.transformers.user_partitions:UserPartitionTransformer",
|
|
"visibility = lms.djangoapps.course_blocks.transformers.visibility:VisibilityTransformer",
|
|
"hide_empty = lms.djangoapps.course_blocks.transformers.hide_empty:HideEmptyTransformer",
|
|
"hidden_content = lms.djangoapps.course_blocks.transformers.hidden_content:HiddenContentTransformer",
|
|
"course_blocks_api = lms.djangoapps.course_api.blocks.transformers.blocks_api:BlocksAPITransformer",
|
|
"milestones = lms.djangoapps.course_api.blocks.transformers.milestones:MilestonesAndSpecialExamsTransformer",
|
|
"grades = lms.djangoapps.grades.transformer:GradesTransformer",
|
|
"completion = lms.djangoapps.course_api.blocks.transformers.block_completion:BlockCompletionTransformer",
|
|
"load_override_data = lms.djangoapps.course_blocks.transformers.load_override_data:OverrideDataTransformer",
|
|
"content_type_gate = openedx.features.content_type_gating.block_transformers:ContentTypeGateTransformer",
|
|
"access_denied_message_filter = lms.djangoapps.course_blocks.transformers.access_denied_filter:AccessDeniedMessageFilterTransformer",
|
|
],
|
|
"openedx.ace.policy": [
|
|
"bulk_email_optout = lms.djangoapps.bulk_email.policies:CourseEmailOptout"
|
|
],
|
|
"lms.djangoapp": [
|
|
"announcements = openedx.features.announcements.apps:AnnouncementsConfig",
|
|
"ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig",
|
|
"credentials = openedx.core.djangoapps.credentials.apps:CredentialsConfig",
|
|
"content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig",
|
|
"discussion = lms.djangoapps.discussion.apps:DiscussionConfig",
|
|
"grades = lms.djangoapps.grades.apps:GradesConfig",
|
|
"plugins = openedx.core.djangoapps.plugins.apps:PluginsConfig",
|
|
"schedules = openedx.core.djangoapps.schedules.apps:SchedulesConfig",
|
|
"theming = openedx.core.djangoapps.theming.apps:ThemingConfig",
|
|
"bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig",
|
|
"zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig",
|
|
"instructor = lms.djangoapps.instructor.apps:InstructorConfig",
|
|
"password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig",
|
|
"user_authn = openedx.core.djangoapps.user_authn.apps:UserAuthnConfig",
|
|
"program_enrollments = lms.djangoapps.program_enrollments.apps:ProgramEnrollmentsConfig",
|
|
"courseware_api = openedx.core.djangoapps.courseware_api.apps:CoursewareAPIConfig",
|
|
],
|
|
"cms.djangoapp": [
|
|
"announcements = openedx.features.announcements.apps:AnnouncementsConfig",
|
|
"ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig",
|
|
"content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig",
|
|
# Importing an LMS app into the Studio process is not a good
|
|
# practice. We're ignoring this for Discussions here because its
|
|
# placement in LMS is a historical artifact. The eventual goal is to
|
|
# consolidate the multiple discussions-related Django apps and
|
|
# either put them in the openedx/ dir, or in another repo entirely.
|
|
"discussion = lms.djangoapps.discussion.apps:DiscussionConfig",
|
|
"olx_rest_api = openedx.core.djangoapps.olx_rest_api.apps:OlxRestApiAppConfig",
|
|
"plugins = openedx.core.djangoapps.plugins.apps:PluginsConfig",
|
|
"schedules = openedx.core.djangoapps.schedules.apps:SchedulesConfig",
|
|
"theming = openedx.core.djangoapps.theming.apps:ThemingConfig",
|
|
"bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig",
|
|
"zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig",
|
|
"password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig",
|
|
"user_authn = openedx.core.djangoapps.user_authn.apps:UserAuthnConfig",
|
|
"instructor = lms.djangoapps.instructor.apps:InstructorConfig",
|
|
],
|
|
'openedx.learning_context': [
|
|
'lib = openedx.core.djangoapps.content_libraries.library_context:LibraryContextImpl',
|
|
],
|
|
}
|
|
)
|