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

version 1.96, 2009/03/08 21:49:33 version 1.97, 2009/05/07 15:25:37
Line 1612  sub groupsettings_options { Line 1612  sub groupsettings_options {
         'lett' => 'Letters, numbers and underscore only',          'lett' => 'Letters, numbers and underscore only',
         'doyo' => 'Different subsets of the chosen collaborative tools '.          'doyo' => 'Different subsets of the chosen collaborative tools '.
                   'for different group members?',                    'for different group members?',
           'gran' => 'Granularity',
           'dquo' => 'Disk quota',
     );      );
     my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored);      my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored);
     $r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'gnde'}).'      $r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'gnde'}));
      <table class="LC_descriptive_input">  
       <tr>      # Group Name
        <td class="LC_description">'.$lt{'gnam'}.':</td>      $r->print(&Apache::lonhtmlcommon::start_pick_box()
        <td colspan="5">               .&Apache::lonhtmlcommon::row_title($lt{'gnam'})
 ');      );
     if ($action eq 'create') {      if ($action eq 'create') {
         $r->print('<input type="text" name="groupname" size="25" />&nbsp;('.          $r->print('<input type="text" name="groupname" size="25" />'
                   $lt{'lett'}.')');                   .' <span class="LC_nobreak">('
                    .$lt{'lett'}.')</span>'
           );
     } else {      } else {
         $r->print('<input type="hidden" name="groupname" value="'.          $r->print('<input type="hidden" name="groupname" value="'.
                          $env{'form.groupname'}.'" />'.$env{'form.groupname'});                           $env{'form.groupname'}.'" />'.$env{'form.groupname'});
     }      }
     $r->print(<<"END");      $r->print(&Apache::lonhtmlcommon::row_closure());
        </td>  
       <tr>      # Group Title
       <tr>      $r->print(&Apache::lonhtmlcommon::row_title($lt{'desc'})
        <td class="LC_description">$lt{'desc'}:</td>               .'<input type="text" name="description" size="40" value="" />'
        <td colspan="5"><input type="text" name="description" size="40"               .&Apache::lonhtmlcommon::row_closure()
                                                     value="" />      );
        </td>  
       <tr>      # Collaborative Tools
       <tr>  
        <td class="LC_description">$lt{'func'}:</td>  
 END  
     my $numitems = keys(%{$functions});      my $numitems = keys(%{$functions});
     my $halfnum = int($numitems/2);      my $halfnum = int($numitems/2);
     my $remnum = $numitems%2;      my $remnum = $numitems%2;
Line 1646  END Line 1647  END
         $halfnum ++;          $halfnum ++;
     }      }
     my @allfunctions = sort(keys (%{$functions}));      my @allfunctions = sort(keys (%{$functions}));
     for (my $i=0; $i<$halfnum; $i++) {  
         $r->print('<td><label><input type="checkbox" name="tool" value="'.      $r->print(&Apache::lonhtmlcommon::row_title($lt{'func'})
                   $allfunctions[$i].'" />&nbsp;'.               .'<div>'
                    &mt($$functions{$allfunctions[$i]}).'</label></td>               .'<input type="button" value="'.&mt('check all').'"'
                    <td>&nbsp;</td><td>&nbsp;</td>');               .' onclick="javascript:checkAll(document.'.$formname.'.tool)" />'
     }               .'&nbsp;<input type="button" value="'.&mt('uncheck all').'"'
     $r->print('<td><input type="button" value="'.&mt('check all').'" '.               .' onclick="javascript:uncheckAll(document.'.$formname.'.tool)" />'
               'onclick="javascript:checkAll(document.'.$formname.'.tool)" />'.               .'</div>'
               '</td></tr><tr><td>&nbsp;</td>');               .'<table cellpadding="5px"><tr>' # FIXME Get rid of inflexible table (-> float)
     for (my $j=$halfnum; $j<@allfunctions; $j++) {      );
         $r->print('<td><label><input type="checkbox" name="tool" value="'.      for (my $i=0; $i<@allfunctions; $i++) {
                   $allfunctions[$j].'" />&nbsp;'.          $r->print('<td><label><span class="LC_nobreak">'
                   &mt($$functions{$allfunctions[$j]}).'</label></td>                   .'<input type="checkbox" name="tool" value="'
                   <td>&nbsp;</td><td>&nbsp;</td>');                   .$allfunctions[$i].'" /> '
     }                   .&mt($$functions{$allfunctions[$i]})
     if ($remnum) {                   .'</span></label></td>'
         $r->print('<td>&nbsp;</td>');          );
           if ($i == $halfnum - 1) {
               $r->print('</tr><tr>');
           }
     }      }
     $r->print('      $r->print('</tr></table>'
        <td>               .&Apache::lonhtmlcommon::row_closure()
         <input type="button" value="'.&mt('uncheck all').'"      );
           onclick="javascript:uncheckAll(document.'.$formname.'.tool)" />  
        </td>      # Granularity
       </tr>      $r->print(&Apache::lonhtmlcommon::row_title($lt{'gran'})
       <tr>               .$lt{'doyo'}.'<br />'
        <td class="LC_description">'.&mt('Granularity:').'</td>               .'<label>'
        <td colspan="10">'.$lt{'doyo'}.'&nbsp;<label><input type="radio" name="granularity" value="Yes" />'.&mt('Yes').'</label>&nbsp;<label><input type="radio" name="granularity" value="No" checked="checked" />'.&mt('No').'</label>');               .'<input type="radio" name="granularity" value="Yes" />'.&mt('Yes')
                .'</label>&nbsp;<label>'
                .'<input type="radio" name="granularity" value="No" checked="checked" />'.&mt('No')
                .'</label>'
       );
     if ($action eq 'modify') {      if ($action eq 'modify') {
         $r->print('&nbsp;&nbsp;('.&mt('Currently set to [_1].'          $r->print(' <span class="LC_nobreak">('
                                       ,'"'.&mt($$stored{'granularity'}).'"').')');                   .&mt('Currently set to [_1].'
                        ,'"'.&mt($$stored{'granularity'}).'"')
                    .')</span>'
           );
     }      }
     $r->print('      $r->print(&Apache::lonhtmlcommon::row_closure());
        </td>  
       </tr>      # Disk Quota
       <tr>      $r->print(&Apache::lonhtmlcommon::row_title($lt{'dquo'}));
        <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 group portfolio for the '.$gpterm.', allocate a disk quota.'));          $r->print('<span class="LC_info">'
                    .&mt('If you enable the group portfolio for the '.$gpterm
                        .', allocate a disk quota.')
                    .'</span>'
           );
     } else {      } else {
         $r->print(&mt('Quota allocated to group portfolio:'));          $r->print(&mt('Quota allocated to group portfolio:'));
     }       } 
     $r->print('&nbsp;'.&mt('[_1] Mb','<input type="text" name="quota" size="4" />'));      $r->print(' '.&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 '.$gpterm.'s in the '                   .&mt('A total of [_1] Mb can be divided amongst all '.$gpterm.'s in the '
Line 1703  END Line 1717  END
                  .'by adding all unallocated space for '.$gpterm.'s in the '.lc($crstype).'.'                   .'by adding all unallocated space for '.$gpterm.'s in the '.lc($crstype).'.'
                   ,sprintf("%.2f",$maxposs)));                    ,sprintf("%.2f",$maxposs)));
     }      }
     $r->print('      $r->print(&Apache::lonhtmlcommon::row_closure(1));
        </td>  
       </tr>      $r->print(&Apache::lonhtmlcommon::end_pick_box());
      </table>  
 ');  
     return;      return;
 }  }
   

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


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