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

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.9     ! www        21: $numericalanswer=&EXT('resource.0.numericalanswer');
        !            22: unless ($numericalanswer) { $numericalanswer=''; }
        !            23: $numericaltolerance=&EXT('resource.0.numericaltolerance');
        !            24: unless ($numericaltolerance) { $numericaltolerance='5%'; }
        !            25: $numericalsigfigs=&EXT('resource.0.numericalsigfigs');
        !            26: unless ($numericalsigfigs) { $numericalsigfigs='1,15'; }
        !            27: $numericalunits=&EXT('resource.0.numericalunits');
        !            28: unless ($numericalunits) { $numericalunits=''; }
        !            29: $numericalformat=&EXT('resource.0.numericalformat');
        !            30: unless ($numericalformat) { $numericalformat=''; }
1.1       www        31: </script>
                     32: 
1.6       www        33: <block condition="!$questiontype"> 
                     34: 
                     35: <startouttext />
                     36: <h1>Simple Problem Placeholder</h1>
                     37: <endouttext />
                     38: </block>
                     39: 
                     40: <block condition="$questiontype"> 
                     41: 
1.8       albertel   42: <part id="radio">
1.7       albertel   43: <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
1.1       www        44: 
                     45: <radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize">
                     46: <foilgroup>
                     47: <foil location="$position[1]" value="$value[1]" name="radiofoil1">
1.7       albertel   48: <startouttext /><parse>&EXT('resource.0.text1')</parse><endouttext />
1.1       www        49: </foil>
                     50: <foil location="$position[2]" value="$value[2]" name="radiofoil2">
1.7       albertel   51: <startouttext /><parse>&EXT('resource.0.text2')</parse><endouttext />
1.1       www        52: </foil>
                     53: <foil location="$position[3]" value="$value[3]" name="radiofoil3">
1.7       albertel   54: <startouttext /><parse>&EXT('resource.0.text3')</parse><endouttext />
1.1       www        55: </foil>
                     56: <foil location="$position[4]" value="$value[4]" name="radiofoil4">
1.7       albertel   57: <startouttext /><parse>&EXT('resource.0.text4')</parse><endouttext />
1.1       www        58: </foil>
                     59: <foil location="$position[5]" value="$value[5]" name="radiofoil5">
1.7       albertel   60: <startouttext /><parse>&EXT('resource.0.text5')</parse><endouttext />
1.1       www        61: </foil>
                     62: <foil location="$position[6]" value="$value[6]" name="radiofoil6">
1.7       albertel   63: <startouttext /><parse>&EXT('resource.0.text6')</parse><endouttext />
1.1       www        64: </foil>
                     65: <foil location="$position[7]" value="$value[7]" name="radiofoil7">
1.7       albertel   66: <startouttext /><parse>&EXT('resource.0.text7')</parse><endouttext />
1.1       www        67: </foil>
                     68: <foil location="$position[8]" value="$value[8]" name="radiofoil8">
1.7       albertel   69: <startouttext /><parse>&EXT('resource.0.text8')</parse><endouttext />
1.1       www        70: </foil>
                     71: <foil location="$position[9]" value="$value[9]" name="radiofoil9">
1.7       albertel   72: <startouttext /><parse>&EXT('resource.0.text9')</parse><endouttext />
1.1       www        73: </foil>
                     74: <foil location="$position[10]" value="$value[10]" name="radiofoil10">
1.7       albertel   75: <startouttext /><parse>&EXT('resource.0.text10')</parse><endouttext />
1.1       www        76: </foil>
1.3       www        77: </foilgroup>
1.1       www        78: <hintgroup>
1.7       albertel   79: <startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext />
1.1       www        80: </hintgroup>
                     81: </radiobuttonresponse>
1.6       www        82: </part>
1.1       www        83: 
1.6       www        84: <part id="option"> 
1.8       albertel   85: <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
1.3       www        86: <optionresponse max="$max" id="optionsegment" randomize="$randomize">
1.1       www        87: <foilgroup options="$options">
                     88: <foil location="$position[1]" value="$value[1]" name="optionfoil1">
1.7       albertel   89: <startouttext /><parse>&EXT('resource.0.text1')</parse><endouttext />
1.1       www        90: </foil>
                     91: <foil location="$position[2]" value="$value[2]" name="optionfoil2">
1.7       albertel   92: <startouttext /><parse>&EXT('resource.0.text2')</parse><endouttext />
1.1       www        93: </foil>
                     94: <foil location="$position[3]" value="$value[3]" name="optionfoil3">
1.7       albertel   95: <startouttext /><parse>&EXT('resource.0.text3')</parse><endouttext />
1.1       www        96: </foil>
                     97: <foil location="$position[4]" value="$value[4]" name="optionfoil4">
1.7       albertel   98: <startouttext /><parse>&EXT('resource.0.text4')</parse><endouttext />
1.1       www        99: </foil>
                    100: <foil location="$position[5]" value="$value[5]" name="optionfoil5">
1.7       albertel  101: <startouttext /><parse>&EXT('resource.0.text5')</parse><endouttext />
1.1       www       102: </foil>
                    103: <foil location="$position[6]" value="$value[6]" name="optionfoil6">
1.7       albertel  104: <startouttext /><parse>&EXT('resource.0.text6')</parse><endouttext />
1.1       www       105: </foil>
                    106: <foil location="$position[7]" value="$value[7]" name="optionfoil7">
1.7       albertel  107: <startouttext /><parse>&EXT('resource.0.text7')</parse><endouttext />
1.1       www       108: </foil>
                    109: <foil location="$position[8]" value="$value[8]" name="optionfoil8">
1.7       albertel  110: <startouttext /><parse>&EXT('resource.0.text8')</parse><endouttext />
1.1       www       111: </foil>
                    112: <foil location="$position[9]" value="$value[9]" name="optionfoil9">
1.7       albertel  113: <startouttext /><parse>&EXT('resource.0.text9')</parse><endouttext />
1.1       www       114: </foil>
                    115: <foil location="$position[10]" value="$value[10]" name="optionfoil10">
1.7       albertel  116: <startouttext /><parse>&EXT('resource.0.text10')</parse><endouttext />
1.1       www       117: </foil>
1.3       www       118: </foilgroup>
1.1       www       119: <hintgroup>
1.7       albertel  120: <startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext />
1.1       www       121: </hintgroup>
                    122: </optionresponse>
1.6       www       123: </part>
1.4       www       124: 
1.6       www       125: <part id="essay"> 
1.8       albertel  126: <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
1.4       www       127: <essayresponse id="essaysegment">
                    128: <textfield></textfield>
                    129: </essayresponse>
1.6       www       130: </part>
1.4       www       131: 
1.6       www       132: <part id="string"> 
1.8       albertel  133: <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
1.4       www       134: <stringresponse id="stringsegment" answer="$stringanswer" type="$stringtype">
                    135: <textline>
                    136: </textline>
                    137: <hintgroup>
1.7       albertel  138: <startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext />
1.4       www       139: </hintgroup>
                    140: </stringresponse>
1.6       www       141: </part>
                    142: 
1.9     ! www       143: <part id="numerical">
        !           144: <script type="loncapa/perl">
        !           145: $numericalscript
        !           146: </script>
        !           147: <startouttext /><parse>&EXT('resource.0.questiontext')</parse><br /><endouttext />
        !           148: <numericalresponse id="numericalsegment" answer="$numericalanswer" unit="$numericalunit" format="$numericalformat">
        !           149: <responseparam type="tolerance" default="$numericaltolerance" name="tol" description="Numerical Tolerance" />
        !           150: <responseparam name="sig" type="int_range,0-16" default="$numericalsigfigs" description="Significant Figures" />
        !           151: <textline>
        !           152: </textline>
        !           153: <hintgroup>
        !           154: <startouttext /><parse>&EXT('resource.0.hinttext')</parse><endouttext />
        !           155: </hintgroup>
        !           156: </numericalresponse>
        !           157: </part>
        !           158: 
1.4       www       159: </block>
1.1       www       160: 
                    161: </problem>

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