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:
@@ -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',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -12,8 +12,10 @@ const initialState = {
|
||||
answers: [],
|
||||
correctAnswerCount: 0,
|
||||
groupFeedbackList: [],
|
||||
generalFeedback: '',
|
||||
additionalAttributes: {},
|
||||
settings: {
|
||||
randomization: null,
|
||||
scoring: {
|
||||
weight: 0,
|
||||
attempts: {
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user