--- loncom/interface/lonmeta.pm 2005/11/22 23:20:40 1.133
+++ loncom/interface/lonmeta.pm 2005/12/09 23:49:45 1.136
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.133 2005/11/22 23:20:40 banghart Exp $
+# $Id: lonmeta.pm,v 1.136 2005/12/09 23:49:45 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -302,9 +302,9 @@ sub select_course {
$courses{$coursekey} = $value;
}
}
- $r->print('
Course Related Meta-Data
');
+ $r->print('Associate resource with a course
');
$r->print('');
}
return 'ok';
@@ -523,7 +523,7 @@ sub prettyinput {
|| ($type eq 'abstract')|| ($type eq 'title')|| ($type eq 'standards')) {
if ($values) {
if ($only_one) {
- $output .= (&Apache::loncommon::select_form($value,'new_'.$type,%meta_options));
+ $output .= (&Apache::loncommon::select_form($cur_values_inst[0],'new_'.$type,%meta_options));
} else {
$output .= (&Apache::loncommon::multiple_select_form('new_'.$type,\@cur_values_inst,undef,\%meta_options));
}
@@ -603,6 +603,10 @@ sub prettyinput {
",'rights')\">".&mt('Select').''.
&relatedfield(0,$relatedsearchflag,$relatedsep);
}
+ if ($type eq 'courserestricted') {
+ return ('');
+ }
+
# Dates
if (($type eq 'creationdate') ||
($type eq 'lastrevisiondate')) {
@@ -1097,7 +1101,7 @@ ENDEDIT
'default';
}
if ($metacourse ne 'none') {
- $r->print('Document metadata restricted by : '.$env{$metacourse.".description"}."
");
+ $r->print('Using: '.$env{$metacourse.".description"}." metadata framework
");
}
foreach my $field_name(@fields) {
@@ -1152,7 +1156,7 @@ ENDEDIT
$Apache::lonpublisher::metadatakeys{$unikey})
) {
my $value=
- $Apache::lonpublisher::metadatafields{$unikey.'.'.$_};
+ $Apache::lonpublisher::metadatafields{$unikey.'.'.$_};
$value=~s/\"/\'\'/g;
$file_content.=' '.$_.'="'.$value.'"' ;
# print $mfh ' '.$_.'="'.$value.'"';
@@ -1166,7 +1170,7 @@ ENDEDIT
if ($fn =~ /\/portfolio\//) {
$fn =~ /\/portfolio\/(.*)$/;
my $new_fn = '/'.$1;
- $env{'form.'.$formname}=$file_content;
+ $env{'form.'.$formname}=$file_content."\n";
$env{'form.'.$formname.'.filename'}=$new_fn;
&Apache::lonnet::userfileupload('uploaddoc','',
'portfolio'.$env{'form.currentpath'});