--- loncom/homework/inputtags.pm 2023/09/11 12:09:06 1.333.2.12.2.4 +++ loncom/homework/inputtags.pm 2024/08/19 23:01:42 1.333.2.12.2.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.333.2.12.2.4 2023/09/11 12:09:06 raeburn Exp $ +# $Id: inputtags.pm,v 1.333.2.12.2.5 2024/08/19 23:01:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -663,8 +663,13 @@ sub file_selector { $result .= &Apache::lonhtmlcommon::row_title($addfiles); my $constraints; if ($uploadedfiletypes ne '*') { - $constraints = - &mt('Allowed filetypes: [_1]',''.$uploadedfiletypes.'').'
'; + my $showtypes = $uploadedfiletypes; + if ($showtypes =~ /,/) { + my $conjunc = &mt('or'); + $showtypes =~ s/,([^,]+)$/ $conjunc $1/; + } + $constraints = + &mt('Allowed filetypes: [_1]',''.$showtypes.'').'
'; } if ($maxfilesize) { $constraints .= &mt('Combined size of all files not to exceed: [_1] MB.',