Skip to content

A question component that allows the learner to position a slider on scale

License

Notifications You must be signed in to change notification settings

ciaranlp/adapt-contrib-slider

 
 

Repository files navigation

#adapt-contrib-slider

A question component that allows the learner to position a slider on scale

##Installation

This component can be installed using the by running the following command:

adapt install adapt-my-plugin

Alternatively add the component to the adapt.json file:

"adapt-contrib-slider": "*"

##Usage

This component can be used as part of an assessment.

##Settings overview

An complete example of this components settings can be found in the example.json file. A description of the core settings can be found at: Core model attributes

Further slider settings are shown below:

    {
        "_component":"slider",
        "_classes":"",
        "_layout":"right",
        "_attempts": 2,
        "_showNumber": true,
        "_showScaleIndicator": true,
        "labelStart": "incomplete",
        "labelEnd": "complete",
        "_scaleStart": 1,
        "_scaleEnd": 10,
        "_correctAnswer": "",
        "_correctRange": {
            "_bottom": 4,
            "_top": 9
        }
    }

####_component

This value must be: slider

####_classes

You can use this setting to add custom classes to your template and LESS file.

####_layout

This defines the position of the component in the block. Values can be full, left or right.

####_attempts

Default: 1

Specifies the number of attempts for this question

####_showNumber

Default: true

When set to true a numeric value appears above the scale when the slider is moved. The value indicates the sliders position on the scale.

####_showScaleIndicator

Default: true

When set to true a marker for the position of the slider along the scale is shown. If _showNumber is true this marker will contain a numeric value. If _showNumber is false a blank marker is shown.

####labelStart

The value of this setting appears at the start of the slider scale.

####labelEnd

The value of this setting appears at the end of the slider scale.

####_scaleStart

This must be a numeric value for the start of the scale. This value is used to calculate the sliders position on the scale.

####_scaleEnd

This must be a numeric value for the end of the scale.

####_correctAnswer

To set a single value on the slider scale as correct enter it's value in this setting.

####_correctRange

To set a value range as the correct answer the settings for _bottom and _top should be given a numeric value.

####_bottom

This setting is the start value for the correct range. It's value must be numeric.

####_top

This setting is the end value for the correct range. It's value must be numeric.

##Limitations

##Browser spec

This component has been tested to the standard Adapt browser specification.

About

A question component that allows the learner to position a slider on scale

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 92.4%
  • CSS 5.4%
  • HTML 1.2%
  • Handlebars 1.0%