version 1.28, 2002/08/14 21:51:51
|
version 1.32, 2002/09/02 20:21:43
|
Line 123 sub InitializeProblemStatistics {
|
Line 123 sub InitializeProblemStatistics {
|
my $problemData; |
my $problemData; |
if($isNotCached) { |
if($isNotCached) { |
($problemData) = &ExtractStudentData(\%cache, $students); |
($problemData) = &ExtractStudentData(\%cache, $students); |
&CalculateStatistics($problemData, \%cache); |
&CalculateStatistics($problemData, \%cache, $courseID); |
} |
} |
untie(%cache); |
untie(%cache); |
|
|
Line 173 sub BuildProblemStatisticsPage {
|
Line 173 sub BuildProblemStatisticsPage {
|
$Ptr .= '<table border="0" cellspacing="5"><tbody>'; |
$Ptr .= '<table border="0" cellspacing="5"><tbody>'; |
$Ptr .= '<tr><td align="right"><b>Select Map</b></td>'."\n"; |
$Ptr .= '<tr><td align="right"><b>Select Map</b></td>'."\n"; |
$Ptr .= '<td align="left">'; |
$Ptr .= '<td align="left">'; |
$Ptr .= &Apache::lonhtmlcommon::MapOptions(\%cache, 'ProblemStatistics', |
$Ptr .= &Apache::lonhtmlcommon::MapOptions(\%cache, 'Statistics', |
'Statistics'); |
'Statistics'); |
$Ptr .= '</td></tr>'."\n"; |
$Ptr .= '</td></tr>'."\n"; |
$Ptr .= '<tr><td align="right"><b>Sorting Type:</b></td>'."\n"; |
$Ptr .= '<tr><td align="right"><b>Sorting Type:</b></td>'."\n"; |
$Ptr .= '<td align="left">'."\n"; |
$Ptr .= '<td align="left">'."\n"; |
$Ptr .= &Apache::lonhtmlcommon::AscendOrderOptions( |
$Ptr .= &Apache::lonhtmlcommon::AscendOrderOptions( |
$cache{'ProblemStatisticsAscend'}, |
$cache{'ProblemStatisticsAscend'}, |
'ProblemStatistics', |
'ProblemStatistics', |
'Statistics'); |
'Statistics'); |
$Ptr .= '</td></tr>'."\n"; |
$Ptr .= '</td></tr>'."\n"; |
$Ptr .= '<tr><td align="right"><b>Select Sections</b>'; |
$Ptr .= '<tr><td align="right"><b>Select Sections</b>'; |
$Ptr .= '</td>'."\n"; |
$Ptr .= '</td>'."\n"; |
Line 507 sub ProblemStatisticsLegend {
|
Line 507 sub ProblemStatisticsLegend {
|
$Ptr .= '<b>Dis.F.</b></td>'; |
$Ptr .= '<b>Dis.F.</b></td>'; |
$Ptr .= '<td>Discrimination Factor: A Standard for evaluating the '; |
$Ptr .= '<td>Discrimination Factor: A Standard for evaluating the '; |
$Ptr .= 'problem according to a Criterion<br>'; |
$Ptr .= 'problem according to a Criterion<br>'; |
$Ptr .= '<b>[Applied Criterion in %27 Upper Students - '; |
$Ptr .= '<b>[Criterion to group students into %27 Upper Students - '; |
$Ptr .= 'Applied the same Criterion in %27 Lower Students]</b><br>'; |
$Ptr .= 'and %27 Lower Students]</b><br>'; |
$Ptr .= '<b>1st Criterion</b> for Sorting the Students: '; |
$Ptr .= '<b>1st Criterion</b> for Sorting the Students: '; |
$Ptr .= '<b>Sum of Partial Credit Awarded / Total Number of Tries</b><br>'; |
$Ptr .= '<b>Sum of Partial Credit Awarded / Total Number of Tries</b><br>'; |
$Ptr .= '<b>2nd Criterion</b> for Sorting the Students: '; |
$Ptr .= '<b>2nd Criterion</b> for Sorting the Students: '; |
Line 699 sub SortProblems {
|
Line 699 sub SortProblems {
|
} |
} |
|
|
sub CalculateStatistics { |
sub CalculateStatistics { |
my ($data, $cache)=@_; |
my ($data, $cache, $courseID)=@_; |
|
|
my @problems = split(':::', $data->{'problemList'}); |
my @problems = split(':::', $data->{'problemList'}); |
foreach(@problems) { |
foreach(@problems) { |
Line 797 sub CalculateStatistics {
|
Line 797 sub CalculateStatistics {
|
|
|
my $df2 = $upper2Sum - $lower2Sum; |
my $df2 = $upper2Sum - $lower2Sum; |
$data->{$_.':discriminationFactor2'} = sprintf("%.2f", $df2); |
$data->{$_.':discriminationFactor2'} = sprintf("%.2f", $df2); |
|
|
|
my %storestats; |
|
my $Average = ($data->{$_.':studentCount'}) ? |
|
$data->{$_.':totalTries'}/$data->{$_.':studentCount'} : 0; |
|
$storestats{$courseID.'___'.$cache->{$sequence.':source'}. |
|
'___timestamp'}=time; |
|
$storestats{$courseID.'___'.$cache->{$sequence.':source'}. |
|
'___stdno'}=$data->{$_.':studentCount'}; |
|
$storestats{$courseID.'___'.$cache->{$sequence.':source'}. |
|
'___avetries'}=$Average; |
|
$storestats{$courseID.'___'.$cache->{$sequence.':source'}. |
|
'___difficulty'}=$data->{$_.':degreeOfDifficulty'}; |
|
$cache->{$sequence.':source'} =~ /^(\w+)\/(\w+)/; |
|
if($data->{$_.':studentCount'}) { |
|
&Apache::lonnet::put('nohist_resevaldata',\%storestats,$1,$2); |
|
} |
} |
} |
|
|
return; |
return; |