--- loncom/homework/bridgetask.pm 2005/11/21 22:28:13 1.82 +++ loncom/homework/bridgetask.pm 2005/11/21 22:42:22 1.83 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.82 2005/11/21 22:28:13 albertel Exp $ +# $Id: bridgetask.pm,v 1.83 2005/11/21 22:42:22 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -476,7 +476,8 @@ DONESCREEN } } elsif ($target eq 'grade' && !$env{'form.webgrade'}) { if ($status eq 'NEEDS_CHECKIN') { - if(&proctor_check_auth($slot_name,$slot,'Task')) { + if(&proctor_check_auth($slot_name,$slot,'Task') + && defined($Apache::inputtags::slot_name)) { my $result=&add_to_queue('gradingqueue', [$Apache::inputtags::slot_name]); &Apache::lonxml::debug("add_to_queue said $result"); @@ -787,7 +788,8 @@ DONEBUTTON } &Apache::lonhomework::showhash(%Apache::lonhomework::results); &Apache::structuretags::finalize_storage(); - if ($award eq 'SUBMITTED') { + if ($award eq 'SUBMITTED' + && defined($Apache::inputtags::slot_name)) { &add_to_queue('gradingqueue',[$Apache::inputtags::slot_name]); } } elsif ($Apache::lonhomework::results{'INTERNAL_store'}) { @@ -1020,7 +1022,7 @@ sub add_to_queue { my $cdom=$env{'course.'.$cid.'.domain'}; my %data; $data{"$symb\0queue\0$uname\@$udom"}=$user_data; - return &Apache::lonnet::newput($queue,\%data,$cdom,$cnum); + return &Apache::lonnet::cput($queue,\%data,$cdom,$cnum); } sub show_queue { @@ -1245,8 +1247,8 @@ sub get_from_queue { if ($todo) { return $todo; } while (1) { my $starttime=time; - &Apache::lonnet::put($queue,{"$symb\0timestamp"=>$starttime}, - $cdom,$cnum); + &Apache::lonnet::cput($queue,{"$symb\0timestamp"=>$starttime}, + $cdom,$cnum); &Apache::lonxml::debug("$starttime"); my $regexp="^$symb\0queue\0"; my %queue=&Apache::lonnet::dump($queue,$cdom,$cnum,$regexp);