Annotation of loncom/homework/simpleproblem.problem, revision 1.2

1.1       www         1: <problem>
1.2     ! www         2: <simpleeditbutton />
1.1       www         3: <script type="loncapa/perl">
                      4: $questiontype=&EXT('resource.0.questiontype');
                      5: unless ($questiontype) { $questiontype='radio'; }
                      6: $max=&EXT('resource.0.maxfoils');
                      7: unless ($max) { $max=10; }
                      8: $randomize=&EXT('resource.0.randomize');
                      9: unless ($randomize) { $randomize='yes'; }
                     10: $options=&EXT('resource.0.options');
                     11: unless ($options) { $options='("true","false")'; }
                     12: for ($i=1;$i<=10;$i++) {
                     13:     $value[$i]=&EXT('resource.0.value'.$i);
                     14:     unless ($value[$i]) { $value[$i]='unused'; }
                     15:     $position[$i]=&EXT('resource.0.position'.$i);
                     16:     unless ($position[$i]) { $position[$i]='random'; }
                     17: }
                     18: </script>
                     19: 
                     20: <startouttext />&EXT('resource.0.questiontext')<endouttext />
                     21: 
                     22: <block condition="&EXT('resource.0.questiontype') eq 'radio'"> 
                     23: <radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize">
                     24: <foilgroup>
                     25: <foil location="$position[1]" value="$value[1]" name="radiofoil1">
                     26: <startouttext />&EXT('resource.0.text1')<endouttext />
                     27: </foil>
                     28: <foil location="$position[2]" value="$value[2]" name="radiofoil2">
                     29: <startouttext />&EXT('resource.0.text2')<endouttext />
                     30: </foil>
                     31: <foil location="$position[3]" value="$value[3]" name="radiofoil3">
                     32: <startouttext />&EXT('resource.0.text3')<endouttext />
                     33: </foil>
                     34: <foil location="$position[4]" value="$value[4]" name="radiofoil4">
                     35: <startouttext />&EXT('resource.0.text4')<endouttext />
                     36: </foil>
                     37: <foil location="$position[5]" value="$value[5]" name="radiofoil5">
                     38: <startouttext />&EXT('resource.0.text5')<endouttext />
                     39: </foil>
                     40: <foil location="$position[6]" value="$value[6]" name="radiofoil6">
                     41: <startouttext />&EXT('resource.0.text6')<endouttext />
                     42: </foil>
                     43: </foilgroup>
                     44: <foil location="$position[7]" value="$value[7]" name="radiofoil7">
                     45: <startouttext />&EXT('resource.0.text7')<endouttext />
                     46: </foil>
                     47: <foil location="$position[8]" value="$value[8]" name="radiofoil8">
                     48: <startouttext />&EXT('resource.0.text8')<endouttext />
                     49: </foil>
                     50: <foil location="$position[9]" value="$value[9]" name="radiofoil9">
                     51: <startouttext />&EXT('resource.0.text9')<endouttext />
                     52: </foil>
                     53: <foil location="$position[10]" value="$value[10]" name="radiofoil10">
                     54: <startouttext />&EXT('resource.0.text10')<endouttext />
                     55: </foil>
                     56: <hintgroup>
                     57: <startouttext />&EXT('resource.0.hinttext')<endouttext />
                     58: </hintgroup>
                     59: </radiobuttonresponse>
                     60: </block>
                     61: 
                     62: <block condition="&EXT('resource.0.questiontype') eq 'option'"> 
                     63: <optionresponse max="$max" id="radiosegment" randomize="$randomize">
                     64: <foilgroup options="$options">
                     65: <foil location="$position[1]" value="$value[1]" name="optionfoil1">
                     66: <startouttext />&EXT('resource.0.text1')<endouttext />
                     67: </foil>
                     68: <foil location="$position[2]" value="$value[2]" name="optionfoil2">
                     69: <startouttext />&EXT('resource.0.text2')<endouttext />
                     70: </foil>
                     71: <foil location="$position[3]" value="$value[3]" name="optionfoil3">
                     72: <startouttext />&EXT('resource.0.text3')<endouttext />
                     73: </foil>
                     74: <foil location="$position[4]" value="$value[4]" name="optionfoil4">
                     75: <startouttext />&EXT('resource.0.text4')<endouttext />
                     76: </foil>
                     77: <foil location="$position[5]" value="$value[5]" name="optionfoil5">
                     78: <startouttext />&EXT('resource.0.text5')<endouttext />
                     79: </foil>
                     80: <foil location="$position[6]" value="$value[6]" name="optionfoil6">
                     81: <startouttext />&EXT('resource.0.text6')<endouttext />
                     82: </foil>
                     83: </foilgroup>
                     84: <foil location="$position[7]" value="$value[7]" name="optionfoil7">
                     85: <startouttext />&EXT('resource.0.text7')<endouttext />
                     86: </foil>
                     87: <foil location="$position[8]" value="$value[8]" name="optionfoil8">
                     88: <startouttext />&EXT('resource.0.text8')<endouttext />
                     89: </foil>
                     90: <foil location="$position[9]" value="$value[9]" name="optionfoil9">
                     91: <startouttext />&EXT('resource.0.text9')<endouttext />
                     92: </foil>
                     93: <foil location="$position[10]" value="$value[10]" name="optionfoil10">
                     94: <startouttext />&EXT('resource.0.text10')<endouttext />
                     95: </foil>
                     96: <hintgroup>
                     97: <startouttext />&EXT('resource.0.hinttext')<endouttext />
                     98: </hintgroup>
                     99: </optionresponse>
                    100: </block>
                    101: 
                    102: </problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>