--- loncom/interface/portfolio.pm 2006/05/09 14:38:10 1.98 +++ loncom/interface/portfolio.pm 2006/05/30 12:46:09 1.101 @@ -30,6 +30,9 @@ use Apache::lontexconvert; use Apache::lonfeedback; use Apache::lonlocal; use Apache::lonnet; +use Apache::longroup; +use lib '/home/httpd/lib/perl'; +use LONCAPA; # receives a file name and path stub from username/userfiles/portfolio/ # returns an anchor tag consisting encoding filename and currentpath @@ -501,7 +504,6 @@ sub upload { } else { my $result=&Apache::lonnet::userfileupload('uploaddoc','', $port_path.$env{'form.currentpath'}); - print STDERR "result was $result for $port_path.$env{'form.currentpath'}\n"; if ($result !~ m|^/uploaded/|) { $r->print(' An errror occured ('.$result. ') while trying to upload '.&display_file().'
'); @@ -650,7 +652,7 @@ sub handler { $group =~ s/\W//g; if ($group) { ($uname,$udom) = &get_name_dom($group); - my %curr_groups = &Apache::loncommon::coursegroups($udom,$uname, + my %curr_groups = &Apache::longroup::coursegroups($udom,$uname, $group); if (%curr_groups) { if (($view_permission) || (&Apache::lonnet::allowed('rgf', @@ -732,7 +734,8 @@ sub handler { # 1) never been here, so directory structure not created # 2) back-button navigation after deleting a directory if ($current_path eq '/'){ - &Apache::lonnet::mkdiruserfile($uname,$udom,'portfolio'); + &Apache::lonnet::mkdiruserfile($uname,$udom, + &get_port_path($group)); } else { # some directory that snuck in get rid of the directory # from the recent pulldown, just in case