diff --git a/src/constants.js b/src/constants.js index 163a16ef84..9e5c5cc84d 100644 --- a/src/constants.js +++ b/src/constants.js @@ -58,6 +58,7 @@ export const COURSE_BLOCK_NAMES = ({ chapter: { id: 'chapter', name: 'Section' }, sequential: { id: 'sequential', name: 'Subsection' }, vertical: { id: 'vertical', name: 'Unit' }, + libraryContent: { id: 'library_content', name: 'Library content' }, component: { id: 'component', name: 'Component' }, }); diff --git a/src/course-team/CourseTeam.test.jsx b/src/course-team/CourseTeam.test.jsx index c0506dcde3..4f33788744 100644 --- a/src/course-team/CourseTeam.test.jsx +++ b/src/course-team/CourseTeam.test.jsx @@ -189,7 +189,7 @@ describe('', () => { }); it('should delete user', async () => { - `cleanup();` + cleanup(); axiosMock .onGet(getCourseTeamApiUrl(courseId)) .reply(200, courseTeamMock); diff --git a/src/course-unit/CourseUnit.jsx b/src/course-unit/CourseUnit.jsx index 68aa3a3d46..5392294cdb 100644 --- a/src/course-unit/CourseUnit.jsx +++ b/src/course-unit/CourseUnit.jsx @@ -22,6 +22,7 @@ import ProcessingNotification from '../generic/processing-notification'; import { SavingErrorAlert } from '../generic/saving-error-alert'; import ConnectionErrorAlert from '../generic/ConnectionErrorAlert'; import Loading from '../generic/Loading'; +import { COURSE_BLOCK_NAMES } from '../constants'; import AddComponent from './add-component/AddComponent'; import HeaderTitle from './header-title/HeaderTitle'; import Breadcrumbs from './breadcrumbs/Breadcrumbs'; @@ -44,6 +45,7 @@ const CourseUnit = ({ courseId }) => { isLoading, sequenceId, unitTitle, + unitCategory, errorMessage, sequenceStatus, savingStatus, @@ -68,6 +70,19 @@ const CourseUnit = ({ courseId }) => { handleNavigateToTargetUnit, } = useCourseUnit({ courseId, blockId }); + const isUnitVerticalType = unitCategory === COURSE_BLOCK_NAMES.vertical.id; + const isUnitLibraryType = unitCategory === COURSE_BLOCK_NAMES.libraryContent.id; + + const unitLayout = [{ span: 12 }, { span: 0 }]; + const defaultLayout = { + lg: [{ span: 8 }, { span: 4 }], + md: [{ span: 8 }, { span: 4 }], + sm: [{ span: 8 }, { span: 3 }], + xs: [{ span: 9 }, { span: 3 }], + xl: [{ span: 9 }, { span: 3 }], + }; + const layoutGrid = isUnitLibraryType ? { lg: unitLayout } : defaultLayout; + useEffect(() => { document.title = getPageHeadTitle('', unitTitle); }, [unitTitle]); @@ -139,30 +154,30 @@ const CourseUnit = ({ courseId }) => { /> )} breadcrumbs={( - + )} headerActions={( )} /> - - + {isUnitVerticalType && ( + + )} + - {currentlyVisibleToStudents && ( + {!currentlyVisibleToStudents && ( { /> )} - - {showPasteXBlock && canPasteComponent && ( + {isUnitVerticalType && ( + + )} + {showPasteXBlock && canPasteComponent && isUnitVerticalType && ( { - - - - {getConfig().ENABLE_TAGGING_TAXONOMY_PAGES === 'true' - && ( - - - + {isUnitVerticalType && ( + <> + + + + {getConfig().ENABLE_TAGGING_TAXONOMY_PAGES === 'true' && ( + + + + )} + + + + )} - - - diff --git a/src/course-unit/CourseUnit.scss b/src/course-unit/CourseUnit.scss index 3ada01ca2f..6a7c0c72bd 100644 --- a/src/course-unit/CourseUnit.scss +++ b/src/course-unit/CourseUnit.scss @@ -5,6 +5,10 @@ @import "./header-title/HeaderTitle"; @import "./move-modal"; +.course-unit { + min-width: 900px; +} + .course-unit__alert { margin-bottom: 1.75rem; } diff --git a/src/course-unit/CourseUnit.test.jsx b/src/course-unit/CourseUnit.test.jsx index 4a9682af17..bde7c99315 100644 --- a/src/course-unit/CourseUnit.test.jsx +++ b/src/course-unit/CourseUnit.test.jsx @@ -1,6 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; import { - act, render, waitFor, fireEvent, within, screen, + act, render, waitFor, fireEvent, within, } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { IntlProvider } from '@edx/frontend-platform/i18n'; @@ -803,7 +803,7 @@ describe('', () => { axiosMock .onPost(getXBlockBaseApiUrl(courseUnitIndexMock.id), { publish: null, - metadata: { visible_to_staff_only: true, group_access: { 50: [2] } }, + metadata: { visible_to_staff_only: true, group_access: { 50: [2] }, discussion_enabled: true }, }) .reply(200, { dummy: 'value' }); axiosMock @@ -1145,8 +1145,8 @@ describe('', () => { id: requestData.currentParentLocator, category: 'vertical', hasChildren: true, - } - } + }, + }, }, origin: '*', }); @@ -1169,7 +1169,7 @@ describe('', () => { window.dispatchEvent(messageEvent); expect(getByText( - moveModalMessages.moveModalTitle.defaultMessage.replace('{displayName}', requestData.title) + moveModalMessages.moveModalTitle.defaultMessage.replace('{displayName}', requestData.title), )).toBeInTheDocument(); expect(getByRole('button', { name: moveModalMessages.moveModalSubmitButton.defaultMessage })).toBeInTheDocument(); expect(getByRole('button', { name: moveModalMessages.moveModalCancelButton.defaultMessage })).toBeInTheDocument(); @@ -1193,7 +1193,7 @@ describe('', () => { window.dispatchEvent(messageEvent); expect(getByText( - moveModalMessages.moveModalTitle.defaultMessage.replace('{displayName}', requestData.title) + moveModalMessages.moveModalTitle.defaultMessage.replace('{displayName}', requestData.title), )).toBeInTheDocument(); const currentSection = courseOutlineInfoMock.child_info.children[1]; @@ -1211,7 +1211,7 @@ describe('', () => { fireEvent.click(currentSubsectionText); const currentComponentLocationText = getByText( - moveModalMessages.moveModalOutlineItemCurrentComponentLocationText.defaultMessage + moveModalMessages.moveModalOutlineItemCurrentComponentLocationText.defaultMessage, ); expect(currentComponentLocationText).toBeInTheDocument(); }); diff --git a/src/course-unit/__mocks__/courseOutlineInfo.js b/src/course-unit/__mocks__/courseOutlineInfo.js index 0966bf8067..a5646c6fee 100644 --- a/src/course-unit/__mocks__/courseOutlineInfo.js +++ b/src/course-unit/__mocks__/courseOutlineInfo.js @@ -1,1683 +1,1683 @@ module.exports = { - id: "block-v1:edX+DemoX+Demo_Course+type@course+block@course", - display_name: "Demonstration Course", - category: "course", + id: 'block-v1:edX+DemoX+Demo_Course+type@course+block@course', + display_name: 'Demonstration Course', + category: 'course', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', unit_level_discussions: false, child_info: { - category: "chapter", - display_name: "Section", + category: 'chapter', + display_name: 'Section', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@chapter+block@d8a6192ade314473a78242dfeedfbf5b", - display_name: "Introduction", - category: "chapter", + id: 'block-v1:edX+DemoX+Demo_Course+type@chapter+block@d8a6192ade314473a78242dfeedfbf5b', + display_name: 'Introduction', + category: 'chapter', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "sequential", - display_name: "Subsection", + category: 'sequential', + display_name: 'Subsection', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@edx_introduction", - display_name: "Demo Course Overview", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@edx_introduction', + display_name: 'Demo Course Overview', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_0270f6de40fc", - display_name: "Introduction: Video and Sequences", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_0270f6de40fc', + display_name: 'Introduction: Video and Sequences', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4", - display_name: "Blank HTML Page", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4', + display_name: 'Blank HTML Page', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@f7cc083ff66d442eafafd48152881276", - display_name: "“Blank HTML Page”的副本", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@f7cc083ff66d442eafafd48152881276', + display_name: '“Blank HTML Page”的副本', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@video+block@0b9e39477cf34507a7a48f74be381fdd", - display_name: "Welcome!", - category: "video", + id: 'block-v1:edX+DemoX+Demo_Course+type@video+block@0b9e39477cf34507a7a48f74be381fdd', + display_name: 'Welcome!', + category: 'video', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@video+block@6e72ebc448694e42ac56553af74304e7", - display_name: "Video", - category: "video", + id: 'block-v1:edX+DemoX+Demo_Course+type@video+block@6e72ebc448694e42ac56553af74304e7', + display_name: 'Video', + category: 'video', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@8c964a36521a42e3a221e7b8cf6c94fc", - display_name: "Subsection", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@8c964a36521a42e3a221e7b8cf6c94fc', + display_name: 'Subsection', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@chapter+block@interactive_demonstrations", - display_name: "Example Week 1: Getting Started", - category: "chapter", + id: 'block-v1:edX+DemoX+Demo_Course+type@chapter+block@interactive_demonstrations', + display_name: 'Example Week 1: Getting Started', + category: 'chapter', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "sequential", - display_name: "Subsection", + category: 'sequential', + display_name: 'Subsection', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@19a30717eff543078a5d94ae9d6c18a5", - display_name: "Lesson 1 - Getting Started", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@19a30717eff543078a5d94ae9d6c18a5', + display_name: 'Lesson 1 - Getting Started', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@867dddb6f55d410caaa9c1eb9c6743ec", - display_name: "Getting Started", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@867dddb6f55d410caaa9c1eb9c6743ec', + display_name: 'Getting Started', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@82d599b014b246c7a9b5dfc750dc08a9", - display_name: "Getting Started", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@82d599b014b246c7a9b5dfc750dc08a9', + display_name: 'Getting Started', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@4f6c1b4e316a419ab5b6bf30e6c708e9", - display_name: "Working with Videos", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@4f6c1b4e316a419ab5b6bf30e6c708e9', + display_name: 'Working with Videos', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@6bcccc2d7343416e9e03fd7325b2f232", - display_name: "", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@6bcccc2d7343416e9e03fd7325b2f232', + display_name: '', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@video+block@7e9b434e6de3435ab99bd3fb25bde807", - display_name: "A Shared Culture", - category: "video", + id: 'block-v1:edX+DemoX+Demo_Course+type@video+block@7e9b434e6de3435ab99bd3fb25bde807', + display_name: 'A Shared Culture', + category: 'video', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@412dc8dbb6674014862237b23c1f643f", - display_name: "Working with Videos", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@412dc8dbb6674014862237b23c1f643f', + display_name: 'Working with Videos', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@3dc16db8d14842e38324e95d4030b8a0", - display_name: "Videos on edX", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@3dc16db8d14842e38324e95d4030b8a0', + display_name: 'Videos on edX', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@0a3b4139f51a4917a3aff9d519b1eeb6", - display_name: "Videos on edX", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@0a3b4139f51a4917a3aff9d519b1eeb6', + display_name: 'Videos on edX', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@video+block@5c90cffecd9b48b188cbfea176bf7fe9", - display_name: "Video", - category: "video", + id: 'block-v1:edX+DemoX+Demo_Course+type@video+block@5c90cffecd9b48b188cbfea176bf7fe9', + display_name: 'Video', + category: 'video', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@722085be27c84ac693cfebc8ac5da700", - display_name: "Videos on edX", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@722085be27c84ac693cfebc8ac5da700', + display_name: 'Videos on edX', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@4a1bba2a403f40bca5ec245e945b0d76", - display_name: "Video Demonstrations", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@4a1bba2a403f40bca5ec245e945b0d76', + display_name: 'Video Demonstrations', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@ed5dccf14ae94353961f46fa07217491", - display_name: "", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@ed5dccf14ae94353961f46fa07217491', + display_name: '', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@9f9e1373cc8243b985c8750cc8acec7d", - display_name: "Video Demonstrations", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@9f9e1373cc8243b985c8750cc8acec7d', + display_name: 'Video Demonstrations', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@256f17a44983429fb1a60802203ee4e0", - display_name: "Video Presentation Styles", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@256f17a44983429fb1a60802203ee4e0', + display_name: 'Video Presentation Styles', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@c2f7008c9ccf4bd09d5d800c98fb0722", - display_name: "", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@c2f7008c9ccf4bd09d5d800c98fb0722', + display_name: '', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@video+block@636541acbae448d98ab484b028c9a7f6", - display_name: "Connecting a Circuit and a Circuit Diagram", - category: "video", + id: 'block-v1:edX+DemoX+Demo_Course+type@video+block@636541acbae448d98ab484b028c9a7f6', + display_name: 'Connecting a Circuit and a Circuit Diagram', + category: 'video', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@e2cb0e0994f84b0abfa5f4ae42ed9d44", - display_name: "Video Presentation Styles", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@e2cb0e0994f84b0abfa5f4ae42ed9d44', + display_name: 'Video Presentation Styles', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@e3601c0abee6427d8c17e6d6f8fdddd1", - display_name: "Interactive Questions", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@e3601c0abee6427d8c17e6d6f8fdddd1', + display_name: 'Interactive Questions', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@9cee77a606ea4c1aa5440e0ea5d0f618", - display_name: "Interactive Questions", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@9cee77a606ea4c1aa5440e0ea5d0f618', + display_name: 'Interactive Questions', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@3169f89efde2452993f2f2d9bc74f5b2", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@3169f89efde2452993f2f2d9bc74f5b2', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@a79d59cd72034188a71d388f4954a606", - display_name: "Exciting Labs and Tools", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@a79d59cd72034188a71d388f4954a606', + display_name: 'Exciting Labs and Tools', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@ffcd6351126d4ca984409180e41d1b51", - display_name: "Exciting Labs and Tools", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@ffcd6351126d4ca984409180e41d1b51', + display_name: 'Exciting Labs and Tools', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@1c8d47c425724346a7968fa1bc745dcd", - display_name: "Labs and Tools", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@1c8d47c425724346a7968fa1bc745dcd', + display_name: 'Labs and Tools', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@134df56c516a4a0dbb24dd5facef746e", - display_name: "Reading Assignments", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@134df56c516a4a0dbb24dd5facef746e', + display_name: 'Reading Assignments', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@e0254b911fa246218bd98bbdadffef06", - display_name: "Reading Assignments", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@e0254b911fa246218bd98bbdadffef06', + display_name: 'Reading Assignments', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@2574c523e97b477a9d72fbb37bfb995f", - display_name: "Text", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@2574c523e97b477a9d72fbb37bfb995f', + display_name: 'Text', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@932e6f2ce8274072a355a94560216d1a", - display_name: "Perchance to Dream", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@932e6f2ce8274072a355a94560216d1a', + display_name: 'Perchance to Dream', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@303034da25524878a2e66fb57c91cf85", - display_name: "Attributing Blame", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@303034da25524878a2e66fb57c91cf85', + display_name: 'Attributing Blame', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@ffa5817d49e14fec83ad6187cbe16358", - display_name: "Reading Sample", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@ffa5817d49e14fec83ad6187cbe16358', + display_name: 'Reading Sample', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@d91b9e5d8bc64d57a1332d06bf2f2193", - display_name: "When Are Your Exams? ", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@d91b9e5d8bc64d57a1332d06bf2f2193', + display_name: 'When Are Your Exams? ', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@9d5104b502f24ee89c3d2f4ce9d347cf", - display_name: "When Are Your Exams? ", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@9d5104b502f24ee89c3d2f4ce9d347cf', + display_name: 'When Are Your Exams? ', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@basic_questions", - display_name: "Homework - Question Styles", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@basic_questions', + display_name: 'Homework - Question Styles', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@2152d4a4aadc4cb0af5256394a3d1fc7", - display_name: "Pointing on a Picture", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@2152d4a4aadc4cb0af5256394a3d1fc7', + display_name: 'Pointing on a Picture', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@c554538a57664fac80783b99d9d6da7c", - display_name: "Pointing on a Picture Component", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@c554538a57664fac80783b99d9d6da7c', + display_name: 'Pointing on a Picture Component', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@e5eac7e1a5a24f5fa7ed77bb6d136591", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@e5eac7e1a5a24f5fa7ed77bb6d136591', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@47dbd5f836544e61877a483c0b75606c", - display_name: "Drag and Drop", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@47dbd5f836544e61877a483c0b75606c', + display_name: 'Drag and Drop', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@d2e35c1d294b4ba0b3b1048615605d2a", - display_name: "Drag and Drop", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@d2e35c1d294b4ba0b3b1048615605d2a', + display_name: 'Drag and Drop', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@5ab88e67d46049b9aa694cb240c39cef", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@5ab88e67d46049b9aa694cb240c39cef', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@54bb9b142c6c4c22afc62bcb628f0e68", - display_name: "Multiple Choice Questions", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@54bb9b142c6c4c22afc62bcb628f0e68', + display_name: 'Multiple Choice Questions', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@a0effb954cca4759994f1ac9e9434bf4", - display_name: "Multiple Choice Questions", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@a0effb954cca4759994f1ac9e9434bf4', + display_name: 'Multiple Choice Questions', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@67c26b1e826e47aaa29757f62bcd1ad0", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@67c26b1e826e47aaa29757f62bcd1ad0', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_0c92347a5c00", - display_name: "Mathematical Expressions", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_0c92347a5c00', + display_name: 'Mathematical Expressions', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@Sample_Algebraic_Problem", - display_name: "Mathematical Expressions", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@Sample_Algebraic_Problem', + display_name: 'Mathematical Expressions', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@870371212ba04dcf9536d7c7b8f3109e", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@870371212ba04dcf9536d7c7b8f3109e', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_1fef54c2b23b", - display_name: "Chemical Equations", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_1fef54c2b23b', + display_name: 'Chemical Equations', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@Sample_ChemFormula_Problem", - display_name: "Chemical Equations", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@Sample_ChemFormula_Problem', + display_name: 'Chemical Equations', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@4d672c5893cb4f1dad0de67d2008522e", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@4d672c5893cb4f1dad0de67d2008522e', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@2889db1677a549abb15eb4d886f95d1c", - display_name: "Numerical Input", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@2889db1677a549abb15eb4d886f95d1c', + display_name: 'Numerical Input', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@75f9562c77bc4858b61f907bb810d974", - display_name: "Numerical Input", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@75f9562c77bc4858b61f907bb810d974', + display_name: 'Numerical Input', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@501aed9d902349eeb2191fa505548de2", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@501aed9d902349eeb2191fa505548de2', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@e8a5cc2aed424838853defab7be45e42", - display_name: "Text input", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@e8a5cc2aed424838853defab7be45e42', + display_name: 'Text input', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@0d759dee4f9d459c8956136dbde55f02", - display_name: "Text Input", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@0d759dee4f9d459c8956136dbde55f02', + display_name: 'Text Input', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@6244918637ed4ff4b5f94a840a7e4b43", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@6244918637ed4ff4b5f94a840a7e4b43', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@fb6b62dbec4348528629cf2232b86aea", - display_name: "Instructor Programmed Responses", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@fb6b62dbec4348528629cf2232b86aea', + display_name: 'Instructor Programmed Responses', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - children: [] - } - } - ] - } - } - ] - } + children: [], + }, + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@chapter+block@graded_interactions", - display_name: "Example Week 2: Get Interactive", - category: "chapter", + id: 'block-v1:edX+DemoX+Demo_Course+type@chapter+block@graded_interactions', + display_name: 'Example Week 2: Get Interactive', + category: 'chapter', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "sequential", - display_name: "Subsection", + category: 'sequential', + display_name: 'Subsection', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@simulations", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@simulations', display_name: "Lesson 2 - Let's Get Interactive!", - category: "sequential", + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@d0d804e8863c4a95a659c04d8a2b2bc0", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@d0d804e8863c4a95a659c04d8a2b2bc0', display_name: "Lesson 2 - Let's Get Interactive! ", - category: "vertical", + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@78d7d3642f3a4dbabbd1b017861aa5f2", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@78d7d3642f3a4dbabbd1b017861aa5f2', display_name: "Lesson 2: Let's Get Interactive!", - category: "html", + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_2dbb0072785e", - display_name: "An Interactive Reference Table", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_2dbb0072785e', + display_name: 'An Interactive Reference Table', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@html_07d547513285", - display_name: "An Interactive Reference Table", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@html_07d547513285', + display_name: 'An Interactive Reference Table', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@6f7a6670f87147149caeff6afa07a526", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@6f7a6670f87147149caeff6afa07a526', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_98cf62510471", - display_name: "Zooming Diagrams", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_98cf62510471', + display_name: 'Zooming Diagrams', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@700x_pathways", - display_name: "Zooming Diagrams", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@700x_pathways', + display_name: 'Zooming Diagrams', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@e0d7423118ab432582d03e8e8dad8e36", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@e0d7423118ab432582d03e8e8dad8e36', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_d32bf9b2242c", - display_name: "Electronic Sound Experiment", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_d32bf9b2242c', + display_name: 'Electronic Sound Experiment', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@Lab_5B_Mosfet_Amplifier_Experiment", - display_name: "Electronic Sound Experiment", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@Lab_5B_Mosfet_Amplifier_Experiment', + display_name: 'Electronic Sound Experiment', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@03f051f9a8814881a3783d2511613aa6", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@03f051f9a8814881a3783d2511613aa6', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@4e592689563243c484af947465eaef0d", - display_name: "New Unit", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@4e592689563243c484af947465eaef0d', + display_name: 'New Unit', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@video+block@af7fe1335eb841cd81ce31c7ee8eb069", - display_name: "Video", - category: "video", + id: 'block-v1:edX+DemoX+Demo_Course+type@video+block@af7fe1335eb841cd81ce31c7ee8eb069', + display_name: 'Video', + category: 'video', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@graded_simulations", - display_name: "Homework - Labs and Demos", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@graded_simulations', + display_name: 'Homework - Labs and Demos', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@d6cee45205a449369d7ef8f159b22bdf", - display_name: "Labs and Demos", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@d6cee45205a449369d7ef8f159b22bdf', + display_name: 'Labs and Demos', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@2bee8c4248e842a19ba1e73ed8d426c2", - display_name: "Labs and Demos", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@2bee8c4248e842a19ba1e73ed8d426c2', + display_name: 'Labs and Demos', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_aae927868e55", - display_name: "Code Grader", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_aae927868e55', + display_name: 'Code Grader', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@891211e17f9a472290a5f12c7a6626d7", - display_name: "Code Grader", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@891211e17f9a472290a5f12c7a6626d7', + display_name: 'Code Grader', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@python_grader", - display_name: "problem", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@python_grader', + display_name: 'problem', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@c6cd4bea43454aaea60ad01beb0cf213", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@c6cd4bea43454aaea60ad01beb0cf213', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_c037f3757df1", - display_name: "Electric Circuit Simulator", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_c037f3757df1', + display_name: 'Electric Circuit Simulator', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@d5a5caaf35e84ebc9a747038465dcfb4", - display_name: "Electronic Circuit Simulator", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@d5a5caaf35e84ebc9a747038465dcfb4', + display_name: 'Electronic Circuit Simulator', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@free_form_simulation", - display_name: "problem", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@free_form_simulation', + display_name: 'problem', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@logic_gate_problem", - display_name: "problem", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@logic_gate_problem', + display_name: 'problem', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@4f06b358a96f4d1dae57d6d81acd06f2", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@4f06b358a96f4d1dae57d6d81acd06f2', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_bc69a47c6fae", - display_name: "Protein Creator", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_bc69a47c6fae', + display_name: 'Protein Creator', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@78e3719e864e45f3bee938461f3c3de6", - display_name: "Protein Builder", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@78e3719e864e45f3bee938461f3c3de6', + display_name: 'Protein Builder', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@700x_proteinmake", - display_name: "Designing Proteins in Two Dimensions", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@700x_proteinmake', + display_name: 'Designing Proteins in Two Dimensions', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@ed01bcd164e64038a78964a16eac3edc", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@ed01bcd164e64038a78964a16eac3edc', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@8f89194410954e768bde1764985454a7", - display_name: "Molecule Structures", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@8f89194410954e768bde1764985454a7', + display_name: 'Molecule Structures', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@9b9687073e904ae197799dc415df899f", - display_name: "Molecule Structures", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@9b9687073e904ae197799dc415df899f', + display_name: 'Molecule Structures', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@175e76c4951144a29d46211361266e0e", - display_name: "Homework - Essays", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@175e76c4951144a29d46211361266e0e', + display_name: 'Homework - Essays', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@fb79dcbad35b466a8c6364f8ffee9050", - display_name: "Peer Assessed Essays", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@fb79dcbad35b466a8c6364f8ffee9050', + display_name: 'Peer Assessed Essays', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@openassessment+block@b24c33ea35954c7889e1d2944d3fe397", - display_name: "Open Response Assessment", - category: "openassessment", + id: 'block-v1:edX+DemoX+Demo_Course+type@openassessment+block@b24c33ea35954c7889e1d2944d3fe397', + display_name: 'Open Response Assessment', + category: 'openassessment', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@12ad4f3ff4c14114a6e629b00e000976", - display_name: "Peer Grading", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@12ad4f3ff4c14114a6e629b00e000976', + display_name: 'Peer Grading', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@chapter+block@social_integration", - display_name: "Example Week 3: Be Social", - category: "chapter", + id: 'block-v1:edX+DemoX+Demo_Course+type@chapter+block@social_integration', + display_name: 'Example Week 3: Be Social', + category: 'chapter', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "sequential", - display_name: "Subsection", + category: 'sequential', + display_name: 'Subsection', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@48ecb924d7fe4b66a230137626bfa93e", - display_name: "Lesson 3 - Be Social", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@48ecb924d7fe4b66a230137626bfa93e', + display_name: 'Lesson 3 - Be Social', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@3c4b575924bf4b75a2f3542df5c354fc", - display_name: "Be Social", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@3c4b575924bf4b75a2f3542df5c354fc', + display_name: 'Be Social', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@f9f3a25e7bab46e583fd1fbbd7a2f6a0", - display_name: "Be Social", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@f9f3a25e7bab46e583fd1fbbd7a2f6a0', + display_name: 'Be Social', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_3888db0bc286", - display_name: "Discussion Forums", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_3888db0bc286', + display_name: 'Discussion Forums', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@html_49b4494da2f7", - display_name: "Discussion Forums", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@html_49b4494da2f7', + display_name: 'Discussion Forums', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@discussion_5deb6081620d", - display_name: "Discussion Forums", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@discussion_5deb6081620d', + display_name: 'Discussion Forums', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@312cb4faed17420e82ab3178fc3e251a", - display_name: "Getting Help", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@312cb4faed17420e82ab3178fc3e251a', + display_name: 'Getting Help', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@8bb218cccf8d40519a971ff0e4901ccf", - display_name: "Getting Help", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@8bb218cccf8d40519a971ff0e4901ccf', + display_name: 'Getting Help', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@7efc7bf4a47b4a6cb6595c32cde7712a", - display_name: "Homework - Find Your Study Buddy", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@7efc7bf4a47b4a6cb6595c32cde7712a', + display_name: 'Homework - Find Your Study Buddy', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@87fa6792d79f4862be098e5169e93339", - display_name: "Blank HTML Page", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@87fa6792d79f4862be098e5169e93339', + display_name: 'Blank HTML Page', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@dbe8fc027bcb4fe9afb744d2e8415855", - display_name: "Homework - Find Your Study Buddy", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@dbe8fc027bcb4fe9afb744d2e8415855', + display_name: 'Homework - Find Your Study Buddy', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@26d89b08f75d48829a63520ed8b0037d", - display_name: "Homework - Find Your Study Buddy", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@26d89b08f75d48829a63520ed8b0037d', + display_name: 'Homework - Find Your Study Buddy', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@6018785795994726950614ce7d0f38c5", - display_name: "Find Your Study Buddy", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@6018785795994726950614ce7d0f38c5', + display_name: 'Find Your Study Buddy', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@6ab9c442501d472c8ed200e367b4edfa", - display_name: "More Ways to Connect", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@6ab9c442501d472c8ed200e367b4edfa', + display_name: 'More Ways to Connect', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@3f2c11aba9434e459676a7d7acc4d960", - display_name: "Google Hangout", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@3f2c11aba9434e459676a7d7acc4d960', + display_name: 'Google Hangout', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@d45779ad3d024a40a09ad8cc317c0970", - display_name: "Text", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@d45779ad3d024a40a09ad8cc317c0970', + display_name: 'Text', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@55cbc99f262443d886a25cf84594eafb", - display_name: "Text", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@55cbc99f262443d886a25cf84594eafb', + display_name: 'Text', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@ade92343df3d4953a40ab3adc8805390", - display_name: "Google Hangout", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@ade92343df3d4953a40ab3adc8805390', + display_name: 'Google Hangout', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@chapter+block@1414ffd5143b4b508f739b563ab468b7", - display_name: "About Exams and Certificates", - category: "chapter", + id: 'block-v1:edX+DemoX+Demo_Course+type@chapter+block@1414ffd5143b4b508f739b563ab468b7', + display_name: 'About Exams and Certificates', + category: 'chapter', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "sequential", - display_name: "Subsection", + category: 'sequential', + display_name: 'Subsection', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@workflow", - display_name: "edX Exams", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@workflow', + display_name: 'edX Exams', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@934cc32c177d41b580c8413e561346b3", - display_name: "EdX Exams", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@934cc32c177d41b580c8413e561346b3', + display_name: 'EdX Exams', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@8293139743f34377817d537b69911530", - display_name: "EdX Exams", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@8293139743f34377817d537b69911530', + display_name: 'EdX Exams', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_f04afeac0131", - display_name: "Immediate Feedback", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_f04afeac0131', + display_name: 'Immediate Feedback', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@ex_practice_2", - display_name: "Immediate Feedback", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@ex_practice_2', + display_name: 'Immediate Feedback', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@4aba537a78774bd5a862485a8563c345", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@4aba537a78774bd5a862485a8563c345', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@b6662b497c094bcc9b870d8270c90c93", - display_name: "Getting Answers", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@b6662b497c094bcc9b870d8270c90c93', + display_name: 'Getting Answers', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@45d46192272c4f6db6b63586520bbdf4", - display_name: "Getting Answers", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@45d46192272c4f6db6b63586520bbdf4', + display_name: 'Getting Answers', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@f480df4ce91347c5ae4301ddf6146238", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@f480df4ce91347c5ae4301ddf6146238', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@f91d8d31f7cf48ce990f8d8745ae4cfa", - display_name: "Answering More Than Once", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@f91d8d31f7cf48ce990f8d8745ae4cfa', + display_name: 'Answering More Than Once', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@651e0945b77f42e0a4c89b8c3e6f5b3b", - display_name: "Answering More Than Once", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@651e0945b77f42e0a4c89b8c3e6f5b3b', + display_name: 'Answering More Than Once', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@b8cec2a19ebf463f90cd3544c7927b0e", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@b8cec2a19ebf463f90cd3544c7927b0e', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_ac391cde8a91", - display_name: "Limited Checks", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_ac391cde8a91', + display_name: 'Limited Checks', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@ex_practice_limited_checks", - display_name: "Limited Checks", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@ex_practice_limited_checks', + display_name: 'Limited Checks', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@d1b84dcd39b0423d9e288f27f0f7f242", - display_name: "Few Checks", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@d1b84dcd39b0423d9e288f27f0f7f242', + display_name: 'Few Checks', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@cd177caa62444fbca48aa8f843f09eac", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@cd177caa62444fbca48aa8f843f09eac', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_36e0beb03f0a", - display_name: "Randomized Questions", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_36e0beb03f0a', + display_name: 'Randomized Questions', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@problem+block@ex_practice_3", - display_name: "Randomized Questions", - category: "problem", + id: 'block-v1:edX+DemoX+Demo_Course+type@problem+block@ex_practice_3', + display_name: 'Randomized Questions', + category: 'problem', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@ddede76df71045ffa16de9d1481d2119", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@ddede76df71045ffa16de9d1481d2119', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@1b0e2c2c84884b95b1c99fb678cc964c", - display_name: "Overall Grade Performance", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@1b0e2c2c84884b95b1c99fb678cc964c', + display_name: 'Overall Grade Performance', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@f4a39219742149f781a1dda6f43a623c", - display_name: "Overall Grade", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@f4a39219742149f781a1dda6f43a623c', + display_name: 'Overall Grade', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@1a810b1a3b2447b998f0917d0e5a802b", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@1a810b1a3b2447b998f0917d0e5a802b', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@c7e98fd39a6944edb6b286c32e1150ff", - display_name: "Passing a Course", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@c7e98fd39a6944edb6b286c32e1150ff', + display_name: 'Passing a Course', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@5e009378f0b64585baa0a14b155974b9", - display_name: "Passing a Course", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@5e009378f0b64585baa0a14b155974b9', + display_name: 'Passing a Course', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@discussion+block@23e6eda482c04335af2bb265beacaf59", - display_name: "", - category: "discussion", + id: 'block-v1:edX+DemoX+Demo_Course+type@discussion+block@23e6eda482c04335af2bb265beacaf59', + display_name: '', + category: 'discussion', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@d6eaa391d2be41dea20b8b1bfbcb1c45", - display_name: "Getting Your edX Certificate", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@d6eaa391d2be41dea20b8b1bfbcb1c45', + display_name: 'Getting Your edX Certificate', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@148ae8fa73ea460eb6f05505da0ba6e6", - display_name: "Getting Your edX Certificate", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@148ae8fa73ea460eb6f05505da0ba6e6', + display_name: 'Getting Your edX Certificate', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', }, { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@6b6bee43c7c641509da71c9299cc9f5a", - display_name: "Blank HTML Page", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@6b6bee43c7c641509da71c9299cc9f5a', + display_name: 'Blank HTML Page', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@chapter+block@59666313a79946079f5ef4fff36e45f0", - display_name: "IFrame", - category: "chapter", + id: 'block-v1:edX+DemoX+Demo_Course+type@chapter+block@59666313a79946079f5ef4fff36e45f0', + display_name: 'IFrame', + category: 'chapter', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "sequential", - display_name: "Subsection", + category: 'sequential', + display_name: 'Subsection', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@f9fd819dfb224d118e4df4d46c648179", - display_name: "Subsection", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@f9fd819dfb224d118e4df4d46c648179', + display_name: 'Subsection', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { - category: "vertical", - display_name: "Unit", + category: 'vertical', + display_name: 'Unit', children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@vertical+block@c8165538b5f04283879efc8e8deb2d92", - display_name: "Iframe", - category: "vertical", + id: 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@c8165538b5f04283879efc8e8deb2d92', + display_name: 'Iframe', + category: 'vertical', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html", + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', child_info: { children: [ { - id: "block-v1:edX+DemoX+Demo_Course+type@html+block@fd3d0a72d0d344af9a53de144d83af1f", - display_name: "IFrame Tool", - category: "html", + id: 'block-v1:edX+DemoX+Demo_Course+type@html+block@fd3d0a72d0d344af9a53de144d83af1f', + display_name: 'IFrame Tool', + category: 'html', has_children: false, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }, { - id: "block-v1:edX+DemoX+Demo_Course+type@sequential+block@a7deaeb85ee24470871c912536534a59", - display_name: "Subsection", - category: "sequential", + id: 'block-v1:edX+DemoX+Demo_Course+type@sequential+block@a7deaeb85ee24470871c912536534a59', + display_name: 'Subsection', + category: 'sequential', has_children: true, video_sharing_enabled: true, - video_sharing_options: "per-video", - video_sharing_doc_url: "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html" - } - ] - } - } - ] - } + video_sharing_options: 'per-video', + video_sharing_doc_url: 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/developing_course/social_sharing.html', + }, + ], + }, + }, + ], + }, }; diff --git a/src/course-unit/add-component/AddComponent.jsx b/src/course-unit/add-component/AddComponent.jsx index a2c80f8b74..573da717fe 100644 --- a/src/course-unit/add-component/AddComponent.jsx +++ b/src/course-unit/add-component/AddComponent.jsx @@ -16,7 +16,7 @@ const AddComponent = ({ blockId, handleCreateNewCourseXBlock }) => { const [isOpenAdvanced, openAdvanced, closeAdvanced] = useToggle(false); const [isOpenHtml, openHtml, closeHtml] = useToggle(false); const [isOpenOpenAssessment, openOpenAssessment, closeOpenAssessment] = useToggle(false); - const { componentTemplates } = useSelector(getCourseSectionVertical); + const { componentTemplates = {} } = useSelector(getCourseSectionVertical); const handleCreateNewXBlock = (type, moduleName) => { switch (type) { diff --git a/src/course-unit/breadcrumbs/Breadcrumbs.jsx b/src/course-unit/breadcrumbs/Breadcrumbs.jsx index 8dd34cfc52..8d770fd23b 100644 --- a/src/course-unit/breadcrumbs/Breadcrumbs.jsx +++ b/src/course-unit/breadcrumbs/Breadcrumbs.jsx @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; import { useIntl } from '@edx/frontend-platform/i18n'; import { Dropdown, Icon } from '@openedx/paragon'; @@ -6,73 +7,67 @@ import { ChevronRight as ChevronRightIcon, } from '@openedx/paragon/icons'; -import { createCorrectInternalRoute } from '../../utils'; import { getCourseSectionVertical } from '../data/selectors'; +import { adoptCourseSectionUrl } from '../utils'; import messages from './messages'; -const Breadcrumbs = () => { +const Breadcrumbs = ({ courseId, sequenceId }) => { const intl = useIntl(); - const { ancestorXblocks } = useSelector(getCourseSectionVertical); - const [section, subsection] = ancestorXblocks ?? []; + const { ancestorXblocks = [] } = useSelector(getCourseSectionVertical); return ( ); }; +Breadcrumbs.propTypes = { + courseId: PropTypes.string.isRequired, + sequenceId: PropTypes.string.isRequired, +}; + export default Breadcrumbs; diff --git a/src/course-unit/constants.js b/src/course-unit/constants.js index ebadb310b4..fbb51640b7 100644 --- a/src/course-unit/constants.js +++ b/src/course-unit/constants.js @@ -52,6 +52,7 @@ export const messageTypes = { videoFullScreen: 'plugin.videoFullScreen', refreshXBlock: 'refreshXBlock', showMoveXBlockModal: 'showMoveXBlockModal', + handleViewXBlockContent: 'handleViewXBlockContent', }; export const IFRAME_FEATURE_POLICY = ( diff --git a/src/course-unit/context/hooks.tsx b/src/course-unit/context/hooks.tsx index fcb13041c9..9760c07afc 100644 --- a/src/course-unit/context/hooks.tsx +++ b/src/course-unit/context/hooks.tsx @@ -2,10 +2,11 @@ import { useContext } from 'react'; import { IframeContext, IframeContextType } from './iFrameContext'; +// eslint-disable-next-line import/prefer-default-export export const useIframe = (): IframeContextType => { - const context = useContext(IframeContext); - if (!context) { - throw new Error('useIframe must be used within an IframeProvider'); - } - return context; + const context = useContext(IframeContext); + if (!context) { + throw new Error('useIframe must be used within an IframeProvider'); + } + return context; }; diff --git a/src/course-unit/context/iFrameContext.tsx b/src/course-unit/context/iFrameContext.tsx index 17586a3de8..3ca1733114 100644 --- a/src/course-unit/context/iFrameContext.tsx +++ b/src/course-unit/context/iFrameContext.tsx @@ -1,4 +1,6 @@ -import React, { createContext, MutableRefObject, useState } from 'react'; +import React, { + createContext, MutableRefObject, useState, useMemo, +} from 'react'; export interface IframeContextType { setIframeRef: (ref: MutableRefObject) => void; @@ -16,15 +18,22 @@ export const IframeProvider: React.FC = ({ children }) => { try { iframeWindow.postMessage({ type: messageType, payload }, '*'); } catch (error) { + // eslint-disable-next-line no-console console.error('Failed to send message to iframe:', error); } } else { + // eslint-disable-next-line no-console console.warn('Iframe is not accessible or loaded yet.'); } }; + const value = useMemo(() => ({ + setIframeRef, + sendMessageToIframe, + }), [setIframeRef, sendMessageToIframe]); + return ( - + {children} ); diff --git a/src/course-unit/data/api.js b/src/course-unit/data/api.js index cce2d89e27..cbd2503a12 100644 --- a/src/course-unit/data/api.js +++ b/src/course-unit/data/api.js @@ -90,15 +90,17 @@ export async function createCourseXblock({ * @param {string} type - The action type (e.g., PUBLISH_TYPES.discardChanges). * @param {boolean} isVisible - The visibility status for students. * @param {boolean} groupAccess - Access group key set. + * @param {boolean} isDiscussionEnabled - Indicates whether the discussion feature is enabled. * @returns {Promise} A promise that resolves with the response data. */ -export async function handleCourseUnitVisibilityAndData(unitId, type, isVisible, groupAccess) { +export async function handleCourseUnitVisibilityAndData(unitId, type, isVisible, groupAccess, isDiscussionEnabled) { const body = { publish: groupAccess ? null : type, ...(type === PUBLISH_TYPES.republish ? { metadata: { visible_to_staff_only: isVisible ? true : null, group_access: groupAccess || null, + discussion_enabled: isDiscussionEnabled, }, } : {}), }; diff --git a/src/course-unit/data/slice.js b/src/course-unit/data/slice.js index fec0ba7dc2..1755d0960f 100644 --- a/src/course-unit/data/slice.js +++ b/src/course-unit/data/slice.js @@ -28,7 +28,7 @@ const slice = createSlice({ title: '', sourceLocator: '', targetParentLocator: '', - } + }, }, reducers: { fetchCourseItemSuccess: (state, { payload }) => { diff --git a/src/course-unit/data/thunk.js b/src/course-unit/data/thunk.js index ac7e1a62d5..c3f7b956ef 100644 --- a/src/course-unit/data/thunk.js +++ b/src/course-unit/data/thunk.js @@ -71,7 +71,7 @@ export function fetchCourseSectionVerticalData(courseId, sequenceId) { })); dispatch(updateModels({ modelType: 'units', - models: courseSectionVerticalData.units, + models: courseSectionVerticalData.units || [], })); dispatch(fetchStaticFileNoticesSuccess(JSON.parse(localStorage.getItem('staticFileNotices')))); localStorage.removeItem('staticFileNotices'); @@ -104,7 +104,7 @@ export function editCourseItemQuery(itemId, displayName, sequenceId) { })); dispatch(updateModels({ modelType: 'units', - models: courseSectionVerticalData.units, + models: courseSectionVerticalData.units || [], })); dispatch(fetchSequenceSuccess({ sequenceId })); dispatch(fetchCourseItemSuccess(courseUnit)); @@ -119,15 +119,28 @@ export function editCourseItemQuery(itemId, displayName, sequenceId) { }; } -export function editCourseUnitVisibilityAndData(itemId, type, isVisible, groupAccess, isModalView, blockId = itemId) { +export function editCourseUnitVisibilityAndData( + itemId, + type, + isVisible, + groupAccess, + isDiscussionEnabled, + blockId = itemId, +) { return async (dispatch) => { dispatch(updateSavingStatus({ status: RequestStatus.PENDING })); dispatch(updateQueryPendingStatus(true)); - const notification = getNotificationMessage(type, isVisible, isModalView); + const notification = getNotificationMessage(type, isVisible, true); dispatch(showProcessingNotification(notification)); try { - await handleCourseUnitVisibilityAndData(itemId, type, isVisible, groupAccess).then(async (result) => { + await handleCourseUnitVisibilityAndData( + itemId, + type, + isVisible, + groupAccess, + isDiscussionEnabled, + ).then(async (result) => { if (result) { const courseUnit = await getCourseUnitData(blockId); dispatch(fetchCourseItemSuccess(courseUnit)); diff --git a/src/course-unit/data/utils.js b/src/course-unit/data/utils.js index b523b9ace6..ef589bb491 100644 --- a/src/course-unit/data/utils.js +++ b/src/course-unit/data/utils.js @@ -11,9 +11,9 @@ export function normalizeCourseSectionVerticalData(metadata) { sequence: { id: data.subsectionLocation, title: data.xblock.displayName, - unitIds: data.xblockInfo.ancestorInfo.ancestors[0].childInfo.children.map((item) => item.id), + unitIds: data.xblockInfo.ancestorInfo?.ancestors[0].childInfo.children.map((item) => item.id), }, - units: data.xblockInfo.ancestorInfo.ancestors[0].childInfo.children.map((unit) => ({ + units: data.xblockInfo.ancestorInfo?.ancestors[0].childInfo.children.map((unit) => ({ id: unit.id, sequenceId: data.subsectionLocation, bookmarked: unit.bookmarked, diff --git a/src/course-unit/header-navigations/HeaderNavigations.jsx b/src/course-unit/header-navigations/HeaderNavigations.jsx index 178c768dfd..a934c0c974 100644 --- a/src/course-unit/header-navigations/HeaderNavigations.jsx +++ b/src/course-unit/header-navigations/HeaderNavigations.jsx @@ -1,27 +1,42 @@ import PropTypes from 'prop-types'; import { useIntl } from '@edx/frontend-platform/i18n'; import { Button } from '@openedx/paragon'; +import { Edit as EditIcon } from '@openedx/paragon/icons'; +import { COURSE_BLOCK_NAMES } from '../../constants'; import messages from './messages'; -const HeaderNavigations = ({ headerNavigationsActions }) => { +const HeaderNavigations = ({ headerNavigationsActions, unitCategory }) => { const intl = useIntl(); - const { handleViewLive, handlePreview } = headerNavigationsActions; + const { handleViewLive, handlePreview, handleEdit } = headerNavigationsActions; return ( ); }; @@ -30,7 +45,9 @@ HeaderNavigations.propTypes = { headerNavigationsActions: PropTypes.shape({ handleViewLive: PropTypes.func.isRequired, handlePreview: PropTypes.func.isRequired, + handleEdit: PropTypes.func.isRequired, }).isRequired, + unitCategory: PropTypes.string.isRequired, }; export default HeaderNavigations; diff --git a/src/course-unit/header-navigations/HeaderNavigations.test.jsx b/src/course-unit/header-navigations/HeaderNavigations.test.jsx index e5a094247e..724f8b70c9 100644 --- a/src/course-unit/header-navigations/HeaderNavigations.test.jsx +++ b/src/course-unit/header-navigations/HeaderNavigations.test.jsx @@ -1,14 +1,18 @@ import { fireEvent, render } from '@testing-library/react'; import { IntlProvider } from '@edx/frontend-platform/i18n'; +import { COURSE_BLOCK_NAMES } from '../../constants'; import HeaderNavigations from './HeaderNavigations'; import messages from './messages'; const handleViewLiveFn = jest.fn(); const handlePreviewFn = jest.fn(); +const handleEditFn = jest.fn(); + const headerNavigationsActions = { handleViewLive: handleViewLiveFn, handlePreview: handlePreviewFn, + handleEdit: handleEditFn, }; const renderComponent = (props) => render( @@ -22,14 +26,14 @@ const renderComponent = (props) => render( describe('', () => { it('render HeaderNavigations component correctly', () => { - const { getByRole } = renderComponent(); + const { getByRole } = renderComponent({ unitCategory: COURSE_BLOCK_NAMES.vertical.id }); expect(getByRole('button', { name: messages.viewLiveButton.defaultMessage })).toBeInTheDocument(); expect(getByRole('button', { name: messages.previewButton.defaultMessage })).toBeInTheDocument(); }); - it('calls the correct handlers when clicking buttons', () => { - const { getByRole } = renderComponent(); + it('calls the correct handlers when clicking buttons for unit page', () => { + const { getByRole, queryByRole } = renderComponent({ unitCategory: COURSE_BLOCK_NAMES.vertical.id }); const viewLiveButton = getByRole('button', { name: messages.viewLiveButton.defaultMessage }); fireEvent.click(viewLiveButton); @@ -38,5 +42,22 @@ describe('', () => { const previewButton = getByRole('button', { name: messages.previewButton.defaultMessage }); fireEvent.click(previewButton); expect(handlePreviewFn).toHaveBeenCalledTimes(1); + + const editButton = queryByRole('button', { name: messages.editButton.defaultMessage }); + expect(editButton).not.toBeInTheDocument(); + }); + + it('calls the correct handlers when clicking buttons for library page', () => { + const { getByRole } = renderComponent({ unitCategory: COURSE_BLOCK_NAMES.libraryContent.id }); + + const editButton = getByRole('button', { name: messages.editButton.defaultMessage }); + fireEvent.click(editButton); + expect(handleViewLiveFn).toHaveBeenCalledTimes(1); + + const viewLiveButton = getByRole('button', { name: messages.viewLiveButton.defaultMessage }); + expect(viewLiveButton).not.toBeInTheDocument(); + + const previewButton = getByRole('button', { name: messages.previewButton.defaultMessage }); + expect(previewButton).not.toBeInTheDocument(); }); }); diff --git a/src/course-unit/header-navigations/messages.js b/src/course-unit/header-navigations/messages.ts similarity index 59% rename from src/course-unit/header-navigations/messages.js rename to src/course-unit/header-navigations/messages.ts index 55e60fc965..1a58965085 100644 --- a/src/course-unit/header-navigations/messages.js +++ b/src/course-unit/header-navigations/messages.ts @@ -4,10 +4,17 @@ const messages = defineMessages({ viewLiveButton: { id: 'course-authoring.course-unit.button.view-live', defaultMessage: 'View live version', + description: 'The unit view live button text', }, previewButton: { id: 'course-authoring.course-unit.button.preview', defaultMessage: 'Preview', + description: 'The unit preview button text', + }, + editButton: { + id: 'course-authoring.course-unit.button.preview', + defaultMessage: 'Edit', + description: 'The unit edit button text', }, }); diff --git a/src/course-unit/header-title/HeaderTitle.jsx b/src/course-unit/header-title/HeaderTitle.jsx index 0d29404ba6..2219b467e4 100644 --- a/src/course-unit/header-title/HeaderTitle.jsx +++ b/src/course-unit/header-title/HeaderTitle.jsx @@ -9,6 +9,7 @@ import { } from '@openedx/paragon/icons'; import ConfigureModal from '../../generic/configure-modal/ConfigureModal'; +import { COURSE_BLOCK_NAMES } from '../../constants'; import { getCourseUnitData } from '../data/selectors'; import { updateQueryPendingStatus } from '../data/slice'; import messages from './messages'; @@ -85,6 +86,10 @@ const HeaderTitle = ({ onClose={closeConfigureModal} onConfigureSubmit={onConfigureSubmit} currentItemData={currentItemData} + isSelfPaced={false} + isXBlockComponent={ + [COURSE_BLOCK_NAMES.libraryContent.id, COURSE_BLOCK_NAMES.component.id].includes(currentItemData.category) + } /> {getVisibilityMessage()} diff --git a/src/course-unit/hooks.jsx b/src/course-unit/hooks.jsx index 302a61a128..b1b02aa75b 100644 --- a/src/course-unit/hooks.jsx +++ b/src/course-unit/hooks.jsx @@ -1,11 +1,11 @@ -import { useContext, useEffect } from 'react'; +import { useCallback, useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useNavigate, useSearchParams } from 'react-router-dom'; import { useToggle } from '@openedx/paragon'; import { RequestStatus } from '../data/constants'; import { useCopyToClipboard } from '../generic/clipboard'; -import { createCorrectInternalRoute } from '../utils'; +import { useEventListener } from '../generic/hooks'; import { createNewCourseXBlock, fetchCourseUnitQuery, @@ -38,7 +38,6 @@ import { import { useIframe } from './context/hooks'; import { messageTypes, PUBLISH_TYPES } from './constants'; - // eslint-disable-next-line import/prefer-default-export export const useCourseUnit = ({ courseId, blockId }) => { const dispatch = useDispatch(); @@ -51,7 +50,7 @@ export const useCourseUnit = ({ courseId, blockId }) => { const isLoading = useSelector(getIsLoading); const errorMessage = useSelector(getErrorMessage); const sequenceStatus = useSelector(getSequenceStatus); - const { draftPreviewLink, publishedPreviewLink } = useSelector(getCourseSectionVertical); + const { draftPreviewLink, publishedPreviewLink, xblockInfo = {} } = useSelector(getCourseSectionVertical); const courseVerticalChildren = useSelector(getCourseVerticalChildren); const staticFileNotices = useSelector(getStaticFileNotices); const navigate = useNavigate(); @@ -62,8 +61,7 @@ export const useCourseUnit = ({ courseId, blockId }) => { const { currentlyVisibleToStudents } = courseUnit; const { sharedClipboardData, showPasteXBlock, showPasteUnit } = useCopyToClipboard(canEdit); const { canPasteComponent } = courseVerticalChildren; - - const unitTitle = courseUnit.metadata?.displayName || ''; + const { displayName: unitTitle, category: unitCategory } = xblockInfo; const sequenceId = courseUnit.ancestorInfo?.ancestors[0].id; const headerNavigationsActions = { @@ -73,14 +71,22 @@ export const useCourseUnit = ({ courseId, blockId }) => { handlePreview: () => { window.open(draftPreviewLink, '_blank'); }, + handleEdit: () => {}, }; const handleTitleEdit = () => { dispatch(changeEditTitleFormOpen(!isTitleEditFormOpen)); }; - const handleConfigureSubmit = (id, isVisible, groupAccess, closeModalFn) => { - dispatch(editCourseUnitVisibilityAndData(id, PUBLISH_TYPES.republish, isVisible, groupAccess, true, blockId)); + const handleConfigureSubmit = (id, isVisible, groupAccess, isDiscussionEnabled, closeModalFn) => { + dispatch(editCourseUnitVisibilityAndData( + id, + PUBLISH_TYPES.republish, + isVisible, + groupAccess, + isDiscussionEnabled, + blockId, + )); closeModalFn(); }; @@ -119,7 +125,9 @@ export const useCourseUnit = ({ courseId, blockId }) => { }; const handleRollbackMovedXBlock = () => { - const { sourceLocator, targetParentLocator, title, currentParentLocator } = movedXBlockParams; + const { + sourceLocator, targetParentLocator, title, currentParentLocator, + } = movedXBlockParams; dispatch(patchUnitItemQuery({ sourceLocator, targetParentLocator, @@ -141,6 +149,17 @@ export const useCourseUnit = ({ courseId, blockId }) => { navigate(`/course/${courseId}/container/${movedXBlockParams.targetParentLocator}`); }; + const receiveMessage = useCallback(({ data }) => { + const { payload, type } = data; + + if (type === messageTypes.handleViewXBlockContent) { + const newUnitId = payload.destination.split('/').pop(); + navigate(`/course/${courseId}/container/${newUnitId}/${sequenceId}`); + } + }, []); + + useEventListener('message', receiveMessage); + useEffect(() => { if (savingStatus === RequestStatus.SUCCESSFUL) { dispatch(updateQueryPendingStatus(true)); @@ -166,6 +185,7 @@ export const useCourseUnit = ({ courseId, blockId }) => { sequenceId, courseUnit, unitTitle, + unitCategory, errorMessage, sequenceStatus, savingStatus, diff --git a/src/course-unit/move-modal/constants.ts b/src/course-unit/move-modal/constants.ts index 397c434900..dddfb46230 100644 --- a/src/course-unit/move-modal/constants.ts +++ b/src/course-unit/move-modal/constants.ts @@ -19,7 +19,7 @@ export const CATEGORIES_KEYS = { component: 'component', split_test: 'split_test', group: 'group', -} +}; export const CATEGORY_RELATION_MAP = { course: 'section', diff --git a/src/course-unit/move-modal/index.scss b/src/course-unit/move-modal/index.scss index 1ca814bc9f..b644898e2d 100644 --- a/src/course-unit/move-modal/index.scss +++ b/src/course-unit/move-modal/index.scss @@ -62,7 +62,7 @@ border-radius: 0; width: 100%; gap: map-get($spacers, 2); - padding: 0.5625rem $spacer 0.5625rem map-get($spacers, 4); + padding: .5625rem $spacer .5625rem map-get($spacers, 4); } .btn { diff --git a/src/course-unit/move-modal/index.tsx b/src/course-unit/move-modal/index.tsx index 278ab55cd8..137c6f5cee 100644 --- a/src/course-unit/move-modal/index.tsx +++ b/src/course-unit/move-modal/index.tsx @@ -61,16 +61,16 @@ const MoveModal: FC = ({ ), [isExtraSmall, breadcrumbs, handleBreadcrumbsClick]); const getEmptyMessage = useCallback(() => ( -
  • - {intl.formatMessage(messages.moveModalEmptyCategoryText, { - category: parentInfo.category, - categoryText: categoryText.toLowerCase(), - })} -
  • +
  • + {intl.formatMessage(messages.moveModalEmptyCategoryText, { + category: parentInfo.category, + categoryText: categoryText.toLowerCase(), + })} +
  • ), [parentInfo.category, categoryText]); const getCategoryIndicator = useCallback(() => ( -
    +
    {intl.formatMessage(messages.moveModalCategoryIndicatorAccessibilityText, { categoryText, displayName })} @@ -150,9 +150,11 @@ const MoveModal: FC = ({
      {!childrenInfo.children?.length ? getEmptyMessage() - : childrenInfo.children.map((xBlock: IXBlock | IXBlockInfo, index: number) => { - return getCourseStructureListItem(xBlock as IXBlock, index); - })} + : childrenInfo.children.map( + (xBlock: IXBlock | IXBlockInfo, index: number) => ( + getCourseStructureListItem(xBlock as IXBlock, index) + ), + )}
    diff --git a/src/course-unit/move-modal/interfaces.ts b/src/course-unit/move-modal/interfaces.ts index d1574053cc..023161b54e 100644 --- a/src/course-unit/move-modal/interfaces.ts +++ b/src/course-unit/move-modal/interfaces.ts @@ -1,89 +1,83 @@ export interface IXBlockInfo { - id: string; - displayName: string; - child_info?: { - children?: IXBlockInfo[]; - }; - category?: string; - has_children?: boolean; + id: string; + displayName: string; + child_info?: { + children?: IXBlockInfo[]; + }; + category?: string; + has_children?: boolean; + hasChildren?: boolean; } export interface IUseMoveModalParams { - isOpenModal: boolean; - closeModal: () => void; - openModal: () => void; - courseId: string; + isOpenModal: boolean; + closeModal: () => void; + openModal: () => void; + courseId: string; } export interface IUseMoveModalReturn { - isLoading: boolean; - isValidMove: boolean; - isExtraSmall: boolean; - parentInfo: { - parent: IXBlockInfo; - category: string; - }; - childrenInfo: { - children: IXBlockInfo[]; - category: string; - }; - displayName: string; - sourceXBlockId: string; - categoryText: string; - breadcrumbs: string[]; - currentXBlockParentIds: string[]; - handleXBlockClick: (newParentIndex: string|number) => void; - handleBreadcrumbsClick: (newParentIndex: string|number) => void; - handleCLoseModal: () => void; - handleMoveXBlock: () => void; + isLoading: boolean; + isValidMove: boolean; + isExtraSmall: boolean; + parentInfo: { + parent: IXBlockInfo; + category: string; + }; + childrenInfo: { + children: IXBlockInfo[]; + category: string; + }; + displayName: string; + sourceXBlockId: string; + categoryText: string; + breadcrumbs: string[]; + currentXBlockParentIds: string[]; + handleXBlockClick: (newParentIndex: string | number) => void; + handleBreadcrumbsClick: (newParentIndex: string | number) => void; + handleCLoseModal: () => void; + handleMoveXBlock: () => void; } export interface IState { - sourceXBlockInfo: { - current: IXBlockInfo; - parent: IXBlockInfo; - }; - childrenInfo: { - children: IXBlockInfo[]; - category: string; - }; - parentInfo: { - parent: IXBlockInfo; - category: string; - }; - visitedAncestors: IXBlockInfo[]; - isValidMove: boolean; + sourceXBlockInfo: { + current: IXBlockInfo; + parent: IXBlockInfo; + }; + childrenInfo: { + children: IXBlockInfo[]; + category: string; + }; + parentInfo: { + parent: IXBlockInfo; + category: string; + }; + visitedAncestors: IXBlockInfo[]; + isValidMove: boolean; } export interface ITreeNode { - id: string; - child_info?: { - children?: ITreeNode[]; - }; -} - -export interface IXBlockInfo { - id: string, - category?: string; - hasChildren?: boolean; - has_children?: boolean; + id: string; + child_info?: { + children?: ITreeNode[]; + }; } export interface IAncestor { - category?: string; - display_name?: string; + category?: string; + display_name?: string; } export interface IXBlockChildInfo { - category?: string; - display_name?: string; - children?: IXBlock[]; + category?: string; + display_name?: string; + children?: IXBlock[]; } export interface IXBlock { - id: string; - display_name: string; - category: string; - has_children: boolean; - child_info?: IXBlockChildInfo; + id: string; + display_name: string; + category: string; + has_children: boolean; + child_info?: IXBlockChildInfo; } diff --git a/src/course-unit/move-modal/moveModal.test.tsx b/src/course-unit/move-modal/moveModal.test.tsx index b801b7d120..bb759e36c4 100644 --- a/src/course-unit/move-modal/moveModal.test.tsx +++ b/src/course-unit/move-modal/moveModal.test.tsx @@ -6,6 +6,7 @@ import { initializeMockApp } from '@edx/frontend-platform'; import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth'; import { Store } from 'redux'; +import userEvent from '@testing-library/user-event'; import initializeStore from '../../store'; import { getOutlineInfo } from '../data/api'; import { courseOutlineInfoMock } from '../__mocks__'; @@ -14,7 +15,6 @@ import { getCourseOutlineInfoQuery } from '../data/thunk'; import { IframeProvider } from '../context/iFrameContext'; import MoveModal from './index'; import messages from './messages'; -import userEvent from '@testing-library/user-event'; interface CourseOutlineChildInfo { category: string; @@ -96,8 +96,12 @@ describe('', () => { const categoryIndicator: HTMLElement = getByTestId('move-xblock-modal-category'); expect(getByText(messages.moveModalTitle.defaultMessage.replace(' {displayName}', ''))).toBeInTheDocument(); - expect(within(breadcrumbs).getByText(messages.moveModalBreadcrumbsBaseCategory.defaultMessage)).toBeInTheDocument(); - expect(within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSections.defaultMessage)).toBeInTheDocument(); + expect( + within(breadcrumbs).getByText(messages.moveModalBreadcrumbsBaseCategory.defaultMessage), + ).toBeInTheDocument(); + expect( + within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSections.defaultMessage), + ).toBeInTheDocument(); expect(getByRole('button', { name: messages.moveModalSubmitButton.defaultMessage })).toBeInTheDocument(); expect(getByRole('button', { name: messages.moveModalCancelButton.defaultMessage })).toBeInTheDocument(); }); @@ -107,35 +111,45 @@ describe('', () => { const breadcrumbs: HTMLElement = getByTestId('move-xblock-modal-breadcrumbs'); const categoryIndicator: HTMLElement = getByTestId('move-xblock-modal-category'); - expect(within(breadcrumbs).getByText(messages.moveModalBreadcrumbsBaseCategory.defaultMessage)).toBeInTheDocument(); - expect(within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSections.defaultMessage)).toBeInTheDocument(); + expect( + within(breadcrumbs).getByText(messages.moveModalBreadcrumbsBaseCategory.defaultMessage), + ).toBeInTheDocument(); + expect( + within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSections.defaultMessage), + ).toBeInTheDocument(); sections.map((section) => ( expect(getByText(section.display_name)).toBeInTheDocument() )); await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(sections[1].display_name, 'i') }))); await waitFor(() => { - expect(within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSubsections.defaultMessage)).toBeInTheDocument(); + expect( + within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSubsections.defaultMessage), + ).toBeInTheDocument(); expect(within(breadcrumbs).getByText(sections[1].display_name)).toBeInTheDocument(); subsections.map((subsection) => ( - expect(getByRole('button', { name: new RegExp(subsection.display_name, 'i') })).toBeInTheDocument() + expect(getByRole('button', { name: new RegExp(subsection.display_name, 'i') })).toBeInTheDocument() )); }); await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(subsections[1].display_name, 'i') }))); await waitFor(() => { - expect(within(categoryIndicator).getByText(messages.moveModalBreadcrumbsUnits.defaultMessage)).toBeInTheDocument(); + expect( + within(categoryIndicator).getByText(messages.moveModalBreadcrumbsUnits.defaultMessage), + ).toBeInTheDocument(); expect(within(breadcrumbs).getByText(subsections[1].display_name)).toBeInTheDocument(); units.map((unit) => ( - expect(getByRole('button', { name: new RegExp(unit.display_name, 'i') })).toBeInTheDocument() + expect(getByRole('button', { name: new RegExp(unit.display_name, 'i') })).toBeInTheDocument() )); }); await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(units[0].display_name, 'i') }))); await waitFor(() => { - expect(within(categoryIndicator).getByText(messages.moveModalBreadcrumbsComponents.defaultMessage)).toBeInTheDocument(); + expect( + within(categoryIndicator).getByText(messages.moveModalBreadcrumbsComponents.defaultMessage), + ).toBeInTheDocument(); expect(within(breadcrumbs).getByText(units[0].display_name)).toBeInTheDocument(); - components.map((component) => { + components.forEach((component) => { if (component.display_name) { expect(getByText(component.display_name)).toBeInTheDocument(); } @@ -148,15 +162,17 @@ describe('', () => { const breadcrumbs: HTMLElement = getByTestId('move-xblock-modal-breadcrumbs'); const categoryIndicator: HTMLElement = getByTestId('move-xblock-modal-category'); - await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(sections[1].display_name, 'i') }))); - await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(subsections[1].display_name, 'i') }))); - await waitFor(() => userEvent.click(within(breadcrumbs).getByText(sections[1].display_name))); + await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(sections[1].display_name, 'i') }))); + await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(subsections[1].display_name, 'i') }))); + await waitFor(() => userEvent.click(within(breadcrumbs).getByText(sections[1].display_name))); await waitFor(() => { - expect(within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSubsections.defaultMessage)).toBeInTheDocument(); + expect( + within(categoryIndicator).getByText(messages.moveModalBreadcrumbsSubsections.defaultMessage), + ).toBeInTheDocument(); expect(within(breadcrumbs).getByText(sections[1].display_name)).toBeInTheDocument(); subsections.map((subsection) => ( - expect(getByRole('button', { name: new RegExp(subsection.display_name, 'i') })).toBeInTheDocument() + expect(getByRole('button', { name: new RegExp(subsection.display_name, 'i') })).toBeInTheDocument() )); }); }); @@ -164,15 +180,15 @@ describe('', () => { it('renders empty message when no components are provided', async () => { const { getByText, getByRole } = renderComponent(); - await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(sections[1].display_name, 'i') } ))); - await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(subsections[1].display_name, 'i') } ))); - await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(units[7].display_name, 'i') } ))); + await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(sections[1].display_name, 'i') }))); + await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(subsections[1].display_name, 'i') }))); + await waitFor(() => userEvent.click(getByRole('button', { name: new RegExp(units[7].display_name, 'i') }))); await waitFor(() => { expect(getByText( - messages.moveModalEmptyCategoryText.defaultMessage - .replace('{category}', 'unit') - .replace('{categoryText}', 'components') + messages.moveModalEmptyCategoryText.defaultMessage + .replace('{category}', 'unit') + .replace('{categoryText}', 'components'), )).toBeInTheDocument(); }); }); diff --git a/src/course-unit/move-modal/utils.ts b/src/course-unit/move-modal/utils.ts index 4c2e7bb704..99f685cfa4 100644 --- a/src/course-unit/move-modal/utils.ts +++ b/src/course-unit/move-modal/utils.ts @@ -37,20 +37,20 @@ export const findParentIds = ( ): string[] => { let path: string[] = []; - function traverse(node: ITreeNode | undefined, targetId: string, currentPath: string[]): boolean { + function traverse(node: ITreeNode | undefined, id: string, currentPath: string[]): boolean { if (!node) { return false; } currentPath.push(node.id); - if (node.id === targetId) { + if (node.id === id) { path = currentPath.slice(); return true; } for (const child of node.child_info?.children ?? []) { - if (traverse(child, targetId, currentPath)) { + if (traverse(child, id, currentPath)) { return true; } } @@ -73,8 +73,10 @@ export const isValidCategory = ( sourceParentInfo: IXBlockInfo, targetParentInfo: IXBlockInfo, ): boolean => { - let { category: sourceParentCategory, hasChildren: sourceParentHasChildren } = sourceParentInfo; - let { category: targetParentCategory, has_children: targetParentHasChildren } = targetParentInfo; + let { category: sourceParentCategory } = sourceParentInfo; + let { category: targetParentCategory } = targetParentInfo; + const { hasChildren: sourceParentHasChildren } = sourceParentInfo; + const { has_children: targetParentHasChildren } = targetParentInfo; if ( sourceParentHasChildren diff --git a/src/course-unit/utils.ts b/src/course-unit/utils.ts new file mode 100644 index 0000000000..68adaf191a --- /dev/null +++ b/src/course-unit/utils.ts @@ -0,0 +1,33 @@ +import { createCorrectInternalRoute } from '../utils'; + +/** + * Adapts API URL paths to the application's internal URL format based on predefined conditions. + * + * @param {Object} params - Parameters for URL adaptation. + * @param {string} params.url - The original API URL to transform. + * @param {string} params.courseId - The course ID. + * @param {string} params.sequenceId - The sequence ID. + * @returns {string} - A correctly formatted internal route for the application. + */ +// eslint-disable-next-line import/prefer-default-export +export const adoptCourseSectionUrl = ( + { url, courseId, sequenceId }: { url: string, courseId: string, sequenceId: string }, +): string => { + let newUrl = url; + const urlConditions = [ + { + regex: /^\/container\/(.+)/, + transform: ([, unitId]) => `/course/${courseId}/container/${unitId}/${sequenceId}`, + }, + ]; + + for (const { regex, transform } of urlConditions) { + const match = RegExp(regex).exec(url); + if (match) { + newUrl = transform([match[0], match[1]]); + break; + } + } + + return createCorrectInternalRoute(newUrl); +}; diff --git a/src/course-unit/xblock-container-iframe/index.tsx b/src/course-unit/xblock-container-iframe/index.tsx index 67d625ab1d..761d637750 100644 --- a/src/course-unit/xblock-container-iframe/index.tsx +++ b/src/course-unit/xblock-container-iframe/index.tsx @@ -4,7 +4,7 @@ import { useIntl } from '@edx/frontend-platform/i18n'; import { getConfig } from '@edx/frontend-platform'; import { IFRAME_FEATURE_POLICY } from '../constants'; -import {useIframe} from '../context/hooks'; +import { useIframe } from '../context/hooks'; import { useIFrameBehavior } from './hooks'; import messages from './messages'; diff --git a/src/course-unit/xblock-container-iframe/tests/XblockContainerIframe.test.tsx b/src/course-unit/xblock-container-iframe/tests/XblockContainerIframe.test.tsx index 417c0f2180..b3bee233b8 100644 --- a/src/course-unit/xblock-container-iframe/tests/XblockContainerIframe.test.tsx +++ b/src/course-unit/xblock-container-iframe/tests/XblockContainerIframe.test.tsx @@ -5,7 +5,7 @@ import { IntlProvider } from '@edx/frontend-platform/i18n'; import { IFRAME_FEATURE_POLICY } from '../../constants'; import { useIFrameBehavior } from '../hooks'; import XBlockContainerIframe from '..'; -import {IframeProvider} from '../../context/iFrameContext'; +import { IframeProvider } from '../../context/iFrameContext'; jest.mock('@edx/frontend-platform', () => ({ getConfig: jest.fn(), diff --git a/src/generic/configure-modal/ConfigureModal.jsx b/src/generic/configure-modal/ConfigureModal.jsx index 04c82200df..6a4af78153 100644 --- a/src/generic/configure-modal/ConfigureModal.jsx +++ b/src/generic/configure-modal/ConfigureModal.jsx @@ -166,6 +166,7 @@ const ConfigureModal = ({ ); break; case COURSE_BLOCK_NAMES.vertical.id: + case COURSE_BLOCK_NAMES.libraryContent.id: case COURSE_BLOCK_NAMES.component.id: // groupAccess should be {partitionId: [group1, group2]} or {} if selectedPartitionIndex === -1 if (data.selectedPartitionIndex >= 0) { @@ -242,10 +243,12 @@ const ConfigureModal = ({ ); case COURSE_BLOCK_NAMES.vertical.id: + case COURSE_BLOCK_NAMES.libraryContent.id: case COURSE_BLOCK_NAMES.component.id: return ( for Unit', () => { expect(getByRole('button', { name: messages.cancelButton.defaultMessage })).toBeInTheDocument(); expect(getByRole('button', { name: messages.saveButton.defaultMessage })).toBeInTheDocument(); + + expect(queryByText(messages.discussionEnabledSectionTitle.defaultMessage)).toBeInTheDocument(); + expect(queryByText(messages.discussionEnabledCheckbox.defaultMessage)).toBeInTheDocument(); + expect(queryByText(messages.discussionEnabledDescription.defaultMessage)).toBeInTheDocument(); }); }); @@ -278,5 +282,9 @@ describe(' for XBlock', () => { expect(getByRole('button', { name: messages.cancelButton.defaultMessage })).toBeInTheDocument(); expect(getByRole('button', { name: messages.saveButton.defaultMessage })).toBeInTheDocument(); + + expect(queryByText(messages.discussionEnabledSectionTitle.defaultMessage)).not.toBeInTheDocument(); + expect(queryByText(messages.discussionEnabledCheckbox.defaultMessage)).not.toBeInTheDocument(); + expect(queryByText(messages.discussionEnabledDescription.defaultMessage)).not.toBeInTheDocument(); }); }); diff --git a/src/generic/configure-modal/UnitTab.jsx b/src/generic/configure-modal/UnitTab.jsx index c55d17a95b..0f65bb19f8 100644 --- a/src/generic/configure-modal/UnitTab.jsx +++ b/src/generic/configure-modal/UnitTab.jsx @@ -11,6 +11,7 @@ import messages from './messages'; const UnitTab = ({ isXBlockComponent, + isLibraryContent, values, setFieldValue, showWarning, @@ -61,7 +62,9 @@ const UnitTab = ({ )} {userPartitionInfo.selectablePartitions.length > 0 && ( -

    +

    + +


    @@ -130,22 +133,28 @@ const UnitTab = ({ )}
    )} -

    -
    - - - -

    + {!isXBlockComponent && ( + <> +

    +
    + + + +

    + + )} ); }; UnitTab.defaultProps = { isXBlockComponent: false, + isLibraryContent: false, }; UnitTab.propTypes = { isXBlockComponent: PropTypes.bool, + isLibraryContent: PropTypes.bool, values: PropTypes.shape({ isVisibleToStaffOnly: PropTypes.bool.isRequired, discussionEnabled: PropTypes.bool.isRequired, diff --git a/src/generic/configure-modal/messages.js b/src/generic/configure-modal/messages.js index 41ef703bd8..c7da8ff665 100644 --- a/src/generic/configure-modal/messages.js +++ b/src/generic/configure-modal/messages.js @@ -46,6 +46,10 @@ const messages = defineMessages({ id: 'course-authoring.course-outline.configure-modal.visibility-tab.unit-access', defaultMessage: 'Unit access', }, + libraryContentAccess: { + id: 'course-authoring.course-outline.configure-modal.visibility-tab.unit-access', + defaultMessage: 'Library content access', + }, discussionEnabledSectionTitle: { id: 'course-authoring.course-outline.configure-modal.discussion-enabled.section-title', defaultMessage: 'Discussion',