--- loncom/interface/statistics/lonproblemstatistics.pm 2005/03/01 00:07:21 1.97 +++ loncom/interface/statistics/lonproblemstatistics.pm 2005/03/08 17:40:39 1.100 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.97 2005/03/01 00:07:21 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.100 2005/03/08 17:40:39 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -353,17 +353,18 @@ my @Fields = ( # selectable => 'no', # defaultselected => 'yes', # }, -## weight included for research purposes. Commented out most of the time. -# { name => 'weight', -# title => 'weight', -# align => 'right', -# color => '#FFFFFF', -# sortable => 'no', -# graphable => 'no', -# long_title => 'Problem weight (for instructor)', -# selectable => 'no', -# defaultselected => 'yes', -# }, +# +## problem weight for instructor + { name => 'weight', + title => 'weight', + align => 'right', + color => '#FFFFFF', + sortable => 'no', + graphable => 'no', + long_title => 'Problem weight (for instructor)', + selectable => 'yes', + defaultselected => 'yes', + }, ); my @SeqFields = ( @@ -712,6 +713,13 @@ sub BuildProblemStatisticsPage { # it does not slow things down noticably. &Apache::loncoursedata::populate_weight_table(); # + ($navmap,@sequences) = + &Apache::lonstatistics::selected_sequences_with_assessments(); + if (! ref($navmap)) { + $r->print('

'.&mt('A course-wide error occured.').'

'. + '

'.$navmap.'

'); + return; + } if (exists($ENV{'form.Excel'})) { &Excel_output($r); } else { @@ -719,13 +727,6 @@ sub BuildProblemStatisticsPage { &mt('Produce Excel Output').'" />'.' 'x5); $r->rflush(); my $count = 0; - ($navmap,@sequences) = - &Apache::lonstatistics::selected_sequences_with_assessments(); - if (! ref($navmap)) { - $r->print('

'.&mt('A course-wide error occured.').'

'. - '

'.$navmap.'

'); - return; - } foreach my $seq (@sequences) { my @resources = &Apache::lonstathelpers::get_resources($navmap,$seq); @@ -1598,8 +1599,8 @@ sub get_statistics { # &Apache::lonnet::EXT('resource.'.$part.'.maxtries',$symb); # $data->{'hinttries'} = # &Apache::lonnet::EXT('resource.'.$part.'.hinttries',$symb); -# $data->{'weight'} = -# &Apache::lonnet::EXT('resource.'.$part.'.weight',$symb); + $data->{'weight'} = + &Apache::lonnet::EXT('resource.'.$part.'.weight',$symb); # $data->{'resptypes'} = join(',',@{$resource->{'partdata'}->{$part}->{'ResponseTypes'}}); return $data; }