Annotation of loncom/homework/templates/randomvalueradio.problem, revision 1.1
1.1 ! www 1: <problem>
! 2:
! 3: <parameter name="maxtries" id="11" type="int_pos" default="2" description="Maximum Number of Tries" />
! 4: <script type="loncapa/perl">$idx=&random(0,3,1);
! 5: $city=('Berlin','New York','Sao Paulo','Canberra')[$idx];
! 6: $southern=('false','false','true','true')[$idx];
! 7: $northern=('true','true','false','false')[$idx];
! 8: $europe=('true','false','false','false')[$idx];
! 9: $australia=('false','false','false','true')[$idx];
! 10: if ($idx==2) { $anothercontinent='Asia'; } else { $anothercontinent='South America'; }</script>
! 11:
! 12: <startouttext />
! 13: Which one of the following statements is true for $city?
! 14: <endouttext />
! 15:
! 16: <radiobuttonresponse direction="vertical" max="3" id="12" randomize="yes">
! 17: <foilgroup>
! 18: <foil location="random" value="$europe" name="foil1">
! 19: <startouttext />In Europe<endouttext />
! 20: </foil>
! 21: <foil location="random" value="$australia" name="foil2">
! 22: <startouttext />In Australia<endouttext />
! 23: </foil>
! 24: <foil location="random" value="false" name="foil3">
! 25: <startouttext />In $anothercontinent<endouttext />
! 26: </foil>
! 27: <foil location="random" value="$southern" name="foil4">
! 28: <startouttext />In the Southern Hemisphere<endouttext />
! 29: </foil>
! 30: <foil location="random" value="$northern" name="foil5">
! 31: <startouttext />In the Northern Hemisphere<endouttext />
! 32: </foil>
! 33: <foil location="bottom" value="true" name="foil6">
! 34: <startouttext />None of the above<endouttext />
! 35: </foil>
! 36: </foilgroup>
! 37: </radiobuttonresponse>
! 38: </problem>
! 39:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>