--- loncom/interface/portfolio.pm 2008/04/17 14:46:18 1.192 +++ loncom/interface/portfolio.pm 2008/06/09 22:34:55 1.194 @@ -1,7 +1,7 @@ # The LearningOnline Network # portfolio browser # -# $Id: portfolio.pm,v 1.192 2008/04/17 14:46:18 raeburn Exp $ +# $Id: portfolio.pm,v 1.194 2008/06/09 22:34:55 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -93,7 +93,9 @@ sub display_common { 'Upload file to current directory:', 'createdir' => 'Create Subdirectory', 'createdir_label' => - 'Create subdirectory in current directory:'); + 'Create subdirectory in current directory:', + 'parse' => 'If HTML file, upload embedded images/multimedia/css/linked files' + ); my $escuri = &HTML::Entities::encode($r->uri,'&<>"'); my $help_fileupload = &Apache::loncommon::help_open_topic('Portfolio AddFiles'); my $help_createdir = &Apache::loncommon::help_open_topic('Portfolio CreateDirectory'); @@ -116,6 +118,12 @@ sub display_common { $help_fileupload +
+ + + @@ -1815,8 +1823,9 @@ sub upload { my $port_path = &get_port_path(); my (%allfiles,%codebase,$mode); if ($env{'form.uploaddoc.filename'} =~ m/(\.htm|\.html|\.shtml)$/i) { - $mode = 'parse'; - + if ($env{'form.parserflag'}) { + $mode = 'parse'; + } } my $result= &Apache::lonnet::userfileupload('uploaddoc','', @@ -1837,7 +1846,7 @@ STATE $r->print("

".&mt("Reference Warning")."

"); $r->print("

".&mt("Completed upload of the file. This file contained references to other files. You must upload the referenced files or else the uploaded file may not work properly.")."

"); $r->print("

".&mt("Please select the locations from which the referenced files are to be uploaded.")."

"); - $r->print(&Apache::londocs::ask_for_embedded_content('/adm/portfolio',$state,\%allfiles,\%codebase, + $r->print(&Apache::loncommon::ask_for_embedded_content('/adm/portfolio',$state,\%allfiles,\%codebase, {'error_on_invalid_names' => 1, 'ignore_remote_references' => 1,})); $r->print('

Or '.&done('Return to directory',$url).'

');