Diff for /loncom/homework/radiobuttonresponse.pm between versions 1.15 and 1.17

version 1.15, 2001/04/23 17:15:13 version 1.17, 2001/05/04 21:19:37
Line 26  sub end_radiobuttonresponse { Line 26  sub end_radiobuttonresponse {
 sub start_foilgroup {  sub start_foilgroup {
   %Apache::response::foilgroup={};    %Apache::response::foilgroup={};
   $Apache::optionresponse::conceptgroup=0;    $Apache::optionresponse::conceptgroup=0;
   &setrandomnumber();    &Apache::response::setrandomnumber();
   return '';  
 }  
   
 sub setrandomnumber {  
   my $rndseed=&Apache::lonnet::rndseed();  
   $rndseed=unpack("%32i",$rndseed);  
   $rndseed=$rndseed  
     +&Apache::lonnet::numval($Apache::inputtags::part)  
       +&Apache::lonnet::numval($Apache::inputtags::response['-1']);  
   srand($rndseed);  
   return '';    return '';
 }  }
   
Line 129  sub displayallfoils { Line 119  sub displayallfoils {
   foreach my $name (@names) {    foreach my $name (@names) {
     if ($Apache::response::foilgroup{$name.'.value'} ne 'unused') {      if ($Apache::response::foilgroup{$name.'.value'} ne 'unused') {
       $result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" ";        $result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" ";
       if ($lastresponse == $temp) { $result .= 'checked="on"'; }        if ($lastresponse eq $temp) { $result .= 'checked="on"'; }
       $result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n";        $result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n";
       $temp++;        $temp++;
     }      }
Line 185  sub displayfoils { Line 175  sub displayfoils {
     my $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};      my $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};
     foreach $name (@whichfalse) {      foreach $name (@whichfalse) {
        $result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" ";         $result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" ";
       if ($lastresponse == $temp) { $result .= 'checked="on"'; }        if ($lastresponse eq $temp) { $result .= 'checked="on"'; }
       $result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n";        $result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n";
       $temp++;        $temp++;
     }      }

Removed from v.1.15  
changed lines
  Added in v.1.17


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