--- loncom/homework/inputtags.pm 2010/08/29 19:39:16 1.270
+++ loncom/homework/inputtags.pm 2010/09/05 20:57:42 1.271
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.270 2010/08/29 19:39:16 raeburn Exp $
+# $Id: inputtags.pm,v 1.271 2010/09/05 20:57:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -535,13 +535,13 @@ sub current_file_submissions {
if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
$header .= '
'.&mt('Delete?').' | ';
}
- $header .= ''.&mt('Name').' | '.
+ $header .= ''.&mt('File').' | '.
''.&mt('Size (MB)').' | '.
''.&mt('Last Modified').' | '.
&Apache::loncommon::end_data_table_header_row();
my (undef,$crsid,$udom,$uname)=&Apache::lonnet::whichuser();
my ($cdom,$cnum) = ($crsid =~ /^($LONCAPA::match_domain)_($LONCAPA::match_courseid)$/);
- my ($result,$header_shown,%okfiles,%rows,@bad_file_list);
+ my ($result,$header_shown,%okfiles,%rows,%legacy,@bad_file_list);
if ($uploadedfile) {
my $url=$Apache::lonhomework::history{"resource.$part.$id.uploadedurl"};
my $link = &HTML::Entities::encode($url,'<>&"');
@@ -551,6 +551,7 @@ sub current_file_submissions {
if ($status eq 'ok') {
push(@{$okfiles{$name}},$url);
$rows{$url} = $hashref;
+ $legacy{$url} = 1;
&Apache::lonxml::extlink($url);
&Apache::lonnet::allowuploaded('/adm/essayresponse',$url);
} else {
@@ -593,9 +594,13 @@ sub current_file_submissions {
' | '."\n";
}
+ my $showname = $rows{$url}{path}.$name;
+ if ($legacy{$url}) {
+ $showname = $name.' '.&mt('not in portfolio');
+ }
$result .=
''.$name.' | '."\n".
+ '" border="0" />'.$showname.''."\n".
''.$rows{$url}{size}.' | '."\n".
''.$rows{$url}{lastmodified}.' | '."\n".
&Apache::loncommon::end_data_table_row();