fix: make max attempts setting fallback to default
The max attempts setting for a problem xblock should be set to null for course default max attempt setting to take effect. This makes sure that xblock setting is updated if course default is updated.
This commit is contained in:
@@ -19,7 +19,7 @@ class ReactStateSettingsParser {
|
||||
let settings = {};
|
||||
const stateSettings = this.problem.settings;
|
||||
|
||||
settings = popuplateItem(settings, 'number', 'max_attempts', stateSettings.scoring.attempts);
|
||||
settings = popuplateItem(settings, 'number', 'max_attempts', stateSettings.scoring.attempts, true);
|
||||
settings = popuplateItem(settings, 'weight', 'weight', stateSettings.scoring);
|
||||
settings = popuplateItem(settings, 'on', 'showanswer', stateSettings.showAnswer);
|
||||
settings = popuplateItem(settings, 'afterAttempts', 'attempts_before_showanswer_button', stateSettings.showAnswer);
|
||||
|
||||
Reference in New Issue
Block a user