Skip to content

Commit

Permalink
Audio status detection added
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPeek committed Jan 21, 2016
1 parent b7806d2 commit a950508
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/adapt-contrib-assessmentResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ define(function(require) {
this.model.set("_state", state);
this.setFeedback();

//show feedback component
//show feedback component
if(!this.model.get('_isVisible')) this.model.set('_isVisible', true, {pluginName: "assessmentResults"});
this.render();
},
Expand All @@ -128,10 +128,12 @@ define(function(require) {

///// Audio /////
if (this.model.has('_audioAssessment') && this.model.get('_audioAssessment')._isEnabled && Adapt.audio.autoPlayGlobal && this.model.get("_audioAssessment")._autoplay) {
Adapt.trigger('audio:playAudio', this.audioFile, this.model.get('_id'), this.model.get('_audioAssessment')._channel);
// If audio is turned on
if(Adapt.audio.audioClip[this.model.get('_audioAssessment')._channel].status==1){
Adapt.trigger('audio:playAudio', this.audioFile, this.model.get('_id'), this.model.get('_audioAssessment')._channel);
}
}
///// End of Audio /////

}
}
},
Expand Down

0 comments on commit a950508

Please sign in to comment.