Diff for /loncom/homework/inputtags.pm between versions 1.270 and 1.271

version 1.270, 2010/08/29 19:39:16 version 1.271, 2010/09/05 20:57:42
Line 535  sub current_file_submissions { Line 535  sub current_file_submissions {
     if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {      if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
         $header .= '<th>'.&mt('Delete?').'</th>';          $header .= '<th>'.&mt('Delete?').'</th>';
     }      }
     $header .=   '<th>'.&mt('Name').'</th>'.      $header .=   '<th>'.&mt('File').'</th>'.
                  '<th>'.&mt('Size (MB)').'</th>'.                   '<th>'.&mt('Size (MB)').'</th>'.
                  '<th>'.&mt('Last Modified').'</th>'.                   '<th>'.&mt('Last Modified').'</th>'.
                  &Apache::loncommon::end_data_table_header_row();                   &Apache::loncommon::end_data_table_header_row();
     my (undef,$crsid,$udom,$uname)=&Apache::lonnet::whichuser();      my (undef,$crsid,$udom,$uname)=&Apache::lonnet::whichuser();
     my ($cdom,$cnum) = ($crsid =~ /^($LONCAPA::match_domain)_($LONCAPA::match_courseid)$/);      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) {      if ($uploadedfile) {
         my $url=$Apache::lonhomework::history{"resource.$part.$id.uploadedurl"};          my $url=$Apache::lonhomework::history{"resource.$part.$id.uploadedurl"};
         my $link = &HTML::Entities::encode($url,'<>&"');          my $link = &HTML::Entities::encode($url,'<>&"');
Line 551  sub current_file_submissions { Line 551  sub current_file_submissions {
         if ($status eq 'ok') {          if ($status eq 'ok') {
             push(@{$okfiles{$name}},$url);              push(@{$okfiles{$name}},$url);
             $rows{$url} = $hashref;              $rows{$url} = $hashref;
               $legacy{$url} = 1;
             &Apache::lonxml::extlink($url);              &Apache::lonxml::extlink($url);
             &Apache::lonnet::allowuploaded('/adm/essayresponse',$url);              &Apache::lonnet::allowuploaded('/adm/essayresponse',$url);
         } else {          } else {
Line 593  sub current_file_submissions { Line 594  sub current_file_submissions {
                                  '<td valign="bottom"><input type="checkbox" name="HWFILE'.$jspart.'_'.$id.'_delete"'.                                   '<td valign="bottom"><input type="checkbox" name="HWFILE'.$jspart.'_'.$id.'_delete"'.
                                  ' value="'.$portfile.'" /></td>'."\n";                                   ' value="'.$portfile.'" /></td>'."\n";
                         }                          }
                           my $showname = $rows{$url}{path}.$name;
                           if ($legacy{$url}) {
                               $showname = $name.' '.&mt('not in portfolio');
                           }
                         $result .=                           $result .= 
                             '<td><a href="'.$link.'"><img src="'.$icon.                              '<td><a href="'.$link.'"><img src="'.$icon.
                             '" border="0" />'.$name.'</a></td>'."\n".                              '" border="0" />'.$showname.'</a></td>'."\n".
                             '<td align="right" valign="bottom">'.$rows{$url}{size}.'</td>'."\n".                              '<td align="right" valign="bottom">'.$rows{$url}{size}.'</td>'."\n".
                             '<td align="right" valign="bottom">'.$rows{$url}{lastmodified}.'</td>'."\n".                              '<td align="right" valign="bottom">'.$rows{$url}{lastmodified}.'</td>'."\n".
                             &Apache::loncommon::end_data_table_row();                              &Apache::loncommon::end_data_table_row();

Removed from v.1.270  
changed lines
  Added in v.1.271


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>