diff --git a/common/lib/xmodule/xmodule/js/src/conditional/display.js b/common/lib/xmodule/xmodule/js/src/conditional/display.js index 2e656d8a5a..ef54cc355d 100644 --- a/common/lib/xmodule/xmodule/js/src/conditional/display.js +++ b/common/lib/xmodule/xmodule/js/src/conditional/display.js @@ -2,7 +2,7 @@ /* eslint-disable */ (function() { this.Conditional = (function() { - function Conditional(element, callerElId) { + function Conditional(element, runtime, callerElId) { var dependencies; this.el = $(element).find('.conditional-wrapper'); this.callerElId = callerElId; diff --git a/common/lib/xmodule/xmodule/js/src/poll/poll_main.js b/common/lib/xmodule/xmodule/js/src/poll/poll_main.js index e823ce0a3f..90155ce6f7 100644 --- a/common/lib/xmodule/xmodule/js/src/poll/poll_main.js +++ b/common/lib/xmodule/xmodule/js/src/poll/poll_main.js @@ -63,7 +63,8 @@ // Initialize Conditional constructors. if (_this.wrapperSectionEl !== null) { $(_this.wrapperSectionEl).find('.xmodule_ConditionalModule').each(function(index, value) { - new window.Conditional(value, _this.id.replace(/^poll_/, '')); + // eslint-disable-next-line no-new + new window.Conditional(value, _this.runtime, _this.id.replace(/^poll_/, '')); }); } } @@ -103,7 +104,8 @@ // notifying the constructor that this is a reset operation. if (_this.wrapperSectionEl !== null) { $(_this.wrapperSectionEl).find('.xmodule_ConditionalModule').each(function(index, value) { - new window.Conditional(value, _this.id.replace(/^poll_/, '')); + // eslint-disable-next-line no-new + new window.Conditional(value, _this.runtime, _this.id.replace(/^poll_/, '')); }); } } @@ -234,9 +236,10 @@ return PollMain; - function PollMain(el) { + function PollMain(el, runtime) { var _this; + this.runtime = runtime; this.questionEl = $(el).find('.poll_question'); if (this.questionEl.length !== 1) { // We require one question DOM element.