--- loncom/interface/statistics/lonproblemstatistics.pm 2023/09/08 00:07:30 1.122.2.4.2.1 +++ loncom/interface/statistics/lonproblemstatistics.pm 2014/02/28 19:20:17 1.126 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.122.2.4.2.1 2023/09/08 00:07:30 raeburn Exp $ +# $Id: lonproblemstatistics.pm,v 1.126 2014/02/28 19:20:17 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,6 +52,7 @@ package Apache::lonproblemstatistics; use strict; use Apache::lonnet; use Apache::loncommon(); +use Apache::lonquickgrades(); use Apache::lonhtmlcommon; use Apache::loncoursedata; use Apache::lonstatistics; @@ -589,9 +590,9 @@ sub field_selection_input { $Str .= ''."\n"; foreach my $field (@Fields) { next if ($field->{'selectable'} ne 'yes'); - $Str .= ' '."\n"; } @@ -704,6 +705,7 @@ sub BuildProblemStatisticsPage { # Finally let the user know we are here $r->print(&Apache::lonhtmlcommon::breadcrumbs('Overall Problem Statistics', 'Statistics_Overall_Key')); + &Apache::lonquickgrades::startGradeScreen($r,'statistics'); my $interface = &CreateInterface($r); $r->print($interface); @@ -757,10 +759,9 @@ sub BuildProblemStatisticsPage { &Apache::lonstatistics::section_and_enrollment_description(). '

'); my $count = 0; - my $include_tools = 1; foreach my $seq (@sequences) { my @resources = - &Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools); + &Apache::lonstathelpers::get_resources($navmap,$seq); $count += scalar(@resources); } if ($count > 10) { @@ -1468,9 +1469,8 @@ sub write_headers { ################################################## sub compute_statistics_on_sequence { my ($seq) = @_; - my $include_tools = 1; my @Data; - foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools)) { + foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq)) { foreach my $part (@{$res->parts}) { next if (($res->is_survey($part)) || ($res->is_anonsurvey($part))) ; # @@ -1648,10 +1648,9 @@ Returns: integer between -1 and 1 ############################################### sub compute_discrimination_factor { my ($resource,$part,$seq) = @_; - my $include_tools = 1; my $symb = $resource->symb; my @Resources; - foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools)){ + foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq)){ next if ($res->symb eq $symb); push (@Resources,$res->symb); } @@ -1670,11 +1669,11 @@ sub compute_discrimination_factor { my $number_to_grab = int(scalar(@{$ranking})/4); my $num_students = scalar(@{$ranking}); my @BottomSet = map { $_->[&Apache::loncoursedata::RNK_student()]; - } @{$ranking}[0..$number_to_grab-1]; + } @{$ranking}[0..$number_to_grab]; my @TopSet = map { $_->[&Apache::loncoursedata::RNK_student()]; - } @{$ranking}[-$number_to_grab..-1]; + } @{$ranking}[-$number_to_grab..0]; if (! @BottomSet || (@BottomSet == 1 && $BottomSet[0] eq '') || ! @TopSet || (@TopSet == 1 && $TopSet[0] eq '')) { return 'nan'; @@ -1715,11 +1714,10 @@ sub compute_discrimination_factor { ############################################### sub compute_sequence_statistics { my ($seq) = @_; - my $include_tools = 1; my $symb = $seq->symb; my @Resources; my $part_count; - foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools)) { + foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq)) { push (@Resources,$res->symb); $part_count += scalar(@{$res->parts}); }