--- loncom/interface/statistics/lonproblemanalysis.pm 2003/10/16 13:23:13 1.40 +++ 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.40 2003/10/16 13:23:13 matthew Exp $ +# $Id: lonproblemanalysis.pm,v 1.41 2003/10/16 15:24:49 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -49,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); @@ -85,6 +86,7 @@ sub BuildProblemAnalysisPage { # my $resource = &get_resource_from_symb($symb); if (defined($resource)) { + $r->print('
'.
@@ -307,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'}}) {
@@ -415,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 {
@@ -765,30 +767,23 @@ sub get_problem_data {
$key =~ s/^$part\.//;
if (ref($value) eq 'ARRAY') {
if ($key eq 'options') {
- for(my $i=0;$i |