--- loncom/interface/portfolio.pm 2006/06/22 15:56:03 1.112 +++ loncom/interface/portfolio.pm 2006/06/22 16:51:00 1.113 @@ -31,7 +31,7 @@ use Apache::lonfeedback; use Apache::lonlocal; use Apache::lonnet; use Apache::longroup; -use lib '/home/httpd/lib/perl'; +use HTML::Entities; use LONCAPA; # receives a file name and path stub from username/userfiles/portfolio/ @@ -40,9 +40,9 @@ sub make_anchor { my ($url, $filename, $current_path, $current_mode, $field_name, $continue_select,$group) = @_; if ($continue_select ne 'true') {$continue_select = 'false'}; - my $anchor = ''.$filename.''; return $anchor; @@ -63,38 +63,39 @@ sub display_common { 'createdir' => 'Create Subdirectory', 'createdir_label' => 'Create subdirectory in current directory:'); + my $escuri = &HTML::Entities::encode($r->uri,'&<>"'); $r->print(<<"TABLE"); - - - - + + - - - - - - + + + + - - + + +
- $text{'upload_label'} - $groupitem +
+ $text{'upload_label'} + $groupitem + -
- $text{'createdir_label'} - + +
+ $text{'createdir_label'} + +
$groupitem -
TABLE my @tree = split (/\//,$current_path); @@ -108,9 +109,9 @@ TABLE } $r->print(''); &Apache::lonhtmlcommon::store_recent($namespace,$current_path,$current_path); - $r->print('
'. &Apache::lonhtmlcommon::select_recent($namespace,'currentpath', @@ -153,13 +154,13 @@ sub display_directory { return; } if ($select_mode eq 'true') { + $r->print(''); $r->print(''. ''); - $r->print(''); } else { + $r->print(''); $r->print('
Select NameSizeLast Modified
'. ''); - $r->print(''); } if (defined($group)) { $r->print("\n".$groupitem."\n"); @@ -190,9 +191,9 @@ sub display_directory { if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) { if ($dirptr&$testdir) { if ($select_mode eq 'true'){ - $r->print(''); + $r->print(''); } else { - $r->print(''); + $r->print(''); } $r->print(''); $r->print(''); @@ -256,7 +257,7 @@ sub display_directory { } $curr_access = join('+ ',@allaccesses); } - $r->print(''); + $r->print(''); $r->print(''); $r->print(''); @@ -693,7 +694,7 @@ sub update_access { &close_form($r,$url,$group); } else { $r->print('
'. + '&currentpath='.$env{'form.currentpath'}.'">'. &mt('Display all access settings for this file').''); } return; @@ -1277,7 +1278,7 @@ sub select_files { $java_files.=','; } my $javascript =(< +
Actions NameSizeLast ModifiedCurrent Access Status
'.&mt('open folder').'
'.&mt('closed folder').'Go to ...'.&make_anchor($url,$filename.'/',$current_path.$filename.'/',$env{'form.mode'},$env{"form.fieldname"},$env{'form.continue'},$group).''. $filename.''.$size.'