Diff for /modules/gci/lonlogin.pm between versions 1.9 and 1.12

version 1.9, 2010/01/11 02:31:32 version 1.12, 2019/05/14 20:49:48
Line 133  sub handler { Line 133  sub handler {
  (&Apache::lonnet::domain($env{'form.domain'},'description'))) {   (&Apache::lonnet::domain($env{'form.domain'},'description'))) {
  $domain=$env{'form.domain'};   $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 $shortsitename = 'WebCenter';
     my $existing = 'Existing WebCenter user?';      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].','<a href="http://gci.lite.msu.edu/">','</a>','<a href="http://gcitest.lite.msu.edu/adm/login">');      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.') <a href="http://'.$inventory.'.lite.msu.edu/">','</a>','<a href="http://'.$testdom.'.lite.msu.edu/adm/login">');
     my $role    = $r->dir_config('lonRole');      my $role    = $r->dir_config('lonRole');
     my $loadlim = $r->dir_config('lonLoadLim');      my $loadlim = $r->dir_config('lonLoadLim');
     my $servadm = $r->dir_config('lonAdmEMail');      my $servadm = $r->dir_config('lonAdmEMail');
Line 146  sub handler { Line 160  sub handler {
     my $expire  = $r->dir_config('lonExpire');      my $expire  = $r->dir_config('lonExpire');
     my $version = $r->dir_config('lonVersion');      my $version = $r->dir_config('lonVersion');
     my $host_name = &Apache::lonnet::hostname($lonhost);      my $host_name = &Apache::lonnet::hostname($lonhost);
     if ($domain eq 'gcitest') {      if ($domain =~ /^(\w+ci)test$/) {
         $lonhost = 'gcitestl1';          $lonhost = $domain.'l1';
         $host_name = 'gcitest.lite.msu.edu';          $host_name = $domain.'.lite.msu.edu';
         $sitename = 'GCI Testing Center';          $sitename = $inventory.' Testing Center';
         $shortsitename = 'Testing Center';          $shortsitename = 'Testing Center';
         $existing = 'Student with Testing Center account?';          $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.','<i>','</i>');          $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,'<i>','</i>',$longname{$inventory});
     }      }
   
 # --------------------------------------------- Default values for login fields  # --------------------------------------------- Default values for login fields
Line 207  sub handler { Line 221  sub handler {
     if ($env{'form.role'}) {      if ($env{'form.role'}) {
         $tokenextras = '&role='.&escape($env{'form.role'});          $tokenextras = '&role='.&escape($env{'form.role'});
     }      }
     if ($domain eq 'gci') {      if ($domain !~ /^\w+citest$/) {
         unless ($env{'form.symb'} eq '/adm/statistics') {          unless ($env{'form.symb'} eq '/adm/statistics') {
             $env{'form.symb'} = '/adm/gci_info';              $env{'form.symb'} = '/adm/ci_info';
         }          }
     }      }
     if ($env{'form.symb'}) {      if ($env{'form.symb'}) {
Line 401  ENDSCRIPT Line 415  ENDSCRIPT
   
     my $css_url = "/css/$domain/login.css";      my $css_url = "/css/$domain/login.css";
     $js .= "\n".'<link type="text/css" rel="stylesheet" href="'.$css_url.'">'."\n";      $js .= "\n".'<link type="text/css" rel="stylesheet" href="'.$css_url.'">'."\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'],                                          { 'redirect'       => [$expire,'/adm/roles'], 
                                          'add_entries' => \%add_entries,                                           'add_entries' => \%add_entries,
                                          'only_body'   => 1,}));                                           'only_body'   => 1,}));
Line 463  my %lt=&Apache::lonlocal::texthash( Line 477  my %lt=&Apache::lonlocal::texthash(
     <td width="450" valign="top">      <td width="450" valign="top">
       <table class="LC_loginbox_left">        <table class="LC_loginbox_left">
         <tr>          <tr>
           <td width="411" align="left"><br /><img src="/images/login/$domain/logo_smrnd.png" width="411" height="51" alt="GCI" align="left"></td>            <td width="411" align="left"><br /><img src="/images/login/$domain/logo_smrnd.png" width="411" height="51" alt="$uc_inventory" align="left"></td>
         </tr>          </tr>
         <tr>          <tr>
          <td>           <td>
Line 484  my %lt=&Apache::lonlocal::texthash( Line 498  my %lt=&Apache::lonlocal::texthash(
          <span style="font-size: 18px; line-height: 22px; "><font style="font-size: 18px; line-height: 22px;"><br />New to the $sitename?</font></span><br />           <span style="font-size: 18px; line-height: 22px; "><font style="font-size: 18px; line-height: 22px;"><br />New to the $sitename?</font></span><br />
           <font class="bodyblue">$sitedesc<br /><br />The $shortsitename runs on <a href="http://loncapa.org/">LON-CAPA</a> - an open source freeware distributed learning content management and assessment system.</font><br /><br />            <font class="bodyblue">$sitedesc<br /><br />The $shortsitename runs on <a href="http://loncapa.org/">LON-CAPA</a> - an open source freeware distributed learning content management and assessment system.</font><br /><br />
 END_OF_BLOCK1  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");           $r->print(<<"END_OF_BLOCK2"); 
           <font class="bodyblue"><b>Create a GCI WebCenter ID</b> &#150; 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.</font><br /><br /><br />            <font class="bodyblue"><b>Create a $uc_inventory WebCenter ID</b> &#150; 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.</font><br /><br /><br />
          <form name="signup" method="post" action="/adm/createaccount?courseid=gci_9615072b469884921gcil1"><input type="hidden" name="process" value="signup"/>           <form name="signup" method="post" action="/adm/createaccount?courseid=$review"><input type="hidden" name="process" value="signup"/>
          <table class="LC_signup">           <table class="LC_signup">
            <tr>             <tr>
              <td align="left" valign="top" width="11" height="11"><img src="/images/login/$domain/r2_c4.png" width="11" height="11" border="0" alt=""></td>               <td align="left" valign="top" width="11" height="11"><img src="/images/login/$domain/r2_c4.png" width="11" height="11" border="0" alt=""></td>
Line 496  END_OF_BLOCK1 Line 514  END_OF_BLOCK1
            </tr>             </tr>
            <tr>             <tr>
              <td>&nbsp;</td>               <td>&nbsp;</td>
              <td align="center" valign="middle"><span style="white-space: nowrap;">New to GCI WebCenter:&nbsp;<a href="javascript:send('newaccount')" style="color: #ffffff">Click here to sign up</a></span></td>               <td align="center" valign="middle"><span style="white-space: nowrap;">New to $uc_inventory WebCenter:&nbsp;<a href="javascript:send('newaccount')" style="color: #ffffff">Click here to sign up</a></span></td>
              <td>&nbsp;</td>               <td>&nbsp;</td>
            </tr>             </tr>
            <tr>             <tr>
Line 614  END_OF_BLOCK2 Line 632  END_OF_BLOCK2
  Javascript must be enabled in your web browser in order to use this web site.   Javascript must be enabled in your web browser in order to use this web site.
  </font></noscript>   </font></noscript>
 <p>&nbsp;</p>  <p>&nbsp;</p>
 <input type="hidden" name="imagesuppress"  value="" />  <input type="hidden" name="imagesuppress" value="" />
 <input type="hidden" name="embedsuppress"  value="" />  <input type="hidden" name="embedsuppress" value="" />
 <input type="hidden" name="appletsuppress"  value="" />  <input type="hidden" name="appletsuppress" value="" />
 <input type="hidden" name="fontenhance"  value="" />  <input type="hidden" name="fontenhance" value="" />
 <input type="hidden" name="blackwhite"  value="" />  <input type="hidden" name="blackwhite" value="" />
 <input type="hidden" name="remember"  value="" />  <input type="hidden" name="remember" value="" />
 END_OF_BLOCK3  END_OF_BLOCK3
     } else {      } else {
         $r->print(<<ENDACCESSOPTIONS);          $r->print(<<ENDACCESSOPTIONS);
Line 696  ENDTEXTUAL Line 714  ENDTEXTUAL
    <input type="hidden" name="upass1" value="" />     <input type="hidden" name="upass1" value="" />
    <input type="hidden" name="upass2" value="" />     <input type="hidden" name="upass2" value="" />
    <input type="hidden" name="udom" value="" />     <input type="hidden" name="udom" value="" />
    <input type="hidden" name="imagesuppress"  value="" />     <input type="hidden" name="imagesuppress" value="" />
    <input type="hidden" name="appletsuppress"  value="" />     <input type="hidden" name="appletsuppress" value="" />
    <input type="hidden" name="embedsuppress"  value="" />     <input type="hidden" name="embedsuppress" value="" />
    <input type="hidden" name="fontenhance"  value="" />     <input type="hidden" name="fontenhance" value="" />
    <input type="hidden" name="blackwhite"  value="" />     <input type="hidden" name="blackwhite" value="" />
    <input type="hidden" name="remember"  value="" />     <input type="hidden" name="remember" value="" />
    <input type="hidden" name="localpath" value="$env{'form.localpath'}" />     <input type="hidden" name="localpath" value="$env{'form.localpath'}" />
    <input type="hidden" name="localres" value="$env{'form.localres'}" />     <input type="hidden" name="localres" value="$env{'form.localres'}" />
   </form>    </form>
Line 748  function helpdesk() { Line 766  function helpdesk() {
 ENDSCRIPT  ENDSCRIPT
     }      }
     $contactblock .= <<"ENDBLOCK";      $contactblock .= <<"ENDBLOCK";
      &nbsp;&nbsp;&nbsp;$version      &nbsp;&nbsp;&nbsp;$version
 ENDBLOCK  ENDBLOCK
     return $contactblock;      return $contactblock;
 }  }

Removed from v.1.9  
changed lines
  Added in v.1.12


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