From f08a662136b81a99fca691e1e47ccff52929acae Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Fri, 20 Jan 2023 14:22:33 -0500 Subject: [PATCH] feat: remove drag and drop from advanced problems (#206) Drag and drop V2 is still available in studio via the "Advanced" component. --- .../AdvanceTypeSelect.test.jsx.snap | 352 ------------------ .../advancedOlxTemplates/drag_and_drop.js | 88 ----- .../constants/advancedOlxTemplates/index.js | 3 +- src/editors/data/constants/problem.js | 6 - 4 files changed, 1 insertion(+), 448 deletions(-) delete mode 100644 src/editors/data/constants/advancedOlxTemplates/drag_and_drop.js diff --git a/src/editors/containers/ProblemEditor/components/SelectTypeModal/content/__snapshots__/AdvanceTypeSelect.test.jsx.snap b/src/editors/containers/ProblemEditor/components/SelectTypeModal/content/__snapshots__/AdvanceTypeSelect.test.jsx.snap index 5dcf85a1c..659b887c5 100644 --- a/src/editors/containers/ProblemEditor/components/SelectTypeModal/content/__snapshots__/AdvanceTypeSelect.test.jsx.snap +++ b/src/editors/containers/ProblemEditor/components/SelectTypeModal/content/__snapshots__/AdvanceTypeSelect.test.jsx.snap @@ -144,50 +144,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with default - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
@@ -446,50 +402,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with problem - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
@@ -748,50 +660,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with problem - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
@@ -1050,50 +918,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with problem - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
@@ -1352,50 +1176,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with problem - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
@@ -1654,50 +1434,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with problem - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
@@ -1956,50 +1692,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with problem - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
@@ -2258,50 +1950,6 @@ exports[`AdvanceTypeSelect snapshots snapshots: renders as expected with problem - - - Drag and drop (deprecated version) - - - -
- {supportStatus, select, - Provisional {Provisionally supported tools might lack the robustness of functionality - that your courses require. edX does not have control over the quality of the software, - or of the content that can be provided using these tools. - - - - Test these tools thoroughly before using them in your course, especially in graded - sections. Complete documentstion might not be available for provisionally supported - tools, or documentation might be available from sources other than edX.} - Not_supported {Tools with no support are not maintained by edX, and might be deprecated - in the future. They are not recommened for use in courses due to non-compliance with one - or more of the base requirements, such as testing, accessibility, internationalization, - and documentation.} - other { } - } -
- - } - placement="right" - > -
- Not supported -
-
-
diff --git a/src/editors/data/constants/advancedOlxTemplates/drag_and_drop.js b/src/editors/data/constants/advancedOlxTemplates/drag_and_drop.js deleted file mode 100644 index 05f6c77f8..000000000 --- a/src/editors/data/constants/advancedOlxTemplates/drag_and_drop.js +++ /dev/null @@ -1,88 +0,0 @@ -/* eslint-disable */ -// --- -// metadata: -// display_name: Drag and Drop (Deprecated Version) -// markdown: !!null -// showanswer: never -// data: | -export const dragAndDrop = ` -

In drag and drop problems, students respond to a question by dragging text or objects to a specific location on an image.

-

- For more information, see - - Drag and Drop Problem (Deprecated) in Building and Running an edX Course. -

-

- When you add the problem, be sure to select Settings - to specify a Display Name and other values that apply. -

-

You can use the following example problems as models.

-
- -

Simple Drag and Drop

-

Drag each word in the scrollbar to the bucket that matches the number of letters in the word.

- - - - - - - - - - - - - - - correct_answer = { - '1': [[70, 150], 121], - '6': [[190, 150], 121], - '8': [[190, 150], 121], - '2': [[310, 150], 121], - '9': [[310, 150], 121], - '11': [[310, 150], 121], - '4': [[420, 150], 121], - '7': [[420, 150], 121], - '3': [[550, 150], 121], - '5': [[550, 150], 121], - '10': [[550, 150], 121]} - if draganddrop.grade(submission[0], correct_answer): - correct = ['correct'] - else: - correct = ['incorrect'] - -
- - -

Drag and Drop with Outline

-

Label the hydrogen atoms connected with the left carbon atom.

- - - - - - - - - - - - - - - - correct_answer = [{ - 'draggables': ['1', '2'], - 'targets': ['t2', 't3', 't4' ], - 'rule':'anyof' - }] - if draganddrop.grade(submission[0], correct_answer): - correct = ['correct'] - else: - correct = ['incorrect'] - -
-
`; - -export default dragAndDrop; diff --git a/src/editors/data/constants/advancedOlxTemplates/index.js b/src/editors/data/constants/advancedOlxTemplates/index.js index 8e693b5c7..16602efdb 100644 --- a/src/editors/data/constants/advancedOlxTemplates/index.js +++ b/src/editors/data/constants/advancedOlxTemplates/index.js @@ -1,12 +1,11 @@ import { StrictDict } from '../../../utils'; import circuitSchematic from './circuitschematic'; import customGrader from './customgrader'; -import dragAndDrop from './drag_and_drop'; import formulaResponse from './formularesponse'; import imageResponse from './imageresponse'; import jsInputResponse from './jsinput_response'; import problemWithHint from './problem_with_hint'; export default StrictDict({ - circuitSchematic, customGrader, dragAndDrop, formulaResponse, imageResponse, jsInputResponse, problemWithHint, + circuitSchematic, customGrader, formulaResponse, imageResponse, jsInputResponse, problemWithHint, }); diff --git a/src/editors/data/constants/problem.js b/src/editors/data/constants/problem.js index 2348f83bf..ecf2623f2 100644 --- a/src/editors/data/constants/problem.js +++ b/src/editors/data/constants/problem.js @@ -76,7 +76,6 @@ export const AdvanceProblemKeys = StrictDict({ CIRCUITSCHEMATIC: 'circuitschematic', JSINPUT: 'jsinputresponse', CUSTOMGRADER: 'customgrader', - DRAGANDDROP: 'draganddrop', IMAGE: 'imageresponse', FORMULA: 'formularesponse', PROBLEMWITHHINT: 'problemwithhint', @@ -103,11 +102,6 @@ export const AdvanceProblems = StrictDict({ status: 'Provisional', template: advancedOlxTemplates.customGrader, }, - [AdvanceProblemKeys.DRAGANDDROP]: { - title: 'Drag and drop (deprecated version)', - status: 'Not supported', - template: advancedOlxTemplates.dragAndDrop, - }, [AdvanceProblemKeys.IMAGE]: { title: 'Image mapped input', status: 'Not supported',