--- loncom/interface/lonmeta.pm 2007/01/18 23:20:56 1.195.2.1 +++ loncom/interface/lonmeta.pm 2008/01/24 10:05:13 1.211 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.195.2.1 2007/01/18 23:20:56 albertel Exp $ +# $Id: lonmeta.pm,v 1.211 2008/01/24 10:05:13 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', @@ -631,9 +631,16 @@ sub prettyinput { if ($meta_options{$item}) { push(@cur_values_inst,$item); } else { - $cur_values_stu .= $item.','; + if ($item ne '') { + $cur_values_stu .= $item.','; + } } } + $cur_values_stu =~ s/,$//; + my @key_order = sort(keys(%meta_options)); + unshift(@key_order,''); + $meta_options{''} = 'Not specified'; + $meta_options{'select_form_order'} = \@key_order; } else { $cur_values_stu = $value; } @@ -645,6 +652,7 @@ sub prettyinput { || ($type eq 'author')||($type eq 'notes') || ($type eq 'abstract')|| ($type eq 'title')|| ($type eq 'standards') || (exists($env{$course_key.'.metadata.'.$type.'.added'}))) { + if ($values) { if ($only_one) { $output .= (&Apache::loncommon::select_form($cur_values_inst[0],'new_'.$type,%meta_options)); @@ -782,7 +790,6 @@ sub handler { %Apache::lonpublisher::metadatakeys=(); my $result=&Apache::lonnet::getfile($fn); &Apache::lonpublisher::metaeval($result); - &Apache::lonnet::logthis("restricted is: ".$Apache::lonpublisher::metadatafields{'courserestricted'}); if ((!$Apache::lonpublisher::metadatafields{'courserestricted'}) || ($env{'form.changecourse'} eq 'true')) { &pre_select_course($r,$uri); @@ -797,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 { @@ -1017,17 +1026,17 @@ sub print_dynamic_metadata { # # New assessment statistics $r->print('
Course | '. - 'Section(s) | '. - 'Num Students | '. - 'Mean Tries | '. - 'Degree of Difficulty | '. - 'Degree of Discrimination | '. - 'Time 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').' | '. '
---|
'. + &mt('Back To Directory').'
'); + } } $r->print('