--- loncom/interface/domainprefs.pm 2013/01/04 05:38:15 1.160.6.12 +++ loncom/interface/domainprefs.pm 2013/01/09 21:37:04 1.160.6.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.160.6.12 2013/01/04 05:38:15 raeburn Exp $ +# $Id: domainprefs.pm,v 1.160.6.13 2013/01/09 21:37:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,7 +45,7 @@ described at http://www.lon-capa.org. =head1 OVERVIEW 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" the LON-CAPA instance. In addition, an institution will typically have a language and timezone which are used for the majority of courses. @@ -368,7 +368,7 @@ sub handler { help => 'Domain_Configuration_Load_Balancing', header => [{col1 => 'Balancers', col2 => 'Default destinations', - col3 => 'User affliation', + col3 => 'User affiliation', col4 => 'Overrides'}, ], }, @@ -384,12 +384,14 @@ sub handler { col2 => 'Value'}], }; } + my @roles = ('student','coordinator','author','admin'); my @actions = &Apache::loncommon::get_env_multiple('form.actions'); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:changePage(document.$phase,'pickactions')", text=>"Settings to display/modify"}); my $confname = $dom.'-domainconfig'; + if ($phase eq 'process') { &Apache::lonconfigsettings::make_changes($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,\@roles); } elsif ($phase eq 'display') { @@ -809,7 +811,7 @@ sub print_login { ''; - } $$rowtotal += $itemcount; return $datatable; @@ -1963,7 +1965,7 @@ sub print_requestmail { $datatable .= ''; + $fullname.' ('.$uname.':'.$udom.')'; } $datatable .= ''; } else { @@ -2756,7 +2758,10 @@ sub spares_row { $css_class = $itemcount%2 ? ' class="LC_odd_row"' : ''; $datatable .= ' - '.$server.' when busy, offloads to:'."\n"; + '. + &mt('[_1] when busy, offloads to:' + ,''.$server.''). + "\n"; my (%current,%canselect); my @choices = &possible_newspares($server,$spareid->{$server},$serverhomes,$altids); @@ -5577,7 +5582,7 @@ sub write_metadata { print $logfile "\nWrite metadata file for ".$targetdir.'/'.$file; my $mfh; if (open($mfh,'>'.$targetdir.'/'.$file.'.meta')) { - foreach (sort keys %metadatafields) { + foreach (sort(keys(%metadatafields))) { unless ($_=~/\./) { my $unikey=$_; $unikey=~/^([A-Za-z]+)/; @@ -6308,13 +6313,16 @@ sub modify_autocreate { foreach my $item (@types) { if ($changes{$item}) { my $newtxt = $offon[$newvals{$item}]; - $resulttext .= '
  • '.&mt("$title{$item} set to [_1]$newtxt [_2]",'','').'
  • '; + $resulttext .= '
  • '. + &mt("$title{$item} set to [_1]$newtxt [_2]", + '',''). + '
  • '; } } if ($changes{'xmldc'}) { my ($dcname,$dcdom) = split(':',$newvals{'xmldc'}); my $newtxt = &Apache::loncommon::plainname($dcname,$dcdom); - $resulttext .= '
  • '.&mt("$title{'xmldc'} set to [_1]$newtxt [_2]",'','').'
  • '; + $resulttext .= '
  • '.&mt("$title{'xmldc'} set to [_1]",''.$newtxt.'').'
  • '; } $resulttext .= ''; } else { @@ -6460,7 +6468,11 @@ sub modify_directorysrch { } else { $chgtext =~ s/\; $//; } - $resulttext .= '
  • '.&mt("Users from domain '[_1]' permitted to search the institutional directory set to: [_2]",$dom,$chgtext).'
  • '; + $resulttext .= + '
  • '. + &mt("Users from domain '[_1]' permitted to search the institutional directory set to: [_2]", + ''.$dom.'',$chgtext). + '
  • '; } } } @@ -6488,7 +6500,7 @@ sub modify_directorysrch { } } $chgtext =~ s/\; $//; - $resulttext .= '
  • '.&mt("$title{'searchtypes'} set to: \"[_1]\"",$chgtext).'
  • '; + $resulttext .= '
  • '.&mt($title{'searchtypes'}.' set to: "[_1]"',$chgtext).'
  • '; } $resulttext .= ''; } else { @@ -8455,6 +8467,7 @@ sub active_dc_picker { ''. &Apache::loncommon::plainname($dcname,$dcdom). + ' ('.$dcname.':'.$dcdom.')'. '
    '; } $datatable .= '';