@@ -276,8 +276,8 @@ function experimentalPopUpSyntaxErrorSurvey() {
276276 var myUuid = supports_html5_storage ( ) ? localStorage . getItem ( 'opt_uuid' ) : '' ;
277277
278278 // Wording of the survey bubble:
279- var version = 'v1' ; // v1 - deployed on 2015-04-20
280-
279+ /*
280+ var version = 'v1'; // deployed on 2015-04-19, revoked on 2015-04-20
281281 var surveyBubbleHTML = '<div id="syntaxErrBubbleContents">\
282282 <div id="syntaxErrHeader">You just fixed the following error:</div>\
283283 <div id="syntaxErrCodeDisplay"></div>\
@@ -289,7 +289,21 @@ function experimentalPopUpSyntaxErrorSurvey() {
289289 <button id="syntaxErrCloseBtn" type="button">Close</button>\
290290 </div>\
291291 </div>'
292+ */
292293
294+ var version = 'v2' ; // deployed on 2015-04-20
295+ var surveyBubbleHTML = '<div id="syntaxErrBubbleContents">\
296+ <div id="syntaxErrHeader">You just fixed the following error:</div>\
297+ <div id="syntaxErrCodeDisplay"></div>\
298+ <div id="syntaxErrMsg"></div>\
299+ <div id="syntaxErrQuestion">\
300+ If you think this message wasn\'t helpful, what would have been the best error message for you here?<br/>\
301+ <input type="text" id="syntaxErrTxtInput" size=60 maxlength=150/><br/>\
302+ <button id="syntaxErrSubmitBtn" type="button">Submit</button>\
303+ <button id="syntaxErrCloseBtn" type="button">Close</button>\
304+ <a href="#" id="syntaxErrHideAllLink">Hide all pop-ups</a>\
305+ </div>\
306+ </div>'
293307
294308 $ ( bub . qTipContentID ( ) ) . html ( surveyBubbleHTML ) ;
295309
@@ -331,6 +345,26 @@ function experimentalPopUpSyntaxErrorSurvey() {
331345 bub . destroyQTip ( ) ;
332346 } ) ;
333347
348+ $ ( bub . qTipContentID ( ) + ' #syntaxErrHideAllLink' ) . click ( function ( ) {
349+ // grab the value anyways in case the learner wrote something decent ...
350+ var res = $ ( bub . qTipContentID ( ) + ' #syntaxErrTxtInput' ) . val ( ) ;
351+ var resObj = { appState : getAppState ( ) ,
352+ exc : prevExecutionExceptionObj , // note that prevExecutionExceptionObjLst is BLOWN AWAY by now
353+ opt_uuid : myUuid ,
354+ reply : res ,
355+ type : 'killall' ,
356+ v : version } ;
357+
358+ activateSyntaxErrorSurvey = false ; // global!
359+
360+ //console.log(resObj);
361+ $ . get ( 'syntax_err_survey.py' , { arg : JSON . stringify ( resObj ) } , function ( dat ) { } ) ;
362+
363+ bub . destroyQTip ( ) ;
364+
365+ return false ; // otherwise the 'a href' will trigger a page reload, ergh!
366+ } ) ;
367+
334368
335369 var bubbleAceEditor = ace . edit ( 'syntaxErrCodeDisplay' ) ;
336370 // set the size and value ASAP to get alignment working well ...
0 commit comments