--- loncom/interface/lonmeta.pm 2005/12/19 21:17:25 1.144
+++ loncom/interface/lonmeta.pm 2005/12/19 21:33:54 1.145
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.144 2005/12/19 21:17:25 albertel Exp $
+# $Id: lonmeta.pm,v 1.145 2005/12/19 21:33:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -300,14 +300,17 @@ sub portfolio_display_uri {
} else {
$meta_uri .= '.meta';
}
- return ($res_uri,$meta_uri);
+
+ my ($path) = ($res_uri =~ m|(.*)/[^/]*$|);
+
+ return ($res_uri,$meta_uri,$path);
}
sub pre_select_course {
my ($r,$uri) = @_;
my $output;
my $fn=&Apache::lonnet::filelocation('',$uri);
- my ($res_uri,$meta_uri) = &portfolio_display_uri($uri);
+ my ($res_uri,$meta_uri,$path) = &portfolio_display_uri($uri);
%Apache::lonpublisher::metadatafields=();
%Apache::lonpublisher::metadatakeys=();
my $result=&Apache::lonnet::getfile($fn);
@@ -322,6 +325,12 @@ sub pre_select_course {
$r->print($output.'
');
$r->print('');
+
+ $r->print('