--- loncom/homework/bridgetask.pm 2010/08/23 03:24:01 1.252 +++ loncom/homework/bridgetask.pm 2010/09/27 18:45:14 1.253 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.252 2010/08/23 03:24:01 raeburn Exp $ +# $Id: bridgetask.pm,v 1.253 2010/09/27 18:45:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1334,39 +1334,39 @@ DONEBUTTON } if ($canstore) { &Apache::structuretags::finalize_storage(); + # data stored, now handle queue + if ($review) { + if ($env{'form.queue'} eq 'reviewqueue') { + &check_queue_unlock($env{'form.queue'}); + &Apache::lonxml::debug(" still needs review not changing status."); + } else { + if ($env{'form.queue'} ne 'none') { + &move_between_queues($env{'form.queue'},'reviewqueue'); + } else { + &add_to_queue('reviewqueue',\%queue_data); + } + } + } elsif ($ungraded) { + if ($env{'form.queue'} eq 'reviewqueue') { + &Apache::lonxml::debug("moving back."); + &move_between_queues($env{'form.queue'}, + 'gradingqueue'); + } elsif ($env{'form.queue'} eq 'none' ) { + &add_to_queue('gradingqueue',\%queue_data); + } else { + &check_queue_unlock($env{'form.queue'}); + } + } elsif ($mandatory_failed) { + &remove_from_queue($env{'form.queue'}); + } else { + &remove_from_queue($env{'form.queue'}); + } } else { + &check_queue_unlock($env{'form.queue'}); $result .= '
'. - &mt('Information extracted from the current gradingkey was for a different BT or user from those for which grading data are to be stored.').' '.&mt('No grading changes stored.').'

'; + &mt('Information extracted from the current gradingkey was for a different BT or user from those for which grading data are to be stored.').' '.&mt('No grading changes stored.').'
'; } - - # data stored, now handle queue - if ($review) { - if ($env{'form.queue'} eq 'reviewqueue') { - &check_queue_unlock($env{'form.queue'}); - &Apache::lonxml::debug(" still needs review not changing status."); - } else { - if ($env{'form.queue'} ne 'none') { - &move_between_queues($env{'form.queue'},'reviewqueue'); - } else { - &add_to_queue('reviewqueue',\%queue_data); - } - } - } elsif ($ungraded) { - if ($env{'form.queue'} eq 'reviewqueue') { - &Apache::lonxml::debug("moving back."); - &move_between_queues($env{'form.queue'}, - 'gradingqueue'); - } elsif ($env{'form.queue'} eq 'none' ) { - &add_to_queue('gradingqueue',\%queue_data); - } else { - &check_queue_unlock($env{'form.queue'}); - } - } elsif ($mandatory_failed) { - &remove_from_queue($env{'form.queue'}); - } else { - &remove_from_queue($env{'form.queue'}); - } - } + } if (exists($Apache::lonhomework::results{'INTERNAL_store'})) { # instance generation occurred and hasn't yet been stored &Apache::structuretags::finalize_storage();