Diff for /loncom/interface/loncoursegroups.pm between versions 1.78 and 1.79

version 1.78, 2008/08/24 12:54:55 version 1.79, 2008/10/21 14:29:39
Line 111  sub handler { Line 111  sub handler {
         $crstype);          $crstype);
             }              }
         } else {          } else {
             $r->print(&mt('You do not have [_1] administration '.              $r->print('<div class="LC_warning">'
                           'privileges in this [_2]',$gpterm,lc($crstype)));                       .&mt('You do not have '.$gpterm.' administration '
                            .'privileges in this '.lc($crstype).'.')
                        .'</div>');
         }          }
     } else {      } else {
         &print_main_menu($r,$cdom,$cnum,\%functions,\%idx,$view_permission,          &print_main_menu($r,$cdom,$cnum,\%functions,\%idx,$view_permission,
Line 346  END Line 348  END
       '<td>'.$functionality.'</td>'.        '<td>'.$functionality.'</td>'.
       '<td align="right">'.$quota.'</td>'.        '<td align="right">'.$quota.'</td>'.
       '<td align="right">'.$totalmembers.'</td>'.        '<td align="right">'.$totalmembers.'</td>'.
       '<td align="right"><nobr>'.&mt('Files: ').$totalfiles.'</nobr><br /><nobr>'.&mt('Folders: ').$totaldirs.'</nobr></td>'.        '<td align="right">'.
                                     '<div class="LC_nobreak">'.&mt('Files: [_1]',$totalfiles).'</div>'.
                                     '<div class="LC_nobreak">'.&mt('Folders: [_1]',$totaldirs).'</div>'.
                                     '</td>'.
       '<td align="right">'.$boards.'</td>'.        '<td align="right">'.$boards.'</td>'.
       '<td align="right">'.$diskuse.'</td>'.        '<td align="right">'.$diskuse.'</td>'.
       &Apache::loncommon::end_data_table_row());        &Apache::loncommon::end_data_table_row());
Line 390  END Line 395  END
                 }                  }
             }              }
         } else {          } else {
             $r->print(&mt('You are not currently a member of any '.              $r->print(&mt('You are not currently a member of any active '.$gpterm.'s in this '.lc($crstype).'.'));
                           'active [_1]s in this [_2]',$gpterm,  
                           lc($crstype)));  
         }          }
     }      }
     return;      return;
Line 1134  sub display_control { Line 1137  sub display_control {
 sub verify_delete {  sub verify_delete {
     my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_;      my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_;
     $r->print(&Apache::lonhtmlcommon::echo_form_input([]));      $r->print(&Apache::lonhtmlcommon::echo_form_input([]));
     $r->print(&mt("You have requested deletion of the following group: ").'<i>'.      $r->print(&mt('You have requested deletion of the group [_1].'
               $stored->{'description'}.'</i>'.                   ,'<i>'.$stored->{'description'}.'</i>').
               '<br /><br />'.&mt('When a group is deleted the following occurs:').'<ul>'.                '<br /><br />'.&mt('When a group is deleted the following occurs:').'<ul>'.
               '<li>'.&mt('All group membership is terminated.').'</li>'.                '<li>'.&mt('All group membership is terminated.').'</li>'.
               '<li>'.&mt('The group ceases to be available either for viewing or for modification of group settings and membership.').'</li>'.                '<li>'.&mt('The group ceases to be available either for viewing or for modification of group settings and membership.').'</li>'.
Line 1191  sub delete_group { Line 1194  sub delete_group {
                                                            \%usersettings);                                                             \%usersettings);
     }      }
     if ($num_fail > 0) {      if ($num_fail > 0) {
         $r->print(&mt('Group deletion failed because deletion of [_1] out of [_2] members failed.',$num_fail,$num_users));          $r->print('<div class="LC_error">'
                    .&mt('Group deletion failed because deletion of [_1] out of [_2] members failed.'
                        ,$num_fail,$num_users)
                    .'</div>');
                   
     } else {      } else {
         my ($result,$message) =           my ($result,$message) = 
Line 1200  sub delete_group { Line 1206  sub delete_group {
         if ($result eq 'ok') {          if ($result eq 'ok') {
             my $outcome = &modify_folders($cdom,$cnum,$groupname);              my $outcome = &modify_folders($cdom,$cnum,$groupname);
             if ($outcome eq '') {              if ($outcome eq '') {
                 $r->print(&mt('Group successfully deleted.'));                  $r->print('<div class="LC_success">'
                            .&mt('Group successfully deleted.')
                            .'</div>');
             } else {              } else {
                 $r->print(&mt("Although the group was deleted, an error ([_1]) occurred when removing the group's folder from the 'Course Groups' folder.",$outcome));                  $r->print('<div class="LC_error">'
                            .&mt("Although the group was deleted, an error occurred when removing"
                                ." the group's folder from the 'Course Groups' folder: [_1]",$outcome)
                            .'</div>');
             }              }
         } else {          } else {
             $r->print(&mt('Group deletion failed.'));              $r->print('<div class="LC_error">'
                        .&mt('Group deletion failed.')
                        .'</div>');
         }          }
     }      }
     return;      return;
Line 1216  sub reenable_folder { Line 1229  sub reenable_folder {
     my $outcome;      my $outcome;
     my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/';      my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/';
     my $allgrpsmap = $crspath.'group_allfolders.sequence';      my $allgrpsmap = $crspath.'group_allfolders.sequence';
     my $foldertitle = &mt('Course Folder -').$description;      my $foldertitle = &mt('Course Folder -[_1]',$description);
     my $mapurl = $crspath.'group_folder_'.      my $mapurl = $crspath.'group_folder_'.
                    $groupname.'.sequence';                     $groupname.'.sequence';
     my ($errtext,$fatal)=&LONCAPA::map::mapread($allgrpsmap);      my ($errtext,$fatal)=&LONCAPA::map::mapread($allgrpsmap);
     if ($fatal) {      if ($fatal) {
         $outcome=&mt('Error reading contents of parent folder to group').          $outcome='<div class="LC_error">'
                      " ($allgrpsmap): $errtext".'<br />';                  .&mt('An error occurred when reading contents of parent folder to group:')
                   ."<br />($allgrpsmap): $errtext"
                   .'</div>';
     } else {      } else {
         my $idx=&LONCAPA::map::getresidx($mapurl);          my $idx=&LONCAPA::map::getresidx($mapurl);
         $LONCAPA::map::resources[$idx] = $foldertitle.':'.$mapurl.          $LONCAPA::map::resources[$idx] = $foldertitle.':'.$mapurl.
Line 1230  sub reenable_folder { Line 1245  sub reenable_folder {
         $LONCAPA::map::order[1+$#LONCAPA::map::order]=$idx;          $LONCAPA::map::order[1+$#LONCAPA::map::order]=$idx;
         my ($outtext,$errtext) = &LONCAPA::map::storemap($allgrpsmap,1);          my ($outtext,$errtext) = &LONCAPA::map::storemap($allgrpsmap,1);
         if ($errtext) {          if ($errtext) {
             $outcome = &mt('Error saving updated parent folder to group').              $outcome='<div class="LC_error">'
                            "- $allgrpsmap - $errtext".'<br />';                      .&mt('An error occurred when saving updated parent folder to group:'
                           ,"<br />$allgrpsmap - $errtext")
                       .'</div>';
         } else {          } else {
             my ($furl,$ferr) =              my ($furl,$ferr) =
                      &Apache::lonuserstate::readmap($cdom.'/'.$cnum);                       &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
Line 1256  sub modify_folders { Line 1273  sub modify_folders {
         $map = '/'.$map;          $map = '/'.$map;
         my ($errtext,$fatal) = &LONCAPA::map::mapread($map);          my ($errtext,$fatal) = &LONCAPA::map::mapread($map);
         if ($fatal) {          if ($fatal) {
             $outcome=&mt('Error reading contents of parent folder to group').              $outcome='<div class="LC_error">'
                          " ($map): $errtext".'<br />';                      .&mt('An error occurred when reading contents of parent folder to group:')
                       ."<br />($map): $errtext"
                       .'</div>';
         } else {          } else {
             my $idx = 0;              my $idx = 0;
             my $grpidx;              my $grpidx;
Line 1280  sub modify_folders { Line 1299  sub modify_folders {
                 $#LONCAPA::map::order--;                  $#LONCAPA::map::order--;
                 my ($outtext,$errtext) = &LONCAPA::map::storemap($map,1);                  my ($outtext,$errtext) = &LONCAPA::map::storemap($map,1);
                 if ($errtext) {                  if ($errtext) {
                     $outcome = &mt('Error saving updated parent folder to group'). "- $map - $errtext".'<br />';                      $outcome='<div class="LC_error">'
                               .&mt('An error occurred when saving updated parent folder to group:')
                               ."<br />$map - $errtext"
                               .'</div>';
                 } else {                  } else {
                     my ($furl,$ferr) =                      my ($furl,$ferr) =
                         &Apache::lonuserstate::readmap($cdom.'/'.$cnum);                          &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
Line 1294  sub modify_folders { Line 1316  sub modify_folders {
 sub verify_reenable {  sub verify_reenable {
     my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_;      my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_;
     $r->print(&Apache::lonhtmlcommon::echo_form_input([]));      $r->print(&Apache::lonhtmlcommon::echo_form_input([]));
     $r->print(&mt("You have requested enabling the following previously deleted group: ").'<i>'.      $r->print(&mt('You have requested enabling the previously deleted group [_1].'
               $stored->{'description'}.'</i>'.                   ,'<i>'.$stored->{'description'}.'</i>').
               '<br /><br />'.&mt('When a deleted group is re-enabled the following occurs:').'<ul>'.                '<br /><br />'.&mt('When a deleted group is re-enabled the following occurs:').'<ul>'.
               '<li>'.&mt('Group settings and membership at the time the group was deleted are reinstated.').'</li>'.                '<li>'.&mt('Group settings and membership at the time the group was deleted are reinstated.').'</li>'.
               '<li>'.&mt('A group folder is added to the "Course Groups" folder which contains folders for all groups in the course.').'</li></ul>');                '<li>'.&mt('A group folder is added to the "Course Groups" folder which contains folders for all groups in the course.').'</li></ul>');
Line 1316  sub reenable_group { Line 1338  sub reenable_group {
         &Apache::longroup::coursegroups($cdom,$cnum,$groupname,          &Apache::longroup::coursegroups($cdom,$cnum,$groupname,
                                         'deleted_groups');                                          'deleted_groups');
     if (keys(%groups) == 0) {      if (keys(%groups) == 0) {
         $r->print(&mt('The group ([_1]) was not re-enabled, because it is not a deleted group.<br />Perhaps it has already been re-enabled?',$groupname));          $r->print(&mt('The group [_1] was not re-enabled, because it is not a deleted group.[_2]Perhaps it has already been re-enabled?','<i>'.$groupname.'</i>'),'<br />');
         return;          return;
     }      }
     my %groupinfo =       my %groupinfo = 
Line 1371  $context) eq 'ok') { Line 1393  $context) eq 'ok') {
         &Apache::lonnet::modify_coursegroup_membership($cdom,$cnum,          &Apache::lonnet::modify_coursegroup_membership($cdom,$cnum,
                                                        \%usersettings);                                                         \%usersettings);
                 if ($roster_result eq 'ok') {                  if ($roster_result eq 'ok') {
                     $r->print(&mt('Membership reinstated for [_1] users, each with start and end dates for group access set to defaults: [_2] and [_3]',$num_ok,$showstart,$showend).'<br />');                      $r->print('<div class="LC_success">'
                                .&mt('Membership reinstated for [quant,_1,user], each with start and end dates for group access set to defaults: [_2] and [_3]',$num_ok,$showstart,$showend)
                                .'</div>');
                 }                  }
             } else {              } else {
                 $r->print(&mt('A problem occurred when trying to reinstate [_1] of the [_2] members of the pre-existing group.',$num_fail,$num_users).'<br />');                  $r->print('<div class="LC_error">'
                            .&mt('A problem occurred when trying to reinstate [_1] of the [_2] members of the pre-existing group.',$num_fail,$num_users)
                            .'</div>');
             }              }
         } else {          } else {
             $r->print(&mt('There were no group members to reinstate, as none were removed when the group was deleted.').'<br />');              $r->print('<div class="LC_info">'
                        .&mt('There were no group members to reinstate, as none were removed when the group was deleted.')
                        .'</div>');
         }          }
         my $outcome = &reenable_folder($cdom,$cnum,$groupname,$description);          my $outcome = &reenable_folder($cdom,$cnum,$groupname,$description);
         if ($outcome eq '') {          if ($outcome eq '') {
             $r->print(&mt('Group successfully re-enabled.'));              $r->print('<div class="LC_success">'
                        .&mt('Group successfully re-enabled.')
                        .'</div>');
         } else {          } else {
             $r->print(&mt("Although the group was re-enabled, an error ([_1]) occurred when adding the group's folder to the 'Course Groups' folder.",$outcome));              $r->print('<div class="LC_error">'
                        .&mt("Although the group was re-enabled, an error occurred when adding the group's folder to the 'Course Groups' folder: [_1]",$outcome)
                        .'</div>');
         }          }
     } else {      } else {
         $r->print(&mt('Re-enabling group failed'));          $r->print('<div class="LC_error">'
                    .&mt('Re-enabling group failed.')
                    .'</div>');
     }      }
     return;      return;
 }  }
Line 1643  END Line 1677  END
       <tr>        <tr>
        <td class="LC_description">'.&mt('Disk quota: ').'</td><td colspan="10">');         <td class="LC_description">'.&mt('Disk quota: ').'</td><td colspan="10">');
     if ($action eq 'create') {      if ($action eq 'create') {
         $r->print(&mt('If you enable the file repository for the [_1], allocate a disk quota.',$gpterm));          $r->print(&mt('If you enable the file repository for the '.$gpterm.', allocate a disk quota.'));
     } else {      } else {
         $r->print(&mt('Quota allocated to file repository:'));          $r->print(&mt('Quota allocated to file repository:'));
     }       } 
     $r->print('&nbsp;<input type="text" name="quota" size="4" />Mb');      $r->print('&nbsp;'.&mt('[_1] Mb','<input type="text" name="quota" size="4" />'));
     if ($action eq 'create') {      if ($action eq 'create') {
         $r->print('<br />'.          $r->print('<br />'
                   &mt('A total of [_1] Mb can be divided amongst all [_2]s in the '.                   .&mt('A total of [_1] Mb can be divided amongst all '.$gpterm.'s in the '
                   '[_3], and [_4] Mb are currently unallocated.',$crsquota,                       .lc($crstype).', and [_2] Mb are currently unallocated.'
                   $gpterm,lc($crstype),sprintf("%.2f",$freespace)));                       ,$crsquota,sprintf("%.2f",$freespace))
                    );
     } else {      } else {
         $r->print('&nbsp;&nbsp;('.&mt('The quota is currently [_1] Mb',          $r->print('&nbsp;&nbsp;('.&mt('The quota is currently [_1] Mb',
                                       $$stored{'quota'}).').');                                        $$stored{'quota'}).').');
   
         $r->print('<br />'.&mt('The quota can be increased to [_1] Mb, '.          $r->print('<br />'
                   'by adding all unallocated space for [_2]s in the [_3].',                   .&mt('The quota can be increased to [_1] Mb, '
                   sprintf("%.2f",$maxposs),$gpterm,lc($crstype)));                   .'by adding all unallocated space for '.$gpterm.'s in the '.lc($crstype).'.'
                     ,sprintf("%.2f",$maxposs)));
     }      }
     $r->print('      $r->print('
        </td>         </td>
Line 1933  sub print_current_settings { Line 1969  sub print_current_settings {
   <td>    <td>
 ');  ');
     if (@{$available} > 0) {      if (@{$available} > 0) {
         $r->print(&mt('<b>Available for assignment to members:</b>').          $r->print('<b>'.&mt('Available for assignment to members:').'</b>'.
                     '<table class="LC_group_priv"><tr>');                      '<table class="LC_group_priv"><tr>');
         my $rowcell = int(@{$available}/2) + @{$available}%2;          my $rowcell = int(@{$available}/2) + @{$available}%2;
         for (my $i=0; $i<@{$available}; $i++) {          for (my $i=0; $i<@{$available}; $i++) {
Line 1951  sub print_current_settings { Line 1987  sub print_current_settings {
         $r->print('</tr></table><br />');          $r->print('</tr></table><br />');
     }      }
     if (@{$unavailable} > 0) {      if (@{$unavailable} > 0) {
         $r->print(&mt('<b>Unavailable for assignment:</b>').          $r->print('<b>'.&mt('<b>Unavailable for assignment:').'</b>'.
                     '<table class="LC_group_priv"><tr>');                      '<table class="LC_group_priv"><tr>');
         my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2;          my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2;
         for (my $j=0; $j<@{$unavailable}; $j++) {          for (my $j=0; $j<@{$unavailable}; $j++) {
Line 1968  sub print_current_settings { Line 2004  sub print_current_settings {
         }          }
         $r->print('</tr></table>');          $r->print('</tr></table>');
     }      }
       my $quota_text=&mt('[_1] Mb',$quota);
     $r->print(<<"END");      $r->print(<<"END");
   </td>    </td>
   <td valign="top"><b>$lt{'difn'}</b> $granularity</td>    <td valign="top"><b>$lt{'difn'}</b> $granularity</td>
   <td valign="top">$quota Mb</td>     <td valign="top">$quota_text</td> 
   <td valign="top"><b>$lt{'stda'}</b> $showstart<br />    <td valign="top"><b>$lt{'stda'}</b> $showstart<br />
       <b>$lt{'enda'}</b> $showend        <b>$lt{'enda'}</b> $showend
   </td>    </td>
Line 1994  sub pick_new_members { Line 2031  sub pick_new_members {
           'nnew' => "There are no users to add as new members, as all users".            'nnew' => "There are no users to add as new members, as all users".
                     " matching the specified type(s), role(s), and ".                      " matching the specified type(s), role(s), and ".
                     "section(s) are already affiliated with this group.",                      "section(s) are already affiliated with this group.",
           'yoma' =>  'You may need to use the '."'".'modify existing, past or '.            'yoma' =>  "You may need to use the 'modify existing, past or ".
                      'future members'."'".' page if you need to re-enable '.                       "future members' page if you need to re-enable ".
                      'or activate access for previous or future members.',                       "or activate access for previous or future members.",
     );      );
     my %members;      my %members;
     my $totalusers = 0;      my $totalusers = 0;
Line 2273  sub default_privileges { Line 2310  sub default_privileges {
  if ($fixed ne '') {   if ($fixed ne '') {
     $fixed .= '</td><td class="LC_groups_fixed">';      $fixed .= '</td><td class="LC_groups_fixed">';
  }   }
                 $fixed .= '<input type="hidden" name="defpriv" value="'.$priv.'" /><nobr>'.$$toolprivs{$tool}{$priv}.'&nbsp;';                  $fixed .= '<input type="hidden" name="defpriv" value="'.$priv.'" />'
                            .'<span class="LC_nobreak">'.$$toolprivs{$tool}{$priv}.'&nbsp;';
                 if ($action eq 'modify') {                  if ($action eq 'modify') {
                     if (grep(/^$tool$/,@{$available})) {                      if (grep(/^$tool$/,@{$available})) {
                         $fixed .= '<small>'.&mt('(on)').'<small>&nbsp;';                          $fixed .= '<small>'.&mt('(on)').'<small>&nbsp;';
Line 2281  sub default_privileges { Line 2319  sub default_privileges {
                         $fixed .= '<small>'.&mt('(off)').'<small>&nbsp;';                          $fixed .= '<small>'.&mt('(off)').'<small>&nbsp;';
                     }                      }
                 }                  }
                 $fixed .= '</nobr>';                  $fixed .= '</span>';
             } else {              } else {
                 $privcount++;                  $privcount++;
                 if ($privcount == 3) {                  if ($privcount == 3) {
                     $dynamic .= '</tr>                      $dynamic .= '</tr>
                                  <tr>'."\n";                                   <tr>'."\n";
                 }                  }
                 $dynamic .= '<td><nobr><label><input type="checkbox" name="defpriv" value="'.$priv.'" />'.$$toolprivs{$tool}{$priv}.'</label></nobr></td>'."\n";                  $dynamic .= '<td><span class="LC_nobreak"><label><input type="checkbox" name="defpriv" value="'.$priv.'" />'.$$toolprivs{$tool}{$priv}.'</label></span></td>'."\n";
             }              }
         }          }
         if ($privcount == 0) {          if ($privcount == 0) {
             $dynamic .= '<td>None</td>'."\n";              $dynamic .= '<td>'.&mt('None').'</td>'."\n";
         }          }
         if ($privcount < 3) {          if ($privcount < 3) {
             $dynamic .= '<td>&nbsp;</td>'."\n";              $dynamic .= '<td>&nbsp;</td>'."\n";
Line 3082  sub write_group_data { Line 3120  sub write_group_data {
     }      }
     if ($quota !~ /^\d*\.?\d*$/) {      if ($quota !~ /^\d*\.?\d*$/) {
         $quota = 0;          $quota = 0;
         $r->print(&mt('The value you entered for the quota for the file repository in this [_1] contained invalid characters, so it has been set to 0 Mb. You can change this by modifying the [_1] settings.<br />',$gpterm));          $r->print('<div class="LC_warning">'
                    .&mt('The value you entered for the quota for the file repository in this '.$gpterm
                    .' contained invalid characters, so it has been set to 0 Mb. You can change this by'
                    .' modifying the '.$gpterm.' settings.')
                    .'</div>');
     }      }
     if ($quota > $maxposs) {      if ($quota > $maxposs) {
         $quota = $maxposs;          $quota = $maxposs;
         $r->print(&mt('The value you entered for the quota for the file repository in this [_1] exceeded the maximum possible value, so it has been set to [_2] Mb (the maximum possible value).<br />',$gpterm,sprintf("%.2f",$maxposs)));          $r->print('<div class="LC_warning">'
                    .&mt('The value you entered for the quota for the file repository in this '.$gpterm
                    .' exceeded the maximum possible value, so it has been set to [_1] Mb '
                    .'(the maximum possible value).',sprintf("%.2f",$maxposs))
                    .'</div>');
     }      }
     my %groupinfo = (      my %groupinfo = (
                      description => $esc_description,                       description => $esc_description,
Line 3151  sub write_group_data { Line 3197  sub write_group_data {
             my $result = &add_group_folder($cdom,$cnum,$now,$groupname,$action,              my $result = &add_group_folder($cdom,$cnum,$now,$groupname,$action,
                                            $description,$tools,\%groupinfo,                                             $description,$tools,\%groupinfo,
                                            $gpterm,$ucgpterm,$crstype);                                             $gpterm,$ucgpterm,$crstype);
             if ($result ne 'ok') {              if ($result eq 'ok') {
                 $r->print(&mt('A problem occurred when creating folders for the new [_1].<br />[_2]<br />',$gpterm,$result));                  $r->print('<div class="LC_success">'
                            .&mt($ucgpterm.' [_1] was created.','<i>'.$groupname.'</i>')
                            .'</div>');
               } else {
                   $r->print('<div class="LC_error">'
                            .&mt('A problem occurred when creating folders for the new '.$gpterm.' [_1]:'
                                ,'<i>'.$groupname.'</i>')
                            .'<br />'.$result
                            .'</div>');
             }              }
             $r->print(&mt('[_1] [_2] was created.<br />',$ucgpterm,$groupname));  
         } elsif ($action eq 'modify') {          } elsif ($action eq 'modify') {
             my (@oldtools,@newtools);               my (@oldtools,@newtools); 
             if (ref($$stored{'tool'}) eq 'ARRAY') {              if (ref($$stored{'tool'}) eq 'ARRAY') {
Line 3184  sub write_group_data { Line 3237  sub write_group_data {
                         my $parm_result = &parm_setter($navmap,$cdom,$boardsmap,                          my $parm_result = &parm_setter($navmap,$cdom,$boardsmap,
                                                        $groupname);                                                         $groupname);
                         if ($parm_result) {                          if ($parm_result) {
                             $r->print(&mt('Error while setting parameters '.                              $r->print('<div class="LC_error">'
                                           'for Discussion Boards folder: '.                                       .&mt('An error occurred while setting parameters '
                                           '[_1]<br />.',$parm_result));                                           .'for Discussion Boards folder: '
                                            .'[_1]',$parm_result)
                                        .'</div>');
                         } else {                          } else {
                             $r->print(&mt('Discussion Boards Folder created.<br />'));                              $r->print('<div class="LC_success">'
                                        .&mt('Discussion Boards Folder created.')
                                        .'</div>');
                         }                          }
                     } else {                      } else {
                         $r->print($outcome);                          $r->print($outcome);
Line 3196  sub write_group_data { Line 3253  sub write_group_data {
                     undef($navmap);                      undef($navmap);
                 }                  }
             }              }
             $r->print(&mt('[_1] [_2] was updated.<br />',$ucgpterm,$groupname));              $r->print('<div class="LC_success">'
                        .&mt($ucgpterm.' [_1] was updated.','<i>'.$groupname.'</i>')
                        .'</div>');
         }          }
     } else {      } else {
         my %actiontype = (          my %actiontype = (
Line 3206  sub write_group_data { Line 3265  sub write_group_data {
         &Apache::lonnet::logthis("Failed to store $gpterm $groupname ".          &Apache::lonnet::logthis("Failed to store $gpterm $groupname ".
                                  'in '.lc($crstype).': '.$cnum.                                   'in '.lc($crstype).': '.$cnum.
                                  ' in domain: '.$cdom);                                   ' in domain: '.$cdom);
         $r->print(&mt('An error occurred when [_1] the [_2]. '.          $r->print('<div class="LC_error">'
                       'Please try again.',$actiontype{$action},$gpterm));                   .&mt('An error occurred when [_1] the '.$gpterm.'. '
                    .'Please try again.',$actiontype{$action})
                    .'</div>');
     }      }
     return $result;      return $result;
 }  }
Line 3400  sub process_membership { Line 3461  sub process_membership {
     }      }
     if ($num_fail) {      if ($num_fail) {
         foreach my $type (sort(keys(%failed))) {          foreach my $type (sort(keys(%failed))) {
             $r->print(&mt('The following users could not be [_1], because an error occurred:<br />',$type));              $r->print('<div class="LC_error">'
                        .&mt("The following users could not be $type, because an error occurred:")
                        .'</div>');
             foreach my $user (@{$failed{$type}}) {              foreach my $user (@{$failed{$type}}) {
                 $r->print($$userdata{$user}[$$idx{fullname}].' - '.$user.'<br />');                  $r->print($$userdata{$user}[$$idx{fullname}].' - '.$user.'<br />');
             }              }

Removed from v.1.78  
changed lines
  Added in v.1.79


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>