feat: revert group feedback expanded text field (#297)

This commit is contained in:
Raymond Zhou
2023-04-06 10:40:13 -07:00
committed by GitHub
parent 4cfc5a6ea6
commit 9a19711755
8 changed files with 37 additions and 49 deletions

View File

@@ -157,12 +157,9 @@ class ReactStateOLXParser {
addGroupFeedbackList() {
const compoundhint = [];
const { groupFeedbackList } = this.problemState;
const { groupFeedback } = this.editorObject;
groupFeedbackList.forEach((element) => {
const feedbackString = groupFeedback?.[element.id];
const parsedFeedback = this.parser.parse(feedbackString);
compoundhint.push({
...parsedFeedback,
'#text': element.feedback,
'@_value': element.answers.join(' '),
});
});

View File

@@ -31,8 +31,8 @@ export const checkboxesWithFeedbackAndHints = {
'<p>If you add more than one hint, a different hint appears each time learners select the hint button.</p>',
],
groupFeedback: {
0: '<p>You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.</p>',
1: '<p>You can specify optional feedback for one, several, or all answer combinations.</p>',
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.',
},
};

View File

@@ -15,8 +15,8 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({
<choicehint selected="false"><p>You can specify optional feedback for selected answers, cleared answers, or both.</p></choicehint>
</choice>
<choice correct="true"><p>a correct answer</p></choice>
<compoundhint value="A B D"><p>You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.</p></compoundhint>
<compoundhint value="A B C D"><p>You can specify optional feedback for one, several, or all answer combinations.</p></compoundhint>
<compoundhint value="A B D">You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.</compoundhint>
<compoundhint value="A B C D">You can specify optional feedback for one, several, or all answer combinations.</compoundhint>
</checkboxgroup>
<solution>
<div class="detailed-solution">
@@ -87,7 +87,7 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({
'B',
'D',
],
feedback: '<p>You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.</p>',
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: '<p>You can specify optional feedback for one, several, or all answer combinations.</p>',
feedback: 'You can specify optional feedback for one, several, or all answer combinations.',
},
],
},
@@ -118,8 +118,8 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({
<choicehint selected="false"><p>You can specify optional feedback for selected answers, cleared answers, or both.</p></choicehint>
</choice>
<choice correct="true"><p>a correct answer</p></choice>
<compoundhint value="A B D"><p>You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.</p></compoundhint>
<compoundhint value="A B C D"><p>You can specify optional feedback for one, several, or all answer combinations.</p></compoundhint>
<compoundhint value="A B D">You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.</compoundhint>
<compoundhint value="A B C D">You can specify optional feedback for one, several, or all answer combinations.</compoundhint>
</checkboxgroup>
<solution>
<div class="detailed-solution">