Diff for /modules/relate/lonlogin.pm between versions 1.3 and 1.10

version 1.3, 2012/02/10 20:30:01 version 1.10, 2012/05/01 15:47:14
Line 266  sub handler { Line 266  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("This Learn Physics server is temporarily not available for login.").'</h3>'            .'<h3>'.&mt("This Mechanics Online course server is temporarily not available for login.").'</h3>'
           .'</body>'            .'</body>'
           .'</html>'            .'</html>'
         );          );
Line 277  sub handler { Line 277  sub handler {
     $servadm=~s/\,/\<br \/\>/g;      $servadm=~s/\,/\<br \/\>/g;
   
 # ----------------------------------------------------------------------- Texts  # ----------------------------------------------------------------------- Texts
     my $pagetitle = 'Learn Physics Login'; # Do not localize.      my $pagetitle = 'Mechanics Online Log-in'; # Do not localize.
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
           'needu'    => 'You must provide a username',            'needu'    => 'You must provide a username',
           'needp'    => 'You must provide a password',            'needp'    => 'You must provide a password',
Line 293  sub handler { Line 293  sub handler {
           'serv'     => 'Server',            'serv'     => 'Server',
           'servadm'  => 'Server Administration',            'servadm'  => 'Server Administration',
           'helpdesk' => 'Contact Helpdesk',            'helpdesk' => 'Contact Helpdesk',
             'exist'    => 'Existing user - sign-up with existing username',
             'create'   => 'New user - create username and sign-up',
             'already'  => 'Already signed up?',
           'forgotpw' => 'Forgot your password?',            'forgotpw' => 'Forgot your password?',
           'newuser'  => 'New User?',            'newuser'  => 'New User?',
           'learn'    => 'Learn Physics includes an online mechanics course, to which you may receive admission after successfully completing a pre-course test.',            'click'   => 'Click here to sign up',
            'click'   => 'Click here to sign up',            'plea'    => 'Please log-in',
            'plea'    => 'Please log-in',            'supp'    => 'Support from NSF, NIH, Google',
            'supp'    => 'Support from NSF, NIH, Google',            'note'    => 'Please Note:',
            'note'    => 'Please Note:',            'jscr'    => 'Javascript must be enabled in your web browser in order to use this web site.',
            'jscr'    => 'Javascript must be enabled in your web browser in order to use this web site.',  
        );         );
 # ----------------------------------------------------------- Front page design  # ----------------------------------------------------------- Front page design
     my $font=&Apache::loncommon::designparm('login.font',$domain);      my $font=&Apache::loncommon::designparm('login.font',$domain);
Line 319  sub handler { Line 321  sub handler {
   
 # ---------------------------------------- Assemble Javascript to put in <head>  # ---------------------------------------- Assemble Javascript to put in <head>
   
   
     my $js = (<<ENDSCRIPT);      my $js = (<<ENDSCRIPT);
   
 <script type="text/javascript" language="JavaScript">  <script type="text/javascript" language="JavaScript">
Line 370  function enableInput() { Line 373  function enableInput() {
     return;      return;
 }  }
   
   function SubmitSignUp() {
       if (document.signup.usertype[0].checked == true) {
           document.signup.action = '/adm/createaccount';
       }
       if (document.signup.usertype[1].checked == true) {
           document.signup.action = '/adm/selfenroll';
       }
       return true;
   }
   
 // ]]>  // ]]>
 </script>  </script>
   
Line 386  ENDSCRIPT Line 399  ENDSCRIPT
                alink        => "$alink",                 alink        => "$alink",
                onload       => 'javascript:enableInput();',);                 onload       => 'javascript:enableInput();',);
   
     my $css_url = "/css/$domain/login.css";      my $css_url = "/css/relate/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($pagetitle,$js,      $r->print(&Apache::loncommon::start_page($pagetitle,$js,
                                        {'redirect'   => [$expire,'/adm/roles'],                                          {'redirect'   => [$expire,'/adm/roles'], 
Line 394  ENDSCRIPT Line 407  ENDSCRIPT
                                         'only_body'   => 1,}));                                          'only_body'   => 1,}));
   
 # ------------------------------------------------------------ Additional Texts  # ------------------------------------------------------------ Additional Texts
     $lt{'newto'} = &mt('New to the [_1]Learn Physics[_2] site?','<i>','</i>');      $lt{'newto'} = &mt('New to the [_1]Mechanics Online[_2] site?','<i>','</i>');
     $lt{'runson'} = &mt('Learn Physics runs on [_1]LON-CAPA[_2] - an open source, freeware, distributed learning content management and assessment system.',      $lt{'mech'} = &mt('Mechanics Online is a Newtonian Mechanics course developed by Professor David Pritchard and the RELATE education group at MIT. [_1]Learn more[_2]','<a href="http://relate.mit.edu/physicscourse" style="text-decoration: underline;">','</a>');
       $lt{'runson'} = &mt('Mechanics Online runs on [_1]LON-CAPA[_2] - an open source, freeware, distributed learning content management and assessment system.',
                         '<a href="http://loncapa.org/" style="text-decoration: underline;">',                          '<a href="http://loncapa.org/" style="text-decoration: underline;">',
                         '&nbsp;<img src="/images/login/lclogosm.gif" width="16" height="14" alt="LC" border="0" /></a>');                          '</a>');
     $lt{'newhere'} = &mt('New to [_1]Learn Physics[_2]:','<i>','</i>');      $lt{'newhere'} = &mt('New to [_1]Mechanics Online[_2]:','<i>','</i>');
     $lt{'exist'} = &mt('Existing [_1]Learn Physics[_2] user','<i>','</i>');  
     $lt{'browser'} = &mt('Your browser must allow [_1]cookies[_2]',      $lt{'browser'} = &mt('Your browser must allow [_1]cookies[_2]',
                          '<a href="http://loncapa.msu.edu/cookies.html" style="color: #ffffff; text-decoration:underline;">','</a>');                           '<a href="http://loncapa.msu.edu/cookies.html" style="color: #ffffff; text-decoration:underline;">','</a>');
   
     my ($contactrow,$domainrow,$serverrow,$loadrow,$userloadrow,$versionrow);      my ($contactrow,$domainrow,$serverrow,$loadrow,$userloadrow,$versionrow);
     $contactrow = <<"END";      $contactrow = <<"END";
       <tr>        <tr>
        <td colspan="2">         <td align="left" colspan="2">
        $contactblock         $contactblock
        </td>         </td>
       </tr>        </tr>
Line 459  END Line 472  END
         $versionrow = <<"END";          $versionrow = <<"END";
       <tr>        <tr>
        <td colspan="2" align="left">         <td colspan="2" align="left">
         <small>$version</small>          <a href="/adm/about.html">
           <img src="/images/login/lclogosm.gif" width="16" height="14" alt="LC" border="0" />&nbsp;<small>$version</small></a>
        </td>         </td>
       </tr>        </tr>
 END  END
     }      }
   
 # -------------------------------------------- Static cid for prerequisite test  # -------------------------------------------- Static cid for prerequisite test
     my $prereqcid = 'relate_3H121116c19344ff3relatel1';      my $prereqcid = 'relate_2764113e81b9e4f0crelatel1';
   
 # ---------------------------------------------------- Warning if no Javascript   # ---------------------------------------------------- Warning if no Javascript 
     my $noscript_warning = '<noscript><span class="LC_warning">'.      my $noscript_warning = '<noscript><br /><span class="LC_warning">'.
                            '<b>'.$lt{'note'}.'</b>'.$lt{'jscr'}.                             '<b>'.$lt{'note'}.'</b>'.$lt{'jscr'}.
                            '</span></noscript>';                             '</span></noscript>';
   
Line 485  END Line 499  END
 <div align="center">  <div align="center">
 <table class="LC_loginbox">  <table class="LC_loginbox">
   <tr>    <tr>
     <td align="left" valign="top" width="11">      <td align="left" valign="top" width="11"><img src="/images/login/tlc_11_ffffff_e2e2e2.gif" width="10" height="10" border="0" alt="" /></td>
      <img src="/images/login/tlc_11_ffffff_e2e2e2.gif" width="10" height="10" border="0" alt="" />  
     </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 />            <td width="441" align="left"><br />
            <img src="/images/login/LCrelateheader_sm.png" width="411" height="100" alt="Relate @ MIT" align="left" /></td>             <img src="/images/login/LCrelateheader_sm.png" width="441" height="100" alt="Relate @ MIT" align="left" /></td>
         </tr>          </tr>
         <tr>          <tr>
          <td>           <td>
Line 508  END Line 520  END
         <td width="10">&nbsp;</td>          <td width="10">&nbsp;</td>
         <td valign="top" class="bodyred" width="430" align="left"><br />          <td valign="top" class="bodyred" width="430" align="left"><br />
          <span style="font-size: 18px; line-height: 22px; ">$lt{'newto'}</span>           <span style="font-size: 18px; line-height: 22px; ">$lt{'newto'}</span>
          <br />           <p class="bodyred">$lt{'mech'}</p>
          <span class="bodyred">$lt{'learn'}<br /><br />$lt{'runson'}</span>           <p class="bodyred">$lt{'runson'}</p>
          <br /><br />           <fieldset><legend><span style="font-size:larger;">Sign-up for Summer (course begins: June 14th)</span></legend>
          <form name="signup" method="post" action="/adm/createaccount?courseid=$prereqcid"><input type="hidden" name="process" value="signup" />           <form name="signup" method="post" action="/adm/createaccount" onsubmit="return SubmitSignUp();">
          <table class="LC_signup">           <input type="hidden" name="courseid" value="$prereqcid" /> 
            <tr>           <input type="hidden" name="process" value="signup" />
              <td align="left" valign="top" width="11" height="11"><img src="/images/login/tlc_11_993333_ffffff.gif" width="10" height="10" border="0" alt="" /></td>           <span class="LC_nobreak">
              <td>&nbsp;</td>            <label>
              <td align="right" valign="top" width="11" height="11"><img src="/images/login/tr_11_993333_ffffff.gif" width="11" height="11" border="0" alt="" /></td>             <input type="radio" name="usertype" value="newuser" checked="checked" />$lt{'create'}
            </tr>            </label></span><br />
            <tr>            <span class="LC_nobreak"><label>
              <td>&nbsp;</td>             <input type="radio" name="usertype" value="existing" />$lt{'exist'}
              <td align="center" valign="middle"><span style="white-space: nowrap;"><b>$lt{'newhere'}</b>&nbsp;<a href="javascript:send('newaccount')" style="color: #ffffff; text-decoration:underline;">$lt{'click'}</a></span></td>             </label>
              <td>&nbsp;</td>             <input type="hidden" name="phase" value="login" />
            </tr>           </span><br /><br />
            <tr>           <input name="signin" type="submit" value="$lt{'click'}" class="buttonred" />
              <td align="left" valign="bottom" width="11" height="11"><img src="/images/login/bl_11_993333_ffffff.gif" width="11" height="11" border="0" alt="" /></td>  
   
              <td>&nbsp;</td>  
              <td align="right" valign="bottom" width="11" height="11"><img src="/images/login/br_11_993333_ffffff.gif" width="11" height="11" border="0" alt="" /></td>  
            </tr>  
          </table>  
          </form>           </form>
            </fieldset>
         </td>          </td>
        </tr>         </tr>
       </table>        </table>
Line 554  END Line 561  END
           <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;">
              $lt{'exist'}</span>               $lt{'already'}</span>
              <br />$lt{'plea'}<br />               <br />$lt{'plea'}<br />
              <hr class="login" /><br /><br />               <hr class="login" /><br /><br />
             </td>              </td>
Line 568  END Line 575  END
                </tr>                 </tr>
                <tr>                 <tr>
                 <td align="right" class="bodywhite"><label>$lt{'pw'}</label>:</td>                  <td align="right" class="bodywhite"><label>$lt{'pw'}</label>:</td>
                 <td align="right"><input name="upass$now" size="17" value="" type="password" /><input type="hidden" name="udom" value="relate" /></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 608  END Line 615  END
    <td width="10">&nbsp;</td>     <td width="10">&nbsp;</td>
    <td colspan="3">     <td colspan="3">
     <br />      <br />
       $noscript_warning
     <hr style="clear:both;" />      <hr style="clear:both;" />
    </td>     </td>
    <td width="10">&nbsp;</td>     <td width="10">&nbsp;</td>
Line 639  $versionrow Line 647  $versionrow
 </table>  </table>
 </div>  </div>
 <p>&nbsp;</p>  <p>&nbsp;</p>
 $noscript_warning  
   <form name="server" action="/adm/authenticate" method="post" target="_top">    <form name="server" action="/adm/authenticate" method="post" target="_top">
    <input type="hidden" name="logtoken" value="$logtoken" />     <input type="hidden" name="logtoken" value="$logtoken" />
    <input type="hidden" name="serverid" value="$lonhost" />     <input type="hidden" name="serverid" value="$lonhost" />
Line 654  $noscript_warning Line 661  $noscript_warning
   
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[  // <![CDATA[
 // the if prevents the script error if the browser can not handle this  
 if ( document.client.uname ) { document.client.uname.focus(); }  
 // ]]>  
 </script>  
   
 <script type="text/javascript">  
 // <![CDATA[  
 // the if prevents the script error if the browser can not handle this  // the if prevents the script error if the browser can not handle this
 if ( document.client.uname ) { document.client.uname.focus(); }  if ( document.client.uname ) { document.client.uname.focus(); }
 // ]]>  // ]]>

Removed from v.1.3  
changed lines
  Added in v.1.10


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