[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm

banghart lon-capa-cvs@mail.lon-capa.org
Tue, 21 Dec 2004 22:34:07 -0000


banghart		Tue Dec 21 17:34:07 2004 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  	Convert reported diskusage from bytes to kbytes.
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.68 loncom/interface/portfolio.pm:1.69
--- loncom/interface/portfolio.pm:1.68	Thu Dec 16 16:19:46 2004
+++ loncom/interface/portfolio.pm	Tue Dec 21 17:34:07 2004
@@ -437,7 +437,7 @@
         }
     }
     my $current_disk_usage = &Apache::lonnet::diskusage($ENV{'user.domain'}, $ENV{'user.name'},$portfolio_root);
-    if (($current_disk_usage + $filesize) > $disk_quota){
+    if ((($current_disk_usage/1000) + $filesize) > $disk_quota){
         $r->print('<font color="red">Unable to upload <strong>'.$fname.' (size = '.$filesize.' kilobytes</strong>. Disk quota will be exceeded.'.
                   '<br />Disk quota is '.$disk_quota.' kilobytes. Your current disk usage is '.$current_disk_usage.' kilobytes.');
     }