Diff for /modules/gci/lonlogin.pm between versions 1.2 and 1.5

version 1.2, 2009/09/23 13:14:19 version 1.5, 2009/11/19 15:22:20
Line 81  sub handler { Line 81  sub handler {
     &Apache::loncommon::start_page('Already logged in');      &Apache::loncommon::start_page('Already logged in');
  my $end_page =    my $end_page = 
     &Apache::loncommon::end_page();      &Apache::loncommon::end_page();
           my $dest = '/adm/roles';
           if ($env{'form.firsturl'} ne '') {
               $dest = $env{'form.firsturl'};
           }
  $r->print(   $r->print(
                   $start_page                    $start_page
                  .'<h1>'.&mt('You are already logged in!').'</h1>'                   .'<h1>'.&mt('You are already logged in!').'</h1>'
                  .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].',                   .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].',
                   '<a href="/adm/roles">','</a>','<a href="/adm/logout">','</a>').'</p>'                    '<a href="'.$dest.'">','</a>','<a href="/adm/logout">','</a>').'</p>'
                  .'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'                   .'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'
                  .$end_page                   .$end_page
                  );                   );
Line 121  sub handler { Line 125  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 $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].','<a href="http://gci.lite.msu.edu/">','</a>','<a href="http://gcitest.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 130  sub handler { Line 138  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') {
           $lonhost = 'gcitestl1';
           $host_name = 'gcitest.lite.msu.edu';
           $sitename = 'GCI 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.','<i>','</i>');
       }
   
 # --------------------------------------------- Default values for login fields  # --------------------------------------------- Default values for login fields
   
Line 239  sub handler { Line 255  sub handler {
           .'<body bgcolor="#FFFFFF">'            .'<body bgcolor="#FFFFFF">'
           .'<h1>'.&mt('The LearningOnline Network with CAPA').'</h1>'            .'<h1>'.&mt('The LearningOnline Network with CAPA').'</h1>'
           .'<img src="/adm/lonKaputt/lonlogo_broken.gif" align="right" />'            .'<img src="/adm/lonKaputt/lonlogo_broken.gif" align="right" />'
           .'<h3>'.&mt('The GCI WebCenter server is temporarily not available for login.').'</h3>'            .'<h3>'.&mt("The $sitename server is temporarily not available for login.").'</h3>'
           .'</body>'            .'</body>'
           .'</html>'            .'</html>'
         );          );
Line 292  sub handler { Line 308  sub handler {
     my $js = (<<ENDSCRIPT);      my $js = (<<ENDSCRIPT);
   
  <script type="text/javascript" language="JavaScript">   <script type="text/javascript" language="JavaScript">
 // <![CDATA[   // <![CDATA[
   
     function send(caller)      function send(caller)
     {      {
   
Line 350  sub handler { Line 367  sub handler {
         this.document.server.submit();          this.document.server.submit();
         return false;          return false;
     }      }
    // ]]>
  </script>   </script>
 // ]]>  
 ENDSCRIPT  ENDSCRIPT
   
 # --------------------------------------------------- Print login screen header  # --------------------------------------------------- Print login screen header
Line 368  ENDSCRIPT Line 386  ENDSCRIPT
                        onload       => "if ( document.client.uname ) { document.client.uname.focus(); }",                         onload       => "if ( document.client.uname ) { document.client.uname.focus(); }",
                        marginheight => "0",);                         marginheight => "0",);
   
     $js .= "\n".'<link type="text/css" rel="stylesheet" href="/css/login.css">'."\n";      my $css_url = "/css/$domain/login.css";
       $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('GCI WebCenter Login',$js,
                                        { 'redirect'       => [$expire,'/adm/roles'],                                          { 'redirect'       => [$expire,'/adm/roles'], 
                                          'add_entries' => \%add_entries,                                           'add_entries' => \%add_entries,
Line 420  my %lt=&Apache::lonlocal::texthash( Line 439  my %lt=&Apache::lonlocal::texthash(
         $newuserlink = &newuser_link($lt{'newuser'});          $newuserlink = &newuser_link($lt{'newuser'});
     }      }
     if ($fullgraph) {      if ($fullgraph) {
         $r->print(<<"END_OF_BLOCK2");          $r->print(<<"END_OF_BLOCK1");
 <br />  <br />
 <div align="center">  <div align="center">
 <table class="LC_loginbox">  <table class="LC_loginbox">
   <tr>    <tr>
     <td align="left" valign="top" width="12">      <td align="left" valign="top" width="11">
      <img name="login_r1_c1" src="/images/login/lclogin_r1_c1.gif" width="12" height="10" border="0" alt="">       <img name="login_r1_c1" src="/images/login/$domain/r1_c1.png" width="11" height="11" border="0" alt="">
     </td>      </td>
     <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/gcilogo_smrnd.png" width="411" height="51" align="left"></td>            <td width="411" align="left"><br /><img src="/images/login/$domain/logo_smrnd.png" width="411" height="51" alt="GCI" align="left"></td>
         </tr>          </tr>
         <tr>          <tr>
          <td>           <td>
           <div align="left" style="display:block; margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; width:440px; height:5px;">            <div align="left" style="display:block; margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; width:440px; height:5px;">
            <div style="display:block; background-color:#4C6C84; width:100%; height:5px; color:#000000; margin:0px;">             <div class="divider">
             </div>              </div>
           </div>            </div>
         </td>          </td>
Line 449  my %lt=&Apache::lonlocal::texthash( Line 468  my %lt=&Apache::lonlocal::texthash(
        <tr>         <tr>
         <td width="10">&nbsp;</td>          <td width="10">&nbsp;</td>
         <td valign="top" class="bodyblue" width="430" align="left">          <td valign="top" class="bodyblue" width="430" align="left">
          <span style="font-size: 18px; line-height: 22px; "><font style="font-size: 18px; line-height: 22px;"><br />New to the WebCenter?</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">The Geoscience Concept Inventory (GCI) <a href="http://gci.lite.msu.edu/">WebCenter</a> is a place to comment on existing concept questions and submit new ones.<br /><br />The WebCenter 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 />
           <font class="bodyblue"><b>Create a GCI WebCenter ID</b> &#150; use your ID to submit comments or new content.  If you are already a GCI WebCenter user, please log-in.</font><br /><br /><br />  END_OF_BLOCK1
       if ($domain eq 'gci') {
           $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 />
          <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=gci_9615072b469884921gcil1"><input type="hidden" name="process" value="signup"/>
          <table class="LC_signup">           <table class="LC_signup">
            <tr>             <tr>
              <td align="left" valign="top" width="10" height="9"><img src="/images/login/lclogin_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>
              <td>&nbsp;</td>               <td>&nbsp;</td>
              <td align="right" valign="top" width="9" height="10"><img src="/images/login/lclogin_r2_c6.png" width="11 height="11" border="0" alt=""></td>               <td align="right" valign="top" width="11" height="11"><img src="/images/login/$domain/r2_c6.png" width="11" height="11" border="0" alt=""></td>
            </tr>             </tr>
            <tr>             <tr>
              <td align="center" valign="top" colspan="3">New to GCI WebCenter: <a href="javascript:send('newaccount')" style="color: #ffffff">Click here to sign up</a><br /></td>               <td align="center" valign="top" colspan="3">New to GCI WebCenter: <a href="javascript:send('newaccount')" style="color: #ffffff">Click here to sign up</a><br /></td>
            </tr>             </tr>
            <tr>             <tr>
              <td align="left" valign="bottom" width="10" height="10"><img src="/images/login/lclogin_r8_c4.png" width="11" height="11" border="0" alt=""></td>               <td align="left" valign="bottom" width="11" height="11"><img src="/images/login/$domain/r8_c4.png" width="11" height="11" border="0" alt=""></td>
              <td>&nbsp;</td>               <td>&nbsp;</td>
              <td align="right" valign="bottom" width="9" height="10"><img src="/images/login/lclogin_r8_c6.png" width="11" height="11" border="0" alt=""></td>               <td align="right" valign="bottom" width="11" height="11"><img src="/images/login/$domain/r8_c6.png" width="11" height="11" border="0" alt=""></td>
            </tr>             </tr>
          </table>           </table>
          </form>           </form>
   END_OF_BLOCK2
       } else {
           $r->print('<font class="bodyblue">'.
                     &mt("If you are already a $sitename user, please log-in.").' '.&mt('If not, contact your instructor to request a username and password.').
                    '</font><br /><br /><br />');
       }
       $r->print(<<"END_OF_BLOCK3");
         </td>          </td>
        </tr>         </tr>
       </table>        </table>
      </td>       </td>
      <td width="10">&nbsp;</td>       <td width="10">&nbsp;</td>
      <td valign="top">       <td valign="top">
       <form name="client" method="post" action="" onsubmit="return(send());">        <form name="client" method="post" onsubmit="return(send());">
       <table class="LC_loginbox_right">        <table class="LC_loginbox_right">
        <tr>         <tr>
         <td colspan="3" height="23" class="LC_loginbox_strip">&nbsp;</td>          <td colspan="3" height="23" class="LC_loginbox_strip">&nbsp;</td>
        </tr>         </tr>
        <tr>         <tr>
         <td align="left" valign="top" width="10" height="9"><img src="/images/login/lclogin_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>
         <td>&nbsp;</td>          <td>&nbsp;</td>
         <td align="right" valign="top" width="9" height="10"><img src="/images/login/lclogin_r2_c6.png" width="11 height="11" border="0" alt=""></td>          <td align="right" valign="top" width="11" height="11"><img src="/images/login/$domain/r2_c6.png" width="11" height="11" border="0" alt=""></td>
        </tr>         </tr>
        <tr>         <tr>
         <td width="10">&nbsp;</td>          <td width="10">&nbsp;</td>
Line 492  my %lt=&Apache::lonlocal::texthash( Line 521  my %lt=&Apache::lonlocal::texthash(
           <tr>            <tr>
            <td align="right" class="bodywhite" height=50><br>             <td align="right" class="bodywhite" height=50><br>
             <span style="font-size: 15px; line-height: 17px; font-weight: bold;">              <span style="font-size: 15px; line-height: 17px; font-weight: bold;">
              Existing WebCenter user?</span>               $existing</span>
              <br />Please log-in.<br>               <br />Please log-in.<br>
              <hr size=1 noshade color="#FFFFBB"><br /><br />               <hr class="login"><br /><br />
             </td>              </td>
            </tr>             </tr>
            <tr>             <tr>
Line 506  my %lt=&Apache::lonlocal::texthash( Line 535  my %lt=&Apache::lonlocal::texthash(
                </tr>                 </tr>
                <tr>                 <tr>
                 <td align="right" class="bodywhite"><label for="upass$now">$lt{'pw'}</label>:</td>                  <td align="right" class="bodywhite"><label for="upass$now">$lt{'pw'}</label>:</td>
                 <td align="right"><input name="upass$now" size="17" value="" type="password"><input type="hidden" name="udom" value="gci" /></td>                  <td align="right"><input name="upass$now" size="17" value="" type="password"><input type="hidden" name="udom" value="$domain" /></td>
                </tr>                 </tr>
                <tr><td>&nbsp;</td></tr>                 <tr><td>&nbsp;</td></tr>
                <tr>                 <tr>
Line 519  my %lt=&Apache::lonlocal::texthash( Line 548  my %lt=&Apache::lonlocal::texthash(
              <td align="right" valign="top" class="bodywhite">               <td align="right" valign="top" class="bodywhite">
               <br />                <br />
               <br /><br />                <br /><br />
               <hr size="1" noshade color="#FFFFBB" />                <hr class="login" />
               <br />                <br />
               <a href="/adm/resetpw" style="color: #ffffff">Forgot your password?</a><br>                <a href="/adm/resetpw" style="color: #ffffff">Forgot your password?</a><br>
               <br />                <br />
Line 530  my %lt=&Apache::lonlocal::texthash( Line 559  my %lt=&Apache::lonlocal::texthash(
           <td width="9">&nbsp;</td>            <td width="9">&nbsp;</td>
         </tr>          </tr>
         <tr>          <tr>
           <td align="left" valign="bottom" width="10" height="10"><img src="/images/login/lclogin_r8_c4.png" width="11" height="11" border="0" alt=""></td>            <td align="left" valign="bottom" width="11" height="11"><img src="/images/login/$domain/r8_c4.png" width="11" height="11" border="0" alt=""></td>
           <td>&nbsp;</td>            <td>&nbsp;</td>
           <td align="right" valign="bottom" width="9" height="10"><img src="/images/login/lclogin_r8_c6.png" width="11" height="11" border="0" alt=""></td>            <td align="right" valign="bottom" width="11" height="11"><img src="/images/login/$domain/r8_c6.png" width="11" height="11" border="0" alt=""></td>
         </tr>          </tr>
         <tr>          <tr>
           <td colspan="3" height="10" class="LC_loginbox_strip">&nbsp;</td>            <td colspan="3" height="10" class="LC_loginbox_strip">&nbsp;</td>
         </tr>          </tr>
       </table>        </table>
     </td>      </td>
     <td align="right" valign="top" width="10"><img src="/images/login/lclogin_r1_c7.gif" width="10" height="10" border="0" alt=""></td>      <td align="right" valign="top" width="11"><img src="/images/login/$domain/r1_c7.png" width="11" height="11" border="0" alt=""></td>
   </tr>    </tr>
   <tr>    <tr>
     <td colspan="4">      <td colspan="4">
Line 557  my %lt=&Apache::lonlocal::texthash( Line 586  my %lt=&Apache::lonlocal::texthash(
    </td>     </td>
   </tr>    </tr>
   <tr>    <tr>
     <td align="left" valign="bottom" width="12"><img src="/images/login/lclogin_r9_c1.gif" width="12" height="10" border="0" alt=""></td>      <td align="left" valign="bottom" width="11"><img src="/images/login/$domain/r9_c1.png" width="11" height="11" border="0" alt=""></td>
     <td colspan="3" width="698">&nbsp;</td>      <td colspan="3" width="698">&nbsp;</td>
     <td align="right" valign="bottom" width="10"><img src="/images/login/lclogin_r9_c7.gif" width="10" height="10" border="0" alt=""></td>      <td align="right" valign="bottom" width="11"><img src="/images/login/$domain/r9_c7.png" width="11" height="11" border="0" alt=""></td>
   </tr>    </tr>
 </table>  </table>
 </div>  </div>
Line 574  my %lt=&Apache::lonlocal::texthash( Line 603  my %lt=&Apache::lonlocal::texthash(
 <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_BLOCK2  END_OF_BLOCK3
     } else {      } else {
         $r->print(<<ENDACCESSOPTIONS);          $r->print(<<ENDACCESSOPTIONS);
 <h1>The Learning<i>Online</i> Network with CAPA</h1>  <h1>The Learning<i>Online</i> Network with CAPA</h1>
Line 608  ENDACCESSOPTIONS Line 637  ENDACCESSOPTIONS
                             .'</font></div></noscript></td>';                              .'</font></div></noscript></td>';
         $r->print(<<ENDTEXTUAL);          $r->print(<<ENDTEXTUAL);
      <hr />       <hr />
      <table border=0 cellspacing="0" cellpadding="0">       <table border="0" cellspacing="0" cellpadding="0">
       <tr>$logintitle</tr>        <tr>$logintitle</tr>
       <tr>$noscript_warning</tr>        <tr>$noscript_warning</tr>
       <tr>        <tr>
Line 624  ENDACCESSOPTIONS Line 653  ENDACCESSOPTIONS
        <td bgcolor="$mainbg" valign="bottom" align="center">         <td bgcolor="$mainbg" valign="bottom" align="center">
         <br />          <br />
         <input type="submit" value="$lt{'log'}" />          <input type="submit" value="$lt{'log'}" />
         <input type="hidden" name="udom" value="'gci'" />          <input type="hidden" name="udom" value="$domain" />
        </td>         </td>
       </tr>        </tr>
       <tr>        <tr>

Removed from v.1.2  
changed lines
  Added in v.1.5


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