UNPKG

@instructure/quiz-interactions

Version:

A React UI component Library for quiz interaction types.

59 lines 1.34 kB
var possibleValues = [{ type: 'exactResponse', id: '1', value: '111111.1111' }, { type: 'withinARange', id: '2', start: '16', end: '18.0003' }, { type: 'preciseResponse', id: '3', value: '19000.24', precision: '1', precisionType: 'decimals' }, { type: 'marginOfError', id: '4', value: '-20123.456', margin: '0.4', marginType: 'absolute' }]; var scoringDataErrors = [{ value: ['Answer error message'] }, { start: ['Range start error message'], end: ['Range end error message'] }, { precision: ['Precision error message'], precisionType: ['PrecisionType error message'] }, { margin: ['Margin error message'], value: ['Answer error message'] }]; export default { propValues: { values: [[], possibleValues], errors: [{}, { itemBody: ['Error message 1', 'Error message 2'], scoringData: { value: scoringDataErrors } }], locale: ['en-US', 'fr-FR'] }, getComponentProps: function getComponentProps(props) { return { enableRichContentEditor: false, itemId: 'fakeItemId', itemBody: 'Numeric Edit', scoringData: { value: props.values }, errorsAreShowing: !!(props.errors.itemBody || props.errors.scoringData), changeItemState: Function.prototype, openImportModal: Function.prototype }; } };