Diff for /loncom/interface/lonindexer.pm between versions 1.17 and 1.22

version 1.17, 2001/08/13 14:50:35 version 1.22, 2001/11/01 15:59:11
Line 14 Line 14
 # 5/31,6/1,6/2,6/15 Scott Harrison  # 5/31,6/1,6/2,6/15 Scott Harrison
 # 6/26,7/8 H. K. Ng  # 6/26,7/8 H. K. Ng
 # 8/6,8/7,8/10 Scott Harrison  # 8/6,8/7,8/10 Scott Harrison
   # 8/14 H. K. Ng
   # 8/28,10/15 Scott Harrison
   
 package Apache::lonindexer;  package Apache::lonindexer;
   
Line 51  sub handler { Line 53  sub handler {
     return OK if $r->header_only;      return OK if $r->header_only;
     $fnum=0;      $fnum=0;
     $dnum=0;      $dnum=0;
       untie %hash;
   
 # --------------------------------------------- machine configuration variables  # --------------------------------------------- machine configuration variables
     my $iconpath= $r->dir_config('lonIconsURL') . "/";      my $iconpath= $r->dir_config('lonIconsURL') . "/";
Line 128  function select_data(title,url) { Line 131  function select_data(title,url) {
     self.close();      self.close();
 }  }
 function select_group() {  function select_group() {
     window.location="/adm/groupsort?acts="+document.forms.fileattr.acts.value;      window.location="/adm/groupsort?catalogmode=groupimport&acts="+document.forms.fileattr.acts.value;
 }  }
 function changeTitle(val) {  function changeTitle(val) {
     if (opener.inf.document.forms.resinfo.elements.t) {      if (opener.inf.document.forms.resinfo.elements.t) {
Line 169  END Line 172  END
 <head>  <head>
 <title>The LearningOnline Network With CAPA Directory Browser</title>  <title>The LearningOnline Network With CAPA Directory Browser</title>
   
 <script language="javascript">  <script type="text/javascript">
 $catalogmodefunctions  $catalogmodefunctions
 function openWindow(url, wdwName, w, h, toolbar,scrollbar) {  function openWindow(url, wdwName, w, h, toolbar,scrollbar) {
     var options = "width=" + w + ",height=" + h + ",";      var options = "width=" + w + ",height=" + h + ",";
Line 234  ENDHEADER Line 237  ENDHEADER
   'Network Directory Browser</font></h2>'."\n");    'Network Directory Browser</font></h2>'."\n");
 # get state of file attributes to be showing  # get state of file attributes to be showing
  if ($ENV{'form.attrs'} ne "") {   if ($ENV{'form.attrs'} ne "") {
     for (my $i=0; $i<=5; $i++) {      for (my $i=0; $i<=6; $i++) {
  delete $hash{'display_attrs_'.$i};   delete $hash{'display_attrs_'.$i};
  if ($ENV{'form.attr'.$i} == 1) {   if ($ENV{'form.attr'.$i} == 1) {
     $attrchk[$i] = "checked";      $attrchk[$i] = "checked";
Line 242  ENDHEADER Line 245  ENDHEADER
  }   }
     }      }
  } else {   } else {
     for (my $i=0; $i<=5; $i++) {      for (my $i=0; $i<=6; $i++) {
  $attrchk[$i] = "checked" if $hash{'display_attrs_'.$i} == 1;   $attrchk[$i] = "checked" if $hash{'display_attrs_'.$i} == 1;
     }      }
  }   }
Line 253  ENDHEADER Line 256  ENDHEADER
  enctype="application/x-www-form-urlencoded">   enctype="application/x-www-form-urlencoded">
 <table border=0><tr>  <table border=0><tr>
 <td><input type="checkbox" name="attr0" value="1" $attrchk[0] /> Size</td>  <td><input type="checkbox" name="attr0" value="1" $attrchk[0] /> Size</td>
 <td><input type="checkbox" name="attr1" value="1" $attrchk[1] /> Last  <td><input type="checkbox" name="attr1" value="1" $attrchk[1] /> Last access</td>
  access</td>  <td><input type="checkbox" name="attr2" value="1" $attrchk[2] /> Last modified</td>
 <td><input type="checkbox" name="attr2" value="1" $attrchk[2] /> Last  <td><input type="checkbox" name="attr6" value="1" $attrchk[6] /> All versions</td>
  modified</td>  
 </tr><tr>  </tr><tr>
 <td><input type="checkbox" name="attr3" value="1" $attrchk[3] /> Author</td>  <td><input type="checkbox" name="attr3" value="1" $attrchk[3] /> Author</td>
 <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> Keywords</td>  <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> Keywords</td>
 <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> Language</td>  <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> Language</td>
   <td>&nbsp;</td>
 </tr></table>  </tr></table>
 <input type="hidden" name="dirPointer" value="on" />  <input type="hidden" name="dirPointer" value="on" />
 <input type="hidden" name="acts" value="" />  <input type="hidden" name="acts" value="" />
Line 373  sub scanDir { Line 376  sub scanDir {
     foreach my $line (@list) {      foreach my $line (@list) {
  my ($strip,$dom,$foo,$testdir,$foo)=split(/\&/,$line,5);    my ($strip,$dom,$foo,$testdir,$foo)=split(/\&/,$line,5); 
  next if $strip =~ /.*\.meta$/;   next if $strip =~ /.*\.meta$/;
    my (@fileparts) = split(/\./,$strip);
    if ($hash{'display_attrs_6'} != 1) {
       if (scalar(@fileparts) >= 3) {
    my $fext = pop @fileparts;
    my $ov = pop @fileparts;
    my $fname = join ('.',@fileparts,$fext);
    next if (grep /$fname/,@list and $ov =~ /\d+/);
       }
    }
   
  if ($dom eq "domain") {   if ($dom eq "domain") {
     $compuri = join('',$strip,"/");  # dom list has /res/<domain name>      $compuri = join('',$strip,"/");  # dom list has /res/<domain name>
     $curdir = $compuri;      $curdir = $compuri;

Removed from v.1.17  
changed lines
  Added in v.1.22


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