Diff for /loncom/homework/radiobuttonresponse.pm between versions 1.18 and 1.19

version 1.18, 2001/05/31 22:34:33 version 1.19, 2001/06/01 16:00:42
Line 49  sub end_foilgroup { Line 49  sub end_foilgroup {
       
   my $result;    my $result;
   if ($target ne 'meta') {    if ($target ne 'meta') {
     my $rrargs ='';      my $style = &Apache::lonxml::get_param('style',$parstack,$safeeval,'-2');
     if ( $#$parstack > 0 ) { $rrargs=$$parstack['-2']; }  
     my $style = &Apache::run::run("{$rrargs;".'return $style}',$safeeval);  
     if ( $style eq 'survey' ) {      if ( $style eq 'survey' ) {
       if ($target eq 'web') {        if ($target eq 'web') {
  $result=&displayallfoils();   $result=&displayallfoils();
Line 90  sub end_foilgroup { Line 88  sub end_foilgroup {
   
 sub getfoilcounts {  sub getfoilcounts {
   my ($parstack,$safeeval)=@_;    my ($parstack,$safeeval)=@_;
   my $rrargs ='';    my $max = &Apache::lonxml::get_param('max',$parstack,$safeeval,'-2');
   if ( $#$parstack > 0 ) { $rrargs=$$parstack['-2']; }  
   my $max = &Apache::run::run("{$rrargs;".'return $max}',$safeeval);  
   my @names = @{ $Apache::response::foilgroup{'names'} };    my @names = @{ $Apache::response::foilgroup{'names'} };
   my $truecnt=0;    my $truecnt=0;
   my $falsecnt=0;    my $falsecnt=0;
Line 200  sub end_conceptgroup { Line 196  sub end_conceptgroup {
     push @{ $Apache::response::foilgroup{'names'} }, $name;      push @{ $Apache::response::foilgroup{'names'} }, $name;
     $Apache::response::foilgroup{"$name.text"} =  $Apache::response::conceptgroup{"$name.text"};      $Apache::response::foilgroup{"$name.text"} =  $Apache::response::conceptgroup{"$name.text"};
     $Apache::response::foilgroup{"$name.value"} = $Apache::response::conceptgroup{"$name.value"};      $Apache::response::foilgroup{"$name.value"} = $Apache::response::conceptgroup{"$name.value"};
     my $args;      my $concept = &Apache::lonxml::get_param('concept',$parstack,$safeeval);
     if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }  
     my $concept = &Apache::run::run("{$args;".'return $concept}',$safeeval);  
     $Apache::response::foilgroup{"$name.concept"} = $concept;      $Apache::response::foilgroup{"$name.concept"} = $concept;
     &Apache::lonxml::debug("Selecting $name in $concept");      &Apache::lonxml::debug("Selecting $name in $concept");
   }    }
Line 219  sub end_foil { Line 213  sub end_foil {
   my $text='';    my $text='';
   if ($target eq 'web') { $text=&Apache::lonxml::endredirection; }    if ($target eq 'web') { $text=&Apache::lonxml::endredirection; }
   if ($target eq 'web' || $target eq 'grade') {    if ($target eq 'web' || $target eq 'grade') {
     my $args ='';      my $value = &Apache::lonxml::get_param('value',$parstack,$safeeval);
     if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }  
     my $value = &Apache::run::run("{$args;".'return $value}',$safeeval);  
     if ($value ne 'unused') {      if ($value ne 'unused') {
       my $name = &Apache::run::run("{$args;".'return $name}',$safeeval);        my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
       if ( $Apache::radiobuttonresponse::conceptgroup ) {        if ( $Apache::radiobuttonresponse::conceptgroup ) {
  push @{ $Apache::response::conceptgroup{'names'} }, $name;   push @{ $Apache::response::conceptgroup{'names'} }, $name;
  $Apache::response::conceptgroup{"$name.value"} = $value;   $Apache::response::conceptgroup{"$name.value"} = $value;

Removed from v.1.18  
changed lines
  Added in v.1.19


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