[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Sat Aug 25 18:55:00 EDT 2012
raeburn Sat Aug 25 22:55:00 2012 EDT
Modified files:
/loncom/interface domainprefs.pm
Log:
- Use dropdown list to set default language for domain.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.166 loncom/interface/domainprefs.pm:1.167
--- loncom/interface/domainprefs.pm:1.166 Sat Aug 25 21:48:12 2012
+++ loncom/interface/domainprefs.pm Sat Aug 25 22:55:00 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.166 2012/08/25 21:48:12 raeburn Exp $
+# $Id: domainprefs.pm,v 1.167 2012/08/25 22:55:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3526,6 +3526,17 @@
} elsif ($item eq 'datelocale_def') {
my $includeempty = 1;
$datatable .= &Apache::loncommon::select_datelocale($item,$domdefaults{$item},undef,$includeempty);
+ } elsif ($item eq 'lang_def') {
+ my %langchoices=('' => 'No language preference');
+ foreach my $id (&Apache::loncommon::languageids()) {
+ my $code = &Apache::loncommon::supportedlanguagecode($id);
+ if ($code ne '') {
+ $langchoices{$code} = &Apache::loncommon::plainlanguagedescription($id);
+ }
+ }
+ %langchoices = &Apache::lonlocal::texthash(%langchoices);
+ $datatable .= &Apache::loncommon::select_form($domdefaults{$item},$item,
+ \%langchoices);
} else {
my $size;
if ($item eq 'portal_def') {
More information about the LON-CAPA-cvs
mailing list