diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx index 617f2a7ee..b5b4bc3e3 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx @@ -1,12 +1,11 @@ import React from 'react'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { - ActionRow, Container, Form, Icon, IconButton, Row, + ActionRow, Form, Icon, IconButton, Row, } from '@edx/paragon'; import { DeleteOutline } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; import messages from '../../messages'; -import ExpandableTextArea from '../../../../../../../sharedComponents/ExpandableTextArea'; export const GroupFeedbackRow = ({ value, @@ -14,27 +13,25 @@ export const GroupFeedbackRow = ({ handleFeedbackChange, handleDelete, answers, - id, // injected intl, }) => (
- - - - +
+ +
{ handleAnswersSelectedChange: jest.fn().mockName('handleAnswersSelectedChange'), handleFeedbackChange: jest.fn().mockName('handleFeedbackChange'), handleDelete: jest.fn().mockName('handleDelete'), - id: '0', intl: { formatMessage }, }; diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/__snapshots__/GroupFeedbackRow.test.jsx.snap b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/__snapshots__/GroupFeedbackRow.test.jsx.snap index 7bd39badd..410ac07c4 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/__snapshots__/GroupFeedbackRow.test.jsx.snap +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/__snapshots__/GroupFeedbackRow.test.jsx.snap @@ -7,25 +7,20 @@ exports[`GroupFeedbackRow snapshot snapshot: renders hints row 1`] = ` - - - - +
+ +
{ - const feedbackString = groupFeedback?.[element.id]; - const parsedFeedback = this.parser.parse(feedbackString); compoundhint.push({ - ...parsedFeedback, + '#text': element.feedback, '@_value': element.answers.join(' '), }); }); diff --git a/src/editors/containers/ProblemEditor/data/mockData/editorTestData.js b/src/editors/containers/ProblemEditor/data/mockData/editorTestData.js index 0f9ed33e1..19946faab 100644 --- a/src/editors/containers/ProblemEditor/data/mockData/editorTestData.js +++ b/src/editors/containers/ProblemEditor/data/mockData/editorTestData.js @@ -31,8 +31,8 @@ export const checkboxesWithFeedbackAndHints = { '

If you add more than one hint, a different hint appears each time learners select the hint button.

', ], groupFeedback: { - 0: '

You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.

', - 1: '

You can specify optional feedback for one, several, or all answer combinations.

', + 0: 'You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.', + 1: 'You can specify optional feedback for one, several, or all answer combinations.', }, }; diff --git a/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js b/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js index 8a8603162..1d0980b75 100644 --- a/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js +++ b/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js @@ -15,8 +15,8 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({

You can specify optional feedback for selected answers, cleared answers, or both.

a correct answer

-

You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.

-

You can specify optional feedback for one, several, or all answer combinations.

+ You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted. + You can specify optional feedback for one, several, or all answer combinations.
@@ -87,7 +87,7 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({ 'B', 'D', ], - feedback: '

You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.

', + feedback: 'You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.', }, { id: 1, @@ -97,7 +97,7 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({ 'C', 'D', ], - feedback: '

You can specify optional feedback for one, several, or all answer combinations.

', + feedback: 'You can specify optional feedback for one, several, or all answer combinations.', }, ], }, @@ -118,8 +118,8 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({

You can specify optional feedback for selected answers, cleared answers, or both.

a correct answer

-

You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.

-

You can specify optional feedback for one, several, or all answer combinations.

+ You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted. + You can specify optional feedback for one, several, or all answer combinations.
diff --git a/src/editors/data/services/cms/api.js b/src/editors/data/services/cms/api.js index b737e568c..141bd3b43 100644 --- a/src/editors/data/services/cms/api.js +++ b/src/editors/data/services/cms/api.js @@ -137,7 +137,6 @@ export const apiMethods = { metadata: { display_name: title }, }; } else if (blockType === 'problem') { - // console.log(type); response = { data: content.olx, category: blockType, diff --git a/src/editors/data/services/cms/mockApi.js b/src/editors/data/services/cms/mockApi.js index c7e7cb279..d15eaae22 100644 --- a/src/editors/data/services/cms/mockApi.js +++ b/src/editors/data/services/cms/mockApi.js @@ -294,3 +294,5 @@ export const fetchStudioView = ({ blockId, studioEndpointUrl }) => { export const checkTranscriptsForImport = () => mockPromise({}); export const uploadTranscript = () => mockPromise({}); + +export const fetchAdvancedSettings = () => mockPromise({});