[LON-CAPA-cvs] cvs: loncom /interface/statistics lonproblemanalysis.pm /localize/localize newphrases.txt
matthew
lon-capa-cvs@mail.lon-capa.org
Wed, 08 Oct 2003 19:20:47 -0000
matthew Wed Oct 8 15:20:47 2003 EDT
Modified files:
/loncom/localize/localize newphrases.txt
/loncom/interface/statistics lonproblemanalysis.pm
Log:
Further internationalization of lonproblemanalysis.
Added count of students to the problem analysis graphs - please take a look
at your favorite class and let me know what you think of the interface.
Index: loncom/localize/localize/newphrases.txt
diff -u loncom/localize/localize/newphrases.txt:1.9 loncom/localize/localize/newphrases.txt:1.10
--- loncom/localize/localize/newphrases.txt:1.9 Wed Oct 8 14:34:39 2003
+++ loncom/localize/localize/newphrases.txt Wed Oct 8 15:20:47 2003
@@ -37,3 +37,4 @@
Please notify the server administrator
Course Statistics and Charts cannot be retrieved until the database is restarted. Your data is intact but cannot be displayed at this time.
Significant figures are incorrect, submission was not graded.
+Please select a problem to analyze
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.26 loncom/interface/statistics/lonproblemanalysis.pm:1.27
--- loncom/interface/statistics/lonproblemanalysis.pm:1.26 Tue Oct 7 12:07:39 2003
+++ loncom/interface/statistics/lonproblemanalysis.pm Wed Oct 8 15:20:47 2003
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemanalysis.pm,v 1.26 2003/10/07 16:07:39 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.27 2003/10/08 19:20:47 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -82,7 +82,7 @@
}
$r->print('<hr />');
} else {
- $r->print('<h3>No Problem Selected</h3>');
+ $r->print('<h3>'.&mt('Please select a problem to analyze').'</h3>');
}
# Okay, they asked for data, so make sure we get the latest data.
$r->print(&OptionResponseProblemSelector());
@@ -150,10 +150,34 @@
}
my @Data = ('<td></td>');
for (my $i=$mintries;$i<=$maxtries;$i++) {
- push(@Data,'<td colspan="3">'.&DrawGraph('Attempt '.$i,'Foil Number',
- 'Percent Correct',100,
- $PlotData[$i]->{'good'},
- $PlotData[$i]->{'bad'}).'</td>');
+ my $minstu = $ResponseData{$Foils[0]}->[$i]->{'total'};
+ my $maxstu = $ResponseData{$Foils[0]}->[$i]->{'total'};
+ foreach my $foilid (@Foils) {
+ if ($minstu > $ResponseData{$foilid}->[$i]->{'total'}) {
+ $minstu = $ResponseData{$foilid}->[$i]->{'total'};
+ }
+ if ($maxstu < $ResponseData{$foilid}->[$i]->{'total'}) {
+ $maxstu = $ResponseData{$foilid}->[$i]->{'total'};
+ }
+ }
+ my $graphlink;
+ if ($maxstu == $minstu) {
+ $graphlink = &DrawGraph('Attempt '.$i.', '.$maxstu.' students',
+ 'Foil Number',
+ 'Percent Correct',
+ 100,
+ $PlotData[$i]->{'good'},
+ $PlotData[$i]->{'bad'});
+ } else {
+ $graphlink = &DrawGraph('Attempt '.$i.', '.$minstu.'-'.$maxstu.
+ ' students',
+ 'Foil Number',
+ 'Percent Correct',
+ 100,
+ $PlotData[$i]->{'good'},
+ $PlotData[$i]->{'bad'});
+ }
+ push(@Data,'<td colspan="3">'.$graphlink.'</td>');
}
push (@Rows,\@Data);
my $table = '<table border="1" >'."\n";
@@ -193,6 +217,8 @@
! exists($tryhash->{'incorrect'})) ||
($tryhash->{'correct'} < 1 &&
$tryhash->{'incorrect'} < 1));
+ $tryhash->{'total'} = $tryhash->{'correct'} +
+ $tryhash->{'incorrect'};
$tryhash->{'percent_corr'} = 100 *
($tryhash->{'correct'} /
($tryhash->{'correct'} + $tryhash->{'incorrect'})