Diff for /loncom/interface/domainprefs.pm between versions 1.97 and 1.99

version 1.97, 2009/05/26 20:39:22 version 1.99, 2009/08/02 07:21:18
Line 1019  sub print_quotas { Line 1019  sub print_quotas {
     my $typecount = 0;      my $typecount = 0;
     my $css_class;      my $css_class;
     if ($context eq 'requestcourses') {      if ($context eq 'requestcourses') {
         @usertools = ('official','unofficial');          @usertools = ('official','unofficial','community');
     } else {      } else {
         @usertools = ('aboutme','blog','portfolio');          @usertools = ('aboutme','blog','portfolio');
     }      }
Line 1117  sub print_quotas { Line 1117  sub print_quotas {
     $typecount ++;      $typecount ++;
     $css_class = $typecount%2?' class="LC_odd_row"':'';      $css_class = $typecount%2?' class="LC_odd_row"':'';
     $datatable .= '<tr'.$css_class.'>'.      $datatable .= '<tr'.$css_class.'>'.
                   '<td><br/>'.&mt('LON-CAPA Advanced Users').'</td>'.                    '<td>'.&mt('LON-CAPA Advanced Users').
                     ' <span class="LC_nobreak">('.
                     &mt('overrides affiliation').')</span></td>'.
                   '<td class="LC_left_item" colspan="2"><br />';                    '<td class="LC_left_item" colspan="2"><br />';
     foreach my $item (@usertools) {      foreach my $item (@usertools) {
         my $checked;          my $checked;
Line 1138  sub print_quotas { Line 1140  sub print_quotas {
                       '" value="_LC_adv" '.$checked.'/>'.$titles{$item}.                        '" value="_LC_adv" '.$checked.'/>'.$titles{$item}.
                       '</label></span>&nbsp; ';                        '</label></span>&nbsp; ';
     }      }
     $datatable .= '<span class="LC_nobreak">('.&mt('overrides affiliation').      $datatable .= '</td></tr>';
                   ')</span></td></tr>';  
     $$rowtotal += $typecount;      $$rowtotal += $typecount;
     return $datatable;      return $datatable;
 }  }
Line 1471  sub tool_titles { Line 1472  sub tool_titles {
                      portfolio  => 'Portfolio',                       portfolio  => 'Portfolio',
                      official   => 'Official courses (with institutional codes)',                       official   => 'Official courses (with institutional codes)',
                      unofficial => 'Unofficial courses',                       unofficial => 'Unofficial courses',
                        community  => 'Communities',
                  );                   );
     return %titles;      return %titles;
 }  }
Line 1597  sub print_usercreation { Line 1599  sub print_usercreation {
             &Apache::loncommon::sorted_inst_types($dom);              &Apache::loncommon::sorted_inst_types($dom);
         if (ref($usertypes) eq 'HASH') {          if (ref($usertypes) eq 'HASH') {
             if (keys(%{$usertypes}) > 0) {              if (keys(%{$usertypes}) > 0) {
                 $datatable .= &insttypes_row($settings->{cancreate},$types,$usertypes,                  my $createsettings;
                   if (ref($settings) eq 'HASH') {
                       $createsettings = $settings->{cancreate};
                   }
                   $datatable .= &insttypes_row($createsettings,$types,$usertypes,
                                              $dom,$numinrow,$othertitle,                                               $dom,$numinrow,$othertitle,
                                              'statustocreate');                                               'statustocreate');
                 $$rowtotal ++;                  $$rowtotal ++;
Line 2518  sub insttypes_row { Line 2524  sub insttypes_row {
                     $output .= '<tr>';                      $output .= '<tr>';
                 }                  }
                 my $check = ' ';                  my $check = ' ';
                 if (ref($settings->{$context}) eq 'ARRAY') {                  if (ref($settings) eq 'HASH') {
                     if (grep(/^\Q$types->[$i]\E$/,@{$settings->{$context}})) {                      if (ref($settings->{$context}) eq 'ARRAY') {
                           if (grep(/^\Q$types->[$i]\E$/,@{$settings->{$context}})) {
                               $check = ' checked="checked" ';
                           }
                       } elsif ($context eq 'statustocreate') {
                         $check = ' checked="checked" ';                          $check = ' checked="checked" ';
                     }                      }
                 } elsif ($context eq 'statustocreate') {  
                     $check = ' checked="checked" ';  
                 }                  }
                 $output .= '<td class="LC_left_item">'.                  $output .= '<td class="LC_left_item">'.
                            '<span class="LC_nobreak"><label>'.                             '<span class="LC_nobreak"><label>'.
Line 2542  sub insttypes_row { Line 2550  sub insttypes_row {
         $output .= '<td class="LC_left_item">';          $output .= '<td class="LC_left_item">';
     }      }
     my $defcheck = ' ';      my $defcheck = ' ';
     if (ref($settings->{$context}) eq 'ARRAY') {      if (ref($settings) eq 'HASH') {  
         if (grep(/^default$/,@{$settings->{$context}})) {          if (ref($settings->{$context}) eq 'ARRAY') {
               if (grep(/^default$/,@{$settings->{$context}})) {
                   $defcheck = ' checked="checked" ';
               }
           } elsif ($context eq 'statustocreate') {
             $defcheck = ' checked="checked" ';              $defcheck = ' checked="checked" ';
         }          }
     } elsif ($context eq 'statustocreate') {  
         $defcheck = ' checked="checked" ';  
     }      }
     $output .= '<span class="LC_nobreak"><label>'.      $output .= '<span class="LC_nobreak"><label>'.
                '<input type="checkbox" name="'.$context.'" '.                 '<input type="checkbox" name="'.$context.'" '.
Line 3348  sub modify_quotas { Line 3358  sub modify_quotas {
         $context = $action;          $context = $action;
     }      }
     if ($context eq 'requestcourses') {      if ($context eq 'requestcourses') {
         @usertools = ('official','unofficial');          @usertools = ('official','unofficial','community');
     } else {      } else {
         @usertools = ('aboutme','blog','portfolio');          @usertools = ('aboutme','blog','portfolio');
     }      }

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


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