Diff for /loncom/interface/statistics/lonstathelpers.pm between versions 1.42 and 1.45

version 1.42, 2005/03/03 17:55:06 version 1.45, 2005/03/21 19:47:54
Line 81  sub render_resource { Line 81  sub render_resource {
     my ($resource) = @_;      my ($resource) = @_;
     ##      ##
     ## Render the problem      ## Render the problem
     my $base;      my ($base) = ($resource->src =~ m|^(.*/)[^/]*$|);
     ($base,undef) = ($resource->{'src'} =~ m|(.*/)[^/]*$|);      $base="http://".$ENV{'SERVER_NAME'}.$base;
     $base = "http://".$ENV{'SERVER_NAME'}.$base;  
     my ($src,$symb)=($resource->src,&Apache::lonnet::escape($resource->symb));      my ($src,$symb)=($resource->src,&Apache::lonnet::escape($resource->symb));
     my $rendered_problem = &Apache::lonnet::ssi_body($src.'?symb='.$symb);      my $rendered_problem = &Apache::lonnet::ssi_body($src.'?symb='.$symb);
     $rendered_problem =~ s/<\s*form\s*/<nop /g;      $rendered_problem =~ s/<\s*form\s*/<nop /g;
Line 1282  sub get_time_limits { Line 1281  sub get_time_limits {
     return ($starttime,$endtime);      return ($starttime,$endtime);
 }  }
   
   
   
 ####################################################  
 ####################################################  
   
 =pod  
   
 =item sections_description   
   
 Inputs: @Sections, an array of sections  
   
 Returns: A text description of the sections selected.  
   
 =cut  
   
 ####################################################  
 ####################################################  
 sub sections_description {  
     my @Sections = @_;  
     my $sectionstring = '';  
     if (scalar(@Sections) > 1) {  
         if (scalar(@Sections) > 2) {  
             my $last = pop(@Sections);  
             $sectionstring = "Sections ".join(', ',@Sections).', and '.$last;  
         } else {  
             $sectionstring = "Sections ".join(' and ',@Sections);  
         }  
     } else {  
         if ($Sections[0] eq 'all') {  
             $sectionstring = "All sections";  
         } else {  
             $sectionstring = "Section ".$Sections[0];  
         }  
     }  
     return $sectionstring;  
 }  
   
 ####################################################  ####################################################
 ####################################################  ####################################################
   
Line 1341  sub manage_caches { Line 1303  sub manage_caches {
         join(',',          join(',',
              map {               map {
                      &Apache::lonnet::escape($_);                       &Apache::lonnet::escape($_);
                  } sort(@Apache::lonstatistics::SelectedSections)                   } sort(&Apache::lonstatistics::get_selected_sections())
              );               );
     my $statuskey = $Apache::lonstatistics::enrollment_status;      my $statuskey = $Apache::lonstatistics::enrollment_status;
     if (exists($ENV{'form.ClearCache'}) ||       if (exists($ENV{'form.ClearCache'}) || 

Removed from v.1.42  
changed lines
  Added in v.1.45


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