--- loncom/interface/statistics/lonproblemanalysis.pm 2004/03/22 17:25:27 1.82
+++ loncom/interface/statistics/lonproblemanalysis.pm 2004/06/04 21:42:18 1.85
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemanalysis.pm,v 1.82 2004/03/22 17:25:27 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.85 2004/06/04 21:42:18 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -51,10 +51,6 @@ my @SubmitButtons = ({ name => 'PrevProb
{ name => 'NextProblemAnalysis',
text => 'Next Problem' },
{ name => 'break'},
- { name => 'ClearCache',
- text => 'Clear Caches' },
- { name => 'updatecaches',
- text => 'Update Student Data' },
{ name => 'SelectAnother',
text => 'Choose a different Problem' },
{ name => 'ExcelOutput',
@@ -85,18 +81,8 @@ sub BuildProblemAnalysisPage {
$r->print('
There are no students in the sections selected
');
}
#
- &Apache::loncoursedata::clear_internal_caches();
- 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);
- }
- if (! exists($ENV{'form.firstanalysis'})) {
- $r->print('');
- } else {
- $r->print('');
- }
+ my @CacheButtonHTML =
+ &Apache::lonstathelpers::manage_caches($r,'Statistics','stats_status');
$r->rflush();
#
my $problem_types = '(option|radiobutton|numerical)';
@@ -111,6 +97,9 @@ sub BuildProblemAnalysisPage {
$r->print(' 'x5);
}
}
+ foreach my $html (@CacheButtonHTML) {
+ $r->print($html.(' 'x5));
+ }
#
$r->print('
');
$r->rflush();
@@ -230,8 +219,10 @@ sub NumericalResponseAnalysis {
}
#
# This next call causes all the waiting around that people complain about
- my ($max,$min) = &Apache::lonstathelpers::GetStudentAnswers($r,$problem,
- $Students);
+ my ($max,$min) =
+ &Apache::lonstathelpers::GetStudentAnswers($r,$problem,$Students,
+ 'Statistics',
+ 'stats_status');
return if ($c->aborted());
#
# Collate the data
@@ -1320,18 +1311,18 @@ sub build_foil_index {
if (@Concepts > 1) {
$table .= ''.
''.$conceptindex.' | '.
- ''.&HTML::Entities::encode($concept->{'name'}).' | '.
+ ''.&HTML::Entities::encode($concept->{'name'},'<>&"').' | '.
''.$foilindex++.' | '.
- ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'},'<>&"').' | '.
''.$Foildata{$firstfoil}->{'text'}.' | '.
- ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'},'<>&"').' | '.
"
\n";
} else {
$table .= ''.
''.$foilindex++.' | '.
- ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'},'<>&"').' | '.
''.$Foildata{$firstfoil}->{'text'}.' | '.
- ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'},'<>&"').' | '.
"
\n";
}
foreach my $foilid (@FoilsInConcept) {
@@ -1340,16 +1331,16 @@ sub build_foil_index {
' | '.
' | '.
''.$foilindex.' | '.
- ''.&HTML::Entities::encode($Foildata{$foilid}->{'name'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$foilid}->{'name'},'<>&"').' | '.
''.$Foildata{$foilid}->{'text'}.' | '.
- ''.&HTML::Entities::encode($Foildata{$foilid}->{'value'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$foilid}->{'value'},'<>&"').' | '.
"\n";
} else {
$table .= ''.
''.$foilindex.' | '.
- ''.&HTML::Entities::encode($Foildata{$foilid}->{'name'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$foilid}->{'name'},'<>&"').' | '.
''.$Foildata{$foilid}->{'text'}.' | '.
- ''.&HTML::Entities::encode($Foildata{$foilid}->{'value'}).' | '.
+ ''.&HTML::Entities::encode($Foildata{$foilid}->{'value'},'<>&"').' | '.
"
\n";
}
} continue {
@@ -1374,7 +1365,7 @@ sub build_option_index {
''.
''.
(' 'x4).' | '.
- ''.&HTML::Entities::encode($option).' | '.
+ ''.&HTML::Entities::encode($option,'<>&"').' | '.
"
\n");
}
shift(@Rows); # Throw away 'correct option chosen' color
@@ -1468,7 +1459,7 @@ sub CreateInterface {
$Str .= '
';
}
{
- $Str .= '
'.&mt('Number of Plots:');
+ $Str .= ''.&mt('Number of Plots:');
$Str .= &Apache::loncommon::help_open_topic
('Analysis_num_plots');
$Str .= '';
+ $Str .= '
';
+ }
+ {
+ $Str .= ''.&mt('Status: [_1]',
+ ''
+ ).
+ '
';
}
}
$Str .= '';