--- loncom/homework/bridgetask.pm 2006/07/17 20:35:11 1.181 +++ loncom/homework/bridgetask.pm 2006/09/28 18:59:11 1.182 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.181 2006/07/17 20:35:11 albertel Exp $ +# $Id: bridgetask.pm,v 1.182 2006/09/28 18:59:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -394,6 +394,7 @@ sub submission_time_stamp { for (my $v=$Apache::lonhomework::history{'version'};$v>0;$v--) { if (defined($Apache::lonhomework::history{$v.':resource.'.$version.'.0.bridgetask.portfiles'})) { $submissiontime=$Apache::lonhomework::history{$v.':timestamp'}; + last; } } my $result; @@ -404,16 +405,18 @@ sub submission_time_stamp { my ($color,$when)=('#FF6666','after'); if ($diff > 0) { ($color,$when)=('#336600','before'); } my $info; + $diff = abs($diff); if ($diff%60) { $info=($diff%60).' seconds'; } $diff=int($diff/60); if ($diff%60) { $info=($diff%60).' minutes '.$info; } $diff=int($diff/60); if ($diff) { $info=$diff.' hours '.$info; } $result='

'. - &mt('Student submitted [_1] [_2] the deadline. - (Submission was at [_3], end of period was [_4].)', - $info,$when,scalar(localtime($submissiontime)), - scalar(localtime($slot{'endtime'}))). + &mt('Student submitted [_1] [_2] the deadline. '. + '(Submission was at [_3], end of period was [_4].)', + $info,$when, + &Apache::lonlocal::locallocaltime($submissiontime), + &Apache::lonlocal::locallocaltime($slot{'endtime'})). '

'; } return $result; @@ -1232,6 +1235,10 @@ DONEBUTTON 'Partial Credit Factor'); $result.=&Apache::response::meta_stores_write('status','string', 'Bridge Task Status'); + } elsif ($target eq 'edit') { + &Apache::structuretags::reset_problem_globals('Task'); + undef($Apache::lonhomework::parsing_a_task); + return ('','no'); } &Apache::structuretags::reset_problem_globals('Task'); undef($Apache::lonhomework::parsing_a_task);