version 1.160, 2005/03/31 21:24:29
|
version 1.164, 2005/04/05 15:39:41
|
Line 306 sub file_selector {
|
Line 306 sub file_selector {
|
if (!$uploadedfiletypes) { return ''; } |
if (!$uploadedfiletypes) { return ''; } |
my $result; |
my $result; |
|
|
$result.='<tr><td>'. |
$result.='<tr><td>'; |
&mt('Allowed filetypes: <b>[_1]</b>',$uploadedfiletypes).'<br />'; |
if ($uploadedfiletypes ne '*') { |
|
$result.= |
|
&mt('Allowed filetypes: <b>[_1]</b>',$uploadedfiletypes).'<br />'; |
|
} |
if ($which eq 'uploadonly' || $which eq 'both') { |
if ($which eq 'uploadonly' || $which eq 'both') { |
$result.=&mt('Submit a file: (only one file can be uploaded)'). |
$result.=&mt('Submit a file: (only one file can be uploaded)'). |
' <br /><input type="file" size="50" name="HWFILE'. |
' <br /><input type="file" size="50" name="HWFILE'. |
Line 335 sub file_selector {
|
Line 338 sub file_selector {
|
'<input type="text" size="50" name="HWPORT'.$part.'_'.$id.'" value="" />'. |
'<input type="text" size="50" name="HWPORT'.$part.'_'.$id.'" value="" />'. |
'<br />'; |
'<br />'; |
if ($Apache::lonhomework::history{"resource.$part.$id.portfiles"}=~/[^\s]/){ |
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"}))) { |
foreach my $file (split(',',&Apache::lonnet::unescape($Apache::lonhomework::history{"resource.$part.$id.portfiles"}))) { |
my (undef,undef,$domain,$user)=&Apache::lonxml::whichuser(); |
my (undef,undef,$domain,$user)=&Apache::lonxml::whichuser(); |
my $url="/uploaded/$domain/$user/portfolio$file"; |
my $url="/uploaded/$domain/$user/portfolio$file"; |
my $icon=&Apache::loncommon::icon($url); |
my $icon=&Apache::loncommon::icon($url); |
$filelist.='<a href="'.$url.'"><img src="'.$icon. |
push(@filelist,'<a href="'.$url.'"><img src="'.$icon. |
'" border="0" />'.$file.'</a>'; |
'" border="0" />'.$file.'</a>'); |
} |
} |
$result.=&mt("Portfolio files previously selected: <strong>[_1]</strong>",$filelist); |
$result.=&mt("Portfolio files previously selected: <strong>[_1]</strong>",join(', ',@filelist)); |
} |
} |
} |
} |
$result.='</td></tr>'; |
$result.='</td></tr>'; |
Line 805 sub gradestatus {
|
Line 808 sub gradestatus {
|
if ( $maxtries eq '' ) { $maxtries = '2'; } |
if ( $maxtries eq '' ) { $maxtries = '2'; } |
if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } |
if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } |
my $tries_text=&mt('Tries'); |
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 ( $showbutton ) { |
if ($target eq 'tex') { |
if ($target eq 'tex') { |
if ($ENV{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam' && $ENV{'form.suppress_tries'} ne 'yes') { |
if ($ENV{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam' && $ENV{'form.suppress_tries'} ne 'yes') { |
Line 815 sub gradestatus {
|
Line 821 sub gradestatus {
|
} |
} |
} else { |
} else { |
$trystr = "<td><nobr>".$tries_text." $tries"; |
$trystr = "<td><nobr>".$tries_text." $tries"; |
if($ENV{'request.state'} ne 'construct') { |
if ($Apache::lonhomework::parsing_a_task) { |
|
} elsif($ENV{'request.state'} ne 'construct') { |
$trystr.="/$maxtries"; |
$trystr.="/$maxtries"; |
} else { |
} else { |
if (defined($Apache::inputtags::params{'maxtries'})) { |
if (defined($Apache::inputtags::params{'maxtries'})) { |
Line 833 sub gradestatus {
|
Line 840 sub gradestatus {
|
} |
} |
if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) { |
if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) { |
#last submissions was after due date |
#last submissions was after due date |
if ($target eq 'tex') { |
$latemessage=&mt(' The last submission was after the Due Date ');; |
$latemessage=' The last submission was after the Due Date '; |
if ($target eq 'web') { |
} else { |
$latemessage='<td bgcolor="#ffaaaa">'.$latemessage.'</td>'; |
$latemessage="<td bgcolor=\"#ffaaaa\">The last submission was after the Due Date</td>"; |
|
} |
} |
} |
} |
} |
} |