Skip to main content

Range Question

A range question component that asks students to supply a lower and upper end point.

Options

  • question | (string|node): displayed question. Default: ''.
  • solution | array<number>: two-element array containing the endpoints of the correct range. Default: none.
  • hintPlacement | string: placement of the hints (either top, left, right, or bottom). Default: 'top'.
  • hints | array<(string|node)>: hints providing guidance on how to answer the question. Default: [].
  • labels | array: two-element array of custom labels other than "Lower" and "Upper". Default: none.
  • feedback | boolean: controls whether to display feedback buttons. Default: true.
  • chat | boolean: controls whether the element should have an integrated chat. Default: false.
  • digits | number: number of digits that have to match between solution and user-supplied answer. If not given or set to null, the component checks for strict equality. If set to 0, checks for integer equality. Default: 3.
  • max | number: maximum input value. Default: null.
  • min | number: minimum input value. Default: null.
  • nTries | number: after how many tries feedback should be supplied (if provideFeedback is true). Default: 1.
  • provideFeedback | boolean: indicates whether feedback including the correct answer should be displayed after learners submit their answers. Default: true.
  • submitAfterFeedback | boolean: controls whether one should be able to resubmit even after the solution has been revealed. Default: false.
  • until | Date: time until students should be allowed to submit answers. Default: none.
  • points | number: maximum number of points awarded in grading. Default: 10.
  • style | object: CSS inline styles. Default: {}.
  • onChangeLower | function: callback triggered after the lower bound is changed by the user. Default: onChangeLower() {}.
  • onChangeUpper | function: callback triggered after the upper bound is changed by the user. Default: onChangeUpper() {}.
  • onChange | function: callback triggered after a bound is changed by the user (with lower and upper bound as arguments). Default: onChange() {}.
  • onSubmit | function: callback invoked when answer is submitted; has as first parameter a boolean indicating whether the answer was correctly answered (if applicable, null otherwise) and the supplied answer as the second parameter. Default: onSubmit() {}.

Examples

Live Editor
Result
ReferenceError: Provider is not defined