Open Response Assessment tab for Instructor Dashboard - bugfix (prevent loading ORA Block more than one time)

This commit is contained in:
Dmitry Viskov
2017-06-13 14:12:01 +03:00
committed by Eric Fischer
parent 4af499cdd5
commit 0272b84fd0

View File

@@ -7,11 +7,15 @@
function OpenResponseAssessmentBlock($section) {
this.$section = $section;
this.$section.data('wrapper', this);
this.initialized = false;
}
OpenResponseAssessmentBlock.prototype.onClickTitle = function() {
var block = this.$section.find('.open-response-assessment');
XBlock.initializeBlock($(block).find('.xblock')[0]);
if (!this.initialized) {
this.initialized = true;
XBlock.initializeBlock($(block).find('.xblock')[0]);
}
};
return OpenResponseAssessmentBlock;