Skip to content

Commit

Permalink
fix: don't revert to advanced problem editor when max_attempts is set (
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald authored Sep 26, 2024
1 parent 3662fad commit 95c1753
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/editors/containers/ProblemEditor/data/OLXParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ export class OLXParser {
}

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

const problemType = this.getProblemType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('OLXParser', () => {
labelDescriptionQuestionOlxParser.getParsedOLXData();
} catch (e) {
expect(e).toBeInstanceOf(Error);
expect(e.message).toBe('Misc Attributes asscoiated with problem, opening in advanced editor');
expect(e.message).toBe('Misc Attributes associated with problem, opening in advanced editor');
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/editors/data/constants/problem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export const RichTextProblems = [ProblemTypeKeys.SINGLESELECT, ProblemTypeKeys.M
export const settingsOlxAttributes = [
'@_display_name',
'@_weight',
'@_max_atempts',
'@_max_attempts',
'@_showanswer',
'@_show_reset_button',
'@_submission_wait_seconds',
Expand Down

0 comments on commit 95c1753

Please sign in to comment.