version 1.4, 2003/07/09 10:05:15
|
version 1.11, 2009/08/17 19:46:49
|
Line 1
|
Line 1
|
<problem> |
<problem> |
<simpleeditbutton /> |
<simpleeditbutton /> |
<script type="loncapa/perl"> |
<script type="loncapa/perl"> |
$questiontype=&EXT('resource.0.questiontype'); |
$questiontype=&EXT('resource.0.hiddenparts'); |
unless ($questiontype) { $questiontype='radio'; } |
|
$max=&EXT('resource.0.maxfoils'); |
$max=&EXT('resource.0.maxfoils'); |
unless ($max) { $max=10; } |
unless ($max) { $max=10; } |
$randomize=&EXT('resource.0.randomize'); |
$randomize=&EXT('resource.0.randomize'); |
Line 19 $stringanswer=&EXT('resource.0.stringans
|
Line 18 $stringanswer=&EXT('resource.0.stringans
|
unless ($stringanswer) { $stringanswer=''; } |
unless ($stringanswer) { $stringanswer=''; } |
$stringtype=&EXT('resource.0.stringtype'); |
$stringtype=&EXT('resource.0.stringtype'); |
unless ($stringtype) { $stringtype='cs'; } |
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> |
</script> |
|
|
<startouttext />&EXT('resource.0.questiontext')<endouttext /> |
<block condition="!$questiontype"> |
|
|
|
<startouttext /> |
|
<h1>Simple Problem Placeholder</h1> |
|
<endouttext /> |
|
</block> |
|
|
|
<block condition="$questiontype"> |
|
|
|
<part id="radio"> |
|
<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext /> |
|
|
<block condition="&EXT('resource.0.questiontype') eq 'radio'"> |
|
<radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize"> |
<radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize"> |
<foilgroup> |
<foilgroup> |
<foil location="$position[1]" value="$value[1]" name="radiofoil1"> |
<foil location="$position[1]" value="$value[1]" name="radiofoil1"> |
<startouttext />&EXT('resource.0.text1')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text1')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[2]" value="$value[2]" name="radiofoil2"> |
<foil location="$position[2]" value="$value[2]" name="radiofoil2"> |
<startouttext />&EXT('resource.0.text2')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text2')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[3]" value="$value[3]" name="radiofoil3"> |
<foil location="$position[3]" value="$value[3]" name="radiofoil3"> |
<startouttext />&EXT('resource.0.text3')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text3')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[4]" value="$value[4]" name="radiofoil4"> |
<foil location="$position[4]" value="$value[4]" name="radiofoil4"> |
<startouttext />&EXT('resource.0.text4')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text4')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[5]" value="$value[5]" name="radiofoil5"> |
<foil location="$position[5]" value="$value[5]" name="radiofoil5"> |
<startouttext />&EXT('resource.0.text5')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text5')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[6]" value="$value[6]" name="radiofoil6"> |
<foil location="$position[6]" value="$value[6]" name="radiofoil6"> |
<startouttext />&EXT('resource.0.text6')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text6')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[7]" value="$value[7]" name="radiofoil7"> |
<foil location="$position[7]" value="$value[7]" name="radiofoil7"> |
<startouttext />&EXT('resource.0.text7')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text7')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[8]" value="$value[8]" name="radiofoil8"> |
<foil location="$position[8]" value="$value[8]" name="radiofoil8"> |
<startouttext />&EXT('resource.0.text8')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text8')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[9]" value="$value[9]" name="radiofoil9"> |
<foil location="$position[9]" value="$value[9]" name="radiofoil9"> |
<startouttext />&EXT('resource.0.text9')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text9')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[10]" value="$value[10]" name="radiofoil10"> |
<foil location="$position[10]" value="$value[10]" name="radiofoil10"> |
<startouttext />&EXT('resource.0.text10')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text10')</parse><endouttext /> |
</foil> |
</foil> |
</foilgroup> |
</foilgroup> |
<hintgroup> |
<hintgroup> |
<startouttext />&EXT('resource.0.hinttext')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext /> |
</hintgroup> |
</hintgroup> |
</radiobuttonresponse> |
</radiobuttonresponse> |
</block> |
</part> |
|
|
<block condition="&EXT('resource.0.questiontype') eq 'option'"> |
<part id="option"> |
|
<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext /> |
<optionresponse max="$max" id="optionsegment" randomize="$randomize"> |
<optionresponse max="$max" id="optionsegment" randomize="$randomize"> |
<foilgroup options="$options"> |
<foilgroup options="$options"> |
<foil location="$position[1]" value="$value[1]" name="optionfoil1"> |
<foil location="$position[1]" value="$value[1]" name="optionfoil1"> |
<startouttext />&EXT('resource.0.text1')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text1')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[2]" value="$value[2]" name="optionfoil2"> |
<foil location="$position[2]" value="$value[2]" name="optionfoil2"> |
<startouttext />&EXT('resource.0.text2')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text2')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[3]" value="$value[3]" name="optionfoil3"> |
<foil location="$position[3]" value="$value[3]" name="optionfoil3"> |
<startouttext />&EXT('resource.0.text3')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text3')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[4]" value="$value[4]" name="optionfoil4"> |
<foil location="$position[4]" value="$value[4]" name="optionfoil4"> |
<startouttext />&EXT('resource.0.text4')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text4')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[5]" value="$value[5]" name="optionfoil5"> |
<foil location="$position[5]" value="$value[5]" name="optionfoil5"> |
<startouttext />&EXT('resource.0.text5')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text5')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[6]" value="$value[6]" name="optionfoil6"> |
<foil location="$position[6]" value="$value[6]" name="optionfoil6"> |
<startouttext />&EXT('resource.0.text6')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text6')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[7]" value="$value[7]" name="optionfoil7"> |
<foil location="$position[7]" value="$value[7]" name="optionfoil7"> |
<startouttext />&EXT('resource.0.text7')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text7')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[8]" value="$value[8]" name="optionfoil8"> |
<foil location="$position[8]" value="$value[8]" name="optionfoil8"> |
<startouttext />&EXT('resource.0.text8')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text8')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[9]" value="$value[9]" name="optionfoil9"> |
<foil location="$position[9]" value="$value[9]" name="optionfoil9"> |
<startouttext />&EXT('resource.0.text9')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text9')</parse><endouttext /> |
</foil> |
</foil> |
<foil location="$position[10]" value="$value[10]" name="optionfoil10"> |
<foil location="$position[10]" value="$value[10]" name="optionfoil10"> |
<startouttext />&EXT('resource.0.text10')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.text10')</parse><endouttext /> |
</foil> |
</foil> |
</foilgroup> |
</foilgroup> |
<hintgroup> |
<hintgroup> |
<startouttext />&EXT('resource.0.hinttext')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext /> |
</hintgroup> |
</hintgroup> |
</optionresponse> |
</optionresponse> |
</block> |
</part> |
|
|
<block condition="&EXT('resource.0.questiontype') eq 'essay'"> |
<part id="essay"> |
|
<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext /> |
<essayresponse id="essaysegment"> |
<essayresponse id="essaysegment"> |
<textfield></textfield> |
<textfield></textfield> |
</essayresponse> |
</essayresponse> |
</block> |
</part> |
|
|
<block condition="&EXT('resource.0.questiontype') eq 'string'"> |
<part id="string"> |
|
<startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext /> |
<stringresponse id="stringsegment" answer="$stringanswer" type="$stringtype"> |
<stringresponse id="stringsegment" answer="$stringanswer" type="$stringtype"> |
<textline> |
<textline> |
</textline> |
</textline> |
<hintgroup> |
<hintgroup> |
<startouttext />&EXT('resource.0.hinttext')<endouttext /> |
<startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext /> |
</hintgroup> |
</hintgroup> |
</stringresponse> |
</stringresponse> |
</block> |
</part> |
|
|
|
<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 id="numericalsegment" answer="$numericalanswer" unit="$numericalunit" format="$numericalformat"> |
|
<responseparam type="tolerance" default="$numericaltolerance" name="tol" 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> |
</problem> |