--- loncom/interface/lonmeta.pm 2006/05/20 06:34:50 1.155
+++ loncom/interface/lonmeta.pm 2006/05/20 06:40:53 1.156
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.155 2006/05/20 06:34:50 albertel Exp $
+# $Id: lonmeta.pm,v 1.156 2006/05/20 06:40:53 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -318,10 +318,12 @@ sub portfolio_linked_path {
return $result;
}
-sub portfolio_display_uri {
- my ($uri,$as_links)=@_;
+sub get_port_path_and_group {
+ my ($uri)=@_;
+
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
+
my ($port_path,$group);
if ($uri =~ m{^/editupload/\Q$cdom\E/\Q$cnum\E/groups/}) {
$group = (split('/',$uri))[5];
@@ -329,6 +331,14 @@ sub portfolio_display_uri {
} else {
$port_path = '/adm/portfolio';
}
+ return ($port_path,$group);
+}
+
+sub portfolio_display_uri {
+ my ($uri,$as_links)=@_;
+
+ my ($port_path,$group) = &get_port_path_and_group($uri);
+
$uri =~ s|.*/(portfolio/.*)$|$1|;
my ($res_uri,$meta_uri) = ($uri,$uri);
if ($uri =~ /\.meta$/) {
@@ -365,8 +375,10 @@ sub pre_select_course {
&mt('Associate Resource With Selected Course').'">');
$r->print('');
- $r->print('