Annotation of loncom/homework/simpleproblem.problem, revision 1.3
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: <foil location="$position[7]" value="$value[7]" name="radiofoil7">
44: <startouttext />&EXT('resource.0.text7')<endouttext />
45: </foil>
46: <foil location="$position[8]" value="$value[8]" name="radiofoil8">
47: <startouttext />&EXT('resource.0.text8')<endouttext />
48: </foil>
49: <foil location="$position[9]" value="$value[9]" name="radiofoil9">
50: <startouttext />&EXT('resource.0.text9')<endouttext />
51: </foil>
52: <foil location="$position[10]" value="$value[10]" name="radiofoil10">
53: <startouttext />&EXT('resource.0.text10')<endouttext />
54: </foil>
1.3 ! www 55: </foilgroup>
1.1 www 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'">
1.3 ! www 63: <optionresponse max="$max" id="optionsegment" randomize="$randomize">
1.1 www 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: <foil location="$position[7]" value="$value[7]" name="optionfoil7">
84: <startouttext />&EXT('resource.0.text7')<endouttext />
85: </foil>
86: <foil location="$position[8]" value="$value[8]" name="optionfoil8">
87: <startouttext />&EXT('resource.0.text8')<endouttext />
88: </foil>
89: <foil location="$position[9]" value="$value[9]" name="optionfoil9">
90: <startouttext />&EXT('resource.0.text9')<endouttext />
91: </foil>
92: <foil location="$position[10]" value="$value[10]" name="optionfoil10">
93: <startouttext />&EXT('resource.0.text10')<endouttext />
94: </foil>
1.3 ! www 95: </foilgroup>
1.1 www 96: <hintgroup>
97: <startouttext />&EXT('resource.0.hinttext')<endouttext />
98: </hintgroup>
99: </optionresponse>
100: </block>
101:
102: </problem>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>