Diff for /loncom/homework/functionplotresponse.pm between versions 1.94 and 1.95

version 1.94, 2012/02/29 01:24:47 version 1.95, 2012/02/29 01:46:52
Line 551  sub start_plotvector { Line 551  sub start_plotvector {
    $label=~s/\W//gs;     $label=~s/\W//gs;
    $label=ucfirst($label);     $label=ucfirst($label);
    unless ($label) { $label="NewVector"; }     unless ($label) { $label="NewVector"; }
      if ($Apache::functionplotresponse::vectorlabels{$label}) {
          &Apache::lonxml::warning(&mt('Vector labels must be unique: [_1]',$label));
      }
      $Apache::functionplotresponse::vectorlabels{$label}=1;
    if ($target eq 'web') {     if ($target eq 'web') {
       my ($xmin,$xmax,$ymin,$ymax)=&boundaries($parstack,$safeeval,-3);        my ($xmin,$xmax,$ymin,$ymax)=&boundaries($parstack,$safeeval,-3);
       unless (defined($tailx)) { $tailx=$xmin; }        unless (defined($tailx)) { $tailx=$xmin; }
Line 621  sub start_drawvectorsum { Line 625  sub start_drawvectorsum {
                 $thisvector=~s/\W//gs;                  $thisvector=~s/\W//gs;
                 $thisvector=ucfirst($thisvector);                  $thisvector=ucfirst($thisvector);
                 unless ($thisvector) { next; }                  unless ($thisvector) { next; }
                   unless ($Apache::functionplotresponse::vectorlabels{$thisvector}) {
                       &Apache::lonxml::warning(&mt('Vectors must be defined before using them for drawing vector sums: [_1]',$thisvector));
                       next;
                   }
                 my $vectorx=$thisvector.'X';                  my $vectorx=$thisvector.'X';
                 my $vectory=$thisvector.'Y';                  my $vectory=$thisvector.'Y';
                 $result.=(<<ENDADDVEC);                  $result.=(<<ENDADDVEC);
Line 1304  sub start_functionplotresponse { Line 1312  sub start_functionplotresponse {
   undef %Apache::functionplotresponse::previous;    undef %Apache::functionplotresponse::previous;
   $Apache::functionplotresponse::inputfields='';    $Apache::functionplotresponse::inputfields='';
   $Apache::functionplotresponse::counter=0;    $Apache::functionplotresponse::counter=0;
   # Remember vectors
     undef %Apache::functionplotresponse::vectorlabels;
 # Remember rules  # Remember rules
   undef @Apache::functionplotresponse::functionplotrules;    undef @Apache::functionplotresponse::functionplotrules;
   undef @Apache::functionplotresponse::functionplotvectorrules;    undef @Apache::functionplotresponse::functionplotvectorrules;

Removed from v.1.94  
changed lines
  Added in v.1.95


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