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

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

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