--- loncom/interface/portfolio.pm 2006/11/09 22:33:32 1.172
+++ loncom/interface/portfolio.pm 2006/12/11 03:43:15 1.175
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.172 2006/11/09 22:33:32 raeburn Exp $
+# $Id: portfolio.pm,v 1.175 2006/12/11 03:43:15 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 .= '
- '.&mt('Public files are available to anyone without the need for login.');
$info .= '
- '.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
$info .= '
- '.&explain_conditionals();
- $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,15 +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 = 20000; # expressed in k
- 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;
- }
- }
+ my $disk_quota = &get_quota($group);
$fname=&Apache::lonnet::clean_filename($fname);
my $portfolio_root=&get_portfolio_root();
@@ -2022,6 +2020,23 @@ 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
@@ -2118,6 +2133,13 @@ sub handler {
$r->print(&Apache::loncommon::start_page($title));
}
$r->rflush();
+ my ($blocked,$blocktext) =
+ &Apache::loncommon::blocking_status('port',$uname,$udom);
+ if ($blocked) {
+ $r->print($blocktext);
+ $r->print(&Apache::loncommon::end_page());
+ return OK;
+ }
if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){
$r->print(''.
'No file was selected to upload.'.