Diff for /loncom/interface/lonmeta.pm between versions 1.202 and 1.211

version 1.202, 2007/01/22 20:04:46 version 1.211, 2008/01/24 10:05:13
Line 265  sub fieldnames { Line 265  sub fieldnames {
          'correct'    => 'Material appears to be correct',           'correct'    => 'Material appears to be correct',
          'technical'  => 'Resource is technically correct',            'technical'  => 'Resource is technically correct', 
          'avetries'   => 'Average number of tries till solved',           'avetries'   => 'Average number of tries till solved',
          'stdno'      => 'Total number of students who have worked on this problem',           'stdno'      => 'Statistics calculated for number of students',
          'difficulty' => 'Degree of difficulty',           'difficulty' => 'Degree of difficulty',
          'disc'       => 'Degree of discrimination',           'disc'       => 'Degree of discrimination',
      'dependencies' => 'Resources used by this resource',       'dependencies' => 'Resources used by this resource',
Line 638  sub prettyinput { Line 638  sub prettyinput {
             }              }
              $cur_values_stu =~ s/,$//;               $cur_values_stu =~ s/,$//;
             my @key_order = sort(keys(%meta_options));              my @key_order = sort(keys(%meta_options));
             unshift (@key_order,'');              unshift(@key_order,'');
             $meta_options{''} = 'Not specified';              $meta_options{''} = 'Not specified';
             $meta_options{'select_form_order'} = \@key_order;              $meta_options{'select_form_order'} = \@key_order;
         } else {          } else {
Line 804  sub handler { Line 804  sub handler {
         &present_editable_metadata($r,$uri,'groups');              &present_editable_metadata($r,$uri,'groups');    
     } elsif ($uri=~m|^/~|) {       } elsif ($uri=~m|^/~|) { 
         # Construction space          # Construction space
         $r->print(&Apache::loncommon::start_page('Edit Catalog nformation',          $r->print(&Apache::loncommon::start_page('Edit Catalog Information',
  undef,   "\n".'<script type="text/javascript">'."\n".
                                                   &Apache::loncommon::browser_and_searcher_javascript().
                                                   "\n".'</script>',
  {'domain' => $resdomain,}));   {'domain' => $resdomain,}));
         &present_editable_metadata($r,$uri);          &present_editable_metadata($r,$uri);
     } else {      } else {
Line 1024  sub print_dynamic_metadata { Line 1026  sub print_dynamic_metadata {
             #              #
             # New assessment statistics              # New assessment statistics
             $r->print('<h4>'.              $r->print('<h4>'.
                       &mt('Detailed Assessment Statistical Data').                        &mt('Recent 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>'.&mt('Course').'</th>'.
                 '<th>Section(s)</th>'.                  '<th>'.&mt('Section(s)').'</th>'.
                 '<th>Num Students</th>'.                  '<th>'.&mt('Num Student').'s</th>'.
                 '<th>Mean Tries</th>'.                  '<th>'.&mt('Mean Tries').'</th>'.
                 '<th>Degree of Difficulty</th>'.                  '<th>'.&mt('Degree of Difficulty').'</th>'.
                 '<th>Degree of Discrimination</th>'.                  '<th>'.&mt('Degree of Discrimination').'</th>'.
                 '<th>Time of computation</th>'.                  '<th>'.&mt('Time of computation').'</th>'.
                 '</tr>'.$/;                  '</tr>'.$/;
             foreach my $identifier (sort(keys(%{$dynmeta{'stats'}}))) {              foreach my $identifier (sort(keys(%{$dynmeta{'stats'}}))) {
                 my $data = $dynmeta{'stats'}->{$identifier};                  my $data = $dynmeta{'stats'}->{$identifier};
Line 1072  sub print_dynamic_metadata { Line 1074  sub print_dynamic_metadata {
             $table .= '</table>'.$/;              $table .= '</table>'.$/;
             $r->print($table);              $r->print($table);
         } else {          } else {
             $r->print('No new dynamic data found.');              $r->print(&mt('No new dynamic data found.'));
         }          }
     } else {      } else {
         $r->print('<h4>'.          $r->print('<h4>'.
Line 1210  ENDBOMBS Line 1212  ENDBOMBS
 <input type="submit" name="clearmsg" value="$clear" />  <input type="submit" name="clearmsg" value="$clear" />
 ENDDEL  ENDDEL
         } else {          } else {
             $r->print('<a href="'.$disuri.'" />'.$goback.'</a>');              $r->print('<p><a href="'.$disuri.'">'.$goback.'</a></p>');
       if ($env{'form.clearmsg'}) {
    my ($diruri) = ($disuri =~ m{(.*/)[^/]*});
    $r->print('<p><a href="'.$diruri.'">'.
     &mt('Back To Directory').'</a></p>');
       }
  }   }
  $r->print('<br />'.$bombs);   $r->print('<br />'.$bombs);
     } else {      } else {
         my $displayfile='Catalog Information for '.$disuri;          my $displayfile=&mt('Catalog Information for [_1]',$disuri);
         if ($disuri=~/\/default$/) {          if ($disuri=~/\/default$/) {
             my $dir=$disuri;              my $dir=$disuri;
             $dir=~s/default$//;              $dir=~s/default$//;
             $displayfile=              $displayfile=&mt('Default Cataloging Information for Directory [_1]',$dir);
                 &mt('Default Cataloging Information for Directory').' '.  
                 $dir;  
         }          }
         %Apache::lonpublisher::metadatafields=();          %Apache::lonpublisher::metadatafields=();
         %Apache::lonpublisher::metadatakeys=();          %Apache::lonpublisher::metadatakeys=();
Line 1250  ENDDEL Line 1255  ENDDEL
 <h1>$displayfile</h1>  <h1>$displayfile</h1>
 <form method="post" action="" name="defaultmeta">  <form method="post" action="" name="defaultmeta">
 ENDEDIT  ENDEDIT
         $r->print('<script type="JavaScript">'.  
                   &Apache::loncommon::browser_and_searcher_javascript().  
                   '</script>');  
         my %lt=&fieldnames($file_type);          my %lt=&fieldnames($file_type);
  my $output;   my $output;
  my @fields;   my @fields;
Line 1308  ENDEDIT Line 1310  ENDEDIT
  $Apache::lonpublisher::metadatafields{'owner'} =   $Apache::lonpublisher::metadatafields{'owner'} =
     $env{'user.name'}.':'.$env{'user.domain'};      $env{'user.name'}.':'.$env{'user.domain'};
     }      }
       if (! $Apache::lonpublisher::metadatafields{'author'}) {
    $Apache::lonpublisher::metadatafields{'author'} =
       &Apache::loncommon::plainname($env{'user.name'},
     $env{'user.domain'});
       }
     if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {      if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {
   
                 if ($file_type eq 'portfolio') {                  if ($file_type eq 'portfolio') {
Line 1323  ENDEDIT Line 1330  ENDEDIT
                         ".description"}.'</strong>').'<br />');                          ".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">'.&mt('This resource is not associated with a course.').'</a><br />');
     }      }
  }   }
  if (@added_order) {   if (@added_order) {
Line 1382  ENDEDIT Line 1389  ENDEDIT
             $r->print($result);              $r->print($result);
  }   }
  $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('Save Catalog Information').'" />');
   
  if ($file_type eq 'portfolio' || $file_type eq 'groups') {   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);

Removed from v.1.202  
changed lines
  Added in v.1.211


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