[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Mon, 02 May 2005 19:08:17 -0000
banghart Mon May 2 15:08:17 2005 EDT
Modified files:
/loncom/interface portfolio.pm
Log:
Delivers somewhat useful lock info, and a way back.
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.84 loncom/interface/portfolio.pm:1.85
--- loncom/interface/portfolio.pm:1.84 Fri Apr 29 12:51:42 2005
+++ loncom/interface/portfolio.pm Mon May 2 15:08:16 2005
@@ -354,12 +354,10 @@
# eventually, have to handle removing those not checked, but . . .
my @items=&Apache::loncommon::get_env_multiple('form.checkfile');
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 {
#empty the file for a fresh start
- &Apache::lonnet::logthis("Clearing saved files");
&Apache::lonnet::clear_selected_files($env{'user.name'});
}
my @files = &Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'});
@@ -451,21 +449,21 @@
my ($r) = @_;
my %current_permissions = &Apache::lonnet::dump('file_permissions',$env{'user.domain'},$env{'user.name'});
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) {
- $r->print("$key = ");
- foreach my $array_item (@{$current_permissions{$key}}) {
- if (ref($array_item)) {
- $r->print(&Apache::lonnet::gettitle($$array_item[0]).' is the problem<br>');
- $r->print(&Apache::lonnet::coursedescription($$array_item[1]).' is the course<br>');
- # $r->print('the third is '.$$array_item[2].'<br>');
- # $r->print("item is $$array_item[0]<br> and $$array_item[0]");
- }
- }
+ foreach my $array_item (@{$current_permissions{$key}}) {
+ if (ref($array_item)) {
+ $r->print('<strong>'.$key.'</strong> was submitted in response to problem: <strong>'.
+ &Apache::lonnet::gettitle($$array_item[0]).'</strong><br />');
+ my %course_description = &Apache::lonnet::coursedescription($$array_item[1]);
+ $r->print('In the course: <strong>'.$course_description{'description'}.'</strong><br />');
+ # $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';
}
sub createdir {