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