--- loncom/interface/portfolio.pm 2006/11/21 21:38:44 1.173 +++ loncom/interface/portfolio.pm 2006/11/22 03:56:36 1.174 @@ -1,7 +1,7 @@ # The LearningOnline Network # portfolio browser # -# $Id: portfolio.pm,v 1.173 2006/11/21 21:38:44 raeburn Exp $ +# $Id: portfolio.pm,v 1.174 2006/11/22 03:56:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -101,7 +101,6 @@ sub display_common { # FIXME: This line should be deleted once Portfolio uses breadcrumbs $r->print(&Apache::loncommon::help_open_topic('Portfolio About', 'Help on the portfolio')); - $r->print(<<"TABLE"); @@ -762,9 +761,16 @@ sub display_access { $info .= '
'; + $info .= ''. + &mt('A listing of files viewable without log-in is available at: ')."http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio.
"; if ($group eq '') { - $info .= (&mt("A listing of files viewable without log-in is available at: http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio.
For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:
http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme
")); + $info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:"); + } else { + $info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on the course information page:"); + } + $info .= "
http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme
"; + if ($group ne '') { + $info .= &mt("Users with privileges to edit course contents may add a course information page to a course using the 'Course Info' button in DOCS").'
'; } } else { $header = '

'.&mt('Conditional access controls for file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'

'. @@ -1748,19 +1754,7 @@ sub upload { my ($r,$url,$group)=@_; my $fname=$env{'form.uploaddoc.filename'}; my $filesize = (length($env{'form.uploaddoc'})) / 1000; #express in k (1024?) - my $disk_quota; - if (defined($group)) { - my $grp_quota = &get_group_quota($group); # quota expressed in k - if ($grp_quota ne '') { - $disk_quota = $grp_quota; - } else { - $disk_quota = 0; - } - } else { - $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'}, - $env{'user.domain'}); #expressed in Mb - $disk_quota = 1000 * $disk_quota; # convert from Mb to kb - } + my $disk_quota = &get_quota($group); $fname=&Apache::lonnet::clean_filename($fname); my $portfolio_root=&get_portfolio_root(); @@ -2026,6 +2020,24 @@ sub coursegrp_portfolio_header { return $output; } +sub get_quota { + my ($group) = @_; + my $disk_quota; + if (defined($group)) { + my $grp_quota = &get_group_quota($group); # quota expressed in k + if ($grp_quota ne '') { + $disk_quota = $grp_quota; + } else { + $disk_quota = 0; + } + } else { + $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'}, + $env{'user.domain'}); #expressed in Mb + $disk_quota = 1000 * $disk_quota; # convert from Mb to kb + } + return $disk_quota; +} + sub handler { # this handles file management