[LON-CAPA-cvs] cvs: loncom /homework/templates RadioResponse.problem SelectFromOptions-Simple.problem SimpleFormula.problem StringResponse.problem numerical.problem
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 29 Jul 2003 00:51:17 -0000
albertel Mon Jul 28 20:51:17 2003 EDT
Modified files:
/loncom/homework/templates RadioResponse.problem
SelectFromOptions-Simple.problem
SimpleFormula.problem
StringResponse.problem numerical.problem
Log:
- updates to the templates from felicia
Index: loncom/homework/templates/RadioResponse.problem
diff -u loncom/homework/templates/RadioResponse.problem:1.6 loncom/homework/templates/RadioResponse.problem:1.7
--- loncom/homework/templates/RadioResponse.problem:1.6 Tue Mar 11 14:53:07 2003
+++ loncom/homework/templates/RadioResponse.problem Mon Jul 28 20:51:17 2003
@@ -1,36 +1,33 @@
<problem>
-<startouttext />Enter the text of the question here. Of the foils provided,
-LON-CAPA will randomly select one "true" foil,
-and "false" foils up the "Max Number Of Shown Foils."
-<endouttext />
+<startouttext />Enter the text of the question here.<endouttext />
-<radiobuttonresponse max="10">
+<radiobuttonresponse max="10" randomize="yes">
<foilgroup>
-<foil name="foil1" value="true">
-<startouttext />This is foil One, and it is currently set to "true."
+<foil location="random" value="true" name="foil1">
+<startouttext />This is foil One, and it is currently set to "true." Only one true foil is selected.
<endouttext />
</foil>
-<foil name="foil2" value="true">
-<startouttext />This is foil Two, and it is currently set to "true."
+<foil location="random" value="true" name="foil2">
+<startouttext />This is foil Two, and it is currently set to "true." Only one true foil is selected.
<endouttext />
</foil>
-<foil name="foil3" value="false">
-<startouttext />This is foil Three, and it is currently set to "false."
+<foil location="random" value="false" name="foil3">
+<startouttext />This is foil Three, and it is currently set to "false."
<endouttext />
</foil>
-<foil name="foil4" value="false">
-<startouttext />This is foil Four, and it is currently set to "false."
+<foil location="random" value="false" name="foil4">
+<startouttext />This is foil Four, and it is currently set to "false."
<endouttext />
</foil>
-<foil name="foil5" value="unused">
-<startouttext />This is foil Five, and it is currently set to "unused."
+<foil location="random" value="false" name="foil5">
+<startouttext />This is foil Five, and it is currently set to "false."
<endouttext />
</foil>
Index: loncom/homework/templates/SelectFromOptions-Simple.problem
diff -u loncom/homework/templates/SelectFromOptions-Simple.problem:1.5 loncom/homework/templates/SelectFromOptions-Simple.problem:1.6
--- loncom/homework/templates/SelectFromOptions-Simple.problem:1.5 Tue May 13 16:45:20 2003
+++ loncom/homework/templates/SelectFromOptions-Simple.problem Mon Jul 28 20:51:17 2003
@@ -1,14 +1,17 @@
<problem><startouttext />Type Question Here.<endouttext />
-<optionresponse max="10">
+<optionresponse max="10" randomize="yes">
<foilgroup options="('Green','Red')">
-<foil name="Foil1" value="Green">
+<foil location="random" value="Green" name="Foil1">
<startouttext />This is foil One. It is currently set to "Green."<endouttext />
</foil>
-<foil name="Foil2" value="Red">
+<foil location="random" value="Red" name="Foil2">
<startouttext />This is foil Two. It is currently set to "Red."<endouttext />
</foil>
-<foil name="Foil3" value="Green">
+<foil location="random" value="Green" name="Foil3">
<startouttext />This is foil Three. It is currently set to "Green."<endouttext />
+</foil>
+<foil location="random" value="Green" name="">
+<startouttext />This is foil Two. It is currently set to "Red."<endouttext />
</foil>
</foilgroup>
<hintgroup><startouttext />Add hint text here.<endouttext />
Index: loncom/homework/templates/SimpleFormula.problem
diff -u loncom/homework/templates/SimpleFormula.problem:1.1 loncom/homework/templates/SimpleFormula.problem:1.2
--- loncom/homework/templates/SimpleFormula.problem:1.1 Thu Jun 6 04:56:43 2002
+++ loncom/homework/templates/SimpleFormula.problem Mon Jul 28 20:51:17 2003
@@ -1,13 +1,20 @@
-<problem>
-<script type="loncapa/perl"># Enter computations here
+<problem>
+<script type="loncapa/perl">$z=&random(1,10,1);
+$constant=&random(1,10,1);
+# y=x+z-constant, solving for x, x=y-z+constant, prettyconstant is for simplifying
+$prettyconstant=$constant-$z;
+$x="y+$prettyconstant";
+# code below substitutes '+-' and '-+' for '-'. This is used in display of answer
+$x=~s/\+-/-/g;
+$x=~s/-\+/-/g;</script>
+
+<startouttext />If z=$z and y=x+z-$constant, what does x equal?
+<endouttext />
+
+<formularesponse id="11" samples="y@-5:5#10" answer="$x">
+ <responseparam decription="Numerical Tolerance" type="tolerance" default="0.00001" name="tol" />
+ <textline size="25" />
+</formularesponse>
+
+</problem>
-</script>
-<startouttext />Enter Question Text Here. <endouttext />
-<formularesponse answer="$answer" id="11" samples="">
- <responseparam name="tol" type="tolerance" description="Numerical Tolerance" default=".0001" />
- <textline size="50" />
- <hintgroup>
- </hintgroup>
-</formularesponse>
-
-</problem>
Index: loncom/homework/templates/StringResponse.problem
diff -u loncom/homework/templates/StringResponse.problem:1.4 loncom/homework/templates/StringResponse.problem:1.5
--- loncom/homework/templates/StringResponse.problem:1.4 Wed Dec 11 10:21:45 2002
+++ loncom/homework/templates/StringResponse.problem Mon Jul 28 20:51:17 2003
@@ -1,5 +1,5 @@
-<problem><startouttext />Enter your question text here.
-The current answer is "NaCl" and it is "Case Sensitive."<endouttext />
+<problem><startouttext />Enter your question text here.
+The current answer is "NaCl" and it is case sensitive.<endouttext />
<stringresponse answer="NaCl" type="cs">
<textline>
</textline>
Index: loncom/homework/templates/numerical.problem
diff -u loncom/homework/templates/numerical.problem:1.4 loncom/homework/templates/numerical.problem:1.5
--- loncom/homework/templates/numerical.problem:1.4 Mon Jul 7 12:55:12 2003
+++ loncom/homework/templates/numerical.problem Mon Jul 28 20:51:17 2003
@@ -1,17 +1,16 @@
<problem>
-<script type="loncapa/perl">
-#Enter the computations here
-</script>
-<startouttext />
-Enter the problem text here.
-<endouttext />
-<numericalresponse answer="0">
+<script type="loncapa/perl">#Enter the computations here
+$a=&random(1,10,1);
+$b=&random(1,10,1);
+$c=$a+$b;</script>
+<startouttext />Enter the problem text here.
+What is $a + $b?<endouttext />
+<numericalresponse answer="$c">
<responseparam type="tolerance" default="5%" name="tol" description="Numerical Tolerance" />
<responseparam name="sig" type="int_range,0-16" default="0,15" description="Significant Figures" />
<textline />
<hintgroup>
- <startouttext />
-Enter the hint text here.
+ <startouttext />Enter the hint text here.
<endouttext />
</hintgroup>
</numericalresponse>