--- loncom/interface/londocs.pm 2008/05/28 14:21:30 1.307 +++ loncom/interface/londocs.pm 2008/06/09 22:34:55 1.308 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.307 2008/05/28 14:21:30 www Exp $ +# $Id: londocs.pm,v 1.308 2008/06/09 22:34:55 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -818,7 +818,7 @@ sub extract_media { $dirpath = $url; $container = ''; } - &Apache::lonnet::extract_embedded_items(undef,undef,\%allfiles,\%codebase,$content); + &Apache::lonnet::extract_embedded_items(undef,\%allfiles,\%codebase,$content); foreach my $embed_file (keys(%allfiles)) { my $filename; if ($embed_file =~ m#([^/]+)$#) { @@ -1571,8 +1571,8 @@ sub process_file_upload { $$upload_output .= 'This file contains embedded multimedia objects, which need to be uploaded to LON-CAPA.
'. - &ask_for_embedded_content('/adm/coursedocs', - $state,$allfiles,$codebase); + &Apache::loncommon::ask_for_embedded_content( + '/adm/coursedocs',$state,$allfiles,$codebase); } else { $$upload_output .= 'No embedded items identified
'; } @@ -1582,55 +1582,6 @@ sub process_file_upload { return $phase_status; } -sub ask_for_embedded_content { - my ($actionurl,$state,$allfiles,$codebase,$args)=@_; - my $upload_output = ' -
'; - $upload_output .= $state; - $upload_output .= 'Upload embedded files:
'. - &Apache::loncommon::start_data_table(); - - my $num = 0; - foreach my $embed_file (sort {lc($a) cmp lc($b)} keys(%{$allfiles})) { - $upload_output .= &Apache::loncommon::start_data_table_row(). - ''.$embed_file.''; - if ($args->{'ignore_remote_references'} - && $embed_file =~ m{^\w+://}) { - $upload_output.=''.&mt("URL points to other server.").''; - } elsif ($args->{'error_on_invalid_names'} - && $embed_file ne &Apache::lonnet::clean_filename($embed_file,{'keep_path' => 1,})) { - - $upload_output.=''.&mt("Invalid characters").''; - - } else { - - $upload_output .=' - - '; - my $attrib = join(':',@{$$allfiles{$embed_file}}); - $upload_output .= - "\n\t\t". - ''; - if (exists($$codebase{$embed_file})) { - $upload_output .= - "\n\t\t". - ''; - } - } - $upload_output .= ''.&Apache::loncommon::end_data_table_row(); - $num++; - } - $upload_output .= &Apache::loncommon::end_data_table().'
- - - '.&mt('(only files for which a location has been provided will be uploaded)').' -
'; - return $upload_output; -} - sub process_secondary_uploads { my ($upload_output,$coursedom,$coursenum,$formname,$num,$newidx) = @_; my $folder=$env{'form.folder'};