version 1.122.2.4, 2018/03/07 13:32:56
|
version 1.125, 2014/02/03 18:52:30
|
Line 52 package Apache::lonproblemstatistics;
|
Line 52 package Apache::lonproblemstatistics;
|
use strict; |
use strict; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
|
use Apache::lonquickgrades(); |
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::loncoursedata; |
use Apache::loncoursedata; |
use Apache::lonstatistics; |
use Apache::lonstatistics; |
Line 182 my @Fields = (
|
Line 183 my @Fields = (
|
format => '%d', |
format => '%d', |
sortable => 'yes', |
sortable => 'yes', |
graphable => 'yes', |
graphable => 'yes', |
long_title => 'Minimum Number of Tries', |
long_title => 'Minumum Number of Tries', |
selectable => 'yes', |
selectable => 'yes', |
defaultselected => 'yes', |
defaultselected => 'yes', |
}, |
}, |
Line 438 my @SeqFields = (
|
Line 439 my @SeqFields = (
|
format => '%4.2f', |
format => '%4.2f', |
sortable => 'no', |
sortable => 'no', |
graphable => 'no', |
graphable => 'no', |
long_title => 'Minimum Sequence Score', |
long_title => 'Minumum Sequence Score', |
selectable => 'yes', |
selectable => 'yes', |
defaultselected => 'no', |
defaultselected => 'no', |
}, |
}, |
Line 493 my @SeqFields = (
|
Line 494 my @SeqFields = (
|
format => '%4.2f', |
format => '%4.2f', |
sortable => 'no', |
sortable => 'no', |
graphable => 'no', |
graphable => 'no', |
long_title => 'Minimum Number of Correct Problems', |
long_title => 'Minumum Number of Correct Problems', |
selectable => 'yes', |
selectable => 'yes', |
defaultselected => 'no', |
defaultselected => 'no', |
}, |
}, |
Line 589 sub field_selection_input {
|
Line 590 sub field_selection_input {
|
$Str .= '<option value="all">'.&mt('all').'</option>'."\n"; |
$Str .= '<option value="all">'.&mt('all').'</option>'."\n"; |
foreach my $field (@Fields) { |
foreach my $field (@Fields) { |
next if ($field->{'selectable'} ne 'yes'); |
next if ($field->{'selectable'} ne 'yes'); |
$Str .= ' <option value="'.$field->{'name'}.'"'; |
$Str .= ' <option value="'.$field->{'name'}.'" '; |
if ($field->{'selected'} eq 'yes') { |
if ($field->{'selected'} eq 'yes') { |
$Str .= ' selected="selected"'; |
$Str .= 'selected="selected" '; |
} |
} |
$Str .= '>'.&mt($field->{'title'}).'</option>'."\n"; |
$Str .= '>'.&mt($field->{'title'}).'</option>'."\n"; |
} |
} |
Line 704 sub BuildProblemStatisticsPage {
|
Line 705 sub BuildProblemStatisticsPage {
|
# Finally let the user know we are here |
# Finally let the user know we are here |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Overall Problem Statistics', |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Overall Problem Statistics', |
'Statistics_Overall_Key')); |
'Statistics_Overall_Key')); |
|
&Apache::lonquickgrades::startGradeScreen($r,'statistics'); |
|
|
my $interface = &CreateInterface($r); |
my $interface = &CreateInterface($r); |
$r->print($interface); |
$r->print($interface); |
Line 1667 sub compute_discrimination_factor {
|
Line 1669 sub compute_discrimination_factor {
|
my $number_to_grab = int(scalar(@{$ranking})/4); |
my $number_to_grab = int(scalar(@{$ranking})/4); |
my $num_students = scalar(@{$ranking}); |
my $num_students = scalar(@{$ranking}); |
my @BottomSet = map { $_->[&Apache::loncoursedata::RNK_student()]; |
my @BottomSet = map { $_->[&Apache::loncoursedata::RNK_student()]; |
} @{$ranking}[0..$number_to_grab-1]; |
} @{$ranking}[0..$number_to_grab]; |
my @TopSet = |
my @TopSet = |
map { |
map { |
$_->[&Apache::loncoursedata::RNK_student()]; |
$_->[&Apache::loncoursedata::RNK_student()]; |
} @{$ranking}[-$number_to_grab..-1]; |
} @{$ranking}[-$number_to_grab..0]; |
if (! @BottomSet || (@BottomSet == 1 && $BottomSet[0] eq '') || |
if (! @BottomSet || (@BottomSet == 1 && $BottomSet[0] eq '') || |
! @TopSet || (@TopSet == 1 && $TopSet[0] eq '')) { |
! @TopSet || (@TopSet == 1 && $TopSet[0] eq '')) { |
return 'nan'; |
return 'nan'; |