@@ -43,6 +43,8 @@ var preseededCurInstr = null; // if you passed in a 'curInstr=<number>' in the U
4343
4444var myVisualizer = null ; // singleton ExecutionVisualizer instance
4545
46+ var VIZ_LABEL = "Run and Visualize Code" ;
47+
4648
4749function enterEditMode ( ) {
4850 $ . bbq . pushState ( { mode : 'edit' } , 2 /* completely override other hash strings to keep URL clean */ ) ;
@@ -58,7 +60,7 @@ var pyTestInputCodeMirror; // CodeMirror object that contains the test code
5860
5961$ ( document ) . ready ( function ( ) {
6062
61- $ ( "#embedLinkDiv" ) . hide ( ) ;
63+ $ ( "#embedLinkDiv,#gradingPane,#pyOutputPane " ) . hide ( ) ;
6264
6365 pyInputCodeMirror = CodeMirror ( document . getElementById ( 'codeInputPane' ) , {
6466 mode : 'python' ,
@@ -88,7 +90,7 @@ $(document).ready(function() {
8890
8991 if ( appMode === undefined || appMode == 'edit' ) {
9092 $ ( "#pyInputPane" ) . show ( ) ;
91- $ ( "#pyOutputPane" ) . hide ( ) ;
93+ $ ( "#pyOutputPane,#gradingPane " ) . hide ( ) ;
9294 $ ( "#embedLinkDiv" ) . hide ( ) ;
9395
9496 // destroy all annotation bubbles (NB: kludgy)
@@ -98,11 +100,10 @@ $(document).ready(function() {
98100 }
99101 else if ( appMode == 'display' ) {
100102 $ ( "#pyInputPane" ) . hide ( ) ;
101- $ ( "#pyOutputPane" ) . show ( ) ;
102-
103+ $ ( "#pyOutputPane,#gradingPane" ) . show ( ) ;
103104 $ ( "#embedLinkDiv" ) . show ( ) ;
104105
105- $ ( '#executeBtn' ) . html ( "Visualize Execution" ) ;
106+ $ ( '#executeBtn' ) . html ( VIZ_LABEL ) ;
106107 $ ( '#executeBtn' ) . attr ( 'disabled' , false ) ;
107108
108109
@@ -118,7 +119,7 @@ $(document).ready(function() {
118119 }
119120 else if ( appMode == 'display_no_frills' ) {
120121 $ ( "#pyInputPane" ) . hide ( ) ;
121- $ ( "#pyOutputPane" ) . show ( ) ;
122+ $ ( "#pyOutputPane,#gradingPane " ) . show ( ) ;
122123 $ ( "#embedLinkDiv" ) . show ( ) ;
123124 }
124125 else {
@@ -138,7 +139,7 @@ $(document).ready(function() {
138139
139140 $ ( '#executeBtn' ) . html ( "Please wait ... processing your code" ) ;
140141 $ ( '#executeBtn' ) . attr ( 'disabled' , true ) ;
141- $ ( "#pyOutputPane" ) . hide ( ) ;
142+ $ ( "#pyOutputPane,#gradingPane " ) . hide ( ) ;
142143 $ ( "#embedLinkDiv" ) . hide ( ) ;
143144
144145 var backendOptionsObj = { cumulative_mode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'true' ) ,
@@ -176,7 +177,6 @@ $(document).ready(function() {
176177 } ) ;
177178 }
178179 else {
179- console . log ( 'wtf?' , errorLineNo , nCodeLines ) ;
180180 // instead highlight the faulting line in pyTestInputCodeMirror
181181 errorLineNo -= nCodeLines ;
182182
@@ -191,7 +191,7 @@ $(document).ready(function() {
191191 }
192192 }
193193
194- $ ( '#executeBtn' ) . html ( "Visualize Execution" ) ;
194+ $ ( '#executeBtn' ) . html ( VIZ_LABEL ) ;
195195 $ ( '#executeBtn' ) . attr ( 'disabled' , false ) ;
196196 }
197197 }
@@ -251,7 +251,7 @@ $(document).ready(function() {
251251 "Report a bug to philip@pgbovine.net\n\n" +
252252 "(Click the 'Generate URL' button to include a unique URL in your email bug report.)" ) ;
253253
254- $ ( '#executeBtn' ) . html ( "Visualize Execution" ) ;
254+ $ ( '#executeBtn' ) . html ( VIZ_LABEL ) ;
255255 $ ( '#executeBtn' ) . attr ( 'disabled' , false ) ;
256256 } ) ;
257257
0 commit comments