--- loncom/homework/lonhomework.pm 2004/09/27 18:38:33 1.178.2.1 +++ loncom/homework/lonhomework.pm 2004/10/18 18:08:54 1.182 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.178.2.1 2004/09/27 18:38:33 albertel Exp $ +# $Id: lonhomework.pm,v 1.182 2004/10/18 18:08:54 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,7 +52,7 @@ use Apache::Constants qw(:common); use HTML::Entities(); use Apache::loncommon(); use Apache::lonlocal; -#use Time::HiRes qw( gettimeofday tv_interval ); +use Time::HiRes qw( gettimeofday tv_interval ); BEGIN { &Apache::lonxml::register_insert(); @@ -292,7 +292,7 @@ sub check_access { $status = 'CANNOT_ANSWER'; } } - if ($status eq 'CAN_ANSWER') { + if ($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER') { my $interval=&Apache::lonnet::EXT("resource.$id.interval"); &Apache::lonxml::debug("looking for interval $interval"); if ($interval) { @@ -453,7 +453,8 @@ sub analyze_header { '.&mt("Analyzing a problem").' '.&Apache::lonxml::message_location().'
+ &HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">'. + &Apache::structuretags::remember_problem_state().'
@@ -488,6 +489,7 @@ sub analyze { for(my $i=1;$i<$ENV{'form.numtoanalyze'}+1;$i++) { &Apache::lonhtmlcommon::Increment_PrgWin($request,\%prog_state, &mt('last problem')); + if (&Apache::loncommon::connection_aborted($request)) { return; } my $subresult=&Apache::lonnet::ssi($request->uri, ('grade_target' => 'analyze'), ('rndseed' => $i+$rndseed)); @@ -573,7 +575,8 @@ sub editxmlmode { $result.=''. &Apache::lonxml::message_location().' + &HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">'. + &Apache::structuretags::remember_problem_state().'