--- loncom/homework/bridgetask.pm 2012/01/03 00:28:17 1.258 +++ loncom/homework/bridgetask.pm 2012/09/12 05:14:09 1.260 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.258 2012/01/03 00:28:17 raeburn Exp $ +# $Id: bridgetask.pm,v 1.260 2012/09/12 05:14:09 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -719,7 +719,15 @@ sub start_Task { 'slot' => $slot_name}); ($version,$previous)=&get_version(); } - + if (($target eq 'web') && ($version ne '') && ($slot_name ne '')) { + if (ref($slot) eq 'HASH') { + if ($slot->{'endtime'} > time()) { + $result .= + &Apache::lonhtmlcommon::set_due_date($slot->{'endtime'}); + } + } + } + my $status_id = 'LC_task_take'; if ($previous && $target eq 'answer') { $status_id = 'LC_task_answer'; @@ -743,22 +751,22 @@ sub start_Task { } my $msg; if ($status eq 'UNAVAILABLE') { - $msg.='

'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'

'; + $msg.='

'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'

'; } elsif ($status eq 'NOT_IN_A_SLOT') { - $msg.='

'.&mt('You are not currently signed up to work at this time and/or place.').'

'; + $msg.='

'.&mt('You are not currently signed up to work at this time and/or place.').'

'; $msg.=&add_request_another_attempt_button("Sign up for time to work"); } elsif ($status eq 'NEEDS_CHECKIN') { - $msg.='

'.&mt('You need the Proctor to validate you.'). - '

'.&proctor_validation_screen($slot); + $msg.='

'.&mt('You need the Proctor to validate you.'). + '

'.&proctor_validation_screen($slot); } elsif ($status eq 'WAITING_FOR_GRADE') { - $msg.='

'.&mt('Your submission is in the grading queue.').'

'; + $msg.='

'.&mt('Your submission is in the grading queue.').'

'; } elsif ($env{'form.donescreen'}) { $result .= &done_screen($version); } elsif ($status eq 'NOT_YET_VIEWED') { my $symb=&Apache::lonnet::symbread(); $msg.=&Apache::structuretags::firstaccess_msg($accessmsg,$symb); } else { - $msg.='

'.&mt('Not open to be viewed').'

'; + $msg.='

'.&mt('Not open to be viewed').'

'; } if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') { $msg.='The problem '.$accessmsg;