@@ -71,7 +71,7 @@ def setup(app):
7171 %(hidecode)s %(include)s %(timelimit)s %(coach)s %(codelens)s %(enabledownload)s %(chatcodes)s %(optional)s
7272 data-audio='%(ctext)s' %(sourcefile)s %(datafile)s %(stdin)s %(tie)s %(dburl)s %(nopair)s
7373 %(cargs)s %(largs)s %(rargs)s %(iargs)s %(gradebutton)s %(caption)s %(hidehistory)s %(wasmuri)s
74- %(showlastsql)s %(python3_interpreter)s style="visibility: hidden;">
74+ %(showlastsql)s %(python3_interpreter)s %(output_height)s style="visibility: hidden;">
7575%(initialcode)s
7676</textarea>
7777</div>
@@ -163,6 +163,7 @@ class ActiveCode(RunestoneIdDirective):
163163 :dburl: url to load database for sql mode
164164 :showlastsql: -- Only show the last sql result in output
165165 :python3_interpreter: brython (uses brython as interpreter of python3)
166+ :output_height: 200px
166167
167168 If this is a homework problem instead of an example in the text
168169 then the assignment text should go here. The assignment text ends with
@@ -218,7 +219,8 @@ class ActiveCode(RunestoneIdDirective):
218219 "nopair" : directives .flag ,
219220 "dburl" : directives .unchanged ,
220221 "showlastsql" : directives .flag ,
221- "python3_interpreter" : directives .unchanged
222+ "python3_interpreter" : directives .unchanged ,
223+ "output_height" : directives .unchanged ,
222224 }
223225 )
224226
@@ -273,6 +275,11 @@ def run(self):
273275 else :
274276 self .options ["python3_interpreter" ] = ""
275277
278+ if ("output_height" in self .options ) :
279+ self .options ["output_height" ] = "data-output_height='%s'" % self .options ["output_height" ]
280+ else :
281+ self .options ["output_height" ] = ""
282+
276283 if "caption" not in self .options :
277284 self .options ["caption" ] = ""
278285 else :
0 commit comments