--- loncom/homework/simpleproblem.problem	2009/08/17 14:19:56	1.9
+++ 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');
@@ -24,17 +25,24 @@ $numericaltolerance=&EXT('resource.0.num
 unless ($numericaltolerance) { $numericaltolerance='5%'; }
 $numericalsigfigs=&EXT('resource.0.numericalsigfigs');
 unless ($numericalsigfigs) { $numericalsigfigs='1,15'; }
-$numericalunits=&EXT('resource.0.numericalunits');
-unless ($numericalunits) { $numericalunits=''; }
+$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"> 
@@ -131,7 +139,7 @@ unless ($numericalformat) { $numericalfo
 
 <part id="string"> 
 <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
-<stringresponse id="stringsegment" answer="$stringanswer" type="$stringtype">
+<stringresponse answer="$stringanswer" id="stringsegment" type="$stringtype">
 <textline>
 </textline>
 <hintgroup>
@@ -142,11 +150,12 @@ unless ($numericalformat) { $numericalfo
 
 <part id="numerical">
 <script type="loncapa/perl">
-$numericalscript
+$tag='script';
+&xmlparse("<$tag type='loncapa/perl'>$numericalscript</$tag>");
 </script>
 <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
-<numericalresponse id="numericalsegment" answer="$numericalanswer" unit="$numericalunit" format="$numericalformat">
-<responseparam type="tolerance" default="$numericaltolerance" name="tol" description="Numerical Tolerance" />
+<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>
@@ -157,5 +166,6 @@ $numericalscript
 </part>
 
 </block>
-
 </problem>
+
+