We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b8e96d commit fe03277Copy full SHA for fe03277
edu-python-questions.js
@@ -203,6 +203,25 @@ function finishQuestionsInit(questionsDat) {
203
// do this AFTER making #pyOutputPane visible, or else
204
// jsPlumb connectors won't render properly
205
processTrace(traceData, true);
206
+
207
+ // don't let the user submit answer when there's an error
208
+ var hasError = false;
209
+ for (var i = 0; i < curTrace.length; i++) {
210
+ var curEntry = curTrace[i];
211
+ if (curEntry.event == 'exception' ||
212
+ curEntry.event == 'uncaught_exception') {
213
+ hasError = true;
214
+ break;
215
+ }
216
217
218
+ if (hasError) {
219
+ $('#submitBtn').attr('disabled', true);
220
221
+ else {
222
+ $('#submitBtn').attr('disabled', false);
223
224
225
},
226
"json");
227
});
0 commit comments