version 1.84, 2005/04/29 16:51:42
|
version 1.86, 2005/08/26 19:40:38
|
Line 354 sub select_files {
|
Line 354 sub select_files {
|
# eventually, have to handle removing those not checked, but . . . |
# eventually, have to handle removing those not checked, but . . . |
my @items=&Apache::loncommon::get_env_multiple('form.checkfile'); |
my @items=&Apache::loncommon::get_env_multiple('form.checkfile'); |
if (scalar(@items)){ |
if (scalar(@items)){ |
&Apache::lonnet::logthis("one of the items is $items[0]"); |
&Apache::lonnet::save_selected_files($env{'user.name'}, $env{'form.currentpath'}, @items); |
&Apache::lonnet::save_selected_files($env{'user.name'}, $env{'form.currentpath'}, @items); |
|
} |
} |
} else { |
} else { |
#empty the file for a fresh start |
#empty the file for a fresh start |
&Apache::lonnet::logthis("Clearing saved files"); |
|
&Apache::lonnet::clear_selected_files($env{'user.name'}); |
&Apache::lonnet::clear_selected_files($env{'user.name'}); |
} |
} |
my @files = &Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'}); |
my @files = &Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'}); |
Line 420 sub upload {
|
Line 418 sub upload {
|
} |
} |
} |
} |
my $current_disk_usage = &Apache::lonnet::diskusage($env{'user.domain'}, $env{'user.name'},$portfolio_root); |
my $current_disk_usage = &Apache::lonnet::diskusage($env{'user.domain'}, $env{'user.name'},$portfolio_root); |
if ((($current_disk_usage/1000) + $filesize) > $disk_quota){ |
if ((($current_disk_usage) + $filesize/1000) > $disk_quota){ |
$r->print('<font color="red">Unable to upload <strong>'.$fname.' (size = '.$filesize.' kilobytes</strong>. Disk quota will be exceeded.'. |
$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.'); |
'<br />Disk quota is '.$disk_quota.' kilobytes. Your current disk usage is '.$current_disk_usage.' kilobytes.'); |
$r->print(&done('Back')); |
$r->print(&done('Back')); |
} |
} |
Line 451 sub lock_info {
|
Line 449 sub lock_info {
|
my ($r) = @_; |
my ($r) = @_; |
my %current_permissions = &Apache::lonnet::dump('file_permissions',$env{'user.domain'},$env{'user.name'}); |
my %current_permissions = &Apache::lonnet::dump('file_permissions',$env{'user.domain'},$env{'user.name'}); |
my $file_name = $env{'form.lockinfo'}; |
my $file_name = $env{'form.lockinfo'}; |
#my %locked_files = &Apache::lonnet::get_marked_as_readonly_hash ($env{'user.domain'},$env{'user.name'}); |
foreach my $key(keys(%current_permissions)) { |
foreach my $key (keys(%current_permissions)) { |
|
if ($file_name eq $key) { |
if ($file_name eq $key) { |
$r->print("$key = "); |
foreach my $array_item (@{$current_permissions{$key}}) { |
foreach my $array_item (@{$current_permissions{$key}}) { |
if (ref($array_item)) { |
if (ref($array_item)) { |
$r->print('<strong>'.$key.'</strong> was submitted in response to problem: <strong>'. |
$r->print(&Apache::lonnet::gettitle($$array_item[0]).' is the problem<br>'); |
&Apache::lonnet::gettitle($$array_item[0]).'</strong><br />'); |
$r->print(&Apache::lonnet::coursedescription($$array_item[1]).' is the course<br>'); |
my %course_description = &Apache::lonnet::coursedescription($$array_item[1]); |
# $r->print('the third is '.$$array_item[2].'<br>'); |
$r->print('In the course: <strong>'.$course_description{'description'}.'</strong><br />'); |
# $r->print("item is $$array_item[0]<br> and $$array_item[0]"); |
# $r->print('the third is '.$$array_item[2].'<br>'); |
} |
# $r->print("item is $$array_item[0]<br> and $$array_item[0]"); |
} |
} |
|
} |
} |
} |
} |
} |
#$r->print("lock info here"); |
$r->print(&done('Back')); |
return 'ok'; |
return 'ok'; |
} |
} |
sub createdir { |
sub createdir { |