--- loncom/interface/lonmeta.pm 2006/08/10 21:14:10 1.167 +++ loncom/interface/lonmeta.pm 2006/08/21 18:04:20 1.171 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.167 2006/08/10 21:14:10 banghart Exp $ +# $Id: lonmeta.pm,v 1.171 2006/08/21 18:04:20 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -366,15 +366,15 @@ sub pre_select_course { $output = &select_course(); $r->print($output.'
'); + $r->print(''); + $r->print(''); $r->print(''); my ($port_path,$group) = &get_port_path_and_group($uri); my $group_input; if ($group) { - $group_input = '' - } else { - $group_input = ""; - } + $group_input = ''; + } $r->print('

'. ''. $group_input. @@ -719,14 +719,14 @@ sub prettyinput { # Main Handler sub handler { my $r=shift; - # + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['currentpath']); my $uri=$r->uri; # # Set document type &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; - # my ($resdomain,$resuser)= (&Apache::lonnet::declutter($uri)=~/^(\w+)\/(\w+)\//); if ($uri=~m:/adm/bombs/(.*)$:) { @@ -744,6 +744,11 @@ sub handler { } else { &pre_select_course($r,$uri); } + } elsif ($uri=~m|^/editupload/[^/]+/[^/]+/groups/|) { + $r->print(&Apache::loncommon::start_page('Edit Group Portfolio File Catalog Information', + undef, + {'domain' => $resdomain,})); + &present_editable_metadata($r,$uri,'portfolio'); } elsif ($uri=~m|^/~|) { # Construction space $r->print(&Apache::loncommon::start_page('Edit Catalog nformation', @@ -1145,7 +1150,7 @@ sub present_editable_metadata { my $goback=&mt('Back to Source File'); $r->print(<$disuri - + ENDBOMBS if ($showdel) { $r->print(<print(<$displayfile - + ENDEDIT - $r->print(''); my %lt=&fieldnames($file_type); @@ -1284,10 +1289,18 @@ ENDEDIT if ($fn =~ m|^$Apache::lonnet::perlvar{'lonDocRoot'}/userfiles/portfolio/|) { my ($path, $new_fn) = ($fn =~ m|/(portfolio.*)/([^/]*)$|); $r->print(&store_portfolio_metadata($formname,$file_content,$path, - $new_fn)); + $new_fn)); + unless ($env{'form.associate'}) { + $r->print(&Apache::portfolio::done("Return to Portfolio",'/adm/portfolio')); + return; + } } elsif ($fn =~ m|^$Apache::lonnet::perlvar{'lonDocRoot'}/userfiles/groups/\w+/portfolio/|) { my ($path, $new_fn) = ($fn =~ m|/(groups/\w+/portfolio.*)/([^/]*)$|); $r->print(&store_portfolio_metadata($formname,$file_content,$path,$new_fn)); + unless ($env{'form.associate'}) { + $r->print(&Apache::portfolio::done("Return to Portfolio",'/adm/portfolio')); + return; + } } else { if (! ($mfh=Apache::File->new('>'.$fn))) { $r->print('

'. @@ -1299,22 +1312,27 @@ ENDEDIT ' '.&Apache::lonlocal::locallocaltime(time). '

'); } + unless ($env{'form.associate'}) { + $r->print(&Apache::portfolio::done("Return to Portfolio",'/adm/portfolio')); + return; + } } } $r->print($output.'
'); + &mt('Store Catalog Information').'" />'); if ($file_type eq 'portfolio') { my ($port_path,$group) = &get_port_path_and_group($uri); if ($group) { $r->print(''); } + $r->print(''); $r->print(' -

'. +

'. ''. ''. - ''); + ''); } }