Diff for /loncom/homework/structuretags.pm between versions 1.221 and 1.222

version 1.221, 2003/11/03 21:47:21 version 1.222, 2003/11/04 14:46:28
Line 459  sub start_problem { Line 459  sub start_problem {
     my $weight = &Apache::lonnet::EXT("resource.$id.weight");      my $weight = &Apache::lonnet::EXT("resource.$id.weight");
     my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'keys');      my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'keys');
     my @allkeys = split /,/,$allkeys;      my @allkeys = split /,/,$allkeys;
     my $allow_print_points = 0;      my $allow_print_points = 1;
     foreach my $partial_key (@allkeys) {      foreach my $partial_key (@allkeys) {
  if ($partial_key=~m/weight/) {   if ($partial_key=~m/\_(\d*)\_weight/) {
     $allow_print_points++;      if ($1 ne '0') {$allow_print_points=0;}
  }   }
     }      }
     my $duedate = &Apache::lonnet::EXT("resource.$id.duedate");       my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); 
Line 980  sub start_part { Line 980  sub start_part {
  $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';   $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
     }      }
     my $weight = &Apache::lonnet::EXT("resource.$id.weight");      my $weight = &Apache::lonnet::EXT("resource.$id.weight");
     if ($Apache::lonhomework::type eq 'exam') { $result .= '\fbox{\textit{'.$weight.' pt}}';}      my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'keys');
       my @allkeys = split /,/,$allkeys;
       my $allow_print_points = 0;
       foreach my $partial_key (@allkeys) {
    if ($partial_key=~m/\_(\d*)\_weight/) {
       if ($1 ne '0') {$allow_print_points=1;}
    }
       }
       if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}
  }   }
     }      }
  }   }

Removed from v.1.221  
changed lines
  Added in v.1.222


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