-
Notifications
You must be signed in to change notification settings - Fork 249
Core model attributes
Matt Leathes edited this page Feb 19, 2018
·
43 revisions
The following extend the Backbone model:
- configModel (configModel.js)
- lockingModel (lockingModel.js)
- notifyModel (notifyModel.js)
- routerModel (routerModel.js)
- adaptModel (adaptModel.js)
All core models extend adaptModel (adaptModel.js), and so contain its attributes:
- courseModel (courseModel.js)
- contentObjectsModel (contentObjectsModel.js)
- articleModel (articleModel.js)
- blockModel (blockModel.js)
- componentModel (componentModel.js)
In addition, questionModel (questionModel.js) extends componentModel (componentModel.js).
An asterisk denotes that an attribute is required.
Attribute | Description | Default value |
---|---|---|
_canShowFeedback |
true |
|
_classes |
"" |
|
_canReset |
false |
|
_isComplete |
Whether the item has been completed. | false |
_isInteractionComplete |
false |
|
_requireCompletionOf |
-1 |
|
_isEnabled |
Controls the availability of the item. If _isEnabled is false, the item is disabled. |
true |
_isResetOnRevisit |
false |
|
_isAvailable |
true |
|
_isHidden |
Controls the display of the item. If _isHidden is false, the item will not be displayed |
false |
_isOptional |
If set to true , the user will not be required to complete the component in order to complete the course. The completion of the component will still be tracked, but it will be ignored during any completion calculations. |
false |
_isVisible |
true |
|
_isLocked |
Menus and other plug-ins can set its value using “_lockType”. Reference Locking objects with '_isLocked' and '_lockType' | false |
_questionWeight |
The weight of a particular question, which is used when calculating the score. | 1 |
_buttons |
An object to store the label values for template buttons. Buttons can then be referenced in templates using {{{_buttons.submit}}}
|
See fig.1. |
Figure 1
"_buttons": {
"submit":"Submit",
"reset":"Reset",
"showCorrectAnswer":"ModelAnswer",
"hideCorrectAnswer":"My Answer"
}
Attribute | Description | Default value |
---|---|---|
_id * |
A unique identifier. In the authoring tool, this is randomly generated. | |
_type * |
The type of the particular item. Examples include block and component . |
|
title * |
Used in document title. | |
_children |
"contentObjects" |
|
_start |
||
_isReady |
This is used to determine if the current item is ready (i.e. has been initialised). This needs to be set manually for custom components. For instance, this may be set to true post-render. | false |
Attribute | Description | Default value |
---|---|---|
_parent |
"course" |
|
_siblings |
"contentObjects" |
|
_children |
"contentObjects" |
|
_ariaLevel |
If you need to override the default contentObject ARIA level (as set in config.json), set this to any number greater than 0 | 0 |
Attribute | Description | Default value |
---|---|---|
_parent |
"contentObjects" |
|
_siblings |
"articles" |
|
_children |
"blocks" |
|
_ariaLevel |
If you need to override the default article ARIA level (as set in config.json), set this to any number greater than 0 | 0 |
Attribute | Description | Default value |
---|---|---|
_parent |
"articles" |
|
_siblings |
"blocks" |
|
_children |
"components" |
|
_sortComponents |
true |
|
_ariaLevel |
If you need to override the default block ARIA level (as set in config.json), set this to any number greater than 0 | 0 |
Attribute | Description | Default value |
---|---|---|
_parent |
"blocks" |
|
_siblings |
"components" |
|
_ariaLevel |
If you need to override the default component ARIA level (as set in config.json), set this to any number greater than 0 | 0 |
_disableAccessibilityState |
Disables the hidden label that describes the state of the component to screenreader users. Useful if the component is of no interest to a screenreader user - such as an optional decorative graphic component. | false |
Attribute | Description | Default value |
---|---|---|
_isQuestionType |
true |
|
_shouldDisplayAttempts |
false |
|
_canShowModelAnswer |
true |
|
_canShowFeedback |
true |
|
_canShowMarking |
true |
|
_questionWeight |
- Framework in Five Minutes
- Setting up Your Development Environment
- Manual Installation of the Adapt Framework
- Adapt Command Line Interface
- Common Issues
- Reporting Bugs
- Requesting Features
- Creating Your First Course
- Styling Your Course
- Configuring Your Project with config.json
- Content starts with course.json
- Course Localisation
- Compiling, testing and deploying your Adapt course
- Core Plugins in the Adapt Learning Framework
- Converting a Course from Framework Version 1 to Version 2
- Contributing to the Adapt Project
- Git Flow
- Adapt API
- Adapt Command Line Interface
- Core Events
- Core Model Attributes
- Core Modules
- Web Security Audit
- Peer Code Review
- Plugins
- Developing Plugins
- Developer's Guide: Components
- Developer's Guide: Theme
- Making a theme editable
- Developer's Guide: Menu
- Registering a Plugin
- Semantic Version Numbers
- Core Model Attributes
- Adapt Command Line Interface
- Accessibility v3
- Adapt Framework Right to Left (RTL) Support