--- loncom/homework/inputtags.pm 2021/12/12 21:21:44 1.333.2.12 +++ loncom/homework/inputtags.pm 2023/09/06 20:42:00 1.333.2.12.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.333.2.12 2021/12/12 21:21:44 raeburn Exp $ +# $Id: inputtags.pm,v 1.333.2.12.2.3 2023/09/06 20:42:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -473,8 +473,10 @@ sub start_textline { $result .= &spellcheck_onblur($itemid, $spellcheck); if (($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') && - (($tagstack->[-2] eq 'formularesponse') || ($tagstack->[-2] eq 'mathresponse')) && - (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffeditor') ne 'yes')) { + (((($tagstack->[-2] eq 'formularesponse') || ($tagstack->[-2] eq 'mathresponse')) && + (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffeditor') ne 'yes')) || + (($tagstack->[-2] eq 'customresponse') && + (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffeditor') eq 'no')))) { $result.=&edit_mathresponse_button($input_tag_id); } } @@ -1349,7 +1351,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."); } } @@ -1751,12 +1754,17 @@ sub gradestatus { } if ( $showbutton ) { if ($target ne 'tex') { - $button = + if ($env{'form.disable_submit'}) { + $button = ' '. + ''; + } else { + $button = ' '. ''; + } } }