diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/el_output.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/el_output.js index f98e890af9..3c64857d99 100644 --- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/el_output.js +++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/el_output.js @@ -31,7 +31,7 @@ define('ElOutput', ['logme'], function (logme) { // element. if ( (typeof obj['@output'] !== 'string') || - (obj['@output'].toLowerCase() !== 'element') + ((obj['@output'].toLowerCase() !== 'element') && (obj['@output'].toLowerCase() !== 'none')) ) { return; } @@ -108,19 +108,23 @@ define('ElOutput', ['logme'], function (logme) { paramNames.pop(); - el = $('#' + obj['@el_id']); + if (obj['@output'].toLowerCase() !== 'none') { + el = $('#' + obj['@el_id']); - if (el.length !== 1) { - logme( - 'ERROR: DOM element with ID "' + obj['@el_id'] + '" ' + - 'not found. Dynamic element not created.' - ); + if (el.length !== 1) { + logme( + 'ERROR: DOM element with ID "' + obj['@el_id'] + '" ' + + 'not found. Dynamic element not created.' + ); - return; + return; + } + + el.html(func.apply(window, state.getAllParameterValues())); + } else { + el = null; } - el.html(func.apply(window, state.getAllParameterValues())); - state.addDynamicEl(el, func, obj['@el_id'], updateOnEvent); } diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js index c7e54289be..e1da8cc022 100644 --- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js +++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js @@ -237,6 +237,10 @@ define('State', ['logme'], function (logme) { allParameterValues[parameters[paramName].helperArrayIndex] = paramValueNum; for (c1 = 0; c1 < dynamicEl.length; c1++) { + if (dynamicEl[c1].el === null) { + continue; + } + if ( ((updateOnEvent !== undefined) && (dynamicEl[c1].updateOnEvent === updateOnEvent)) || (updateOnEvent === undefined)