Diff for /loncom/homework/inputtags.pm between versions 1.333 and 1.333.2.1

version 1.333, 2015/03/18 12:53:24 version 1.333.2.1, 2015/03/19 08:40:38
Line 640  sub file_selector { Line 640  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('Files currently selected for submission')).          $result .= &Apache::lonhtmlcommon::row_title(&mt('Currently submitted files')).
                    $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 698  sub current_file_submissions { Line 698  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 717  sub current_file_submissions { Line 708  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 ($symb,$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,%legacy,@bad_file_list);      my ($result,$header_shown,%okfiles,%rows,%legacy,@bad_file_list);
     if ($uploadedfile) {      if ($uploadedfile) {
Line 736  sub current_file_submissions { Line 727  sub current_file_submissions {
             push(@bad_file_list,$error);              push(@bad_file_list,$error);
         }          }
     }      }
     if (@unversioned > 0) {      if ($portfiles =~ /[^\s]/) {
         my $prefix = "/uploaded/$udom/$uname/portfolio";          my $prefix = "/uploaded/$udom/$uname/portfolio";
         foreach my $file (@unversioned) {          foreach my $file (split(/\s*,\s*/,&unescape($portfiles))) {
             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.333  
changed lines
  Added in v.1.333.2.1


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