From 0272b84fd0a63150a0b60508d3610c04f2f063ba Mon Sep 17 00:00:00 2001 From: Dmitry Viskov Date: Tue, 13 Jun 2017 14:12:01 +0300 Subject: [PATCH] Open Response Assessment tab for Instructor Dashboard - bugfix (prevent loading ORA Block more than one time) --- .../js/instructor_dashboard/open_response_assessment.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/static/js/instructor_dashboard/open_response_assessment.js b/lms/static/js/instructor_dashboard/open_response_assessment.js index c1290f7e29..d30ce0bbd3 100644 --- a/lms/static/js/instructor_dashboard/open_response_assessment.js +++ b/lms/static/js/instructor_dashboard/open_response_assessment.js @@ -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;