--- loncom/interface/lonmeta.pm 2006/08/21 19:26:27 1.172 +++ 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.172 2006/08/21 19:26:27 banghart Exp $ +# $Id: lonmeta.pm,v 1.173 2006/08/25 23:05:52 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1291,22 +1291,20 @@ ENDEDIT '<>&"'). ''; } - if ($fn =~ m|^$Apache::lonnet::perlvar{'lonDocRoot'}/userfiles/portfolio/|) { - my ($path, $new_fn) = ($fn =~ m|/(portfolio.*)/([^/]*)$|); + if ($fn =~ m|^$Apache::lonnet::perlvar{'lonDocRoot'}/userfiles|) { + my ($path, $new_fn); + if ($fn =~ m|\w+/groups/\w+/portfolio/|) { + ($path, $new_fn) = ($fn =~ m|/(groups/\w+/portfolio.*)/([^/]*)$|); + } else { + ($path, $new_fn) = ($fn =~ m|/(portfolio.*)/([^/]*)$|); + } $r->print(&store_portfolio_metadata($formname,$file_content,$path, $new_fn)); - unless ($env{'form.associate'}) { + if (! $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 { + } else { if (! ($mfh=Apache::File->new('>'.$fn))) { $r->print('

'. &mt('Could not write metadata').', '. @@ -1317,7 +1315,7 @@ ENDEDIT ' '.&Apache::lonlocal::locallocaltime(time). '

'); } - unless ($env{'form.associate'}) { + if (! $env{'form.associate'}) { $r->print(&Apache::portfolio::done("Return to Portfolio",'/adm/portfolio')); return; } 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.