--- loncom/interface/portfolio.pm 2006/10/19 00:23:21 1.164 +++ loncom/interface/portfolio.pm 2006/10/19 20:36:12 1.165 @@ -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.165 2006/10/19 20:36:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -571,16 +571,16 @@ sub delete_confirmed { &Apache::lonnet::modify_access_controls($file_name,\%changes, $udom,$uname); if ($outcome ne 'ok') { - $r->print(&mt('
'."An error occured ($outcome) while ". - "trying to delete access controls for the file."). + $r->print('
'.&mt("An error occured ([_1]) while ". + "trying to delete access controls for the file.",$outcome). '
'); } else { if ($deloutcome eq 'ok') { - $r->print(&mt('
Access controls also deleted for the file.')); + $r->print('
'.&mt('Access controls also deleted for the file.')); } else { - $r->print(''. - &mt('
'."An error occured ($deloutcome) while ". - "trying to delete access controls for the file."). + $r->print(''.'
'. + &mt("An error occured ([_1]) while ". + "trying to delete access controls for the file.",$deloutcome). '

'); } } @@ -685,39 +685,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('

'."An error occured ($outcome) while ". - "trying to delete access control records for the old name."). + $chg_text ='

'.&mt("An error occured ([_1]) while ". + "trying to delete access control records for the old name.",$outcome). '

'; } else { if ($deloutcome ne 'ok') { - $chg_text = '

'. - &mt('
'."An error occured ($deloutcome) while ". - "trying to delete access control records for the old name."). - '

'; + $chg_text = '


'. + &mt("An error occured ([_1]) while ". + "trying to delete access control records for the old name.",$deloutcome). + '

'; } } ($outcome,$deloutcome,$new_values,$translation) = &Apache::lonnet::modify_access_controls($newfile,\%change_new, $udom,$uname); if ($outcome ne 'ok') { - $chg_text .= &mt('

'."An error occured ($outcome) while ". - "trying to update access control records for the new name."). + $chg_text .= '

'. + &mt("An error occured ([_1]) while ". + "trying to update access control records for the new name.",$outcome). '
'; } if ($chg_text eq '') {