Diff for /loncom/interface/londocs.pm between versions 1.582 and 1.583

version 1.582, 2014/06/16 00:09:31 version 1.583, 2014/08/25 00:55:27
Line 5460  sub decompression_info { Line 5460  sub decompression_info {
     my $docuname=$env{'course.'.$env{'request.course.id'}.'.num'};      my $docuname=$env{'course.'.$env{'request.course.id'}.'.num'};
     my $container='sequence';      my $container='sequence';
     my ($pathitem,$hiddenelem);      my ($pathitem,$hiddenelem);
     my @hiddens = ('newidx','comment','position','folderpath');      my @hiddens = ('newidx','comment','position','folderpath','archiveurl');
     if ($env{'form.folderpath'} =~ /\:1$/) {      if ($env{'form.folderpath'} =~ /\:1$/) {
         $container='page';          $container='page';
     }      }
     unshift(@hiddens,$pathitem);      unshift(@hiddens,$pathitem);
     foreach my $item (@hiddens) {      foreach my $item (@hiddens) {
         if ($env{'form.'.$item}) {          if ($env{'form.'.$item}) {
               my $value = $env{'form.'.$item};
             $hiddenelem .= '<input type="hidden" name="'.$item.'" value="'.              $hiddenelem .= '<input type="hidden" name="'.$item.'" value="'.
                            $env{'form.'.$item}.'" />'."\n";                             &HTML::Entities::encode($env{'form.'.$item},'<>&"').'" />'."\n";
         }          }
     }      }
     return ($destination,$dir_root,$londocroot,$docudom,$docuname,$container,      return ($destination,$dir_root,$londocroot,$docudom,$docuname,$container,
Line 5525  sub remove_archive { Line 5526  sub remove_archive {
         } else {          } else {
             $delwarning = &mt('An error occurred retrieving the contents of the current folder.');              $delwarning = &mt('An error occurred retrieving the contents of the current folder.');
         }          }
         $delwarning .= &mt('As a result the archive file has not been removed.');          $delwarning .= ' '.&mt('As a result the archive file has not been removed.');
     } else {      } else {
         my $currcmd = $env{'form.cmd'};          my $currcmd = $env{'form.cmd'};
         my $position = $env{'form.position'};          my $position = $env{'form.position'};
           my $archiveidx = $position;
         if ($position > 0) {          if ($position > 0) {
             $env{'form.cmd'} = 'remove_'.$position;              if (($env{'form.autoextract_camtasia'}) && (scalar(@LONCAPA::map::order) == 2)) {
                   $archiveidx = $position-1;
               }
               $env{'form.cmd'} = 'remove_'.$archiveidx;
             my ($title,$url,@rrest) =               my ($title,$url,@rrest) = 
                 split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$position]]);                  split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$archiveidx]]);
             if (&handle_edit_cmd($docuname,$docudom)) {              if ($url eq $env{'form.archiveurl'}) {
                 ($errtext,$fatal) = &storemap($docuname,$docudom,$map,1);                  if (&handle_edit_cmd($docuname,$docudom)) {
                 if ($fatal) {                      ($errtext,$fatal) = &storemap($docuname,$docudom,$map,1);
                     if ($container eq 'page') {                      if ($fatal) {
                         $delwarning = &mt('An error occurred updating the contents of the current page.');                          if ($container eq 'page') {
                               $delwarning = &mt('An error occurred updating the contents of the current page.');
                           } else {
                               $delwarning = &mt('An error occurred updating the contents of the current folder.');
                           }
                     } else {                      } else {
                         $delwarning = &mt('An error occurred updating the contents of the current folder.');                          $delresult = &mt('Archive file removed.');
                     }                      }
                 } else {  
                     $delresult = &mt('Archive file removed.');  
                 }                  }
               } else {
                   $delwarning .=  &mt('Archive file had unexpected item number in folder.').
                                   ' '.&mt('As a result the archive file has not been removed.');
             }              }
         }          }
         $env{'form.cmd'} = $currcmd;          $env{'form.cmd'} = $currcmd;

Removed from v.1.582  
changed lines
  Added in v.1.583


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