Diff for /loncom/homework/radiobuttonresponse.pm between versions 1.121 and 1.122

version 1.121, 2007/06/29 12:49:10 version 1.122, 2007/06/29 17:24:03
Line 232  sub end_foilgroup { Line 232  sub end_foilgroup {
  '-2');   '-2');
     my $randomize = &Apache::lonxml::get_param('randomize',$parstack,      my $randomize = &Apache::lonxml::get_param('randomize',$parstack,
        $safeeval,'-2');         $safeeval,'-2');
     my @shown = &whichfoils($max,$randomize);      my ($answer,@shown) = &whichfoils($max,$randomize);
     $answer_count = scalar(@shown);      $answer_count = scalar(@shown);
   
     if ($target eq 'web' || $target eq 'tex') {      if ($target eq 'web' || $target eq 'tex') {
Line 378  sub displayallfoils { Line 378  sub displayallfoils {
     return $result;      return $result;
 }  }
   
   =pod
   
   =item &whichfoils($max,$randomize)
   
   Randomizes the list of foils.
   Respects
     - each foils desire to be randomized
     - the existance of Concept groups of foils (select 1 foil from each)
     - and selects a single correct statement from all possilble true statments
     - and limits it to a toal of $max foils
   
   Arguments
     $max - maximum number of foils to select (including the true one)
            (so a max of 5 is: 1 true, 4 false)
   
     $randomize - whether to randomize the listing of foils, by default
                  will randomize, only if randomize is 'no' will it not
   
   Returns
     $answer - location in the array of the correct answer
     @foils  - array of foil names in to display order
   
   =cut
   
 sub whichfoils {  sub whichfoils {
     my ($max,$randomize)=@_;      my ($max,$randomize)=@_;
   

Removed from v.1.121  
changed lines
  Added in v.1.122


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