--- loncom/homework/lonhomework.pm 2005/11/10 20:43:00 1.222 +++ loncom/homework/lonhomework.pm 2005/11/15 21:39:33 1.225 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.222 2005/11/10 20:43:00 albertel Exp $ +# $Id: lonhomework.pm,v 1.225 2005/11/15 21:39:33 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -236,7 +236,6 @@ sub check_task_access { my ($status,$datemsg)=&check_access; if ($status eq 'SHOW_ANSWER' || $status eq 'CLOSED' || - $status eq 'CANNOT_ANSWER' || $status eq 'INVALID_ACCESS' || $status eq 'UNAVAILABLE') { return ($status,$datemsg); @@ -286,6 +285,11 @@ sub check_task_access { return ('WAITING_FOR_GRADE'); } } + if ( $status eq 'CANNOT_ANSWER' && + ($slotstatus ne 'NEEDS_CHECKIN' && $slotstatus ne 'NOT_IN_A_SLOT')) { + return ($status,$datemsg); + } + return ($slotstatus,$datemsg,$slot_name,$returned_slot); } @@ -919,7 +923,7 @@ EDITMENU sub handler { #my $t0 = [&gettimeofday()]; my $request=$_[0]; - + $Apache::lonxml::request=$request; $Apache::lonxml::debug=$env{'user.debug'}; $env{'request.uri'}=$request->uri; &setuppermissions(); @@ -939,10 +943,6 @@ sub handler { if ($Apache::lonhomework::browse ne 'F' && $env{'request.state'} ne "construct") { #should know where we are, so ask - if ( &Apache::lonnet::mod_perl_version() == 2 ) { - &Apache::lonnet::cleanenv(); - } - &Apache::lonnet::logthis(&Apache::lonnet::mod_perl_version()); $request->internal_redirect('/adm/ambiguous'); return OK; } }