[LON-CAPA-cvs] cvs: modules /relate lonlogin.pm

raeburn raeburn at source.lon-capa.org
Fri Feb 10 11:34:07 EST 2012


raeburn		Fri Feb 10 16:34:07 2012 EDT

  Modified files:              
    /modules/relate	lonlogin.pm 
  Log:
  - Customization for MITrelate
   - wording change: physics course -> mechanics course
   - xhtml
   - LON-CAPA logo
   - Add Contact Helpdesk, Load, Domain etc. to right side of footer.
  
  
-------------- next part --------------
Index: modules/relate/lonlogin.pm
diff -u modules/relate/lonlogin.pm:1.1 modules/relate/lonlogin.pm:1.2
--- modules/relate/lonlogin.pm:1.1	Tue Feb  7 14:49:47 2012
+++ modules/relate/lonlogin.pm	Fri Feb 10 16:34:07 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.1 2012/02/07 14:49:47 raeburn Exp $
+# $Id: lonlogin.pm,v 1.2 2012/02/10 16:34:07 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -295,7 +295,7 @@
           'helpdesk' => 'Contact Helpdesk',
           'forgotpw' => 'Forgot your password?',
           'newuser'  => 'New User?',
-          'learn'    => 'Learn Physics includes an online physics course, to which you may receive admission after successfully completing a pre-course test.',
+          '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',
            'plea'    => 'Please log-in',
            'supp'    => 'Support from NSF, NIH, Google',
@@ -387,7 +387,7 @@
                onload       => 'javascript:enableInput();',);
 
     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($pagetitle,$js,
                                        {'redirect'   => [$expire,'/adm/roles'], 
                                         'add_entries' => \%add_entries,
@@ -396,18 +396,81 @@
 # ------------------------------------------------------------ Additional Texts
     $lt{'newto'} = &mt('New to the [_1]Learn Physics[_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.',
-                        '<a href="http://loncapa.org/">','</a>');
+                        '<a href="http://loncapa.org/" style="text-decoration: underline;">',
+                        ' <img src="/images/login/lclogosm.gif" width="16" height="14" alt="LC" valign="middle" border="0" /></a>');
     $lt{'newhere'} = &mt('New to [_1]Learn Physics[_2]:','<i>','</i>');
     $lt{'exist'} = &mt('Existing [_1]Learn Physics[_2] user','<i>','</i>');
     $lt{'browser'} = &mt('Your browser must allow [_1]cookies[_2]',
-                         '<a href="http://loncapa.msu.edu/cookies.html" style="color: #ffffff">','</a>');
+                         '<a href="http://loncapa.msu.edu/cookies.html" style="color: #ffffff; text-decoration:underline;">','</a>');
+
+    my ($contactrow,$domainrow,$serverrow,$loadrow,$userloadrow,$versionrow);
+    $contactrow = <<"END";
+      <tr>
+       <td colspan="2">
+       $contactblock
+       </td>
+      </tr>
+END
+    $domainrow = <<"END";
+      <tr>
+       <td align="left" valign="top">
+        <small><b>$lt{'dom'}: </b></small>
+       </td>
+       <td align="left" valign="top">
+        <small><tt> $domain</tt></small>
+       </td>
+      </tr>
+END
+    $serverrow = <<"END";
+      <tr>
+       <td align="left" valign="top">
+        <small><b>$lt{'serv'}: </b></small>
+       </td>
+       <td align="left" valign="top">
+        <small><tt> $lonhost ($role)</tt></small>
+       </td>
+      </tr>
+END
+    if ($loadlim) {
+        $loadrow = <<"END";
+      <tr>
+       <td align="left" valign="top">
+        <small><b>$lt{'load'}: </b></small>
+       </td>
+       <td align="left" valign="top">
+        <small><tt> $loadpercent $lt{'perc'}</tt></small>
+       </td>
+      </tr>
+END
+    }
+    if ($uloadlim) {
+        $userloadrow = <<"END";
+      <tr>
+       <td align="left" valign="top">
+        <small><b>$lt{'userload'}: </b></small>
+       </td>
+       <td align="left" valign="top">
+        <small><tt> $userloadpercent $lt{'perc'}</tt></small>
+       </td>
+      </tr>
+END
+    }
+    if (($version ne '') && ($version ne '<!-- VERSION -->')) {
+        $versionrow = <<"END";
+      <tr>
+       <td colspan="2" align="left">
+        <small>$version</small>
+       </td>
+      </tr>
+END
+    }
 
 # -------------------------------------------- Static cid for prerequisite test
-    $prereqcid = 'relate_9615072b469884921relatel1';
+    my $prereqcid = 'relate_9615072b469884921relatel1';
 
 # ---------------------------------------------------- Warning if no Javascript 
     my $noscript_warning = '<noscript><span class="LC_warning">'.
-                           '<b>'.$lt{'note'}.'</b>'.$lt{'jscr'}.' 
+                           '<b>'.$lt{'note'}.'</b>'.$lt{'jscr'}.
                            '</span></noscript>';
 
 # ---------------------------------------------------- Serve out DES JavaScript
@@ -444,7 +507,7 @@
        <tr>
         <td width="10"> </td>
         <td valign="top" class="bodyred" width="430" align="left"><br />
-         <span style="font-size: 18px; line-height: 22px; ">$lt{'newt'}</span>
+         <span style="font-size: 18px; line-height: 22px; ">$lt{'newto'}</span>
          <br />
          <span class="bodyred">$lt{'learn'}<br /><br />$lt{'runson'}
          <br /><br />
@@ -457,7 +520,7 @@
            </tr>
            <tr>
              <td> </td>
-             <td align="center" valign="middle"><span style="white-space: nowrap;"><b>$lt{'newhere'}</b>: <a href="javascript:send('newaccount')" style="color: #ffffff">$lt{'click'}</a></span></td>
+             <td align="center" valign="middle"><span style="white-space: nowrap;"><b>$lt{'newhere'}</b> <a href="javascript:send('newaccount')" style="color: #ffffff; text-decoration:underline;">$lt{'click'}</a></span></td>
              <td> </td>
            </tr>
            <tr>
@@ -478,7 +541,7 @@
       <table class="LC_loginbox_right">
        <tr>
         <td colspan="3" height="23" class="LC_loginbox_strip"> </td>
-i       </tr>
+       </tr>
        <tr>
         <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>
         <td> </td>
@@ -522,7 +585,7 @@
               <span style="font-size: smaller;">$lt{'browser'}</span><br />
               <hr class="login" />
               <br />
-              <a href="/adm/resetpw" style="color: #ffffff">$lt{forgotpw'}</a><br>
+              <a href="/adm/resetpw" style="color: #ffffff; text-decoration:underline;">$lt{'forgotpw'}</a><br>
               <br />
              </td>
             </tr>
@@ -536,18 +599,33 @@
 
           <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>
-        <tr>
-          <td colspan="3" height="10" class="LC_loginbox_strip"> $contactblock</td>
-        </tr>
       </table>
     </td>
     <td align="right" valign="top" width="11"><img src="/images/login/tr_11_ffffff_e2e2e2.gif" width="11" height="11" border="0" alt=""></td>
   </tr>
   <tr>
-    <td colspan="4">
-      <div align="right">
-          <img src="/images/login/sponsors.png" alt="$lt{'supp'}" align="right" />
-     </div>
+   <td colspan="4">
+    <br />
+    <hr style="clear:both;" />
+   </td>
+  </tr>
+  <tr>
+    <td width="10"> </td>
+    <td colspan="3">
+    <div style="float: left;">
+     <table border="0" cellspacing="0" cellpadding="0">
+$contactrow
+$domainrow
+$serverrow
+$loadrow
+$userloadrow
+$versionrow
+     </table>
+    </div>
+    <div style="float: right;">
+     <img src="/images/login/sponsors.png" alt="$lt{'supp'}" align="right" />
+    <br style="clear:both;" />
+    </div>
    </td>
   </tr>
   <tr>
@@ -581,6 +659,13 @@
 // ]]>
 </script>
 
+<script type="text/javascript">
+// <![CDATA[
+// the if prevents the script error if the browser can not handle this
+if ( document.client.uname ) { document.client.uname.focus(); }
+// ]]>
+</script>
+
 ENDLOGIN
 
 # -------------------------------------------------------- Standard page ending 
@@ -659,7 +744,7 @@
                          '<tt>'.$servadm.'</tt><br />';
     }
     if ($showhelpdesk) {
-        $contactblock .= '<a href="javascript:helpdesk()">'.$lt->{'helpdesk'}.'</a><br />';
+        $contactblock .= '<a href="javascript:helpdesk()" style="text-decoration:underline;">'.$lt->{'helpdesk'}.'</a><br />';
         my $thisurl = &escape('/adm/login');
         $$helpdeskscript = <<"ENDSCRIPT";
 <script type="text/javascript">


More information about the LON-CAPA-cvs mailing list