Diff for /loncom/interface/portfolio.pm between versions 1.65 and 1.67

version 1.65, 2004/12/12 01:35:44 version 1.67, 2004/12/14 19:17:54
Line 249  sub display_file { Line 249  sub display_file {
         $display_file_text = '<tt>'.$path.$filename.'</tt>';          $display_file_text = '<tt>'.$path.$filename.'</tt>';
     } elsif (ref($filename) eq "ARRAY") {      } elsif (ref($filename) eq "ARRAY") {
         foreach (@$filename) {          foreach (@$filename) {
             $display_file_text .= '<tt>'.$path.$_.'</tt>';              $display_file_text .= '<tt>'.$path.$_.'</tt><br />';
         }          }
     } elsif (ref($filename) eq "SCALAR") {      } elsif (ref($filename) eq "SCALAR") {
         $display_file_text = '<tt>'.$path.$filename.'</tt>';                  $display_file_text = '<tt>'.$path.$filename.'</tt>';        
Line 270  sub delete { Line 270  sub delete {
     my @check;      my @check;
     my $file_name = $ENV{'form.currentpath'}.$ENV{'form.selectfile'};      my $file_name = $ENV{'form.currentpath'}.$ENV{'form.selectfile'};
     my @files=&Apache::loncommon::get_env_multiple('form.selectfile');      my @files=&Apache::loncommon::get_env_multiple('form.selectfile');
   
     if (&Apache::lonnet::is_locked($file_name,$ENV{'user.domain'},$ENV{'user.name'} ) eq 'true') {      if (&Apache::lonnet::is_locked($file_name,$ENV{'user.domain'},$ENV{'user.name'} ) eq 'true') {
         $r->print ("The file is locked and cannot be deleted.<br />");          $r->print ("The file is locked and cannot be deleted.<br />");
         $r->print(&done());          $r->print(&done());
     } else {      } else {
         &open_form($r);          if (scalar(@files)) {
         $r->print('<p>'.&mt('Delete').' '.&display_file(undef,\@files).'?</p>');              &open_form($r);
         &close_form($r);              $r->print('<p>'.&mt('Delete').' '.&display_file(undef,\@files).'?</p>');
               &close_form($r);
           } else {
               $r->print("No file was checked to delete.<br />");
               $r->print(&done());
           }
     }      }
 }   } 
   
Line 366  sub rename_confirmed { Line 372  sub rename_confirmed {
   ') while trying to rename '.&display_file().' to '.    ') while trying to rename '.&display_file().' to '.
   &display_file(undef,$filenewname).'</font><br />');    &display_file(undef,$filenewname).'</font><br />');
     }      }
       if ($filenewname ne $ENV{'form.filenewname'}) {
           $r->print("The new file name was changed from:<br /><strong>".$ENV{'form.filenewname'}."</strong> to <strong>$filenewname </strong>");
       }
     $r->print(&done());      $r->print(&done());
 }  }
 sub select_files {  sub select_files {
Line 487  sub createdir { Line 496  sub createdir {
           ') while trying to create a new directory '.&display_file().'</font><br />');            ') while trying to create a new directory '.&display_file().'</font><br />');
         }          }
     }      }
       if ($newdir ne $ENV{'form.newdir'}) {
           $r->print("The new directory name was changed from:<br /><strong>".$ENV{'form.newdir'}."</strong> to <strong>$newdir </strong>");  
       }
     $r->print(&done());      $r->print(&done());
 }  }
   

Removed from v.1.65  
changed lines
  Added in v.1.67


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