--- loncom/homework/inputtags.pm 2005/03/31 21:24:29 1.160 +++ loncom/homework/inputtags.pm 2005/04/05 15:39:41 1.164 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.160 2005/03/31 21:24:29 albertel Exp $ +# $Id: inputtags.pm,v 1.164 2005/04/05 15:39:41 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -306,8 +306,11 @@ sub file_selector { if (!$uploadedfiletypes) { return ''; } my $result; - $result.=''. - &mt('Allowed filetypes: [_1]',$uploadedfiletypes).'
'; + $result.=''; + if ($uploadedfiletypes ne '*') { + $result.= + &mt('Allowed filetypes: [_1]',$uploadedfiletypes).'
'; + } if ($which eq 'uploadonly' || $which eq 'both') { $result.=&mt('Submit a file: (only one file can be uploaded)'). '
'. '
'; if ($Apache::lonhomework::history{"resource.$part.$id.portfiles"}=~/[^\s]/){ - my $filelist; + my @filelist; foreach my $file (split(',',&Apache::lonnet::unescape($Apache::lonhomework::history{"resource.$part.$id.portfiles"}))) { my (undef,undef,$domain,$user)=&Apache::lonxml::whichuser(); my $url="/uploaded/$domain/$user/portfolio$file"; my $icon=&Apache::loncommon::icon($url); - $filelist.=''.$file.''; + push(@filelist,''.$file.''); } - $result.=&mt("Portfolio files previously selected: [_1]",$filelist); + $result.=&mt("Portfolio files previously selected: [_1]",join(', ',@filelist)); } } $result.=''; @@ -805,7 +808,10 @@ sub gradestatus { if ( $maxtries eq '' ) { $maxtries = '2'; } if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } my $tries_text=&mt('Tries'); - if ( $Apache::lonhomework::type eq 'survey') { $tries_text=&mt('Submissions'); } + if ( $Apache::lonhomework::type eq 'survey' || + $Apache::lonhomework::parsing_a_task) { + $tries_text=&mt('Submissions'); + } if ( $showbutton ) { if ($target eq 'tex') { if ($ENV{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam' && $ENV{'form.suppress_tries'} ne 'yes') { @@ -815,7 +821,8 @@ sub gradestatus { } } else { $trystr = "".$tries_text." $tries"; - if($ENV{'request.state'} ne 'construct') { + if ($Apache::lonhomework::parsing_a_task) { + } elsif($ENV{'request.state'} ne 'construct') { $trystr.="/$maxtries"; } else { if (defined($Apache::inputtags::params{'maxtries'})) { @@ -833,10 +840,9 @@ sub gradestatus { } if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) { #last submissions was after due date - if ($target eq 'tex') { - $latemessage=' The last submission was after the Due Date '; - } else { - $latemessage="The last submission was after the Due Date"; + $latemessage=&mt(' The last submission was after the Due Date ');; + if ($target eq 'web') { + $latemessage=''.$latemessage.''; } } }