There are two different notify handlebar files. One in the core and one in themes.
And could you help with were to place the "{{> audio-controls feedbackAudio}}" in the notify.hbs
I have modifyed QuestionView.js file with this:
setupCorrectFeedback: function() {
this.model.set({
feedbackAudio: this.model.get("_feedbackAudio") ? this.model.get("_feedbackAudio").correct : {}
});
return this.model.setupCorrectFeedback();
},
setupPartlyCorrectFeedback: function() {
if (this.model.get('_attemptsLeft') === 0 || !this.model.get('_feedback')._partlyCorrect.notFinal) {
this.model.set({
feedbackAudio: this.model.get("_feedbackAudio") ? this.model.get("_feedbackAudio")._partlyCorrect.final : {}
});
} else {
this.model.set({
feedbackAudio: this.model.get("_feedbackAudio") ? this.model.get("_feedbackAudio")._partlyCorrect.notFinal : {}
});
}
return this.model.setupPartlyCorrectFeedback();
},
setupIncorrectFeedback: function() {
if (this.model.get('_attemptsLeft') === 0 || !this.model.get('_feedback')._incorrect.notFinal) {
this.model.set({
feedbackAudio: this.model.get("_feedbackAudio") ? this.model.get("_feedbackAudio")._incorrect.final : {}
});
} else {
this.model.set({
feedbackAudio: this.model.get("_feedbackAudio") ? this.model.get("_feedbackAudio")._incorrect.notFinal : {}
});
}
return this.model.setupIncorrectFeedback();
},
Modifyed the components json with this:
"_items": [
{
"text": "1. Ämnen och föremål som är bristfälligt förpackade.",
"_shouldBeSelected": false
},
{
"text": "X. Ämnen och föremål som kan orsaka skador på liv, hälsa och egendom om de hanteras fel under transport.",
"_shouldBeSelected": true
},
{
"text": "2. Gods som är explosivt i kontakt med syre.",
"_shouldBeSelected": false
}
],
"_feedback": {
"correct": "Rätt svar!",
"_incorrect": {
"final": "Fel svar, Försök igen!"
}
},
"_feedbackAudio":{
"correct":{
"_audio": {
"mp3": "course/en/audio/01_02_05_00_Ovning_2_Farligt_gods_RATT.mp3"
}
},
"_incorrect": {
"final": {
"_audio": {
"mp3": "course/en/audio/01_02_05_00_Ovning_2_Farligt_gods_FEL.mp3"
}
}
},
"_partlyCorrect": {
"final": {
"_audio": {
"mp3": "course/en/audio/01_02_05_00_Ovning_2_Farligt_gods_FEL.mp3"
}
}
}
},
"_pageLevelProgress": {
"_isEnabled": true
}
},
What do you think!
D