Diff for /loncom/interface/lonmeta.pm between versions 1.85 and 1.89

version 1.85, 2004/08/03 15:56:18 version 1.89, 2005/01/19 01:28:33
Line 537  sub handler { Line 537  sub handler {
         $r->print(&Apache::loncommon::bodytag('Error Messages'));          $r->print(&Apache::loncommon::bodytag('Error Messages'));
         # Looking for all bombs?          # Looking for all bombs?
         &report_bombs($r,$uri);          &report_bombs($r,$uri);
       } elsif ($uri=~/\/portfolio\//) {
           $r->print(&Apache::loncommon::bodytag
             ('Edit Portfolio File Information','','','',$resdomain));
           &present_editable_metadata($r,$uri);
           
     } elsif ($uri=~/^\/\~/) {       } elsif ($uri=~/^\/\~/) { 
         # Construction space          # Construction space
         $r->print(&Apache::loncommon::bodytag          $r->print(&Apache::loncommon::bodytag
Line 665  $disuri<br /> Line 670  $disuri<br />
 $obsoletewarning  $obsoletewarning
 $versiondisplay  $versiondisplay
 </p>  </p>
 <table cellspacing=2 border=0>  <table cellspacing="2" border="0">
 $table  $table
 </table>  </table>
 ENDHEAD  ENDHEAD
Line 695  sub print_dynamic_metadata { Line 700  sub print_dynamic_metadata {
         exists($dynmeta{'goto'}) ||          exists($dynmeta{'goto'}) ||
         exists($dynmeta{'course'})) {          exists($dynmeta{'course'})) {
         $r->print('<h4>'.&mt('Access and Usage Statistics').'</h4>'.          $r->print('<h4>'.&mt('Access and Usage Statistics').'</h4>'.
                   '<table cellspacing=2 border=0>');                    '<table cellspacing="2" border="0">');
         foreach ('count',          foreach ('count',
                  'sequsage','sequsage_list',                   'sequsage','sequsage_list',
                  'comefrom','comefrom_list',                   'comefrom','comefrom_list',
Line 720  sub print_dynamic_metadata { Line 725  sub print_dynamic_metadata {
             $r->print('<h4>'.              $r->print('<h4>'.
                       &mt('Overall Assessment Statistical Data').                        &mt('Overall Assessment Statistical Data').
                       '</h4>'.                        '</h4>'.
                       '<table cellspacing=2 border=0>');                        '<table cellspacing="2" border="0">');
             $r->print('<tr><td bgcolor="#AAAAAA">'.$lt{'stdno'}.'</td>'.              $r->print('<tr><td bgcolor="#AAAAAA">'.$lt{'stdno'}.'</td>'.
                       '<td bgcolor="#CCCCCC">'.                        '<td bgcolor="#CCCCCC">'.
                       &prettyprint('stdno',$dynmeta{'stdno'}).                        &prettyprint('stdno',$dynmeta{'stdno'}).
Line 739  sub print_dynamic_metadata { Line 744  sub print_dynamic_metadata {
             $r->print('<h4>'.              $r->print('<h4>'.
                       &mt('Detailed Assessment Statistical Data').                        &mt('Detailed Assessment Statistical Data').
                       '</h4>');                        '</h4>');
             my $table = '<table cellspacing=2 border=0>'.              my $table = '<table cellspacing="2" border="0">'.
                 '<tr>'.                  '<tr>'.
                 '<th>Course</th>'.                  '<th>Course</th>'.
                 '<th>Section(s)</th>'.                  '<th>Section(s)</th>'.
Line 799  sub print_dynamic_metadata { Line 804  sub print_dynamic_metadata {
         exists($dynmeta{'correct'}) ||           exists($dynmeta{'correct'}) || 
         exists($dynmeta{'technical'})){           exists($dynmeta{'technical'})){ 
         $r->print('<h4>'.&mt('Evaluation Data').'</h4>'.          $r->print('<h4>'.&mt('Evaluation Data').'</h4>'.
                   '<table cellspacing=2 border=0>');                    '<table cellspacing="2" border="0">');
         foreach ('clear','depth','helpful','correct','technical') {          foreach ('clear','depth','helpful','correct','technical') {
             $r->print('<tr><td bgcolor="#AAAAAA">'.$lt{$_}.'</td>'.              $r->print('<tr><td bgcolor="#AAAAAA">'.$lt{$_}.'</td>'.
                       '<td bgcolor="#CCCCCC">'.                        '<td bgcolor="#CCCCCC">'.
Line 913  ENDBOMBS Line 918  ENDBOMBS
 <form method="post" name="defaultmeta">  <form method="post" name="defaultmeta">
 ENDEDIT  ENDEDIT
         $r->print('<script language="JavaScript">'.          $r->print('<script language="JavaScript">'.
                   &Apache::loncommon::browser_and_searcher_javascript.                    &Apache::loncommon::browser_and_searcher_javascript().
                   '</script>');                    '</script>');
         my %lt=&fieldnames();          my %lt=&fieldnames();
    my $output;
         foreach ('author','title','subject','keywords','abstract','notes',          foreach ('author','title','subject','keywords','abstract','notes',
                  'copyright','customdistributionfile','language',                   'copyright','customdistributionfile','language',
                  'standards',                   'standards',
Line 929  ENDEDIT Line 935  ENDEDIT
                 $Apache::lonpublisher::metadatafields{'copyright'}=                  $Apache::lonpublisher::metadatafields{'copyright'}=
                     'default';                      'default';
             }              }
             $r->print('<p>'.$lt{$_}.': '.              $output.=('<p>'.$lt{$_}.': '.
                       &prettyinput                        &prettyinput($_,
                       ($_,$Apache::lonpublisher::metadatafields{$_},     $Apache::lonpublisher::metadatafields{$_},
                        'new_'.$_,'defaultmeta').'</p>');     'new_'.$_,'defaultmeta').'</p>');
         }          }
         if ($ENV{'form.store'}) {          if ($ENV{'form.store'}) {
             my $mfh;              my $mfh;
             if (!  ($mfh=Apache::File->new('>'.$fn))) {              if (!  ($mfh=Apache::File->new('>'.$fn))) {
                 $r->print('<p><font color=red>'.                  $r->print('<p><font color="red">'.
                           &mt('Could not write metadata').', '.                            &mt('Could not write metadata').', '.
                           &mt('FAIL').'</font>');                            &mt('FAIL').'</font></p>');
             } else {              } else {
                 foreach (sort keys %Apache::lonpublisher::metadatafields) {                  foreach (sort keys %Apache::lonpublisher::metadatafields) {
                     next if ($_ =~ /\./);                      next if ($_ =~ /\./);
Line 962  ENDEDIT Line 968  ENDEDIT
                          '<>&"').                           '<>&"').
                          '</'.$tag.'>';                           '</'.$tag.'>';
                 }                  }
                 $r->print('<p>'.&mt('Wrote Metadata'));                  $r->print('<p><font color="blue">'.&mt('Wrote Metadata').
     ' '.&Apache::lonlocal::locallocaltime(time).
     '</font></p>');
             }              }
         }          }
         $r->print('<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').'">');
     }      }
     $r->print('</form>');      $r->print('</form>');

Removed from v.1.85  
changed lines
  Added in v.1.89


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