--- loncom/homework/simpleproblem.problem 2009/08/17 19:46:49 1.11 +++ 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'); @@ -32,11 +33,16 @@ $numericalscript=&EXT('resource.0.numeri 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"> @@ -133,7 +139,7 @@ unless ($numericalscript) { $numericalsc <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> @@ -148,8 +154,8 @@ $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> @@ -160,5 +166,6 @@ $tag='script'; </part> </block> - </problem> + +