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 d713c6f2ac..2af55fc83e 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
@@ -98,8 +98,10 @@ define('ElOutput', ['logme'], function (logme) {
);
logme('Error message: "' + err.message + '".');
- $('#' + gstId).html('
' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
paramNames.pop();
diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/g_label_el_output.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/g_label_el_output.js
index 3e9e12b62e..83c6df607d 100644
--- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/g_label_el_output.js
+++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/g_label_el_output.js
@@ -87,8 +87,10 @@ define('GLabelElOutput', ['logme'], function (logme) {
);
logme('Error message: "' + err.message + '".');
- $('#' + gstId).html('' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
paramNames.pop();
diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
index 9f0d5046ca..7c2f792258 100644
--- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
+++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
@@ -242,8 +242,10 @@ define('Graph', ['logme'], function (logme) {
);
logme('Error message: "' + err.message + '"');
- $('#' + gstId).html('' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
paramNames.pop();
@@ -709,15 +711,17 @@ define('Graph', ['logme'], function (logme) {
);
logme('Error message: "' + err.message + '"');
- $('#' + gstId).html(
- '' + 'ERROR IN ' +
- 'XML: Could not create a function from the string "' +
- funcString + '" for xrange.min.' + '
'
- );
- $('#' + gstId).append(
- '' + 'Error ' +
- 'message: "' + err.message + '".' + '
'
- );
+ if (state.showDebugInfo) {
+ $('#' + gstId).html(
+ '' + 'ERROR IN ' +
+ 'XML: Could not create a function from the string "' +
+ funcString + '" for xrange.min.' + '
'
+ );
+ $('#' + gstId).append(
+ '' + 'Error ' +
+ 'message: "' + err.message + '".' + '
'
+ );
+ }
return false;
}
@@ -790,15 +794,17 @@ define('Graph', ['logme'], function (logme) {
);
logme('Error message: "' + err.message + '"');
- $('#' + gstId).html(
- '' + 'ERROR IN ' +
- 'XML: Could not create a function from the string "' +
- funcString + '" for xrange.max.' + '
'
- );
- $('#' + gstId).append(
- '' + 'Error message: "' +
- err.message + '".' + '
'
- );
+ if (state.showDebugInfo) {
+ $('#' + gstId).html(
+ '' + 'ERROR IN ' +
+ 'XML: Could not create a function from the string "' +
+ funcString + '" for xrange.max.' + '
'
+ );
+ $('#' + gstId).append(
+ '' + 'Error message: "' +
+ err.message + '".' + '
'
+ );
+ }
return false;
}
@@ -1006,8 +1012,10 @@ define('Graph', ['logme'], function (logme) {
);
logme('Error message: "' + err.message + '"');
- $('#' + gstId).html('' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
paramNames.pop();
paramNames.pop();
@@ -1133,8 +1141,10 @@ define('Graph', ['logme'], function (logme) {
logme('ERROR: Could not determine xrange start.');
logme('Error message: "' + err.message + '".');
- $('#' + gstId).html('' + 'ERROR IN XML: Could not determine xrange start from defined function.' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not determine xrange start from defined function.' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
return false;
}
@@ -1144,8 +1154,10 @@ define('Graph', ['logme'], function (logme) {
logme('ERROR: Could not determine xrange end.');
logme('Error message: "' + err.message + '".');
- $('#' + gstId).html('' + 'ERROR IN XML: Could not determine xrange end from defined function.' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not determine xrange end from defined function.' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
return false;
}
@@ -1175,8 +1187,10 @@ define('Graph', ['logme'], function (logme) {
logme('ERROR: Could not generate data.');
logme('Error message: "' + err.message + '".');
- $('#' + gstId).html('' + 'ERROR IN XML: Could not generate data from defined function.' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not generate data from defined function.' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
return false;
}
@@ -1204,8 +1218,10 @@ define('Graph', ['logme'], function (logme) {
logme('ERROR: Could not generate data.');
logme('Error message: "' + err.message + '".');
- $('#' + gstId).html('' + 'ERROR IN XML: Could not generate data from function.' + '
');
- $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ if (state.showDebugInfo) {
+ $('#' + gstId).html('' + 'ERROR IN XML: Could not generate data from function.' + '
');
+ $('#' + gstId).append('' + 'Error message: "' + err.message + '".' + '
');
+ }
return false;
}
diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/gst_main.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/gst_main.js
index 3d9f511ca9..e1d1211f6a 100644
--- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/gst_main.js
+++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/gst_main.js
@@ -51,6 +51,8 @@ define(
// state object.
state = State(gstId, config);
+ state.showDebugInfo = false;
+
// It is possible that something goes wrong while extracting parameters
// from the JSON config object. In this case, we will not continue.
if (state === undefined) {
diff --git a/lms/templates/staff_problem_info.html b/lms/templates/staff_problem_info.html
index 7b4abf13fd..d24d6528ac 100644
--- a/lms/templates/staff_problem_info.html
+++ b/lms/templates/staff_problem_info.html
@@ -1,6 +1,6 @@
## The JS for this is defined in xqa_interface.html
${module_content}
-%if location.category in ['problem','video','html','combinedopenended']:
+%if location.category in ['problem','video','html','combinedopenended','graphical_slider_tool']:
% if edit_link: