--- loncom/interface/portfolio.pm 2008/04/16 23:11:06 1.191
+++ loncom/interface/portfolio.pm 2008/05/28 20:46:46 1.193
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.191 2008/04/16 23:11:06 raeburn Exp $
+# $Id: portfolio.pm,v 1.193 2008/05/28 20:46:46 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','',
@@ -2336,7 +2345,7 @@ sub handler {
&Apache::lonhtmlcommon::clear_breadcrumbs();
$r->print(&coursegrp_portfolio_header($udom,$uname,$grp_desc));
}
- my @dir_list=&get_dir_list($portfolio_root,undef,$group);
+ my @dir_list=&get_dir_list($portfolio_root,$current_path,$group);
if ($dir_list[0] eq 'no_such_dir'){
# two main reasons for this:
# 1) never been here, so directory structure not created
@@ -2352,9 +2361,7 @@ sub handler {
$current_path = '/'; # force it back to the root
}
# now grab the directory list again, for the first time
- @dir_list=
- &Apache::lonnet::dirlist($portfolio_root.$current_path,
- $udom,$uname,$getpropath);
+ @dir_list=&get_dir_list($portfolio_root,$current_path,$group);
}
# need to know if directory is empty so it can be removed if desired
my $is_empty=(@dir_list == 2);