'.$env{$metacourse.".description"}.
+ if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {
+ $r->print('Using: '.$env{$Apache::lonpublisher::metadatafields{'courserestricted'}.".description"}.
" metadata framework
");
} else {
- $r->print("This resources is not associated with a metadata framework
");
+ $r->print("This resource is not associated with a metadata framework
");
}
foreach my $field_name(@fields) {
@@ -1111,34 +1106,33 @@ ENDEDIT
$Apache::lonpublisher::metadatafields{$field_name}=
join(',',&Apache::loncommon::get_env_multiple('form.new_'.$field_name));
}
- if ($metacourse ne 'none') {
+ if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {
# handle restrictions here
- if ($env{$metacourse.'.metadata.'.$field_name.'.options'} =~ m/active/){
+ if (($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/active/) ||
+ ($field_name eq 'courserestricted')){
$output.=(''.$lt{$field_name}.': '.
&prettyinput($field_name,
$Apache::lonpublisher::metadatafields{$field_name},
- 'new_'.$field_name,'defaultmeta',undef,undef,undef,undef,$metacourse).'
');
- } elsif ($field_name eq 'courserestricted') {
- $output.=(
- &prettyinput($field_name,
- $Apache::lonpublisher::metadatafields{$field_name},
- 'new_'.$field_name,'defaultmeta',undef,undef,undef,undef,$metacourse));
+ 'new_'.$field_name,'defaultmeta',
+ undef,undef,undef,undef,
+ $Apache::lonpublisher::metadatafields{'courserestricted'}).'');
}
} else {
- if ($field_name ne 'courserestricted') {
+
$output.=(''.$lt{$field_name}.': '.
&prettyinput($field_name,
$Apache::lonpublisher::metadatafields{$field_name},
'new_'.$field_name,'defaultmeta').'
');
- } else {
- $output.=&prettyinput($field_name,
- $Apache::lonpublisher::metadatafields{$field_name},
- 'new_'.$field_name,'defaultmeta');
- }
+
}
}
- if ($env{'form.store'}) {
+ $r->print($output.'
');
+
+ }
+ $r->print('