--- loncom/cgi/quotacheck.pl 2014/03/17 02:37:13 1.1 +++ loncom/cgi/quotacheck.pl 2014/07/31 15:02:26 1.3 @@ -6,7 +6,7 @@ $|=1; # requested domain, or current server should belong to requested # domain. # -# $Id: quotacheck.pl,v 1.1 2014/03/17 02:37:13 raeburn Exp $ +# $Id: quotacheck.pl,v 1.3 2014/07/31 15:02:26 musolffc Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,6 +51,8 @@ if (ref($perlvar) eq 'HASH') { } undef($perlvar); +my $script = "/cgi-bin/quotacheck.pl"; + print &LONCAPA::loncgi::cgi_header('text/html',1); &main($lonhost); @@ -59,7 +61,7 @@ sub main { if ($lonhost eq '') { &Apache::lonlocal::get_language_handle(); &Apache::lonhtmlcommon::add_breadcrumb - ({href=>"/cgi-bin/quotacheck.pl", + ({href=>$script, text=>"Content disk usage"}); print(&Apache::loncommon::start_page('Course/Community disk usage and quotas'). &Apache::lonhtmlcommon::breadcrumbs('Course/Community status'). @@ -121,11 +123,11 @@ sub main { &Apache::lonlocal::get_language_handle(); &Apache::lonhtmlcommon::add_breadcrumb - ({href=>"/cgi-bin/quotacheck.pl?domain=$reqdom", + ({href=>$script."?domain=$reqdom", text=>"Content disk usage"}); if ($params{'gosearch'}) { &Apache::lonhtmlcommon::add_breadcrumb - ({href=>"/cgi-bin/quotacheck.pl?domain=$reqdom", + ({href=>$script."?domain=$reqdom", text=>"Result"}); } my $domdesc = &Apache::lonnet::domain($reqdom,'description'); @@ -158,7 +160,7 @@ sub main { $Apache::lonnet::env{'form.state'} = $params{'state'}; } print(&Apache::loncommon::build_filters($filterlist,$crstype,undef,undef,$filter, - '/cgi-bin/quotacheck.pl',\$numtitles, + $script,\$numtitles, 'quotacheck',undef,undef,undef, \@codetitles,$reqdom,'quotacheck',$reqdom)); if ($params{'gosearch'}) { @@ -197,7 +199,7 @@ sub print_usage { '
'."\n". ''. &Apache::lonlocal::mt('Show quotas for the domain being coordinated: [_1]', - ''. + ''. $otherdomdesc.''). '
'); return; @@ -280,6 +282,7 @@ sub print_usage { foreach my $subdir ('docs','supplemental') { $current_disk_usage += &Apache::lonnet::diskusage($dom,$cnum,"userfiles/$subdir",1); } + $current_disk_usage=int($current_disk_usage/1024); } my $percent; if (($quota == 0) || ($quota =~ /[^\d\.]/)) {