--- loncom/interface/portfolio.pm 2006/08/02 02:34:54 1.141 +++ loncom/interface/portfolio.pm 2006/08/04 21:44:19 1.145 @@ -1,7 +1,7 @@ # The LearningOnline Network # portfolio browser # -# $Id: portfolio.pm,v 1.141 2006/08/02 02:34:54 raeburn Exp $ +# $Id: portfolio.pm,v 1.145 2006/08/04 21:44:19 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -294,7 +294,7 @@ sub display_directory { my $cat=''.&mt('Catalog Information').
                             ''; $line .= 'Rename'; - $line .= ''.$version_flag{$filename}.''.$cat.''; + $line .= ''.''.$cat.''; } $line .= ''; } @@ -339,6 +339,7 @@ sub display_directory { foreach my $dir_line (@version_lines) { my ($v_filename,$dom,$testdir,$size,$mtime,$obs) = @$dir_line; my ($v_fname,$version,$v_extension) = &Apache::grades::file_name_version_ext($v_filename); + $line = ' '; if (($v_fname eq $fname)&&($v_extension eq $extension)) { &display_directory_line($r,$select_mode,$fullpath, $v_filename, $mtime, $size, $css_class, $line, \%access_controls, $curr_access, $now, @@ -571,8 +572,13 @@ sub display_access { $uname); my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group,$file_name); my $aclcount = keys(%access_controls); - my $header = '

'.&mt('Allowing others to retrieve portfolio file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'

'; + my $header = '

'.&mt('Allowing others to retrieve file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'

'; my $info .= &mt('Access to this file by others can be set to be one or more of the following types: public, passphrase-protected or conditional.').'
'; + + if ($group eq '') { + $info .= (&mt("Direct others to the 'Display file listing' link (shown when there are viewable files) on your personal information page:
http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme")); + } + if ($can_setacl) { &open_form($r,$url); $r->print($header.$info); @@ -747,7 +753,7 @@ sub update_access { } } my $file_name = $env{'form.currentpath'}.$env{'form.selectfile'}; - $r->print('

'.&mt('Allowing others to retrieve portfolio file: [_1]', + $r->print('

'.&mt('Allowing others to retrieve file: [_1]', $port_path.$file_name).'

'."\n"); $file_name = &prepend_group($file_name); my ($uname,$udom) = &get_name_dom(); @@ -1470,7 +1476,6 @@ sub upload { } } $fname=&Apache::lonnet::clean_filename($fname); - my $portfolio_root=&get_portfolio_root(); my ($uname,$udom) = &get_name_dom(); my $port_path = &get_port_path(); @@ -1590,7 +1595,10 @@ sub createdir { } sub get_portfolio_root { - my ($uname,$udom) = &get_name_dom(); + my ($udom,$uname) = @_; + if (!defined($uname) || !defined($udom)) { + ($uname,$udom) = &get_name_dom(); + } my $path; if (defined($env{'form.group'})) { $path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio';