--- loncom/interface/lonmeta.pm 2006/12/05 02:55:53 1.190 +++ loncom/interface/lonmeta.pm 2007/01/02 11:38:28 1.191 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.190 2006/12/05 02:55:53 albertel Exp $ +# $Id: lonmeta.pm,v 1.191 2007/01/02 11:38:28 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -235,7 +235,7 @@ sub fieldnames { 'lowestgradelevel' => 'Lowest Grade Level', 'highestgradelevel' => 'Highest Grade Level'); - if (! defined($file_type) || $file_type ne 'portfolio') { + if ( !defined($file_type) || ($file_type ne 'portfolio' && $file_type ne 'groups') ) { %fields = (%fields, 'domain' => 'Domain', @@ -1252,11 +1252,18 @@ ENDEDIT } if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') { - $r->print(&mt('Associated with course [_1]', + if ($file_type eq 'portfolio') { + $r->print(&mt('Associated with course [_1]', ''. $env{$Apache::lonpublisher::metadatafields{'courserestricted'}. ".description"}. '').'
'); + } else { + $r->print(&mt('Associated with course [_1]', + ''. + $env{$Apache::lonpublisher::metadatafields{'courserestricted'}. + ".description"}.'').'
'); + } } else { $r->print('This resource is not associated with a course.
'); } @@ -1350,6 +1357,7 @@ ENDEDIT &mt('FAIL').'

'); } else { print $mfh ($file_content); + close($mfh); $r->print('

'.&mt('Wrote Metadata'). ' '.&Apache::lonlocal::locallocaltime(time). '

'); @@ -1359,16 +1367,16 @@ ENDEDIT $r->print($output.'
'); - if ($file_type eq 'portfolio') { + if ($file_type eq 'portfolio' || $file_type eq 'groups') { my ($port_path,$group) = &get_port_path_and_group($uri); - if ($group) { + if ($group ne '') { $r->print(''); } $r->print(''); $r->print('

'); - if ($group) { + if ($group ne '') { $r->print(''); - } + } $r->print(''. ''); }