--- loncom/interface/domainprefs.pm 2012/10/30 10:39:02 1.174
+++ loncom/interface/domainprefs.pm 2013/01/04 05:37:05 1.182
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.174 2012/10/30 10:39:02 foxr Exp $
+# $Id: domainprefs.pm,v 1.182 2013/01/04 05:37:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -431,6 +431,34 @@ sub handler {
}
&Apache::lonconfigsettings::display_settings($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,$js);
} else {
+# check if domconfig user exists for the domain.
+ my $servadm = $r->dir_config('lonAdmEMail');
+ my ($configuserok,$author_ok,$switchserver) =
+ &config_check($dom,$confname,$servadm);
+ unless ($configuserok eq 'ok') {
+ &Apache::lonconfigsettings::print_header($r,$phase,$context);
+ $r->print(&mt('The domain configuration user "[_1]" has yet to be created.',
+ $confname).
+ ' '
+ );
+ if ($switchserver) {
+ $r->print(&mt('Ordinarily, that domain configuration user is created when the ./UPDATE script is run to install LON-CAPA for the first time.').
+ ' '.
+ &mt('However, that does not apply when new domains are added to a multi-domain server, and ./UPDATE has not been run recently.').
+ ' '.
+ &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('To do that now, use the following link: [_1]',$switchserver)
+ );
+ } else {
+ $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.').
+ ' '.
+ &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());
+ return OK;
+ }
if (keys(%domconfig) == 0) {
my $primarylibserv = &Apache::lonnet::domain($dom,'primary');
my @ids=&Apache::lonnet::current_machine_ids();
@@ -815,7 +843,7 @@ sub print_login {
'
'.
&loadbalancing_rules($dom,$intdom,$currrules{$lonhost},
$othertitle,$usertypes,$types,\%servers,
@@ -5673,7 +5697,7 @@ sub check_switchserver {
my @ids=&Apache::lonnet::current_machine_ids();
foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
if (!$allowed) {
- $switchserver=''.&mt('Switch Server').'';
+ $switchserver=''.&mt('Switch Server').'';
}
return $switchserver;
}
@@ -6320,13 +6344,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.'').'