feat: Group, General Feedback Settings, Randomization

This Ticket adds three new settings widgets to the Problem Editor:
Randomization: This is a setting for advanced problems only which deals with python scripts.
General Feedback: This is feedback which is only applied to certain problem types for mass-adding feedback to incorrect problems.
Group Feedback: For certain problems, the user can provide specific feedback for a combination of specific answers.
This commit is contained in:
connorhaugh
2023-02-10 08:50:32 -05:00
committed by GitHub
parent 7c0309189f
commit d69d3e1ce7
32 changed files with 1303 additions and 22 deletions

View File

@@ -184,3 +184,30 @@ export const ShowAnswerTypes = StrictDict({
defaultMessage: 'Attempted',
},
});
export const RandomizationTypesKeys = StrictDict({
ALWAYS: 'always',
NEVER: 'never',
ONRESET: 'on_reset',
PERSTUDENT: 'per_student',
});
export const RandomizationTypes = StrictDict({
[RandomizationTypesKeys.ALWAYS]:
{
id: 'authoring.problemeditor.settings.RandomizationTypes.always',
defaultMessage: 'Always',
},
[RandomizationTypesKeys.NEVER]:
{
id: 'authoring.problemeditor.settings.RandomizationTypes.never',
defaultMessage: 'Never',
},
[RandomizationTypesKeys.ONRESET]: {
id: 'authoring.problemeditor.settings.RandomizationTypes.onreset',
defaultMessage: 'On Reset',
},
[RandomizationTypesKeys.PERSTUDENT]: {
id: 'authoring.problemeditor.settings.RandomizationTypes.perstudent',
defaultMessage: 'Per Student',
},
});

View File

@@ -12,8 +12,10 @@ const initialState = {
answers: [],
correctAnswerCount: 0,
groupFeedbackList: [],
generalFeedback: '',
additionalAttributes: {},
settings: {
randomization: null,
scoring: {
weight: 0,
attempts: {

View File

@@ -5,6 +5,8 @@ export const problemState = (state) => state.problem;
const mkSimpleSelector = (cb) => createSelector([module.problemState], cb);
export const simpleSelectors = {
problemType: mkSimpleSelector(problemData => problemData.problemType),
generalFeedback: mkSimpleSelector(problemData => problemData.generalFeedback),
groupFeedbackList: mkSimpleSelector(problemData => problemData.groupFeedbackList),
answers: mkSimpleSelector(problemData => problemData.answers),
correctAnswerCount: mkSimpleSelector(problemData => problemData.correctAnswerCount),
settings: mkSimpleSelector(problemData => problemData.settings),