Diff for /loncom/interface/domainprefs.pm between versions 1.180 and 1.186

version 1.180, 2012/12/20 13:15:36 version 1.186, 2013/01/09 21:30:27
Line 45  described at http://www.lon-capa.org. Line 45  described at http://www.lon-capa.org.
 =head1 OVERVIEW  =head1 OVERVIEW
   
 Each institution using LON-CAPA will typically have a single domain designated   Each institution using LON-CAPA will typically have a single domain designated 
 for use by individuals affliated with the institution.  Accordingly, each domain  for use by individuals affiliated with the institution.  Accordingly, each domain
 may define a default set of logos and a color scheme which can be used to "brand"  may define a default set of logos and a color scheme which can be used to "brand"
 the LON-CAPA instance. In addition, an institution will typically have a language  the LON-CAPA instance. In addition, an institution will typically have a language
 and timezone which are used for the majority of courses.  and timezone which are used for the majority of courses.
Line 386  sub handler { Line 386  sub handler {
                               col2 => 'Rules'}],                                col2 => 'Rules'}],
                  },                   },
          'loadbalancing' =>           'loadbalancing' =>
                  {text  => 'Dedicated Load Balancer',                   {text  => 'Dedicated Load Balancer(s)',
                   help  => 'Domain_Configuration_Load_Balancing',                    help  => 'Domain_Configuration_Load_Balancing',
                   header => [{col1 => 'Balancers',                    header => [{col1 => 'Balancers',
                               col2 => 'Default destinations',                                col2 => 'Default destinations',
                               col3 => 'User affliation',                                col3 => 'User affiliation',
                               col4 => 'Overrides'},                                col4 => 'Overrides'},
                             ],                              ],
                  },                   },
Line 436  sub handler { Line 436  sub handler {
         my ($configuserok,$author_ok,$switchserver) =          my ($configuserok,$author_ok,$switchserver) =
             &config_check($dom,$confname,$servadm);              &config_check($dom,$confname,$servadm);
         unless ($configuserok eq 'ok') {          unless ($configuserok eq 'ok') {
             &Apache::lonconfigsettings::print_header($r,$phase,$context).              &Apache::lonconfigsettings::print_header($r,$phase,$context);
             &mt('The domain configuration user "[_1]" has yet to be created.',              $r->print(&mt('The domain configuration user "[_1]" has yet to be created.',
                 $confname).                             $confname).
             '<br />';                        '<br />'
               );
             if ($switchserver) {              if ($switchserver) {
                 &mt('Ordinarily, that domain configuration user is created when the ./UPDATE script is run to install LON-CAPA for the first time.').                  $r->print(&mt('Ordinarily, that domain configuration user is created when the ./UPDATE script is run to install LON-CAPA for the first time.').
                 '<br />'.                            '<br />'.
                 &mt('However, that does not apply when new domains are added to a multi-domain server, and ./UPDATE has not been run recently.').                            &mt('However, that does not apply when new domains are added to a multi-domain server, and ./UPDATE has not been run recently.').
                 '<br />'.                            '<br />'.
                 &mt('The "[_1]" user can be created automatically when a Domain Coordinator visits the web-based "Set domain configuration" screen, in a session hosted on the primary library server.',$confname).                            &mt('The "[_1]" user can be created automatically when a Domain Coordinator visits the web-based "Set domain configuration" screen, in a session hosted on the primary library server.',$confname).
                 '<br />'.                            '<br />'.
                 &mt("To do that now, use the following link: [_1],$switchserver);                            &mt('To do that now, use the following link: [_1]',$switchserver)
                   );
             } else {              } else {
                 &mt('To create that user from the command line run the ./UPDATE script found in the top level directory of the extracted LON-CAPA tarball.').                  $r->print(&mt('To create that user from the command line run the ./UPDATE script found in the top level directory of the extracted LON-CAPA tarball.').
                 '<br />'.                            '<br />'.
                 &mt('Once that is done, you will be able to use the web-based "Set domain configuration" to configure the domain');                            &mt('Once that is done, you will be able to use the web-based "Set domain configuration" to configure the domain')
                   );
             }              }
             $r->print(&Apache::loncommon::end_page());              $r->print(&Apache::loncommon::end_page());
             return OK;              return OK;
Line 840  sub print_login { Line 843  sub print_login {
                           '<td><select name="'.$lonhost.'_server">'.                            '<td><select name="'.$lonhost.'_server">'.
                           '<option value=""'.$direct.'>'.$choices{'directlogin'}.                            '<option value=""'.$direct.'>'.$choices{'directlogin'}.
                           '</option>';                            '</option>';
             foreach my $hostid (sort keys(%servers)) {              foreach my $hostid (sort(keys(%servers))) {
                 next if ($servers{$hostid} eq $servers{$lonhost});                  next if ($servers{$hostid} eq $servers{$lonhost});
                 my $selected = '';                  my $selected = '';
                 if (ref($disallowed{$lonhost}) eq 'HASH') {                  if (ref($disallowed{$lonhost}) eq 'HASH') {
Line 1370  sub display_color_options { Line 1373  sub display_color_options {
     $datatable .= '<td class="LC_right_item">'.      $datatable .= '<td class="LC_right_item">'.
                   '<table border="0"><tr>';                    '<table border="0"><tr>';
   
   
     foreach my $item (@{$bgs}) {      foreach my $item (@{$bgs}) {
 #        my $link = &color_pick($phase,$role,$item,$choices->{$item},$designs->{'bgs'}{$item});  
         $datatable .= '<td align="center">';          $datatable .= '<td align="center">';
  my $color = $designs->{'bgs'}{$item} ? $designs->{'bgs'}{$item} : $defaults->{'bgs'}{$item};   my $color = $designs->{'bgs'}{$item} ? $designs->{'bgs'}{$item} : $defaults->{'bgs'}{$item};
         if ($designs->{'bgs'}{$item}) {          if ($designs->{'bgs'}{$item}) {
Line 2789  sub spares_row { Line 2790  sub spares_row {
             $css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';              $css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
             $datatable .= '<tr'.$css_class.'>              $datatable .= '<tr'.$css_class.'>
                            <td rowspan="2">                             <td rowspan="2">
                             <span class="LC_nobreak"><b>'.$server.'</b> when busy, offloads to:</span></td>'."\n";                              <span class="LC_nobreak">'.
                             &mt('[_1] when busy, offloads to:'
                                 ,'<b>'.$server.'</b>').
                             "\n";
             my (%current,%canselect);              my (%current,%canselect);
             my @choices =               my @choices = 
                 &possible_newspares($server,$spareid->{$server},$serverhomes,$altids);                  &possible_newspares($server,$spareid->{$server},$serverhomes,$altids);
Line 3038  sub print_loadbalancing { Line 3042  sub print_loadbalancing {
                                '<table><tr>'.$targettable.'</tr></table><br />';                                 '<table><tr>'.$targettable.'</tr></table><br />';
             }              }
         }          }
         my $cssidx = $balnum%2;   
         $datatable .= '</div></td></tr>'.          $datatable .= '</div></td></tr>'.
                       &loadbalancing_rules($dom,$intdom,$currrules{$lonhost},                        &loadbalancing_rules($dom,$intdom,$currrules{$lonhost},
                                            $othertitle,$usertypes,$types,\%servers,                                             $othertitle,$usertypes,$types,\%servers,
Line 5611  sub write_metadata { Line 5614  sub write_metadata {
         print $logfile "\nWrite metadata file for ".$targetdir.'/'.$file;          print $logfile "\nWrite metadata file for ".$targetdir.'/'.$file;
         my $mfh;          my $mfh;
         if (open($mfh,'>'.$targetdir.'/'.$file.'.meta')) {          if (open($mfh,'>'.$targetdir.'/'.$file.'.meta')) {
             foreach (sort keys %metadatafields) {              foreach (sort(keys(%metadatafields))) {
                 unless ($_=~/\./) {                  unless ($_=~/\./) {
                     my $unikey=$_;                      my $unikey=$_;
                     $unikey=~/^([A-Za-z]+)/;                      $unikey=~/^([A-Za-z]+)/;

Removed from v.1.180  
changed lines
  Added in v.1.186


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