--- loncom/homework/bridgetask.pm 2012/01/03 00:28:17 1.258 +++ loncom/homework/bridgetask.pm 2014/02/13 18:13:22 1.263 @@ -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.263 2014/02/13 18:13:22 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -252,11 +252,11 @@ sub add_grading_button { $size=scalar(keys(%sections))+2; } my $sec_select = "\n".'\n"; + $sec_select .= "\t".'\n\n"; my $uri=$env{'request.uri'}; if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); } @@ -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; @@ -988,7 +996,7 @@ sub get_key_todo { my $classlist=&get_limited_classlist(); if (!&allow_grade_user($classlist->{$uname.':'.$udom})) { return (undef,'not_allowed', - &mt('Requested student ([_1]) is in a section you aren\'t allowed to grade.',$uname.':'.$udom)); + &mt("Requested student ([_1]) is in a section you aren't allowed to grade.",$uname.':'.$udom)); } } my $gradingkey=&encode_queue_key($symb,$udom,$uname); @@ -1788,7 +1796,7 @@ sub show_queue { $result.=(<$status -
+ @@ -2207,7 +2215,7 @@ sub select_user { $result.=&Apache::loncommon::start_data_table_row(); $result.=< - +