@instructure/quiz-interactions
Version:
A React UI component Library for quiz interaction types.
95 lines (94 loc) • 2.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _default = exports["default"] = {
propValues: {
data: [{
itemBody: 'All valid and present',
errors: {},
scoringData: {
value: {
quuid1: 'Planet',
quuid2: 'Moon'
},
editData: {}
}
}, {
itemBody: 'All valid and absent',
errors: {},
scoringData: {
editData: {
matches: [{
questionId: 'quuid1',
questionBody: 'Mars',
answerBody: ''
}, {
questionId: 'quuid2',
questionBody: 'Phobos',
answerBody: ''
}],
distractors: ['Planet']
}
}
}, {
itemBody: 'Absent with errors',
errors: {
scoringData: {
editData: {
matches: [{
questionBody: ['Question cannot be blank'],
answerBody: ['Answer cannot be blank']
}, {
answerBody: ['Answer cannot be blank']
}],
distractors: [[], ['Distractor cannot be blank'], ['Distractor cannot be duplicated']]
}
}
},
scoringData: {
editData: {
matches: [{
questionId: 'quuid1',
questionBody: '',
answerBody: ''
}, {
questionId: 'quuid2',
questionBody: 'Phobos',
answerBody: ''
}],
distractors: ['Planet', '', '']
}
}
}]
},
getComponentProps: function getComponentProps(props) {
return {
changeItemState: Function.prototype,
enableRichContentEditor: false,
itemId: 'fakeItemId',
errorsAreShowing: true,
itemBody: "Matching: Result (".concat(props.data.itemBody, ")"),
interactionData: {
questions: [{
id: 'quuid1',
itemBody: 'Mars'
}, {
id: 'quuid2',
itemBody: 'Phobos'
}],
answers: ['Planet', 'Moon', 'Nebula']
},
scoringData: props.data.scoringData,
errors: props.data.errors,
properties: {
shuffleRules: {
questions: {
shuffled: false
}
}
}
};
}
};