--- loncom/interface/lonmeta.pm 2006/11/20 18:54:55 1.187 +++ loncom/interface/lonmeta.pm 2006/11/20 19:39:22 1.188 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.187 2006/11/20 18:54:55 banghart Exp $ +# $Id: lonmeta.pm,v 1.188 2006/11/20 19:39:22 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -724,7 +724,7 @@ sub prettyinput { sub handler { my $r=shift; &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, - ['currentpath']); + ['currentpath','changecourse']); my $uri=$r->uri; # # Set document type @@ -752,7 +752,8 @@ sub handler { my $result=&Apache::lonnet::getfile($fn); &Apache::lonpublisher::metaeval($result); &Apache::lonnet::logthis("restricted is: ".$Apache::lonpublisher::metadatafields{'courserestricted'}); - if (!$Apache::lonpublisher::metadatafields{'courserestricted'}) { + if ((!$Apache::lonpublisher::metadatafields{'courserestricted'}) || + ($env{'form.changecourse'} eq 'true')) { &pre_select_course($r,$uri); } else { &present_editable_metadata($r,$uri,'portfolio'); @@ -1252,10 +1253,13 @@ ENDEDIT } if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') { - $r->print(&mt('Associated with course [_1]',''.$env{$Apache::lonpublisher::metadatafields{'courserestricted'}.".description"}. - '').'
'); + $r->print(&mt('Associated with course [_1]', + ''. + $env{$Apache::lonpublisher::metadatafields{'courserestricted'}. + ".description"}. + '').'
'); } else { - $r->print("This resource is not associated with a course.
"); + $r->print('This resource is not associated with a course.
'); } } if (@added_order) {