-
Notifications
You must be signed in to change notification settings - Fork 0
textinput RDME
Text Input is a question component bundled with the Adapt framework.
It allows the user to input a free-form answer in response to an initial question. The author may supply multiple correct answers to accommodate, for example, variations in spelling. The author may also supply a suffix and prefix to be added to the text field.
Visit the Text Input Wiki for more information about its functionality and for explanations of key properties.
##Installation
As one of Adapt's core components, Text Input is included with the installation of the Adapt framework and the installation of the Adapt authoring tool.
-
If Text Input has been uninstalled from the Adapt framework, it may be reinstalled. With the Adapt CLI installed, run the following from the command line:
adapt install adapt-contrib-textInput
Alternatively, this component can also be installed by adding the following line of code to the adapt.json file:
"adapt-contrib-textInput": "*"
Then running the command:
adapt install
(This second method will reinstall all plug-ins listed in adapt.json.) -
If Text Input has been uninstalled from the Adapt authoring tool, it may be reinstalled using the Plug-in Manager.
The attributes listed below are used in components.json to configure Text Input, and are properly formatted as JSON in example.json. Visit the TextInput wiki for more information about how they appear in the authoring tool.
In addition to the attributes specifically listed below, question components can implement the following sets of attributes:
- core model attributes: These are inherited by every Adapt component. Like the attributes below, their values are assigned in components.json.
- core buttons: Default values are found in course.json, but may be overridden by Text Input's model in components.json.
- core feedback: Default values are found in course.json, but may be overridden by Text Input's model in components.json.
_component (string): This value must be: textInput
. (One word, with uppercase "I".)
_classes (string): CSS class name to be applied to [core plug-in]’s containing div
. The class must be predefined in one of the Less files. Separate multiple classes with a space.
_layout (string): This defines the horizontal position of the component in the block. Acceptable values are full
, left
or right
.
instruction (string): This optional text appears above the component. It is frequently used to guide the learner’s interaction with the component.
_attempts (integer): This specifies the number of times a learner is allowed to submit an answer. The default is 1
.
_isRandom (boolean): Setting this value to true
will cause the _items
to appear in a random order each time the component is loaded. The default is true
.
_allowsAnyCase (boolean): This setting determines whether or not the learner's input must match the uppercase and lowercase letters of the supplied answer/s. Set to false
if case-sensitivity is required for a correct answer. The default is true
.
_allowsPunctuation (boolean): This setting determines whether the learner's input may include punctuation characters listed below. The default is true
.
) ( ~ _ - = } { : ; * & ^ % £ $ ! # - / , .
`
_items (object array): Each item represents one one text input box for this question and contains values for _answers, prefix, suffix, and placeholder.
_answers (string array): Text value/s that must be matched by the learner's input. Multiple answers can be created to accommodate, for example, variations in spelling. Example:
"_answers": [
"2",
"two"
]
prefix (string): Text entered in this setting will appear before the input area.
suffix (string): Text entered in this setting will appear after the input area.
placeholder (string): This text supplies a short hint describing the expected value of the input field.
Note to developers:
Text Input varies slightly from other Adapt question components in that the answer object does not have a _isCorrect. Only one answer object is supplied and its values determine which responses are correct.
No known limitations.
This component has been tested to the standard Adapt browser specification.
Version number: 2.0
Framework versions: 2.0
Author / maintainer: Adapt Core Team
Accessibility support: WAI AA
RTL support: yes
Cross-platform coverage: Chrome, Chrome for Android, Firefox (ESR + latest version), IE 11, IE10, IE9, IE8, IE Mobile 11, iPhone (iOS 7+8), Safari iPad (iOS 7+8), Safari 8, Opera
![adapt learning logo](https://github.com/adaptlearning/documentation/raw/master/04_wiki_assets/plug-ins/images/adapt-learning-logo.jpg)
- Framework in Five Minutes
- Setting up Your Development Environment
- Manual Installation of the Adapt Framework
- Adapt Command Line Interface
- Common Issues
- Adapt API
- Adapt Command Line Interface
- Core Events
- Core Model Attributes
- Core Modules
- Peer Code Review