--- loncom/interface/portfolio.pm 2006/11/05 21:08:53 1.170
+++ loncom/interface/portfolio.pm 2006/11/21 21:38:44 1.173
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.170 2006/11/05 21:08:53 raeburn Exp $
+# $Id: portfolio.pm,v 1.173 2006/11/21 21:38:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,7 +270,9 @@ sub display_directory {
$r->print(&Apache::loncommon::help_open_topic('Portfolio FileList',
'Using the portfolio file list'));
$r->print('
'.
- 'Actions | | | Name'.
+ ' |
---|
Actions'.
+ &Apache::loncommon::help_open_topic('Portfolio FileAction').
+ ' | | | Name'.
&Apache::loncommon::help_open_topic('Portfolio OpenFile').
' | Size | Last Modified | Current Access Status'.
&Apache::loncommon::help_open_topic('Portfolio ShareFile').
@@ -872,7 +874,7 @@ sub build_access_summary {
if ($scope eq 'guest') {
$r->print(&mt('Passphrase').': '.$content->{'password'});
} elsif ($scope eq 'course') {
- $r->print('');
+ $r->print('');
$r->print(''.&mt('Roles').' | '.
&mt('Access').' | '.
&mt('Sections').' | ');
@@ -1334,7 +1336,7 @@ sub display_access_row {
$r->print(&Apache::loncommon::start_data_table_header_row());
$r->print(''.&mt('Action?').' | '.&mt($uctype).' | '.
&mt('Dates available').' | ');
- if ($type eq 'course') {
+ if ($type eq 'course' && $status eq 'old') {
$r->print(''.&mt('Allowed [_1] member affiliations',$type).
' | ');
$colspan ++;
@@ -1371,34 +1373,37 @@ sub display_access_row {
sub course_js {
return qq|
END_SCRIPT
$r->print(&mt('Select roles, course status, section(s) and group(s) for users who will be able to access the portfolio file.'));
@@ -1714,7 +1748,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
+ my $disk_quota;
if (defined($group)) {
my $grp_quota = &get_group_quota($group); # quota expressed in k
if ($grp_quota ne '') {
@@ -1722,6 +1756,10 @@ sub upload {
} 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
}
$fname=&Apache::lonnet::clean_filename($fname);
|
---|