--- loncom/homework/simpleproblem.problem	2005/02/28 20:39:05	1.7
+++ loncom/homework/simpleproblem.problem	2011/01/18 21:20:15	1.12
@@ -2,6 +2,7 @@
 <simpleeditbutton />
 <script type="loncapa/perl">
 $questiontype=&EXT('resource.0.hiddenparts');
+if ($questiontype eq '!placeholder') { $questiontype=''; }
 $max=&EXT('resource.0.maxfoils');
 unless ($max) { $max=10; }
 $randomize=&EXT('resource.0.randomize');
@@ -18,20 +19,37 @@ $stringanswer=&EXT('resource.0.stringans
 unless ($stringanswer) { $stringanswer=''; }
 $stringtype=&EXT('resource.0.stringtype');
 unless ($stringtype) { $stringtype='cs'; }
+$numericalanswer=&EXT('resource.0.numericalanswer');
+unless ($numericalanswer) { $numericalanswer=''; }
+$numericaltolerance=&EXT('resource.0.numericaltolerance');
+unless ($numericaltolerance) { $numericaltolerance='5%'; }
+$numericalsigfigs=&EXT('resource.0.numericalsigfigs');
+unless ($numericalsigfigs) { $numericalsigfigs='1,15'; }
+$numericalunit=&EXT('resource.0.numericalunit');
+unless ($numericalunit) { $numericalunit=''; }
+$numericalformat=&EXT('resource.0.numericalformat');
+unless ($numericalformat) { $numericalformat=''; }
+$numericalscript=&EXT('resource.0.numericalscript');
+unless ($numericalscript) { $numericalscript=''; }
 </script>
 
-<block condition="!$questiontype"> 
+<parameter name="hiddenparts" id="11" type="string" default="!placeholder" description="List of hidden parts" />
 
+<block condition="!$questiontype"> 
 <startouttext />
-<h1>Simple Problem Placeholder</h1>
+<h1>Problem Placeholder</h1>
 <endouttext />
+<part id="placeholder">
+<stringresponse id="placeholdersegment">
+</stringresponse>
+</part>
 </block>
 
 <block condition="$questiontype"> 
 
+<part id="radio">
 <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
 
-<part id="radio">
 <radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize">
 <foilgroup>
 <foil location="$position[1]" value="$value[1]" name="radiofoil1">
@@ -72,6 +90,7 @@ unless ($stringtype) { $stringtype='cs';
 </part>
 
 <part id="option"> 
+<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
 <optionresponse max="$max" id="optionsegment" randomize="$randomize">
 <foilgroup options="$options">
 <foil location="$position[1]" value="$value[1]" name="optionfoil1">
@@ -112,13 +131,15 @@ unless ($stringtype) { $stringtype='cs';
 </part>
 
 <part id="essay"> 
+<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
 <essayresponse id="essaysegment">
 <textfield></textfield>
 </essayresponse>
 </part>
 
 <part id="string"> 
-<stringresponse id="stringsegment" answer="$stringanswer" type="$stringtype">
+<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
+<stringresponse answer="$stringanswer" id="stringsegment" type="$stringtype">
 <textline>
 </textline>
 <hintgroup>
@@ -127,6 +148,24 @@ unless ($stringtype) { $stringtype='cs';
 </stringresponse>
 </part>
 
-</block>
+<part id="numerical">
+<script type="loncapa/perl">
+$tag='script';
+&xmlparse("<$tag type='loncapa/perl'>$numericalscript</$tag>");
+</script>
+<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
+<numericalresponse unit="$numericalunit" format="$numericalformat" answer="$numericalanswer" id="numericalsegment">
+<responseparam name="tol" type="tolerance" default="$numericaltolerance" description="Numerical Tolerance" />
+<responseparam name="sig" type="int_range,0-16" default="$numericalsigfigs" description="Significant Figures" />
+<textline>
+</textline>
+<hintgroup>
+<startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext />
+</hintgroup>
+</numericalresponse>
+</part>
 
+</block>
 </problem>
+
+