version 1.122, 2005/11/02 01:02:31
|
version 1.123, 2005/11/07 23:03:17
|
Line 507 sub prettyinput {
|
Line 507 sub prettyinput {
|
if ($type eq 'keywords') { |
if ($type eq 'keywords') { |
my %hash; |
my %hash; |
my $def; |
my $def; |
|
my @cur_values; |
|
foreach (split(/,/,$value)) { |
|
$_ =~ s/^\s+//; |
|
push(@cur_values,$_); |
|
} |
foreach (split(/,/,$values)) { |
foreach (split(/,/,$values)) { |
$_ =~ s/^\s+//; |
$_ =~ s/^\s+//; |
$hash{$_} = $_; |
$hash{$_} = $_; |
Line 514 sub prettyinput {
|
Line 519 sub prettyinput {
|
if ($only_one) { |
if ($only_one) { |
return(&Apache::loncommon::select_form($def,'new_keywords',%hash)); |
return(&Apache::loncommon::select_form($def,'new_keywords',%hash)); |
} else { |
} else { |
return(&Apache::loncommon::multiple_select_form('new_keywords',$value,undef,%hash)); |
return(&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values,undef,%hash)); |
} |
} |
} |
} |
if ($type eq 'notes') { |
if ($type eq 'notes') { |
Line 1085 ENDEDIT
|
Line 1090 ENDEDIT
|
foreach (@fields) { |
foreach (@fields) { |
if (defined($env{'form.new_'.$_})) { |
if (defined($env{'form.new_'.$_})) { |
$Apache::lonpublisher::metadatafields{$_}= |
$Apache::lonpublisher::metadatafields{$_}= |
$env{'form.new_'.$_}; |
join(',',&Apache::loncommon::get_env_multiple('form.new_'.$_)); |
} |
} |
if ($metacourse ne 'none') { |
if ($metacourse ne 'none') { |
# handle restrictions here |
# handle restrictions here |
Line 1109 ENDEDIT
|
Line 1114 ENDEDIT
|
my $file_content; |
my $file_content; |
foreach my $meta_field (keys %env) { |
foreach my $meta_field (keys %env) { |
if (&Apache::loncommon::get_env_multiple('form.new_keywords')) { |
if (&Apache::loncommon::get_env_multiple('form.new_keywords')) { |
$Apache::lonpublisher::metadatafields{'keywords'} = |
$Apache::lonpublisher::metadatafields{'keywords'} = |
join (',', &Apache::loncommon::get_env_multiple('form.new_keywords')); |
join (',', &Apache::loncommon::get_env_multiple('form.new_keywords')); |
} |
} |
} |
} |