[LON-CAPA-cvs] cvs: loncom /interface/statistics lonproblemanalysis.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 12 Mar 2004 21:06:32 -0000
matthew Fri Mar 12 16:06:32 2004 EDT
Modified files:
/loncom/interface/statistics lonproblemanalysis.pm
Log:
Check for aborted connections when compiling results for students.
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.78 loncom/interface/statistics/lonproblemanalysis.pm:1.79
--- loncom/interface/statistics/lonproblemanalysis.pm:1.78 Fri Mar 12 15:29:48 2004
+++ loncom/interface/statistics/lonproblemanalysis.pm Fri Mar 12 16:06:32 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemanalysis.pm,v 1.78 2004/03/12 20:29:48 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.79 2004/03/12 21:06:32 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -192,6 +192,7 @@
#########################################################
sub NumericalResponseAnalysis {
my ($r,$problem,$ProblemData,$Students) = @_;
+ my $c = $r->connection();
my ($resource,$respid) = ($problem->{'resource'},
$problem->{'respid'});
my $analysis_html;
@@ -209,6 +210,7 @@
#
# This next call causes all the waiting around that people complain about
my ($max,$min) = &GetStudentAnswers($r,$problem,$Students);
+ return if ($c->aborted());
#
# Collate the data
my %Data;
@@ -312,6 +314,7 @@
sub GetStudentAnswers {
my ($r,$problem,$Students) = @_;
+ my $c = $r->connection();
my %Answers;
my ($resource,$partid,$respid) = ($problem->{'resource'},
$problem->{'part'},
@@ -323,6 +326,7 @@
$r->print("<table>\n");
$r->rflush();
foreach my $student (@$Students) {
+ last if ($c->aborted());
my $sname = $student->{'username'};
my $sdom = $student->{'domain'};
my $answer = &Apache::lonstathelpers::analyze_problem_as_student
@@ -331,6 +335,7 @@
&mt('last student'));
$student->{'answer'} = $answer;
}
+ return if ($c->aborted());
$r->print("</table>\n");
$r->rflush();
# close progress window