--- modules/gci/lonlogin.pm 2010/01/11 02:31:32 1.9 +++ modules/gci/lonlogin.pm 2019/05/14 20:49:48 1.12 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.9 2010/01/11 02:31:32 gci Exp $ +# $Id: lonlogin.pm,v 1.12 2019/05/14 20:49:48 gci Exp $ # # Copyright Michigan State University Board of Trustees # @@ -133,10 +133,24 @@ sub handler { (&Apache::lonnet::domain($env{'form.domain'},'description'))) { $domain=$env{'form.domain'}; } - my $sitename = 'GCI WebCenter'; + my %longname = ( + GCI => 'Geoscience Concept Inventory', + SLCI => 'Science Literacy Concept Inventory', + ); + my %allnums = &Apache::loncommon::get_faculty_cnums(); + my ($inventory,$uc_inventory,$testdom); + if ($domain =~ /^(\w+ci)test$/) { + $inventory = $1; + $testdom = $domain; + } else { + $inventory = $domain; + $testdom = $domain.'test'; + } + $uc_inventory = uc($inventory); + my $sitename; = $uc_inventory.' WebCenter'; my $shortsitename = 'WebCenter'; my $existing = 'Existing WebCenter user?'; - my $sitedesc = &mt('The Geoscience Concept Inventory (GCI) [_1]WebCenter[_2] is a place to comment on existing concept questions, or submit new ones, and is also a place to build and manage Concept Tests which your students will complete via the [_3]Testing Center[_2].','','',''); + my $sitedesc = &mt('The [_1]WebCenter[_2] is a place to comment on existing concept questions, or submit new ones, and is also a place to build and manage Concept Tests which your students will complete via the [_3]Testing Center[_2].',$longname{$inventory}.' ('.$uc_inventory.') ','',''); my $role = $r->dir_config('lonRole'); my $loadlim = $r->dir_config('lonLoadLim'); my $servadm = $r->dir_config('lonAdmEMail'); @@ -146,13 +160,13 @@ sub handler { my $expire = $r->dir_config('lonExpire'); my $version = $r->dir_config('lonVersion'); my $host_name = &Apache::lonnet::hostname($lonhost); - if ($domain eq 'gcitest') { - $lonhost = 'gcitestl1'; - $host_name = 'gcitest.lite.msu.edu'; - $sitename = 'GCI Testing Center'; + if ($domain =~ /^(\w+ci)test$/) { + $lonhost = $domain.'l1'; + $host_name = $domain.'.lite.msu.edu'; + $sitename = $inventory.' Testing Center'; $shortsitename = 'Testing Center'; $existing = 'Student with Testing Center account?'; - $sitedesc = &mt('The GCI Testing Center is used by [_1]students[_2] to complete online concept tests created by their instructors using questions available in the Geoscience Concept Inventory.','',''); + $sitedesc = &mt('The [_1] Testing Center is used by [_2]students[_3] to complete online concept tests created by their instructors using questions available in the [_4].',$inventory,'','',$longname{$inventory}); } # --------------------------------------------- Default values for login fields @@ -207,9 +221,9 @@ sub handler { if ($env{'form.role'}) { $tokenextras = '&role='.&escape($env{'form.role'}); } - if ($domain eq 'gci') { + if ($domain !~ /^\w+citest$/) { unless ($env{'form.symb'} eq '/adm/statistics') { - $env{'form.symb'} = '/adm/gci_info'; + $env{'form.symb'} = '/adm/ci_info'; } } if ($env{'form.symb'}) { @@ -401,7 +415,7 @@ ENDSCRIPT my $css_url = "/css/$domain/login.css"; $js .= "\n".''."\n"; - $r->print(&Apache::loncommon::start_page('GCI WebCenter Login',$js, + $r->print(&Apache::loncommon::start_page($uc_inventory.' WebCenter Login',$js, { 'redirect' => [$expire,'/adm/roles'], 'add_entries' => \%add_entries, 'only_body' => 1,})); @@ -463,7 +477,7 @@ my %lt=&Apache::lonlocal::texthash( - +

GCI

$uc_inventory
@@ -484,10 +498,14 @@ my %lt=&Apache::lonlocal::texthash(
New to the $sitename?

$sitedesc

The $shortsitename runs on LON-CAPA - an open source freeware distributed learning content management and assessment system.


END_OF_BLOCK1 - if ($domain eq 'gci') { + if ($domain !~ /^\w+citest$/) { + my $review; + if (ref($allnums{$domain}) eq 'HASH') { + $review = $domain.'_'.$allnums{$domain}{'review'}; + } $r->print(<<"END_OF_BLOCK2"); - Create a GCI WebCenter ID – use your ID to submit comments or new content, or to create a new test. If you are already a GCI WebCenter user, please log-in.


-
+ Create a $uc_inventory WebCenter ID – use your ID to submit comments or new content, or to create a new test. If you are already a $uc_inventory WebCenter user, please log-in.


+ @@ -496,7 +514,7 @@ END_OF_BLOCK1 - + @@ -614,12 +632,12 @@ END_OF_BLOCK2 Javascript must be enabled in your web browser in order to use this web site.

 

- - - - - - + + + + + + END_OF_BLOCK3 } else { $r->print(< - - - - - - + + + + + + @@ -748,7 +766,7 @@ function helpdesk() { ENDSCRIPT } $contactblock .= <<"ENDBLOCK"; -    $version +    $version ENDBLOCK return $contactblock; }