Diff for /loncom/interface/lonindexer.pm between versions 1.111 and 1.112

version 1.111, 2004/06/16 23:39:01 version 1.112, 2004/06/17 01:44:34
Line 53  use Apache::lonmeta; Line 53  use Apache::lonmeta;
 use Apache::File;  use Apache::File;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonsource();  use Apache::lonsource();
 use LONCAPA::lonmetadata();  
 use GDBM_File;  use GDBM_File;
   
 # ---------------------------------------- variables used throughout the module  # ---------------------------------------- variables used throughout the module
Line 675  sub get_list { Line 674  sub get_list {
 # is really a directory  # is really a directory
  @list = &Apache::lonnet::dirlist($uri);   @list = &Apache::lonnet::dirlist($uri);
  $hash{'dirlist_files_'.$luri} = join("\n",@list);   $hash{'dirlist_files_'.$luri} = join("\n",@list);
    &dynmetaread($uri);
     }      }
     return @list=&match_ext($r,@list);      return @list=&match_ext($r,@list);
 }  }
   
   sub dynmetaread {
       my $uri=shift;
       if (($hash{'display_attrs_8'}==1) || ($hash{'display_attrs_11'}==1)) {
    %dynhash=
       (%dynhash,&Apache::lonmeta::get_dynamic_metadata_from_sql($uri));
    &Apache::lonnet::logthis('Found: '.$uri." : ".join(',',keys %dynhash));
       } 
   }
   
 sub initdebug {  sub initdebug {
     return <<ENDJS;      return <<ENDJS;
 <script>  <script>
Line 795  sub display_line { Line 804  sub display_line {
     if($filecom[15] ne '1') { return OK if (!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])); }      if($filecom[15] ne '1') { return OK if (!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])); }
   
 # make absolute links appear on different background  # make absolute links appear on different background
     if ($absolute) { $fileclr='#aaaa88'; }      if ($absolute) { $fileclr='#ccdd99'; }
   
 # display domain  # display domain
     if ($filecom[1] eq 'domain') {      if ($filecom[1] eq 'domain') {
Line 1007  sub display_line { Line 1016  sub display_line {
         }          }
  if ($hash{'display_attrs_8'} == 1) {   if ($hash{'display_attrs_8'} == 1) {
 # statistics  # statistics
     $r->print("<td>&nbsp;</td>\n");      $r->print("<td>");
       if ($dynhash{$filelink}->{'stdno'}) {
    $r->print(&mt('Number of students: ').
     $dynhash{$filelink}->{'stdno'}.'<br />');
       }
       $r->print("&nbsp;</td>\n");
   
  }   }
  if ($hash{'display_attrs_10'} == 1) {   if ($hash{'display_attrs_10'} == 1) {
Line 1023  sub display_line { Line 1037  sub display_line {
  }   }
  if ($hash{'display_attrs_11'} == 1) {   if ($hash{'display_attrs_11'} == 1) {
 # links  # links
     $r->print("<td>&nbsp;</td>\n");      $r->print("<td>$filelink");
       if ($dynhash{$filelink}->{'goto_list'}) {
    $r->print(&mt('Number of students: ').
     $dynhash{$filelink}->{'goto_list'}.'<br />');
       }
       if ($dynhash{$filelink}->{'comefrom_list'}) {
    $r->print(&mt('Number of students: ').
     $dynhash{$filelink}->{'comefrom_list'}.'<br />');
       }
       $r->print("&nbsp;</td>\n");
  }   }
  $r->print("</tr>\n");   $r->print("</tr>\n");
     }      }

Removed from v.1.111  
changed lines
  Added in v.1.112


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