--- loncom/interface/portfolio.pm	2006/10/19 00:23:21	1.164
+++ loncom/interface/portfolio.pm	2006/10/19 21:23:22	1.166
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.164 2006/10/19 00:23:21 raeburn Exp $
+# $Id: portfolio.pm,v 1.166 2006/10/19 21:23:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -550,9 +550,10 @@ sub delete_confirmed {
 					       $env{'form.currentpath'}.
 					       $delete_file);
         if ($result ne 'ok') {
-	    $r->print('<span class="LC_error"> An error occured ('.$result.
-    		      ') while trying to delete '.
-                      &display_file(undef, $delete_file).'</span><br />');
+	    $r->print('<span class="LC_error">'.
+                     &mt('An error occured ([_1]) while trying to delete 
+                         [_2].',$result,&display_file(undef, $delete_file)).
+                      '</span><br /><br />');
         } else {
             $r->print(&mt('File: [_1] deleted.',
                           &display_file(undef,$delete_file)));
@@ -563,7 +564,7 @@ sub delete_confirmed {
                                                          $group,$file_name);
             if (keys(%access_controls) > 0) {
                 my %changes; 
-                foreach my $key (%{$access_controls{$file_name}}) {
+                foreach my $key (keys(%{$access_controls{$file_name}})) {
                     $changes{'delete'}{$key} = 1;
                 }
                 if (keys(%changes) > 0) {
@@ -571,17 +572,17 @@ sub delete_confirmed {
                     &Apache::lonnet::modify_access_controls($file_name,\%changes,
                                                             $udom,$uname);
                     if ($outcome ne 'ok') {
-                           $r->print(&mt('<br />'."An error occured ($outcome) while ".
-                               "trying to delete access controls for the file.").
-                               '</span><br />');
+                           $r->print('<br />'.&mt("An error occured ([_1]) while ".
+                               "trying to delete access controls for the file.",$outcome).
+                               '</span><br /><br />');
                     } else {
                         if ($deloutcome eq 'ok') {
-                            $r->print(&mt('<br />Access controls also deleted for the file.'));
+                            $r->print('<br />'.&mt('Access controls also deleted for the file.').'<br /><br />');
                         } else {
-                            $r->print('<span class="LC_error">'.
-                               &mt('<br />'."An error occured ($deloutcome) while ".
-                                   "trying to delete access controls for the file.").
-                                   '</span><br />');
+                            $r->print('<span class="LC_error">'.'<br />'.
+                               &mt("An error occured ([_1]) while ".
+                                   "trying to delete access controls for the file.",$deloutcome).
+                                   '</span><br /><br />');
                         }
                     }
                 }
@@ -685,39 +686,40 @@ sub access_for_renamed {
     my $newfile = $env{'form.currentpath'}.$filenewname;
     $newfile = &prepend_group($newfile);
     my $current_permissions =
-            &Apache::lonnet::get_portfile_permissions($udom,$uname);
+	&Apache::lonnet::get_portfile_permissions($udom,$uname);
     my %access_controls =
-            &Apache::lonnet::get_access_controls($current_permissions,
-                                                 $group,$oldfile);
+	&Apache::lonnet::get_access_controls($current_permissions,
+					     $group,$oldfile);
     my $chg_text;
     if (keys(%access_controls) > 0) {
         my %change_old;
         my %change_new;
-        foreach my $key (%{$access_controls{$oldfile}}) {
+        foreach my $key (keys(%{$access_controls{$oldfile}})) {
             $change_old{'delete'}{$key} = 1;
             $change_new{'activate'}{$key} = $access_controls{$oldfile}{$key};
         }
         my ($outcome,$deloutcome,$new_values,$translation) =
             &Apache::lonnet::modify_access_controls($oldfile,\%change_old,
-                                                            $udom,$uname);
+						    $udom,$uname);
         if ($outcome ne 'ok') {
-            $chg_text = &mt('<br /><br />'."An error occured ($outcome) while ".
-                "trying to delete access control records for the old name.").
+            $chg_text ='<br /><br />'.&mt("An error occured ([_1]) while ".
+                "trying to delete access control records for the old name.",$outcome).
                 '</span><br />';
         } else {
             if ($deloutcome ne 'ok') {
-                $chg_text = '<br /><br /><span class="LC_error">'.
-                          &mt('<br />'."An error occured ($deloutcome) while ".
-                          "trying to delete access control records for the old name.").
-                          '</span><br />';
+                $chg_text = '<br /><br /><span class="LC_error"><br />'.
+		    &mt("An error occured ([_1]) while ".
+			"trying to delete access control records for the old name.",$deloutcome).
+			'</span><br />';
             }
         }
         ($outcome,$deloutcome,$new_values,$translation) =
             &Apache::lonnet::modify_access_controls($newfile,\%change_new,
                                                     $udom,$uname);
         if ($outcome ne 'ok') {
-            $chg_text .= &mt('<br /><br />'."An error occured ($outcome) while ".
-                "trying to update access control records for the new name.").
+            $chg_text .= '<br /><br />'.
+		&mt("An error occured ([_1]) while ".
+                "trying to update access control records for the new name.",$outcome).
                 '</span><br />';
         }
         if ($chg_text eq '') {