Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated feedback to show title independent of title/display title of the component. #113

Merged
merged 6 commits into from
Feb 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ guide the learner’s interaction with the component.
**_feedback** (object): If the [**Tutor** extension](https://github.com/adaptlearning/adapt-contrib-tutor) is enabled, these various texts will be displayed depending on the submitted answer. **_feedback**
contains values for three types of answers: **correct**, **_incorrect**, and **_partlyCorrect**. Some attributes are optional. If they are not supplied, the default that is noted below will be used.

>**title** (string): If not set, the component's **displayTitle** is used as the feedback title. If **displayTitle** is not set , **title** will be used instead.

>**correct** (string): Text that will be displayed when the submitted answer is correct.

>**_incorrect** (object): Texts that will be displayed when the submitted answer is incorrect. It contains values that are displayed under differing conditions: **final** and **notFinal**.
Expand Down
3 changes: 2 additions & 1 deletion example.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"_items": [
{
"text": "This is option 1.",
"_shouldBeSelected":true,
"_shouldBeSelected": true,
"_graphic": {
"alt": "Alt text for option 1",
"attribution": "Copyright © 2015",
Expand All @@ -42,6 +42,7 @@
}
],
"_feedback":{
"title": "Feedback",
"correct": "Congratulations, this is the correct feedback.",
"_incorrect": {
"notFinal": "",
Expand Down
10 changes: 10 additions & 0 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@
"required": false,
"title": "Feedback",
"properties": {
"title": {
"type": "string",
"required": false,
"default": "",
"title": "Feedback Title",
"inputType": "Text",
"validators": [],
"help": "Leave blank to have the component's title shown instead.",
"translatable": true
},
"correct": {
"type": "string",
"required": false,
Expand Down