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

1.1       www         1: <problem>
1.2       www         2: <simpleeditbutton />
1.1       www         3: <script type="loncapa/perl">
1.6     ! www         4: $questiontype=&EXT('resource.0.hiddenparts');
1.1       www         5: $max=&EXT('resource.0.maxfoils');
                      6: unless ($max) { $max=10; }
                      7: $randomize=&EXT('resource.0.randomize');
                      8: unless ($randomize) { $randomize='yes'; }
                      9: $options=&EXT('resource.0.options');
                     10: unless ($options) { $options='("true","false")'; }
                     11: for ($i=1;$i<=10;$i++) {
                     12:     $value[$i]=&EXT('resource.0.value'.$i);
                     13:     unless ($value[$i]) { $value[$i]='unused'; }
                     14:     $position[$i]=&EXT('resource.0.position'.$i);
                     15:     unless ($position[$i]) { $position[$i]='random'; }
                     16: }
1.4       www        17: $stringanswer=&EXT('resource.0.stringanswer');
                     18: unless ($stringanswer) { $stringanswer=''; }
                     19: $stringtype=&EXT('resource.0.stringtype');
                     20: unless ($stringtype) { $stringtype='cs'; }
1.1       www        21: </script>
                     22: 
1.6     ! www        23: <block condition="!$questiontype"> 
        !            24: 
        !            25: <startouttext />
        !            26: <h1>Simple Problem Placeholder</h1>
        !            27: <endouttext />
        !            28: </block>
        !            29: 
        !            30: <block condition="$questiontype"> 
        !            31: 
1.5       www        32: <startouttext />&EXT('resource.0.questiontext')<br /><endouttext />
1.1       www        33: 
1.6     ! www        34: <part id="radio">
1.1       www        35: <radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize">
                     36: <foilgroup>
                     37: <foil location="$position[1]" value="$value[1]" name="radiofoil1">
                     38: <startouttext />&EXT('resource.0.text1')<endouttext />
                     39: </foil>
                     40: <foil location="$position[2]" value="$value[2]" name="radiofoil2">
                     41: <startouttext />&EXT('resource.0.text2')<endouttext />
                     42: </foil>
                     43: <foil location="$position[3]" value="$value[3]" name="radiofoil3">
                     44: <startouttext />&EXT('resource.0.text3')<endouttext />
                     45: </foil>
                     46: <foil location="$position[4]" value="$value[4]" name="radiofoil4">
                     47: <startouttext />&EXT('resource.0.text4')<endouttext />
                     48: </foil>
                     49: <foil location="$position[5]" value="$value[5]" name="radiofoil5">
                     50: <startouttext />&EXT('resource.0.text5')<endouttext />
                     51: </foil>
                     52: <foil location="$position[6]" value="$value[6]" name="radiofoil6">
                     53: <startouttext />&EXT('resource.0.text6')<endouttext />
                     54: </foil>
                     55: <foil location="$position[7]" value="$value[7]" name="radiofoil7">
                     56: <startouttext />&EXT('resource.0.text7')<endouttext />
                     57: </foil>
                     58: <foil location="$position[8]" value="$value[8]" name="radiofoil8">
                     59: <startouttext />&EXT('resource.0.text8')<endouttext />
                     60: </foil>
                     61: <foil location="$position[9]" value="$value[9]" name="radiofoil9">
                     62: <startouttext />&EXT('resource.0.text9')<endouttext />
                     63: </foil>
                     64: <foil location="$position[10]" value="$value[10]" name="radiofoil10">
                     65: <startouttext />&EXT('resource.0.text10')<endouttext />
                     66: </foil>
1.3       www        67: </foilgroup>
1.1       www        68: <hintgroup>
                     69: <startouttext />&EXT('resource.0.hinttext')<endouttext />
                     70: </hintgroup>
                     71: </radiobuttonresponse>
1.6     ! www        72: </part>
1.1       www        73: 
1.6     ! www        74: <part id="option"> 
1.3       www        75: <optionresponse max="$max" id="optionsegment" randomize="$randomize">
1.1       www        76: <foilgroup options="$options">
                     77: <foil location="$position[1]" value="$value[1]" name="optionfoil1">
                     78: <startouttext />&EXT('resource.0.text1')<endouttext />
                     79: </foil>
                     80: <foil location="$position[2]" value="$value[2]" name="optionfoil2">
                     81: <startouttext />&EXT('resource.0.text2')<endouttext />
                     82: </foil>
                     83: <foil location="$position[3]" value="$value[3]" name="optionfoil3">
                     84: <startouttext />&EXT('resource.0.text3')<endouttext />
                     85: </foil>
                     86: <foil location="$position[4]" value="$value[4]" name="optionfoil4">
                     87: <startouttext />&EXT('resource.0.text4')<endouttext />
                     88: </foil>
                     89: <foil location="$position[5]" value="$value[5]" name="optionfoil5">
                     90: <startouttext />&EXT('resource.0.text5')<endouttext />
                     91: </foil>
                     92: <foil location="$position[6]" value="$value[6]" name="optionfoil6">
                     93: <startouttext />&EXT('resource.0.text6')<endouttext />
                     94: </foil>
                     95: <foil location="$position[7]" value="$value[7]" name="optionfoil7">
                     96: <startouttext />&EXT('resource.0.text7')<endouttext />
                     97: </foil>
                     98: <foil location="$position[8]" value="$value[8]" name="optionfoil8">
                     99: <startouttext />&EXT('resource.0.text8')<endouttext />
                    100: </foil>
                    101: <foil location="$position[9]" value="$value[9]" name="optionfoil9">
                    102: <startouttext />&EXT('resource.0.text9')<endouttext />
                    103: </foil>
                    104: <foil location="$position[10]" value="$value[10]" name="optionfoil10">
                    105: <startouttext />&EXT('resource.0.text10')<endouttext />
                    106: </foil>
1.3       www       107: </foilgroup>
1.1       www       108: <hintgroup>
                    109: <startouttext />&EXT('resource.0.hinttext')<endouttext />
                    110: </hintgroup>
                    111: </optionresponse>
1.6     ! www       112: </part>
1.4       www       113: 
1.6     ! www       114: <part id="essay"> 
1.4       www       115: <essayresponse id="essaysegment">
                    116: <textfield></textfield>
                    117: </essayresponse>
1.6     ! www       118: </part>
1.4       www       119: 
1.6     ! www       120: <part id="string"> 
1.4       www       121: <stringresponse id="stringsegment" answer="$stringanswer" type="$stringtype">
                    122: <textline>
                    123: </textline>
                    124: <hintgroup>
                    125: <startouttext />&EXT('resource.0.hinttext')<endouttext />
                    126: </hintgroup>
                    127: </stringresponse>
1.6     ! www       128: </part>
        !           129: 
1.4       www       130: </block>
1.1       www       131: 
                    132: </problem>

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