You can use this template as a guide to the simple editor markdown and OLX markup to use for checkboxes with hints and feedback problems. Edit this component to replace this template with your own assessment.
@@ -8,12 +11,12 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({a correct answer
You can specify optional feedback that appears after the learner selects and submits this answer.
You can specify optional feedback that appears after the learner clears and submits this answer.
an incorrect answer
an incorrect answer
You can specify optional feedback for none, all, or a subset of the answers.
You can specify optional feedback for selected answers, cleared answers, or both.
a correct answer
a correct answer
', + title: `a correct answer
\n \n \n `, correct: true, selectedFeedback: 'You can specify optional feedback that appears after the learner selects and submits this answer.
', unselectedFeedback: 'You can specify optional feedback that appears after the learner clears and submits this answer.
', @@ -68,7 +71,7 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({ }, { id: 'C', - title: 'an incorrect answer
', + title: `an incorrect answer
\n \n \n `, correct: false, selectedFeedback: 'You can specify optional feedback for none, all, or a subset of the answers.
', unselectedFeedback: 'You can specify optional feedback for selected answers, cleared answers, or both.
', @@ -103,45 +106,43 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({ }, question: 'You can use this template as a guide to the simple editor markdown and OLX markup to use for checkboxes with hints and feedback problems. Edit this component to replace this template with your own assessment.
You can add an optional tip or note related to the prompt like this.', buildOLX: `You can use this template as a guide to the simple editor markdown and OLX markup to use for checkboxes with hints and feedback problems. Edit this component to replace this template with your own assessment.
- - You can add an optional tip or note related to the prompt like this. -a correct answer
You can specify optional feedback that appears after the learner selects and submits this answer.
You can specify optional feedback that appears after the learner clears and submits this answer.
an incorrect answer
an incorrect answer
You can specify optional feedback for none, all, or a subset of the answers.
You can specify optional feedback for selected answers, cleared answers, or both.
a correct answer
Explanation
-
+ You can use this template as a guide to the simple editor markdown and OLX markup to use for checkboxes with hints and feedback problems. Edit this component to replace this template with your own assessment. a correct answer You can specify optional feedback that appears after the learner selects and submits this answer. You can specify optional feedback that appears after the learner clears and submits this answer. an incorrect answer an incorrect answer You can specify optional feedback for none, all, or a subset of the answers. You can specify optional feedback for selected answers, cleared answers, or both. a correct answer Explanation
You can form a voltage divider that evenly divides the input
voltage with two identically valued resistors, with the sampled
voltage taken in between the two.
- You can add an optional hint like this. Problems that have a hint include a hint button, and this text appears the first time learners select the button. If you add more than one hint, a different hint appears each time learners select the hint button.

You can add an optional hint like this. Problems that have a hint include a hint button, and this text appears the first time learners select the button.
If you add more than one hint, a different hint appears each time learners select the hint button.
a correct answer
a correct answer
You can specify optional feedback that appears after the learner selects and submits this answer.
', unselectedFeedback: 'You can specify optional feedback that appears after the learner clears and submits this answer.
', @@ -314,11 +315,9 @@ export const multipleChoiceWithFeedbackAndHintsOLX = {an incorrect answer
You can specify optional feedback like this, which appears after this answer is submitted.
an incorrect answer
You can specify optional feedback like this, which appears after this answer is submitted.
the correct answer
an incorrect answer
You can specify optional feedback for none, a subset, or all of the answers.>
an incorrect answer
You can specify optional feedback for none, a subset, or all of the answers.>
You can add a solution
@@ -540,7 +539,7 @@ export const textInputWithFeedbackAndHintsOLX = { }, }, }, - question: 'You can use this template as a guide to the simple editor markdown and OLX markup to use for text input with hints and feedback problems. Edit this component to replace this template with your own assessment.
You can add an optional tip or note related to the prompt like this.', + question: 'You can use this template as a guide to the simple editor markdown and OLX markup to use for text input with hints and feedback problems. Edit this component to replace this template with your own assessment.
You can add an optional tip or note related to the prompt like this. ', buildOLX: `You can use this template as a guide to the simple editor markdown and OLX markup to use for text input with hints and feedback problems. Edit this component to replace this template with your own assessment.
@@ -726,7 +725,13 @@ export const styledQuestionOLX = {test
', + question: `+ + + test + + +
`, }; export const shuffleProblemOLX = { @@ -763,7 +768,8 @@ export const labelDescriptionQuestionOLX = {

What is the content of the register x2 after executing the following three lines of instructions?
Address assembly instructions
0x0 addi x1, x0, 1
0x4 slli x2, x1, 4
0x8 sub x1, x2, x1
What is the content of the register x2 after executing the following three lines of instructions?
Address assembly instructions
0x0 addi x1, x0, 1
0x4 slli x2, x1, 4
0x8 sub x1, x2, x1
Address assembly instructions comment
0x0 addi x1, x0, 1 x1 = 0x1
0x4 slli x2, x1, 4 x2 = x1 << 4 = 0x10
0x8 sub x1, x2, x1 x1 = x2 - x1 = 0x10 - 0x01 = 0xf
99 long is the array q after the following loop runs?
+ for i = 1:99
+ q(2*i - 1) = i;
+ end
+ Explanation
+ This loop will iterate99 times, but the length of q will not be 99 due to indexing with the value 2*i -1. On the last iteration, i = 99, so 2*i - 1 = 2*78 - 1 = 197. This will be the last position filled in q, so the answer is 197.
+ 99 times, but the length of q will not be 99 due to indexing with the value 2*i -1. On the last iteration, i = 99, so 2*i - 1 = 2*78 - 1 = 197. This will be the last position filled in q, so the answer is 197.\n `,
+};
diff --git a/src/editors/data/redux/thunkActions/app.js b/src/editors/data/redux/thunkActions/app.js
index 99c579567..da5acf2c3 100644
--- a/src/editors/data/redux/thunkActions/app.js
+++ b/src/editors/data/redux/thunkActions/app.js
@@ -70,7 +70,7 @@ export const saveBlock = ({ content, returnToUnit }) => (dispatch) => {
content,
onSuccess: (response) => {
dispatch(actions.app.setSaveResponse(response));
- returnToUnit();
+ returnToUnit(response.data)();
},
}));
};
diff --git a/src/editors/data/redux/thunkActions/app.test.js b/src/editors/data/redux/thunkActions/app.test.js
index bb8457c6a..5710071f9 100644
--- a/src/editors/data/redux/thunkActions/app.test.js
+++ b/src/editors/data/redux/thunkActions/app.test.js
@@ -138,7 +138,7 @@ describe('app thunkActions', () => {
let returnToUnit;
let calls;
beforeEach(() => {
- returnToUnit = jest.fn();
+ returnToUnit = jest.fn((response) => () => response);
thunkActions.saveBlock({ content: testValue, returnToUnit })(dispatch);
calls = dispatch.mock.calls;
});
diff --git a/src/editors/data/services/cms/mockApi.js b/src/editors/data/services/cms/mockApi.js
index bb407f4e0..bea7fc463 100644
--- a/src/editors/data/services/cms/mockApi.js
+++ b/src/editors/data/services/cms/mockApi.js
@@ -36,7 +36,21 @@ export const fetchBlockById = ({ blockId, studioEndpointUrl }) => {
} else if (blockId === 'problem-block-id') {
data = {
data: `What is the content of the register x2 after executing the following three lines of instructions?
+Address assembly instructions
0x0 addi x1, x0, 1
0x4 slli x2, x1, 4
0x8 sub x1, x2, x1
Explanation
+Address assembly instructions comment
0x0 addi x1, x0, 1 x1 = 0x1
0x4 slli x2, x1, 4 x2 = x1 << 4 = 0x10
0x8 sub x1, x2, x1 x1 = x2 - x1 = 0x10 - 0x01 = 0xf