Diff for /loncom/interface/lonindexer.pm between versions 1.163 and 1.168

version 1.163, 2007/06/27 23:27:23 version 1.168, 2007/07/02 16:07:06
Line 128  sub handler { Line 128  sub handler {
     if ($env{'form.launch'} eq '1') {      if ($env{'form.launch'} eq '1') {
  &start_fresh_session(\%dbfile);   &start_fresh_session(\%dbfile);
     }      }
   
     while(my($key,$value)=each(%dbfile)) {      while(my($key,$value)=each(%dbfile)) {
  $hash{$key}=$value;   $hash{$key}=$value;
     }      }
Line 358  function checkAll() { Line 357  function checkAll() {
             var fieldName = document.forms[i].elements[j].name;              var fieldName = document.forms[i].elements[j].name;
             if (fieldName == 'filelink') {              if (fieldName == 'filelink') {
                 document.forms[i].elements[j].checked = true;                  document.forms[i].elements[j].checked = true;
                   queue(document.forms[i].name);
             }              }
         }          }
     }      }
Line 370  function uncheckAll() { Line 370  function uncheckAll() {
             var fieldName = document.forms[i].elements[j].name;              var fieldName = document.forms[i].elements[j].name;
             if (fieldName == 'filelink') {              if (fieldName == 'filelink') {
                 document.forms[i].elements[j].checked = false;                  document.forms[i].elements[j].checked = false;
                   queue(document.forms[i].name);
             }              }
         }          }
     }      }
Line 409  ENDHEADER Line 410  ENDHEADER
  $ac++;   $ac++;
     }      }
     # sorting through the actions and changing the global database hash      # sorting through the actions and changing the global database hash
     foreach (sort {$achash{$a}<=>$achash{$b}} (keys %ahash)) {      foreach my $key (sort {$achash{$a}<=>$achash{$b}} (keys %ahash)) {
  my $key=$_;  
  if ($ahash{$key} eq '1') {   if ($ahash{$key} eq '1') {
     $hash{'store_'.$hash{'pre_'.$key.'_link'}}=      $hash{'store_'.$hash{'pre_'.$key.'_link'}}=
  $hash{'pre_'.$key.'_title'};         $hash{'pre_'.$key.'_title'};
     $hash{'storectr_'.$hash{'pre_'.$key.'_link'}}=      $hash{'storectr_'.$hash{'pre_'.$key.'_link'}}=
  $hash{'storectr'}+0;   $hash{'storectr'}+0;
     $hash{'storectr'}++;      $hash{'storectr'}++;
Line 920  sub display_line { Line 920  sub display_line {
   
 # display file  # display file
     if (($fnptr == 0 and $filecom[3] ne '') or $absolute) {      if (($fnptr == 0 and $filecom[3] ne '') or $absolute) {
           my $title;
  my $filelink = $pathprefix.$filecom[0];   my $filelink = $pathprefix.$filecom[0];
    if ($hash{'display_attrs_0'} == 1) {
       $title = &Apache::lonnet::gettitle($filelink,'title');
    }
  my @file_ext = split (/\./,$listname);   my @file_ext = split (/\./,$listname);
  my $curfext = $file_ext[-1];   my $curfext = $file_ext[-1];
         if (@Omit) {          if (@Omit) {
Line 953  sub display_line { Line 957  sub display_line {
     $r->print(" />\n");      $r->print(" />\n");
     $r->print("</form></td><td nowrap='nowrap' valign='top'>");      $r->print("</form></td><td nowrap='nowrap' valign='top'>");
     $hash{"pre_${fnum}_link"}=$filelink;      $hash{"pre_${fnum}_link"}=$filelink;
       $hash{"pre_${fnum}_title"}=$title;
       if (!$hash{"pre_${fnum}_title"}) {
           $hash{"pre_${fnum}_title"} = 'Not_retrieved';
       }
      $fnum++;       $fnum++;
  }   }
 # Form to open or close sequences  # Form to open or close sequences
Line 1006  sub display_line { Line 1014  sub display_line {
  }   }
  $r->print("</td>\n");   $r->print("</td>\n");
  if ($hash{'display_attrs_0'} == 1) {   if ($hash{'display_attrs_0'} == 1) {
     my $title = &Apache::lonnet::gettitle($filelink,'title');  
     $r->print('<td> '.($title eq '' ? '&nbsp;' : $title).      $r->print('<td> '.($title eq '' ? '&nbsp;' : $title).
       ' </td>'."\n");        ' </td>'."\n");
  }   }

Removed from v.1.163  
changed lines
  Added in v.1.168


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