--- loncom/interface/statistics/lonproblemanalysis.pm 2003/10/15 21:30:51 1.39 +++ loncom/interface/statistics/lonproblemanalysis.pm 2003/10/16 15:24:49 1.41 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemanalysis.pm,v 1.39 2003/10/15 21:30:51 matthew Exp $ +# $Id: lonproblemanalysis.pm,v 1.41 2003/10/16 15:24:49 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,12 +37,10 @@ use Apache::lonstatistics; use Apache::lonlocal; use HTML::Entities(); -my $plotcolors = [qw/ - #33ff00 - #0033cc #990000 #aaaa66 #663399 #ff9933 - #66ccff #ff9999 #cccc33 #660000 #33cc66 - /]; - #[qw/lgreen dgreen dred/]; +my $plotcolors = ['#33ff00', + '#0033cc', '#990000', '#aaaa66', '#663399', '#ff9933', + '#66ccff', '#ff9999', '#cccc33', '#660000', '#33cc66', + ]; sub BuildProblemAnalysisPage { my ($r,$c)=@_; @@ -51,7 +49,8 @@ sub BuildProblemAnalysisPage { # my @Students = @Apache::lonstatistics::Students; # - if (exists($ENV{'form.updatecaches'}) || + if (exists($ENV{'form.ClearCache'}) || + exists($ENV{'form.updatecaches'}) || (exists($ENV{'form.firstanalysis'}) && $ENV{'form.firstanalysis'} ne 'no')) { &Apache::lonstatistics::Gather_Full_Student_Data($r); @@ -87,6 +86,7 @@ sub BuildProblemAnalysisPage { # my $resource = &get_resource_from_symb($symb); if (defined($resource)) { + $r->print('
'.
@@ -309,7 +310,7 @@ sub tries_analysis {
if ($ENV{'form.AnalyzeAs'} eq 'Foils') {
$extrakey = &build_option_index($ORdata);
$xlabel = 'Foil Number';
- $ylabel = 'Option Chosen';
+ $ylabel = 'Percent Choosing Option';
foreach my $foilid (@$Foils) {
for (my $i=$mintries;$i<=$maxtries;$i++) {
foreach my $option ('_correct',@{$ORdata->{'Options'}}) {
@@ -417,8 +418,7 @@ sub analyze_option_data_by_tries {
for (my $i=0;$i<=$#Foilgrades;$i++) {
my ($foilid,$correct) = split('=',$Foilgrades[$i]);
my (undef,$submission) = split('=',$Foilsubs[$i]);
- $submission = &HTML::Entities::decode($submission);
- $submission =~ s/\%20/ /g;
+ $submission = &Apache::lonnet::unescape($submission);
if ($correct) {
$Trydata{$foilid}->[$numtries]->{'_correct'}++;
} else {
@@ -767,30 +767,23 @@ sub get_problem_data {
$key =~ s/^$part\.//;
if (ref($value) eq 'ARRAY') {
if ($key eq 'options') {
- for(my $i=0;$i |