Diff for /loncom/homework/radiobuttonresponse.pm between versions 1.99 and 1.101

version 1.99, 2005/01/31 22:00:40 version 1.101, 2005/06/21 21:00:55
Line 30  package Apache::radiobuttonresponse; Line 30  package Apache::radiobuttonresponse;
 use strict;  use strict;
 use HTML::Entities();  use HTML::Entities();
 use Apache::lonlocal;  use Apache::lonlocal;
   use Apache::lonnet;
   
 BEGIN {  BEGIN {
     &Apache::lonxml::register('Apache::radiobuttonresponse',('radiobuttonresponse'));      &Apache::lonxml::register('Apache::radiobuttonresponse',('radiobuttonresponse'));
Line 115  sub start_foilgroup { Line 116  sub start_foilgroup {
   
 sub storesurvey {  sub storesurvey {
     if ( !&Apache::response::submitted() ) { return ''; }      if ( !&Apache::response::submitted() ) { return ''; }
     my $response = $ENV{'form.HWVAL_'.$Apache::inputtags::response['-1']};      my $response = $env{'form.HWVAL_'.$Apache::inputtags::response['-1']};
     &Apache::lonxml::debug("Here I am!:$response:");      &Apache::lonxml::debug("Here I am!:$response:");
     if ( $response !~ /[0-9]+/) { return ''; }      if ( $response !~ /[0-9]+/) { return ''; }
     my $part = $Apache::inputtags::part;      my $part = $Apache::inputtags::part;
Line 139  sub grade_response { Line 140  sub grade_response {
     my ($answer,@whichfoils)=&whichfoils($max,$randomize);      my ($answer,@whichfoils)=&whichfoils($max,$randomize);
     if ( !&Apache::response::submitted() ) { return; }      if ( !&Apache::response::submitted() ) { return; }
     my $response;      my $response;
     if ($ENV{'form.submitted'} eq 'scantron') {      if ($env{'form.submitted'} eq 'scantron') {
  $response=&Apache::response::getresponse();   $response=&Apache::response::getresponse();
     } else {      } else {
  $response = $ENV{'form.HWVAL_'.$Apache::inputtags::response['-1']};   $response = $env{'form.HWVAL_'.$Apache::inputtags::response['-1']};
     }      }
     if ( $response !~ /[0-9]+/) { return; }      if ( $response !~ /[0-9]+/) { return; }
     my $part=$Apache::inputtags::part;      my $part=$Apache::inputtags::part;
Line 607  sub end_foil { Line 608  sub end_foil {
  if ($value ne 'unused') {   if ($value ne 'unused') {
     my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);      my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
     if (!$name) {      if (!$name) {
  &Apache::lonxml::error("Foils without names exist. This can cause problems to malfunction.");   &Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction.");
  $name=$Apache::lonxml::curdepth;   $name=$Apache::lonxml::curdepth;
     }      }
     if (defined($Apache::response::foilnames{$name})) {      if (defined($Apache::response::foilnames{$name})) {

Removed from v.1.99  
changed lines
  Added in v.1.101


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