GST fixes. Removed red error messages preseneted to the user. The errors are now displayed when a flag is turned on. Added graphical_slider_tool tag to the list which shows staff debug info.
This commit is contained in:
@@ -98,8 +98,10 @@ define('ElOutput', ['logme'], function (logme) {
|
||||
);
|
||||
logme('Error message: "' + err.message + '".');
|
||||
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
paramNames.pop();
|
||||
|
||||
|
||||
@@ -87,8 +87,10 @@ define('GLabelElOutput', ['logme'], function (logme) {
|
||||
);
|
||||
logme('Error message: "' + err.message + '".');
|
||||
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
paramNames.pop();
|
||||
|
||||
|
||||
@@ -242,8 +242,10 @@ define('Graph', ['logme'], function (logme) {
|
||||
);
|
||||
logme('Error message: "' + err.message + '"');
|
||||
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
paramNames.pop();
|
||||
|
||||
@@ -709,15 +711,17 @@ define('Graph', ['logme'], function (logme) {
|
||||
);
|
||||
logme('Error message: "' + err.message + '"');
|
||||
|
||||
$('#' + gstId).html(
|
||||
'<div style="color: red;">' + 'ERROR IN ' +
|
||||
'XML: Could not create a function from the string "' +
|
||||
funcString + '" for xrange.min.' + '</div>'
|
||||
);
|
||||
$('#' + gstId).append(
|
||||
'<div style="color: red;">' + 'Error ' +
|
||||
'message: "' + err.message + '".' + '</div>'
|
||||
);
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html(
|
||||
'<div style="color: red;">' + 'ERROR IN ' +
|
||||
'XML: Could not create a function from the string "' +
|
||||
funcString + '" for xrange.min.' + '</div>'
|
||||
);
|
||||
$('#' + gstId).append(
|
||||
'<div style="color: red;">' + 'Error ' +
|
||||
'message: "' + err.message + '".' + '</div>'
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -790,15 +794,17 @@ define('Graph', ['logme'], function (logme) {
|
||||
);
|
||||
logme('Error message: "' + err.message + '"');
|
||||
|
||||
$('#' + gstId).html(
|
||||
'<div style="color: red;">' + 'ERROR IN ' +
|
||||
'XML: Could not create a function from the string "' +
|
||||
funcString + '" for xrange.max.' + '</div>'
|
||||
);
|
||||
$('#' + gstId).append(
|
||||
'<div style="color: red;">' + 'Error message: "' +
|
||||
err.message + '".' + '</div>'
|
||||
);
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html(
|
||||
'<div style="color: red;">' + 'ERROR IN ' +
|
||||
'XML: Could not create a function from the string "' +
|
||||
funcString + '" for xrange.max.' + '</div>'
|
||||
);
|
||||
$('#' + gstId).append(
|
||||
'<div style="color: red;">' + 'Error message: "' +
|
||||
err.message + '".' + '</div>'
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1006,8 +1012,10 @@ define('Graph', ['logme'], function (logme) {
|
||||
);
|
||||
logme('Error message: "' + err.message + '"');
|
||||
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not create a function from the string "' + funcString + '".' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
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('<div style="color: red;">' + 'ERROR IN XML: Could not determine xrange start from defined function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not determine xrange start from defined function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
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('<div style="color: red;">' + 'ERROR IN XML: Could not determine xrange end from defined function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not determine xrange end from defined function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1175,8 +1187,10 @@ define('Graph', ['logme'], function (logme) {
|
||||
logme('ERROR: Could not generate data.');
|
||||
logme('Error message: "' + err.message + '".');
|
||||
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not generate data from defined function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not generate data from defined function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1204,8 +1218,10 @@ define('Graph', ['logme'], function (logme) {
|
||||
logme('ERROR: Could not generate data.');
|
||||
logme('Error message: "' + err.message + '".');
|
||||
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not generate data from function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
if (state.showDebugInfo) {
|
||||
$('#' + gstId).html('<div style="color: red;">' + 'ERROR IN XML: Could not generate data from function.' + '</div>');
|
||||
$('#' + gstId).append('<div style="color: red;">' + 'Error message: "' + err.message + '".' + '</div>');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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:
|
||||
<div>
|
||||
<a href="${edit_link}">Edit</a>
|
||||
|
||||
Reference in New Issue
Block a user