UNPKG

@instructure/quiz-interactions

Version:

A React UI component Library for quiz interaction types.

77 lines 2.22 kB
var propValues = { scoringData: [{ value: 'uuid1' }, {}], varyPoints: [false, true], shuffleChoices: [false, true], overrideEditableForRegrading: [false, true], varyPointsHidden: [false, true], shuffleChoicesHidden: [false, true] }; export default { propValues: propValues, getComponentProps: function getComponentProps(props) { return { answerFeedbackEnabled: false, enableRichContentEditor: false, oneQuestionAtATime: false, overrideEditableForItem: false, itemId: 'fakeItemId', itemBody: "Multiple Choice: Edit (Choice: ".concat(props.scoringData.value, ",\n Vary Points: ").concat(props.varyPoints.value, ", Shuffle: ").concat(props.shuffleChoices.value, ", Disabled: ").concat(props.overrideEditableForRegrading, ")"), interactionData: { choices: [{ id: 'uuid1', itemBody: 'Option 1', position: 1 }, { id: 'uuid2', itemBody: 'Option 2', position: 2 }, { id: 'uuid3', itemBody: '', position: 3 }] }, scoringData: { value: props.scoringData.value }, properties: { varyPointsByAnswer: props.varyPoints, shuffleRules: { choices: { shuffled: props.shuffleChoices, toLock: [0] } } }, errorsAreShowing: !props.scoringData.value, errors: { itemBody: ['You must have an item body'], interactionData: { choices: { 1: { itemBody: ['Answer cannot be duplicated'] }, 2: { itemBody: ['Answer cannot be blank'] }, $errors: ['Example Errors!'] } }, scoringData: { value: ['This is an example choices error!'] } }, additionalOptions: [{ key: 'outcomes', title: 'Align to Outcomes', component: 'Placeholder' }], disabled: props.overrideEditableForRegrading, changeItemState: Function.prototype, openImportModal: Function.prototype, showCalculatorOption: props.showCalculatorOption }; } };