Skip to content

Commit 95c1753

Browse files
fix: don't revert to advanced problem editor when max_attempts is set (#1326)
1 parent 3662fad commit 95c1753

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/editors/containers/ProblemEditor/data/OLXParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ export class OLXParser {
664664
}
665665

666666
if (Object.keys(this.problem).some((key) => key.indexOf('@_') !== -1 && !settingsOlxAttributes.includes(key))) {
667-
throw new Error('Misc Attributes asscoiated with problem, opening in advanced editor');
667+
throw new Error('Misc Attributes associated with problem, opening in advanced editor');
668668
}
669669

670670
const problemType = this.getProblemType();

src/editors/containers/ProblemEditor/data/OLXParser.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('OLXParser', () => {
5858
labelDescriptionQuestionOlxParser.getParsedOLXData();
5959
} catch (e) {
6060
expect(e).toBeInstanceOf(Error);
61-
expect(e.message).toBe('Misc Attributes asscoiated with problem, opening in advanced editor');
61+
expect(e.message).toBe('Misc Attributes associated with problem, opening in advanced editor');
6262
}
6363
});
6464
});

src/editors/data/constants/problem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export const RichTextProblems = [ProblemTypeKeys.SINGLESELECT, ProblemTypeKeys.M
227227
export const settingsOlxAttributes = [
228228
'@_display_name',
229229
'@_weight',
230-
'@_max_atempts',
230+
'@_max_attempts',
231231
'@_showanswer',
232232
'@_show_reset_button',
233233
'@_submission_wait_seconds',

0 commit comments

Comments
 (0)