Diff for /loncom/interface/londocs.pm between versions 1.193 and 1.194

version 1.193, 2005/06/29 18:36:41 version 1.194, 2005/07/24 19:31:00
Line 1175  FOLDERINFO Line 1175  FOLDERINFO
 }  }
   
 sub process_file_upload {  sub process_file_upload {
     my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase) = @_;      my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase,$uploadcmd) = @_;
 # upload a file, if present  # upload a file, if present
     my $parseaction;      my $parseaction;
    if ($env{'form.parserflag'}) {     if ($env{'form.parserflag'}) {
Line 1183  sub process_file_upload { Line 1183  sub process_file_upload {
     }      }
     my $phase_status;      my $phase_status;
     my $folder=$env{'form.folder'};      my $folder=$env{'form.folder'};
     if ($folder eq '' || $folder eq 'supplemental') {      if ($folder eq '') {
         $folder='default';          $folder='default';
     }      }
     if ( ($folder=~/^$1/) || ($1 eq 'default') ) {      if ( ($folder=~/^$uploadcmd/) || ($uploadcmd eq 'default') ) {
         my $errtext='';          my $errtext='';
         my $fatal=0;          my $fatal=0;
         my $container='sequence';          my $container='sequence';
Line 1203  sub process_file_upload { Line 1203  sub process_file_upload {
             return 'failed';              return 'failed';
         }          }
         my $destination = 'docs/';          my $destination = 'docs/';
         if ($folder eq 'default') {          if ($folder =~ /^supplemental/) {
               $destination = 'supplemental/';
           }
           if (($folder eq 'default') || ($folder eq 'supplemental')) {
             $destination .= 'default/';              $destination .= 'default/';
         } elsif ($folder =~ /^default_(\d+)$/) {          } elsif ($folder =~ /^(default|supplemental)_(\d+)$/) {
             $destination .=  $1.'/';              $destination .=  $2.'/';
         }          }
 # this is for a course, not a user, so set coursedoc flag  # this is for a course, not a user, so set coursedoc flag
 # probably the only place in the system where this should be "1"  # probably the only place in the system where this should be "1"
Line 2256  ENDNEWSCRIPT Line 2259  ENDNEWSCRIPT
 # Process file upload - phase one - upload and parse primary file.    # Process file upload - phase one - upload and parse primary file.  
           $upload_result = &process_file_upload(\$upload_output,$coursenum,            $upload_result = &process_file_upload(\$upload_output,$coursenum,
  $coursedom,\%allfiles,   $coursedom,\%allfiles,
  \%codebase);   \%codebase,$1);
           if ($upload_result eq 'phasetwo') {            if ($upload_result eq 'phasetwo') {
               $r->print($upload_output);                $r->print($upload_output);
           }            }

Removed from v.1.193  
changed lines
  Added in v.1.194


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