Diff for /loncom/interface/lonmeta.pm between versions 1.190 and 1.191

version 1.190, 2006/12/05 02:55:53 version 1.191, 2007/01/02 11:38:28
Line 235  sub fieldnames { Line 235  sub fieldnames {
          'lowestgradelevel' => 'Lowest Grade Level',           'lowestgradelevel' => 'Lowest Grade Level',
          'highestgradelevel' => 'Highest Grade Level');           'highestgradelevel' => 'Highest Grade Level');
           
     if (! defined($file_type) || $file_type ne 'portfolio') {      if ( !defined($file_type) || ($file_type ne 'portfolio' && $file_type ne 'groups') ) {
         %fields =           %fields = 
         (%fields,          (%fields,
          'domain' => 'Domain',           'domain' => 'Domain',
Line 1252  ENDEDIT Line 1252  ENDEDIT
     }      }
   
     if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {      if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {
  $r->print(&mt('Associated with course [_1]',                  if ($file_type eq 'portfolio') {
       $r->print(&mt('Associated with course [_1]',
         '<strong><a href="'.$uri.'?changecourse=true">'.          '<strong><a href="'.$uri.'?changecourse=true">'.
         $env{$Apache::lonpublisher::metadatafields{'courserestricted'}.          $env{$Apache::lonpublisher::metadatafields{'courserestricted'}.
         ".description"}.          ".description"}.
       '</a></strong>').'<br />');        '</a></strong>').'<br />');
                   } else {
                       $r->print(&mt('Associated with course [_1]',
                           '<strong>'.
     $env{$Apache::lonpublisher::metadatafields{'courserestricted'}.
                           ".description"}.'</strong>').'<br />');
                   }
     } else {      } else {
  $r->print('<a href="'.$uri.'?changecourse=true">This resource is not associated with a course.</a><br />');   $r->print('<a href="'.$uri.'?changecourse=true">This resource is not associated with a course.</a><br />');
     }      }
Line 1350  ENDEDIT Line 1357  ENDEDIT
       &mt('FAIL').'</font></p>');        &mt('FAIL').'</font></p>');
  } else {   } else {
     print $mfh ($file_content);      print $mfh ($file_content);
                       close($mfh);
     $r->print('<p><font color="blue">'.&mt('Wrote Metadata').      $r->print('<p><font color="blue">'.&mt('Wrote Metadata').
       ' '.&Apache::lonlocal::locallocaltime(time).        ' '.&Apache::lonlocal::locallocaltime(time).
       '</font></p>');        '</font></p>');
Line 1359  ENDEDIT Line 1367  ENDEDIT
  $r->print($output.'<br /><input type="submit" name="store" value="'.   $r->print($output.'<br /><input type="submit" name="store" value="'.
                   &mt('Store Catalog Information').'" />');                    &mt('Store Catalog Information').'" />');
   
  if ($file_type eq 'portfolio') {   if ($file_type eq 'portfolio' || $file_type eq 'groups') {
     my ($port_path,$group) = &get_port_path_and_group($uri);      my ($port_path,$group) = &get_port_path_and_group($uri);
             if ($group) {              if ($group ne '') {
                 $r->print('<input type="hidden" name="group" value="'.$group.'" />');                  $r->print('<input type="hidden" name="group" value="'.$group.'" />');
             }              }
             $r->print('<input type="hidden" name="currentpath" value="'.$env{'form.currentpath'}.'" />');              $r->print('<input type="hidden" name="currentpath" value="'.$env{'form.currentpath'}.'" />');
     $r->print('</form><br /><br /><form method="post" action="'.$port_path.'">');      $r->print('</form><br /><br /><form method="post" action="'.$port_path.'">');
     if ($group) {      if ($group ne '') {
         $r->print('<input type="hidden" name="group" value="'.$group.'" />');          $r->print('<input type="hidden" name="group" value="'.$group.'" />');
     }              }
     $r->print('<input type="hidden" name="currentpath" value="'.$path.'" />'.      $r->print('<input type="hidden" name="currentpath" value="'.$path.'" />'.
       '<input type="submit" name="cancel" value="'.&mt('Discard Edits and Return to Portfolio').'" />');        '<input type="submit" name="cancel" value="'.&mt('Discard Edits and Return to Portfolio').'" />');
  }   }

Removed from v.1.190  
changed lines
  Added in v.1.191


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