version 1.104, 2005/04/07 06:56:24
|
version 1.106, 2006/02/05 19:10:28
|
Line 661 Main interface to problem statistics.
|
Line 661 Main interface to problem statistics.
|
my $navmap; |
my $navmap; |
my @sequences; |
my @sequences; |
|
|
|
sub clean_up { |
|
undef($navmap); |
|
undef(@sequences); |
|
} |
|
|
sub BuildProblemStatisticsPage { |
sub BuildProblemStatisticsPage { |
my ($r,$c)=@_; |
my ($r,$c)=@_; |
undef($navmap); |
undef($navmap); |
Line 705 sub BuildProblemStatisticsPage {
|
Line 710 sub BuildProblemStatisticsPage {
|
'for the first analysis. Future analysis this session '. |
'for the first analysis. Future analysis this session '. |
' will not have this delay.'). |
' will not have this delay.'). |
'</p>'); |
'</p>'); |
|
&clean_up(); |
return; |
return; |
} |
} |
$r->rflush(); |
$r->rflush(); |
Line 718 sub BuildProblemStatisticsPage {
|
Line 724 sub BuildProblemStatisticsPage {
|
if (! ref($navmap)) { |
if (! ref($navmap)) { |
$r->print('<h1>'.&mt('A course-wide error occured.').'</h1>'. |
$r->print('<h1>'.&mt('A course-wide error occured.').'</h1>'. |
'<h3>'.$navmap.'</h3>'); |
'<h3>'.$navmap.'</h3>'); |
|
&clean_up(); |
return; |
return; |
} |
} |
if (exists($env{'form.Excel'})) { |
if (exists($env{'form.Excel'})) { |
Line 765 sub BuildProblemStatisticsPage {
|
Line 772 sub BuildProblemStatisticsPage {
|
&output_sequence_statistics($r); |
&output_sequence_statistics($r); |
} |
} |
} |
} |
|
&clean_up(); |
return; |
return; |
} |
} |
|
|
Line 1622 sub compute_discrimination_factor {
|
Line 1630 sub compute_discrimination_factor {
|
(\@Resources, |
(\@Resources, |
[&Apache::lonstatistics::get_selected_sections()], |
[&Apache::lonstatistics::get_selected_sections()], |
$Apache::lonstatistics::enrollment_status,undef, |
$Apache::lonstatistics::enrollment_status,undef, |
$starttime,$endtime); |
$starttime,$endtime, $symb); |
# |
# |
# compute their percent scores on the problems in the sequence, |
# compute their percent scores on the problems in the sequence, |
my $number_to_grab = int(scalar(@{$ranking})/4); |
my $number_to_grab = int(scalar(@{$ranking})/4); |
Line 1632 sub compute_discrimination_factor {
|
Line 1640 sub compute_discrimination_factor {
|
my @TopSet = |
my @TopSet = |
map { |
map { |
$_->[&Apache::loncoursedata::RNK_student()]; |
$_->[&Apache::loncoursedata::RNK_student()]; |
} @{$ranking}[($num_students-$number_to_grab)..($num_students-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'; |