Diff for /loncom/interface/lonmeta.pm between versions 1.125 and 1.127

version 1.125, 2005/11/11 21:25:50 version 1.127, 2005/11/15 19:20:12
Line 512  sub prettyinput { Line 512  sub prettyinput {
         }          }
         if ($type eq 'keywords') {          if ($type eq 'keywords') {
             my %hash;              my %hash;
             my $def;  
             my @cur_values;              my @cur_values;
             foreach (split(/,/,$value)) {              foreach (split(/,/,$value)) {
                 $_ =~ s/^\s+//;                  $_ =~ s/^\s+//;
Line 523  sub prettyinput { Line 522  sub prettyinput {
                 $hash{$_} = $_;                  $hash{$_} = $_;
             }              }
             if ($only_one) {              if ($only_one) {
                 return(&Apache::loncommon::select_form($def,'new_keywords',%hash));                  return(&Apache::loncommon::select_form($value,'new_keywords',%hash));
             } else {              } else {
                 return (&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values,undef,\%hash));                  return (&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values,undef,\%hash));
             }              }
Line 1102  ENDEDIT Line 1101  ENDEDIT
                 $Apache::lonpublisher::metadatafields{$_}=                  $Apache::lonpublisher::metadatafields{$_}=
                     join(',',&Apache::loncommon::get_env_multiple('form.new_'.$_));                      join(',',&Apache::loncommon::get_env_multiple('form.new_'.$_));
             }              }
               my $field_name = $_;
             if ($metacourse ne 'none') {              if ($metacourse ne 'none') {
                 # handle restrictions here                  # handle restrictions here
                 if (($env{$metacourse.'.metadata.'.$_.'.options'} =~ m/active/)||                  if ($env{$metacourse.'.metadata.'.$_.'.options'} =~ m/active/){
                     ($_ eq 'courserestricted'))  {  
                     $output.=('<p>'.$lt{$_}.': '.                      $output.=('<p>'.$lt{$_}.': '.
                             &prettyinput($_,                                &prettyinput($_,
    $Apache::lonpublisher::metadatafields{$_},     $Apache::lonpublisher::metadatafields{$_},
    'new_'.$_,'defaultmeta',undef,undef,undef,undef,$metacourse).'</p>');     'new_'.$_,'defaultmeta',undef,undef,undef,undef,$metacourse).'</p>');
                 }                   } elsif ($_ eq 'courserestricted') {
                               $output.=(
                                   &prettyinput($field_name,
       $Apache::lonpublisher::metadatafields{$_},
       'new_'.$field_name,'defaultmeta',undef,undef,undef,undef,$metacourse));
                    }
             } else {              } else {
                 $output.=('<p>'.$lt{$_}.': '.                  if ($_ ne 'courserestricted') {
                       $output.=('<p>'.$lt{$_}.': '.
                             &prettyinput($_,                              &prettyinput($_,
    $Apache::lonpublisher::metadatafields{$_},     $Apache::lonpublisher::metadatafields{$_},
    'new_'.$_,'defaultmeta').'</p>');     'new_'.$_,'defaultmeta').'</p>');
           } else {
                       $output.=&prettyinput($field_name,
      $Apache::lonpublisher::metadatafields{$_},
      'new_'.$field_name,'defaultmeta');
                   }
             }              }
         }          }
           $output.=('<p>'.$lt{$_}.': '.
                    &prettyinput($_,
    $Apache::lonpublisher::metadatafields{$_},
    'new_'.$_,'defaultmeta',undef,undef,undef,undef,$metacourse).'</p>');
   
         if ($env{'form.store'}) {          if ($env{'form.store'}) {
             my $mfh;              my $mfh;
             my $formname='store';               my $formname='store'; 

Removed from v.1.125  
changed lines
  Added in v.1.127


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>