--- loncom/interface/lonmeta.pm 2007/01/19 14:23:23 1.201 +++ loncom/interface/lonmeta.pm 2008/01/23 17:23:16 1.210 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.201 2007/01/19 14:23:23 raeburn Exp $ +# $Id: lonmeta.pm,v 1.210 2008/01/23 17:23:16 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -265,7 +265,7 @@ sub fieldnames { 'correct' => 'Material appears to be correct', 'technical' => 'Resource is technically correct', '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', 'disc' => 'Degree of discrimination', 'dependencies' => 'Resources used by this resource', @@ -636,8 +636,9 @@ sub prettyinput { } } } + $cur_values_stu =~ s/,$//; my @key_order = sort(keys(%meta_options)); - unshift (@key_order,''); + unshift(@key_order,''); $meta_options{''} = 'Not specified'; $meta_options{'select_form_order'} = \@key_order; } else { @@ -803,8 +804,10 @@ sub handler { &present_editable_metadata($r,$uri,'groups'); } elsif ($uri=~m|^/~|) { # Construction space - $r->print(&Apache::loncommon::start_page('Edit Catalog nformation', - undef, + $r->print(&Apache::loncommon::start_page('Edit Catalog Information', + "\n".'', {'domain' => $resdomain,})); &present_editable_metadata($r,$uri); } else { @@ -1023,17 +1026,17 @@ sub print_dynamic_metadata { # # New assessment statistics $r->print('

'. - &mt('Detailed Assessment Statistical Data'). + &mt('Recent Detailed Assessment Statistical Data'). '

'); my $table = ''. ''. - ''. - ''. - ''. - ''. - ''. - ''. - ''. + ''. + ''. + ''. + ''. + ''. + ''. + ''. ''.$/; foreach my $identifier (sort(keys(%{$dynmeta{'stats'}}))) { my $data = $dynmeta{'stats'}->{$identifier}; @@ -1071,7 +1074,7 @@ sub print_dynamic_metadata { $table .= '
CourseSection(s)Num StudentsMean TriesDegree of DifficultyDegree of DiscriminationTime of computation'.&mt('Course').''.&mt('Section(s)').''.&mt('Num Student').'s'.&mt('Mean Tries').''.&mt('Degree of Difficulty').''.&mt('Degree of Discrimination').''.&mt('Time of computation').'
'.$/; $r->print($table); } else { - $r->print('No new dynamic data found.'); + $r->print(&mt('No new dynamic data found.')); } } else { $r->print('

'. @@ -1209,11 +1212,16 @@ ENDBOMBS ENDDEL } else { - $r->print(''.$goback.''); + $r->print('

'.$goback.'

'); + if ($env{'form.clearmsg'}) { + my ($diruri) = ($disuri =~ m{(.*/)[^/]*}); + $r->print('

'. + &mt('Back To Directory').'

'); + } } $r->print('
'.$bombs); } else { - my $displayfile='Catalog Information for '.$disuri; + my $displayfile=&mt('Catalog Information for').' '.$disuri; if ($disuri=~/\/default$/) { my $dir=$disuri; $dir=~s/default$//; @@ -1249,9 +1257,6 @@ ENDDEL

$displayfile

ENDEDIT - $r->print(''); my %lt=&fieldnames($file_type); my $output; my @fields; @@ -1307,6 +1312,11 @@ ENDEDIT $Apache::lonpublisher::metadatafields{'owner'} = $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 ($file_type eq 'portfolio') { @@ -1322,7 +1332,7 @@ ENDEDIT ".description"}.'').'
'); } } else { - $r->print('This resource is not associated with a course.
'); + $r->print(''.&mt('This resource is not associated with a course.').'
'); } } if (@added_order) { @@ -1381,7 +1391,7 @@ ENDEDIT $r->print($result); } $r->print($output.'
'); + &mt('Save Catalog Information').'" />'); if ($file_type eq 'portfolio' || $file_type eq 'groups') { my ($port_path,$group) = &get_port_path_and_group($uri);