Diff for /loncom/homework/simpleproblem.problem between versions 1.3 and 1.6

version 1.3, 2003/07/09 06:23:20 version 1.6, 2003/11/04 16:44:50
Line 1 Line 1
 <problem>  <problem>
 <simpleeditbutton />  <simpleeditbutton />
 <script type="loncapa/perl">  <script type="loncapa/perl">
 $questiontype=&EXT('resource.0.questiontype');  $questiontype=&EXT('resource.0.hiddenparts');
 unless ($questiontype) { $questiontype='radio'; }  
 $max=&EXT('resource.0.maxfoils');  $max=&EXT('resource.0.maxfoils');
 unless ($max) { $max=10; }  unless ($max) { $max=10; }
 $randomize=&EXT('resource.0.randomize');  $randomize=&EXT('resource.0.randomize');
Line 15  for ($i=1;$i<=10;$i++) { Line 14  for ($i=1;$i<=10;$i++) {
     $position[$i]=&EXT('resource.0.position'.$i);      $position[$i]=&EXT('resource.0.position'.$i);
     unless ($position[$i]) { $position[$i]='random'; }      unless ($position[$i]) { $position[$i]='random'; }
 }  }
   $stringanswer=&EXT('resource.0.stringanswer');
   unless ($stringanswer) { $stringanswer=''; }
   $stringtype=&EXT('resource.0.stringtype');
   unless ($stringtype) { $stringtype='cs'; }
 </script>  </script>
   
 <startouttext />&EXT('resource.0.questiontext')<endouttext />  <block condition="!$questiontype"> 
   
 <block condition="&EXT('resource.0.questiontype') eq 'radio'">   <startouttext />
   <h1>Simple Problem Placeholder</h1>
   <endouttext />
   </block>
   
   <block condition="$questiontype"> 
   
   <startouttext />&EXT('resource.0.questiontext')<br /><endouttext />
   
   <part id="radio">
 <radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize">  <radiobuttonresponse max="$max" id="radiosegment" randomize="$randomize">
 <foilgroup>  <foilgroup>
 <foil location="$position[1]" value="$value[1]" name="radiofoil1">  <foil location="$position[1]" value="$value[1]" name="radiofoil1">
Line 57  for ($i=1;$i<=10;$i++) { Line 69  for ($i=1;$i<=10;$i++) {
 <startouttext />&EXT('resource.0.hinttext')<endouttext />  <startouttext />&EXT('resource.0.hinttext')<endouttext />
 </hintgroup>  </hintgroup>
 </radiobuttonresponse>  </radiobuttonresponse>
 </block>  </part>
   
 <block condition="&EXT('resource.0.questiontype') eq 'option'">   <part id="option"> 
 <optionresponse max="$max" id="optionsegment" randomize="$randomize">  <optionresponse max="$max" id="optionsegment" randomize="$randomize">
 <foilgroup options="$options">  <foilgroup options="$options">
 <foil location="$position[1]" value="$value[1]" name="optionfoil1">  <foil location="$position[1]" value="$value[1]" name="optionfoil1">
Line 97  for ($i=1;$i<=10;$i++) { Line 109  for ($i=1;$i<=10;$i++) {
 <startouttext />&EXT('resource.0.hinttext')<endouttext />  <startouttext />&EXT('resource.0.hinttext')<endouttext />
 </hintgroup>  </hintgroup>
 </optionresponse>  </optionresponse>
   </part>
   
   <part id="essay"> 
   <essayresponse id="essaysegment">
   <textfield></textfield>
   </essayresponse>
   </part>
   
   <part id="string"> 
   <stringresponse id="stringsegment" answer="$stringanswer" type="$stringtype">
   <textline>
   </textline>
   <hintgroup>
   <startouttext />&EXT('resource.0.hinttext')<endouttext />
   </hintgroup>
   </stringresponse>
   </part>
   
 </block>  </block>
   
 </problem>  </problem>

Removed from v.1.3  
changed lines
  Added in v.1.6


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