Diff for /loncom/interface/loncoursegroups.pm between versions 1.91 and 1.96

version 1.91, 2009/02/02 13:27:39 version 1.96, 2009/03/08 21:49:33
Line 75  sub handler { Line 75  sub handler {
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
   
     my %functions = (      my %functions = (
                       communication => 'Send Messages',                         email => 'Send Messages', 
                       discussion => 'Discussion Boards',                        discussion => 'Discussion Boards',
                       chat => 'Chat',                        chat => 'Chat Room',
                       files => 'File Repository',                        files => 'Group Portfolio',
                       roster => 'Membership Roster',                        roster => 'Membership Roster',
                       homepage => $ucgpterm.' home page',                        homepage => $ucgpterm.' home page',
                     );                      );
Line 141  function openGroupRoster(group,status) { Line 141  function openGroupRoster(group,status) {
     rosterbrowser = open(url,title,options,'1');      rosterbrowser = open(url,title,options,'1');
     rosterbrowser.focus();      rosterbrowser.focus();
 }\n|;  }\n|;
     $r->print(&header('Groups',$jscript,$action,$state));      $r->print(&header('My Space',$jscript,$action,$state));
     if ($env{'form.refpage'} eq 'cusr') {      if ($env{'form.refpage'} eq 'cusr') {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>"/adm/createuser",              ({href=>"/adm/createuser",
Line 785  sub group_administration { Line 785  sub group_administration {
     }      }
     var maxposs = '.sprintf("%.2f",$maxposs).';      var maxposs = '.sprintf("%.2f",$maxposs).';
     if (newquota > maxposs) {      if (newquota > maxposs) {
         alert("The file repository quota you entered for this group ("+newquota+" Mb) exceeds the maximum possible ("+maxposs+" Mb). Please enter a smaller number.");          alert("The group portfolio quota you entered for this group ("+newquota+" Mb) exceeds the maximum possible ("+maxposs+" Mb). Please enter a smaller number.");
         return;          return;
     }      }
     var re_quota = '.$float_check.';      var re_quota = '.$float_check.';
Line 804  sub group_administration { Line 804  sub group_administration {
             }              }
         }          }
         if (warn_zero == 1) {          if (warn_zero == 1) {
             alert("You have indicated that the file repository should be enabled, but you have set the respository quota to 0 Mb.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature.");              alert("You have indicated that the group portfolio should be enabled, but you have set the respository quota to 0 Mb.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature.");
             return;              return;
         }          }
     }       } 
Line 916  function changeSort(caller) { Line 916  function changeSort(caller) {
                           );                            );
     my %navbuttons = &Apache::lonlocal::texthash(      my %navbuttons = &Apache::lonlocal::texthash(
                              gtns => 'Next',#'Go to next step',                               gtns => 'Next',#'Go to next step',
                              gtps => 'Previous',#'Go to previous step',                               gtps => 'Back',#'Go to previous step',
                              crgr => 'Create '.$gpterm,                               crgr => 'Create '.$gpterm,
                              mose => 'Save',#'Modify settings',                               mose => 'Save',#'Modify settings',
                              gtpp => 'Previous',#'Go to previous page',                               gtpp => 'Back',#'Go to previous page',
                              adme => 'Add members',                               adme => 'Add members',
     );      );
     if ((($action eq 'create') || ($action eq 'modify') || ($action eq 'delete') || ($action eq 'reenable')) &&      if ((($action eq 'create') || ($action eq 'modify') || ($action eq 'delete') || ($action eq 'reenable')) &&
Line 1588  sub general_settings_form { Line 1588  sub general_settings_form {
         @{$tools} = sort(keys(%{$functions}));          @{$tools} = sort(keys(%{$functions}));
         &privilege_specificity($r,$action,3,$tools,$stored,$toolprivs,          &privilege_specificity($r,$action,3,$tools,$stored,$toolprivs,
        $fixedprivs,\@available,$formname,         $fixedprivs,\@available,$formname,
        $gpterm,$ucgpterm);         $gpterm,$ucgpterm,$functions);
         &mapping_options($r,$action,$formname,$page,$sectioncount,          &mapping_options($r,$action,$formname,$page,$sectioncount,
                          $states,$stored,$navbuttons,4,5,                           $states,$stored,$navbuttons,4,5,
  $gpterm,$ucgpterm,$crstype,$cdom,$cnum);   $gpterm,$ucgpterm,$crstype,$cdom,$cnum);
Line 1683  END Line 1683  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 '.$gpterm.', allocate a disk quota.'));          $r->print(&mt('If you enable the group portfolio for the '.$gpterm.', allocate a disk quota.'));
     } else {      } else {
         $r->print(&mt('Quota allocated to file repository:'));          $r->print(&mt('Quota allocated to group portfolio:'));
     }       } 
     $r->print('&nbsp;'.&mt('[_1] Mb','<input type="text" name="quota" size="4" />'));      $r->print('&nbsp;'.&mt('[_1] Mb','<input type="text" name="quota" size="4" />'));
     if ($action eq 'create') {      if ($action eq 'create') {
Line 2169  sub pick_new_members { Line 2169  sub pick_new_members {
   
 sub privilege_specificity {  sub privilege_specificity {
     my ($r,$action,$img,$tools,$stored,$toolprivs,$fixedprivs,$available,      my ($r,$action,$img,$tools,$stored,$toolprivs,$fixedprivs,$available,
  $formname,$gpterm,$ucgpterm) = @_;   $formname,$gpterm,$ucgpterm,$functions) = @_;
     my %lt = &Apache::lonlocal::texthash (      my %lt = &Apache::lonlocal::texthash (
       'uprv' => 'User privileges for collaborative tools',        'uprv' => 'User privileges for collaborative tools',
       'frty' => 'For each collaborative tool you have chosen to include, '.        'frty' => 'For each collaborative tool you have chosen to include, '.
Line 2266  sub privilege_specificity { Line 2266  sub privilege_specificity {
             $r->print($lt{'algm'}.'<br /><br />');              $r->print($lt{'algm'}.'<br /><br />');
         }          }
         &default_privileges($r,$action,$tools,$toolprivs,$fixedprivs,          &default_privileges($r,$action,$tools,$toolprivs,$fixedprivs,
     $available);      $available,$functions);
     } else {      } else {
         if ($action eq 'create') {          if ($action eq 'create') {
             $r->print($lt{'asyo'});              $r->print($lt{'asyo'});
Line 2290  sub privilege_specificity { Line 2290  sub privilege_specificity {
 }  }
   
 sub default_privileges {  sub default_privileges {
     my ($r,$action,$tools,$toolprivs,$fixedprivs,$available) = @_;      my ($r,$action,$tools,$toolprivs,$fixedprivs,$available,$functions) = @_;
     my %lt = &Apache::lonlocal::texthash(      my %lt = &Apache::lonlocal::texthash(
                                 'addp' => 'Additional privileges',                                  'addp' => 'Additional privileges',
                                 'fixp' => 'Fixed privileges',                                  'fixp' => 'Fixed privileges',
Line 2300  sub default_privileges { Line 2300  sub default_privileges {
     $r->print(&Apache::lonhtmlcommon::start_pick_box('LC_group_priv_box').      $r->print(&Apache::lonhtmlcommon::start_pick_box('LC_group_priv_box').
       &Apache::lonhtmlcommon::row_title($lt{'func'},undef,        &Apache::lonhtmlcommon::row_title($lt{'func'},undef,
       'LC_groups_functionality'));        'LC_groups_functionality'));
     my @printtool = @{$tools};      my @tableHeader;
     foreach my $printtool (@printtool){      foreach my $key (sort(keys(%{$functions}))){
  $printtool = &mt($printtool);          push (@tableHeader,&mt(${$functions}{$key}));
     }      }   
     $r->print(join('</td><td class="LC_groups_functionality">', @printtool));   $r->print(join('</td><td class="LC_groups_functionality">', @tableHeader));
     $r->print(&Apache::lonhtmlcommon::row_closure(1));      $r->print(&Apache::lonhtmlcommon::row_closure(1));
     my $fixed = '';      my $fixed = '';
     my $dynamic = '';      my $dynamic = '';
Line 3132  sub write_group_data { Line 3132  sub write_group_data {
     if ($quota !~ /^\d*\.?\d*$/) {      if ($quota !~ /^\d*\.?\d*$/) {
         $quota = 0;          $quota = 0;
         $r->print('<div class="LC_warning">'          $r->print('<div class="LC_warning">'
                  .&mt('The value you entered for the quota for the file repository in this '.$gpterm                   .&mt('The value you entered for the quota for the group portfolio in this '.$gpterm
                  .' contained invalid characters, so it has been set to 0 Mb. You can change this by'                   .' contained invalid characters, so it has been set to 0 Mb. You can change this by'
                  .' modifying the '.$gpterm.' settings.')                   .' modifying the '.$gpterm.' settings.')
                  .'</div>');                   .'</div>');
Line 3140  sub write_group_data { Line 3140  sub write_group_data {
     if ($quota > $maxposs) {      if ($quota > $maxposs) {
         $quota = $maxposs;          $quota = $maxposs;
         $r->print('<div class="LC_warning">'          $r->print('<div class="LC_warning">'
                  .&mt('The value you entered for the quota for the file repository in this '.$gpterm                   .&mt('The value you entered for the quota for the group portfolio in this '.$gpterm
                  .' exceeded the maximum possible value, so it has been set to [_1] Mb '                   .' exceeded the maximum possible value, so it has been set to [_1] Mb '
                  .'(the maximum possible value).',sprintf("%.2f",$maxposs))                   .'(the maximum possible value).',sprintf("%.2f",$maxposs))
                  .'</div>');                   .'</div>');

Removed from v.1.91  
changed lines
  Added in v.1.96


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