--- loncom/interface/lonmeta.pm 2006/08/28 00:19:38 1.168.2.3 +++ loncom/interface/lonmeta.pm 2006/08/25 23:05:52 1.173 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.168.2.3 2006/08/28 00:19:38 albertel Exp $ +# $Id: lonmeta.pm,v 1.173 2006/08/25 23:05:52 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -366,6 +366,8 @@ 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); @@ -717,7 +719,8 @@ 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 @@ -1148,7 +1151,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); @@ -1296,7 +1299,11 @@ ENDEDIT ($path, $new_fn) = ($fn =~ m|/(portfolio.*)/([^/]*)$|); } $r->print(&store_portfolio_metadata($formname,$file_content,$path, - $new_fn)); + $new_fn)); + if (! $env{'form.associate'}) { + $r->print(&Apache::portfolio::done("Return to Portfolio",'/adm/portfolio')); + return; + } } else { if (! ($mfh=Apache::File->new('>'.$fn))) { $r->print('

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

'); } + if (! $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(' -

'. +

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