--- loncom/homework/inputtags.pm 2024/08/19 23:01:42 1.333.2.12.2.5 +++ loncom/homework/inputtags.pm 2023/02/05 00:17:42 1.333.2.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.333.2.12.2.5 2024/08/19 23:01:42 raeburn Exp $ +# $Id: inputtags.pm,v 1.333.2.13 2023/02/05 00:17:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -450,7 +450,6 @@ sub start_textline { if ($addchars) { $result.=&addchars('HWVAL_'.$id,$addchars); } - my $numrespclass; my $readonly=&Apache::lonxml::get_param('readonly',$parstack, $safeeval); if (lc($readonly) eq 'yes' @@ -458,10 +457,6 @@ sub start_textline { $readonly=' readonly="readonly" '; } else { $readonly=''; - if (($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') && - ($tagstack->[-2] eq 'numericalresponse')) { - $numrespclass = ' LC_numresponse_text'; - } } my $name = 'HWVAL_'.$id; my $itemid = 'HWVAL_'.$partid.'_'.$id; @@ -474,7 +469,7 @@ sub start_textline { . ' type="text" '.$readonly.' name="'. $name . '"' . ' id="' . $input_tag_id . '"' . ' value="'. $oldresponse.'"' - . ' class="LC_textline spellchecked'.$numrespclass.'" size="'.$size.'"'.$maxlength.' />'; + . ' class="LC_textline spellchecked" size="'.$size.'"'.$maxlength.' />'; $result .= &spellcheck_onblur($itemid, $spellcheck); if (($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') && @@ -663,13 +658,8 @@ sub file_selector { $result .= &Apache::lonhtmlcommon::row_title($addfiles); my $constraints; if ($uploadedfiletypes ne '*') { - my $showtypes = $uploadedfiletypes; - if ($showtypes =~ /,/) { - my $conjunc = &mt('or'); - $showtypes =~ s/,([^,]+)$/ $conjunc $1/; - } - $constraints = - &mt('Allowed filetypes: [_1]',''.$showtypes.'').'
'; + $constraints = + &mt('Allowed filetypes: [_1]',''.$uploadedfiletypes.'').'
'; } if ($maxfilesize) { $constraints .= &mt('Combined size of all files not to exceed: [_1] MB.', @@ -1361,8 +1351,7 @@ 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"); - my ($timelimit) = ($interval[0] =~ /^(\d+)/); - unless (($due_date) && ($due_date < $first_access + $timelimit)) { + unless (($due_date) && ($due_date < $first_access + $interval[0])) { $message = &mt("Answer Submitted: Your final submission will be graded when the time limit is reached."); } } @@ -1764,17 +1753,12 @@ sub gradestatus { } if ( $showbutton ) { if ($target ne 'tex') { - if ($env{'form.disable_submit'}) { - $button = ' '. - ''; - } else { - $button = + $button = ' '. ''; - } } }