Diff for /loncom/homework/inputtags.pm between versions 1.328 and 1.329

version 1.328, 2014/11/28 18:23:04 version 1.329, 2014/12/22 17:04:03
Line 641  sub file_selector { Line 641  sub file_selector {
     my $current_files_display = &current_file_submissions($part,$id);      my $current_files_display = &current_file_submissions($part,$id);
     my $addfiles;      my $addfiles;
     if ($current_files_display) {      if ($current_files_display) {
         $result .= &Apache::lonhtmlcommon::row_title(&mt('Currently submitted files')).          $result .= &Apache::lonhtmlcommon::row_title(&mt('Files currently selected for submission')).
                    $current_files_display.                     $current_files_display.
                    &Apache::lonhtmlcommon::row_closure();                     &Apache::lonhtmlcommon::row_closure();
         $addfiles = &mt('Submit other file(s)');          $addfiles = &mt('Submit other file(s)');
Line 699  sub current_file_submissions { Line 699  sub current_file_submissions {
     my $uploadedfile=$Apache::lonhomework::history{"resource.$part.$id.uploadedfile"};      my $uploadedfile=$Apache::lonhomework::history{"resource.$part.$id.uploadedfile"};
     my $portfiles=$Apache::lonhomework::history{"resource.$part.$id.portfiles"};      my $portfiles=$Apache::lonhomework::history{"resource.$part.$id.portfiles"};
     return if (($uploadedfile eq '') && ($portfiles !~/[^\s]/));      return if (($uploadedfile eq '') && ($portfiles !~/[^\s]/));
       my @unversioned;
       foreach my $file (split(/\s*,\s*/,&unescape($portfiles))) {
           my ($path,$name) = ($file =~ m{^(.*/)([^/]+)$});
           my ($origname,$version,$ext) = &Apache::lonnet::file_name_version_ext($name);
           unless ($version) {
               push(@unversioned,$file);
           }    
       }
       return if (!@unversioned);
     my $header = &portpath_popup_js().      my $header = &portpath_popup_js().
                  &Apache::loncommon::start_data_table().                   &Apache::loncommon::start_data_table().
                  &Apache::loncommon::start_data_table_header_row();                   &Apache::loncommon::start_data_table_header_row();
Line 709  sub current_file_submissions { Line 718  sub current_file_submissions {
                  '<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 ($symb,$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,%legacy,@bad_file_list);      my ($result,$header_shown,%okfiles,%rows,%legacy,@bad_file_list);
     if ($uploadedfile) {      if ($uploadedfile) {
Line 728  sub current_file_submissions { Line 737  sub current_file_submissions {
             push(@bad_file_list,$error);              push(@bad_file_list,$error);
         }          }
     }      }
     if ($portfiles =~ /[^\s]/) {      if (@unversioned > 0) {
         my $prefix = "/uploaded/$udom/$uname/portfolio";          my $prefix = "/uploaded/$udom/$uname/portfolio";
         foreach my $file (split(/\s*,\s*/,&unescape($portfiles))) {          foreach my $file (@unversioned) {
             my ($path,$name) = ($file =~ m{^(.*/)([^/]+)$});              my ($path,$name) = ($file =~ m{^(.*/)([^/]+)$});
             my $url = $prefix.$path.$name;              my $url = $prefix.$path.$name;
             my $uploadedfile = &HTML::Entities::encode($url,'<>&"');              my $uploadedfile = &HTML::Entities::encode($url,'<>&"');

Removed from v.1.328  
changed lines
  Added in v.1.329


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