diff --git a/.env b/.env index d906240d6..2874b4a97 100644 --- a/.env +++ b/.env @@ -34,7 +34,6 @@ ENABLE_NEW_HOME_PAGE = false ENABLE_NEW_COURSE_OUTLINE_PAGE = false ENABLE_NEW_UPDATES_PAGE = false ENABLE_NEW_VIDEO_UPLOAD_PAGE = false -ENABLE_NEW_SCHEDULE_DETAILS_PAGE = false ENABLE_NEW_GRADING_PAGE = false ENABLE_NEW_COURSE_TEAM_PAGE = false ENABLE_NEW_IMPORT_PAGE = false @@ -45,3 +44,4 @@ BBB_LEARN_MORE_URL='' HOTJAR_APP_ID='' HOTJAR_VERSION=6 HOTJAR_DEBUG=false +INVITE_STUDENTS_EMAIL_TO='' diff --git a/.env.development b/.env.development index 391cd08fb..b17611fad 100644 --- a/.env.development +++ b/.env.development @@ -36,7 +36,6 @@ ENABLE_NEW_HOME_PAGE = false ENABLE_NEW_COURSE_OUTLINE_PAGE = false ENABLE_NEW_UPDATES_PAGE = false ENABLE_NEW_VIDEO_UPLOAD_PAGE = false -ENABLE_NEW_SCHEDULE_DETAILS_PAGE = false ENABLE_NEW_GRADING_PAGE = false ENABLE_NEW_COURSE_TEAM_PAGE = false ENABLE_NEW_IMPORT_PAGE = false @@ -47,3 +46,4 @@ BBB_LEARN_MORE_URL='' HOTJAR_APP_ID='' HOTJAR_VERSION=6 HOTJAR_DEBUG=true +INVITE_STUDENTS_EMAIL_TO="someone@domain.com" diff --git a/.env.test b/.env.test index 495c6754c..8a5740394 100644 --- a/.env.test +++ b/.env.test @@ -32,7 +32,6 @@ ENABLE_NEW_HOME_PAGE = false ENABLE_NEW_COURSE_OUTLINE_PAGE = true ENABLE_NEW_UPDATES_PAGE = true ENABLE_NEW_VIDEO_UPLOAD_PAGE = true -ENABLE_NEW_SCHEDULE_DETAILS_PAGE = true ENABLE_NEW_GRADING_PAGE = true ENABLE_NEW_COURSE_TEAM_PAGE = true ENABLE_NEW_IMPORT_PAGE = true @@ -40,3 +39,4 @@ ENABLE_NEW_EXPORT_PAGE = true ENABLE_UNIT_PAGE = true ENABLE_VIDEO_UPLOAD_PAGE_LINK_IN_CONTENT_DROPDOWN = true BBB_LEARN_MORE_URL='' +INVITE_STUDENTS_EMAIL_TO="someone@domain.com" diff --git a/package-lock.json b/package-lock.json index 51adac5b4..f1eb55834 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@edx/brand": "npm:@edx/brand-openedx@1.1.0", "@edx/frontend-component-footer": "12.0.0", "@edx/frontend-enterprise-hotjar": "^1.2.1", - "@edx/frontend-lib-content-components": "^1.163.1", + "@edx/frontend-lib-content-components": "^1.167.0", "@edx/frontend-platform": "4.2.0", "@edx/paragon": "^20.45.4", "@fortawesome/fontawesome-svg-core": "1.2.28", @@ -30,6 +30,7 @@ "moment": "2.29.2", "prop-types": "15.7.2", "react": "16.14.0", + "react-datepicker": "^4.13.0", "react-dom": "16.14.0", "react-helmet": "^6.1.0", "react-redux": "7.1.3", @@ -1884,16 +1885,19 @@ } }, "node_modules/@codemirror/lang-html": { - "version": "6.1.0", - "license": "MIT", + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.4.tgz", + "integrity": "sha512-NbrqEp0GUOSvhZbG6BxVcS4SzM4SvN5vkkD2sEoETHIyHLZDb9pO1z+r1L2heb6LuF4bUeBCXKjHXoSeDJHO1w==", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/lang-css": "^6.0.0", "@codemirror/lang-javascript": "^6.0.0", - "@codemirror/language": "^6.0.0", + "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.2.2", "@lezer/common": "^1.0.0", - "@lezer/html": "^1.0.0" + "@lezer/css": "^1.1.0", + "@lezer/html": "^1.3.0" } }, "node_modules/@codemirror/lang-javascript": { @@ -1951,14 +1955,16 @@ } }, "node_modules/@codemirror/state": { - "version": "6.1.1", - "license": "MIT" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.2.1.tgz", + "integrity": "sha512-RupHSZ8+OjNT38zU9fKH2sv+Dnlr8Eb8sl4NOnnqz95mCFTZUaiRP8Xv5MeeaG0px2b8Bnfe7YGwCV3nsBhbuw==" }, "node_modules/@codemirror/view": { - "version": "6.2.0", - "license": "MIT", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.13.2.tgz", + "integrity": "sha512-XA/jUuu1H+eTja49654QkrQwx2CuDMdjciHcdqyasfTVo4HRlvj87rD/Qmm4HfnhwX8234FQSSA8HxEzxihX/Q==", "dependencies": { - "@codemirror/state": "^6.0.0", + "@codemirror/state": "^6.1.4", "style-mod": "^4.0.0", "w3c-keyname": "^2.2.4" } @@ -2291,9 +2297,9 @@ } }, "node_modules/@edx/frontend-lib-content-components": { - "version": "1.163.1", - "resolved": "https://registry.npmjs.org/@edx/frontend-lib-content-components/-/frontend-lib-content-components-1.163.1.tgz", - "integrity": "sha512-GrEsEh+AkO+9slCU+PK0I+w2/7OkJS08rRZpuLxNF2g7lv4IC6YcCuyhCSR99lIcTPmqsceKvuiLy8ehpMobDg==", + "version": "1.167.0", + "resolved": "https://registry.npmjs.org/@edx/frontend-lib-content-components/-/frontend-lib-content-components-1.167.0.tgz", + "integrity": "sha512-fISyyUiZhdAkEhYsz8hJOIt5w3vpBAH5J0pf4UpxyzqzpxU6anTI3VIkF3i78yJMZgIQ6Sl4eW75KXqIXAijPw==", "dependencies": { "@codemirror/lang-html": "^6.0.0", "@codemirror/lang-xml": "^6.0.0", @@ -2331,8 +2337,8 @@ "@edx/frontend-platform": "^4.0.0", "@edx/paragon": "^20.27.0", "prop-types": "^15.5.10", - "react": "^16.14.0", - "react-dom": "^16.14.0" + "react": "^16.14.0 || ^17.0.0", + "react-dom": "^16.14.0 || ^17.0.0" } }, "node_modules/@edx/frontend-lib-content-components/node_modules/@edx/browserslist-config": { @@ -3797,8 +3803,9 @@ "license": "MIT" }, "node_modules/@lezer/css": { - "version": "1.0.0", - "license": "MIT", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.2.tgz", + "integrity": "sha512-5TKMAReXukfEmIiZprDlGfZVfOOCyEStFi1YLzxclm9H3G/HHI49/2wzlRT6bQw5r7PoZVEtjTItEkb/UuZQyg==", "dependencies": { "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" @@ -3812,8 +3819,9 @@ } }, "node_modules/@lezer/html": { - "version": "1.0.1", - "license": "MIT", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.4.tgz", + "integrity": "sha512-HdJYMVZcT4YsMo7lW3ipL4NoyS2T67kMPuSVS5TgLGqmaCjEU/D6xv7zsa1ktvTK5lwk7zzF1e3eU6gBZIPm5g==", "dependencies": { "@lezer/common": "^1.0.0", "@lezer/highlight": "^1.0.0", @@ -7662,6 +7670,21 @@ "node": ">=10" } }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/debug": { "version": "4.3.4", "dev": true, @@ -17443,6 +17466,23 @@ "react-dom": ">=16.8.0" } }, + "node_modules/react-datepicker": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.13.0.tgz", + "integrity": "sha512-1S8yAqzcHE+LjCjMrTXJfUkTVijTPogxUYrmQmSpmRJ23fdC2w8cg04jzaEAyesTzyUa06JzayZJKk85QHbvcw==", + "dependencies": { + "@popperjs/core": "^2.9.2", + "classnames": "^2.2.6", + "date-fns": "^2.24.0", + "prop-types": "^15.7.2", + "react-onclickoutside": "^6.12.2", + "react-popper": "^2.3.0" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17 || ^18", + "react-dom": "^16.9.0 || ^17 || ^18" + } + }, "node_modules/react-dev-utils": { "version": "12.0.1", "dev": true, @@ -17808,6 +17848,19 @@ "react": ">=16.8.0" } }, + "node_modules/react-onclickoutside": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.13.0.tgz", + "integrity": "sha512-ty8So6tcUpIb+ZE+1HAhbLROvAIJYyJe/1vRrrcmW+jLsaM+/powDRqxzo6hSh9CuRZGSL1Q8mvcF5WRD93a0A==", + "funding": { + "type": "individual", + "url": "https://github.com/Pomax/react-onclickoutside/blob/master/FUNDING.md" + }, + "peerDependencies": { + "react": "^15.5.x || ^16.x || ^17.x || ^18.x", + "react-dom": "^15.5.x || ^16.x || ^17.x || ^18.x" + } + }, "node_modules/react-overlays": { "version": "5.2.0", "license": "MIT", diff --git a/package.json b/package.json index 4f13c3845..03fbe8378 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@edx/brand": "npm:@edx/brand-openedx@1.1.0", "@edx/frontend-component-footer": "12.0.0", "@edx/frontend-enterprise-hotjar": "^1.2.1", - "@edx/frontend-lib-content-components": "^1.163.1", + "@edx/frontend-lib-content-components": "^1.167.0", "@edx/frontend-platform": "4.2.0", "@edx/paragon": "^20.45.4", "@fortawesome/fontawesome-svg-core": "1.2.28", @@ -55,6 +55,7 @@ "moment": "2.29.2", "prop-types": "15.7.2", "react": "16.14.0", + "react-datepicker": "^4.13.0", "react-dom": "16.14.0", "react-helmet": "^6.1.0", "react-redux": "7.1.3", diff --git a/src/CourseAuthoringRoutes.jsx b/src/CourseAuthoringRoutes.jsx index 016043568..657ddd6c0 100644 --- a/src/CourseAuthoringRoutes.jsx +++ b/src/CourseAuthoringRoutes.jsx @@ -11,6 +11,7 @@ import VideoSelectorContainer from './selectors/VideoSelectorContainer'; import CustomPages from './custom-pages'; import FilesAndUploads from './files-and-uploads'; import { AdvancedSettings } from './advanced-settings'; +import ScheduleAndDetails from './schedule-and-details'; /** * As of this writing, these routes are mounted at a path prefixed with the following: @@ -86,10 +87,7 @@ const CourseAuthoringRoutes = ({ courseId }) => { )} - {process.env.ENABLE_NEW_SCHEDULE_DETAILS_PAGE === 'true' - && ( - - )} + {process.env.ENABLE_NEW_GRADING_PAGE === 'true' diff --git a/src/CourseAuthoringRoutes.test.jsx b/src/CourseAuthoringRoutes.test.jsx index 99adaeb8e..8e1bd6fd1 100644 --- a/src/CourseAuthoringRoutes.test.jsx +++ b/src/CourseAuthoringRoutes.test.jsx @@ -14,6 +14,17 @@ const videoSelectorContainerMockText = 'Video Selector Container'; const customPagesMockText = 'Custom Pages'; let store; const mockComponentFn = jest.fn(); + +// Mock the TinyMceWidget from frontend-lib-content-components +jest.mock('@edx/frontend-lib-content-components', () => ({ + TinyMceWidget: () =>
Widget
, + Footer: () =>
Footer
, + prepareEditorRef: jest.fn(() => ({ + refReady: true, + setEditorRef: jest.fn().mockName('prepareEditorRef.setEditorRef'), + })), +})); + jest.mock('react-router', () => ({ ...jest.requireActual('react-router'), useRouteMatch: () => ({ diff --git a/src/advanced-settings/AdvancedSettings.jsx b/src/advanced-settings/AdvancedSettings.jsx index 29ef4639f..9b9f8b720 100644 --- a/src/advanced-settings/AdvancedSettings.jsx +++ b/src/advanced-settings/AdvancedSettings.jsx @@ -55,6 +55,10 @@ const AdvancedSettings = ({ intl, courseId }) => { }, disabledStates: ['pending'], }; + const { + proctoringErrors, + mfeProctoredExamSettingsUrl, + } = proctoringExamErrors; useEffect(() => { if (savingStatus === RequestStatus.SUCCESSFUL) { @@ -123,10 +127,10 @@ const AdvancedSettings = ({ intl, courseId }) => { <>
- {(proctoringExamErrors?.length > 0) && ( + {(proctoringErrors?.length > 0) && (