--- loncom/homework/inputtags.pm 2016/04/06 00:34:12 1.342 +++ loncom/homework/inputtags.pm 2016/12/06 20:51:11 1.344 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.342 2016/04/06 00:34:12 raeburn Exp $ +# $Id: inputtags.pm,v 1.344 2016/12/06 20:51:11 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -460,6 +460,7 @@ sub start_textline { } my $name = 'HWVAL_'.$id; my $itemid = 'HWVAL_'.$partid.'_'.$id; + # NOTE: the input id should match the one given by defaut_homework input_id(). my $input_tag_id = $itemid.'_'.$input_id; if ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') { $name = "none"; @@ -1333,7 +1334,8 @@ sub decideoutput { my $first_access=&Apache::lonnet::get_first_access($interval[1]); if (defined($first_access)) { my $due_date= &Apache::lonnet::EXT("resource.$part.duedate"); - unless (($due_date) && ($due_date < $first_access + $interval[0])) { + my ($timelimit) = ($interval[0] =~ /^(\d+)/); + unless (($due_date) && ($due_date < $first_access + $timelimit)) { $message = &mt("Answer Submitted: Your final submission will be graded when the time limit is reached."); } }