Diff for /loncom/homework/bridgetask.pm between versions 1.64 and 1.65

version 1.64, 2005/10/01 04:52:21 version 1.65, 2005/10/03 21:30:58
Line 1403  sub get_instance { Line 1403  sub get_instance {
     $dim_info.='<h3>Question : you did not pass this '.$mandatory.' question</h3>';      $dim_info.='<h3>Question : you did not pass this '.$mandatory.' question</h3>';
  }   }
  my $man_count=0;   my $man_count=0;
    my $man_passed=0;
  my $opt_count=0;   my $opt_count=0;
  my $opt_passed=0;   my $opt_passed=0;
  foreach my $id (@{$dimension{$instance.'.criterias'}}) {   foreach my $id (@{$dimension{$instance.'.criterias'}}) {
Line 1414  sub get_instance { Line 1415  sub get_instance {
  }   }
     } else {      } else {
  $man_count++;   $man_count++;
    if ($Apache::lonhomework::history{"resource.$version.$dim.$instance.$id.status"} eq 'pass') {
       $man_passed++;
    }
     }      }
  }   }
    if ($man_passed eq $man_count) { $man_passed='all'; }
  my $opt_req=&Apache::lonxml::get_param('OptionalRequired',   my $opt_req=&Apache::lonxml::get_param('OptionalRequired',
        $parstack,$safeeval);         $parstack,$safeeval);
  if ($opt_req !~ /\S/) { $opt_req='0'; }   if ($opt_req !~ /\S/) { $opt_req='0'; }
  $dim_info.="\n<p>".&mt('You passed all of the mandatory components and [_1] of the [_2] optional components, of which you were required to pass [_3].',$opt_passed,$opt_count,$opt_req)."</p>\n</div>";   $dim_info.="\n<p>".&mt('You passed [_1] of the [_2] mandatory components and [_3] of the [_4] optional components, of which you were required to pass [_5].',$man_passed,$man_count,$opt_passed,$opt_count,$opt_req)."</p>\n</div>";
   
  my $internal_location=&internal_location($dim);   my $internal_location=&internal_location($dim);
  $result=~s/\Q$internal_location\E/$dim_info/;   $result=~s/\Q$internal_location\E/$dim_info/;

Removed from v.1.64  
changed lines
  Added in v.1.65


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