Skip to content

Commit

Permalink
change radio buttons to drop-down (hidden in static)
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-fitzpatrick committed Jul 30, 2024
1 parent ea3c86c commit 19728a9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
44 changes: 28 additions & 16 deletions ptx/sec_deriv_interpret.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,9 @@

<exercise label="ex-deriv-interpret-graph-1">
<webwork xml:id="webwork-ex-deriv-interpret-graph-1">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
$h=non_zero_random(-2,2,1);
$k=non_zero_random(-2,2,1);
Expand All @@ -1173,10 +1176,10 @@
$fright=min($fright,4);
$fpleft=max($fpleft,-4);
$fpright=min($fpright,4);
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],0);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],0,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down Expand Up @@ -1222,6 +1225,9 @@

<exercise label="ex-deriv-interpret-graph-2">
<webwork xml:id="webwork-ex-deriv-interpret-graph-2">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
($r,$s,$t)=num_sort((-3..3)[NchooseK(7,3)]);
$a=non_zero_random(-1,1,0.05);
Expand All @@ -1239,10 +1245,10 @@
$ymax=max(5,map{Round($_)+1}(@cv));
$infl=($r+$s+$t)/3;
$inflval=$fp-&gt;eval(x=&gt;$infl);
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],1);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],1,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down Expand Up @@ -1290,11 +1296,14 @@

<exercise label="ex-deriv-interpret-graph-3">
<webwork xml:id="webwork-ex-deriv-interpret-graph-3">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],1);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],1,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down Expand Up @@ -1340,6 +1349,9 @@

<exercise label="ex-deriv-interpret-graph-4">
<webwork xml:id="webwork-ex-deriv-interpret-graph-4">
<pg-macros>
<macro-file>parserPopUp.pl</macro-file>
</pg-macros>
<pg-code>
$h=random(-2,2,1);
$p=random(2,4,1);
Expand All @@ -1348,10 +1360,10 @@
$fp=$f-&gt;D('x');
$ymin=-max(int(pi/$p),1)-1;
$ymax=max(int(pi/$p),1)+1;
$radio=RadioButtons([
math_ev3(f).' is the derivative of '.math_ev3(g).'.',
math_ev3(g).' is the derivative of '.math_ev3(f).'.'
],1);
$radio=DropDown([
'f is the derivative of g.',
'g is the derivative of f.'
],1,showInStatic=&gt;0);
</pg-code>
<statement>
<image>
Expand Down
2 changes: 1 addition & 1 deletion xsl/apex-latex-print-color.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</xsl:template>

<xsl:template match="figure" mode="tcb-style">
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=12pt</xsl:text>
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=\baselineskip</xsl:text>
</xsl:template>

<xsl:template match="example" mode="tcb-style">
Expand Down
2 changes: 1 addition & 1 deletion xsl/apex-latex-print-style.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</xsl:template>

<xsl:template match="figure" mode="tcb-style">
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=12pt</xsl:text>
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=\baselineskip</xsl:text>
</xsl:template>

<xsl:template match="example" mode="tcb-style">
Expand Down
2 changes: 1 addition & 1 deletion xsl/apex-latex-style.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</xsl:template>

<xsl:template match="figure" mode="tcb-style">
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=12pt</xsl:text>
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont, after skip=\baselineskip</xsl:text>
</xsl:template>

<xsl:template match="example" mode="tcb-style">
Expand Down

0 comments on commit 19728a9

Please sign in to comment.