@@ -73,6 +73,7 @@ export class ActiveCode extends RunestoneBase {
7373 this . loadButton = null ;
7474 this . outerDiv = null ;
7575 this . partner = "" ;
76+ this . runCount = 0 ;
7677 this . logResults = true ;
7778 if ( ! eBookConfig . allow_pairs || $ ( orig ) . data ( "nopair" ) ) {
7879 this . enablePartner = false ;
@@ -254,6 +255,10 @@ export class ActiveCode extends RunestoneBase {
254255 this . renderFeedback ( ) ;
255256 // The run is finished; re-enable the button.
256257 this . runButton . disabled = false ;
258+ this . runCount += 1 ;
259+ if ( this . is_toggle && this . runCount == 3 ) {
260+ alert ( "Help is Available Using the Toggle Question Selector" ) ;
261+ }
257262 }
258263
259264 createControls ( ) {
@@ -476,8 +481,8 @@ export class ActiveCode extends RunestoneBase {
476481 if ( ! didAgree ) {
477482 didAgree = confirm (
478483 "Pair Programming should only be used with the consent of your instructor." +
479- "Your partner must be a registered member of the class and have agreed to pair with you." +
480- "By clicking OK you certify that both of these conditions have been met."
484+ "Your partner must be a registered member of the class and have agreed to pair with you." +
485+ "By clicking OK you certify that both of these conditions have been met."
481486 ) ;
482487 if ( didAgree ) {
483488 localStorage . setItem ( "partnerAgree" , "true" ) ;
@@ -520,13 +525,13 @@ export class ActiveCode extends RunestoneBase {
520525 $ ( butt ) . attr (
521526 "href" ,
522527 "http://" +
523- chatcodesServer +
524- "/new?" +
525- $ . param ( {
526- topic : window . location . host + "-" + this . divid ,
527- code : this . editor . getValue ( ) ,
528- lang : "Python" ,
529- } )
528+ chatcodesServer +
529+ "/new?" +
530+ $ . param ( {
531+ topic : window . location . host + "-" + this . divid ,
532+ code : this . editor . getValue ( ) ,
533+ lang : "Python" ,
534+ } )
530535 ) ;
531536 this . chatButton = butt ;
532537 chatBar . appendChild ( butt ) ;
@@ -582,16 +587,21 @@ export class ActiveCode extends RunestoneBase {
582587 // If this is timed and already taken we should restore history info
583588 this . renderScrubber ( ) ;
584589 } else {
585- let request = new Request ( `${ eBookConfig . new_server_prefix } /assessment/gethist` , {
586- method : "POST" ,
587- headers : this . jsonHeaders ,
588- body : JSON . stringify ( reqData ) ,
589- } ) ;
590+ let request = new Request (
591+ `${ eBookConfig . new_server_prefix } /assessment/gethist` ,
592+ {
593+ method : "POST" ,
594+ headers : this . jsonHeaders ,
595+ body : JSON . stringify ( reqData ) ,
596+ }
597+ ) ;
590598 try {
591599 response = await fetch ( request ) ;
592600 let data = await response . json ( ) ;
593601 if ( ! response . ok ) {
594- throw new Error ( `Failed to get the history data: ${ data . detail } ` ) ;
602+ throw new Error (
603+ `Failed to get the history data: ${ data . detail } `
604+ ) ;
595605 }
596606 data = data . detail ;
597607 if ( data . history !== undefined ) {
@@ -919,7 +929,7 @@ export class ActiveCode extends RunestoneBase {
919929 } ) ;
920930 }
921931
922- toggleEditorVisibility ( ) { }
932+ toggleEditorVisibility ( ) { }
923933
924934 addErrorMessage ( err ) {
925935 // Add the error message
@@ -1057,7 +1067,7 @@ Yet another is that there is an internal error. The internal error message is:
10571067 var xl = eval ( x ) ;
10581068 xl = xl . map ( pyStr ) ;
10591069 x = xl . join ( " " ) ;
1060- } catch ( err ) { }
1070+ } catch ( err ) { }
10611071 }
10621072 }
10631073 $ ( this . output ) . css ( "visibility" , "visible" ) ;
@@ -1161,7 +1171,7 @@ Yet another is that there is an internal error. The internal error message is:
11611171 if (
11621172 this . historyScrubber &&
11631173 this . history [ $ ( this . historyScrubber ) . slider ( "value" ) ] !=
1164- this . editor . getValue ( )
1174+ this . editor . getValue ( )
11651175 ) {
11661176 saveCode = "True" ;
11671177 this . history . push ( this . editor . getValue ( ) ) ;
@@ -1220,7 +1230,7 @@ Yet another is that there is an internal error. The internal error message is:
12201230 if ( typeof sid !== "undefined" ) {
12211231 unitData . sid = sid ;
12221232 }
1223- await this . logBookEvent ( unitData )
1233+ await this . logBookEvent ( unitData ) ;
12241234 }
12251235 }
12261236
0 commit comments