-
Notifications
You must be signed in to change notification settings - Fork 248
Question model
The following covers Core question model functionality: Feedback titles, Feedback image support.
As of v6.50.2, feedback titles that use the old style of _feedback
object will work as follows:
- If
_feedback.altTitle
is set, this will be used as a title aria label. No visual title is displayed. - If
_feedback.title
is set and_feedback.altTitle
is not set, a title is displayed with this value. - If neither
_feedback.title
nor_feedback.altTitle
are set, a title is displayed with the component's title. - If none of the above are set,
_globals._accessibility.altFeedbackTitle
is used as an aria label and no visual title is displayed. - Otherwise, no title is displayed or used as an aria label
Support for feedback images was introduced in v6.20.5. This behaviour is fully backward compatible if the old style of _feedback
objects are used. The new style feedback can be used in the new AAT when building by hand. It will not be supported in the classic AAT.
Images mirror the question feedback text so there are _feedback._correct
, _feedback._partlyCorrectNotFinal
, _feedback._partlyCorrectFinal
, _feedback._incorrectNotFinal
, _feedback._incorrectFinal
and for _items[].feedback
.
If an image is defined, the layout of the text and image is split 60% / 40% in favour of the text. If no image is defined the text defaults to 100% width.
The image position can be configured per feedback text via _imageAlignment
. Options include: left
: Image aligned to the left of the text area, top
: Image aligned above the text area, right
: Image aligned to the right of the text area and bottom
: Image aligned below the text area. The default alignment is right
.
Example _feedback
JSON to be added to question component in component.json:
"_feedback": { "title": "Global feedback title", "_classes": "", "_correct": { "altTitle": "", "title": "", "body": "Correct feedback final", "_classes": "", "_imageAlignment": "left", "_graphic": { "_src": "course/en/images/single-width.png", "alt": "", "attribution": "" } }, "_incorrectNotFinal": { "altTitle": "", "title": "", "body": "Incorrect feedback not final", "_classes": "", "_imageAlignment": "right", "_graphic": { "_src": "course/en/images/single-width.png", "alt": "", "attribution": "" } }, "_incorrectFinal": { "altTitle": "", "title": "", "body": "Incorrect feedback final", "_classes": "", "_imageAlignment": "left", "_graphic": { "_src": "course/en/images/single-width.png", "alt": "", "attribution": "" } } }
As per other Adapt images, alt
and attribution
properties are supported per feedback _graphic
.
- 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