[LON-CAPA-cvs] cvs: modules /gci lonlogin.pm
gci
gci@source.lon-capa.org
Sat, 03 Oct 2009 01:41:27 -0000
This is a MIME encoded message
--gci1254534087
Content-Type: text/plain
gci Sat Oct 3 01:41:27 2009 EDT
Modified files:
/modules/gci lonlogin.pm
Log:
- Different color schemes depending on context:
- domain: gcitest for GCI Testing Center (students)
- domain: gci for GCI WebCenter (faculty)
- Update location of css files and image files.
- All rounded corners now 11 x 11 pixels.
--gci1254534087
Content-Type: text/plain
Content-Disposition: attachment; filename="gci-20091003014127.txt"
Index: modules/gci/lonlogin.pm
diff -u modules/gci/lonlogin.pm:1.3 modules/gci/lonlogin.pm:1.4
--- modules/gci/lonlogin.pm:1.3 Thu Sep 24 14:42:27 2009
+++ modules/gci/lonlogin.pm Sat Oct 3 01:41:27 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.3 2009/09/24 14:42:27 gci Exp $
+# $Id: lonlogin.pm,v 1.4 2009/10/03 01:41:27 gci Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -81,11 +81,15 @@
&Apache::loncommon::start_page('Already logged in');
my $end_page =
&Apache::loncommon::end_page();
+ my $dest = '/adm/roles';
+ if ($env{'form.firsturl'} ne '') {
+ $dest = $env{'form.firsturl'};
+ }
$r->print(
$start_page
.'<h1>'.&mt('You are already logged in!').'</h1>'
.'<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>'
.$end_page
);
@@ -121,6 +125,10 @@
(&Apache::lonnet::domain($env{'form.domain'},'description'))) {
$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 $loadlim = $r->dir_config('lonLoadLim');
my $servadm = $r->dir_config('lonAdmEMail');
@@ -130,6 +138,12 @@
my $expire = $r->dir_config('lonExpire');
my $version = $r->dir_config('lonVersion');
my $host_name = &Apache::lonnet::hostname($lonhost);
+ if ($domain eq 'gcitest') {
+ $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
@@ -239,7 +253,7 @@
.'<body bgcolor="#FFFFFF">'
.'<h1>'.&mt('The LearningOnline Network with CAPA').'</h1>'
.'<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>'
.'</html>'
);
@@ -292,7 +306,8 @@
my $js = (<<ENDSCRIPT);
<script type="text/javascript" language="JavaScript">
-// <![CDATA[
+ // <![CDATA[
+
function send(caller)
{
@@ -350,8 +365,9 @@
this.document.server.submit();
return false;
}
-// ]]>
+ // ]]>
</script>
+
ENDSCRIPT
# --------------------------------------------------- Print login screen header
@@ -368,7 +384,8 @@
onload => "if ( document.client.uname ) { document.client.uname.focus(); }",
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,
{ 'redirect' => [$expire,'/adm/roles'],
'add_entries' => \%add_entries,
@@ -420,23 +437,23 @@
$newuserlink = &newuser_link($lt{'newuser'});
}
if ($fullgraph) {
- $r->print(<<"END_OF_BLOCK2");
+ $r->print(<<"END_OF_BLOCK1");
<br />
<div align="center">
<table class="LC_loginbox">
<tr>
- <td align="left" valign="top" width="12">
- <img name="login_r1_c1" src="/images/login/lclogin_r1_c1.gif" width="12" height="10" border="0" alt="">
+ <td align="left" valign="top" width="11">
+ <img name="login_r1_c1" src="/images/login/$domain/r1_c1.png" width="11" height="11" border="0" alt="">
</td>
<td width="450" valign="top">
<table class="LC_loginbox_left">
<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>
<td>
<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>
</td>
@@ -449,41 +466,51 @@
<tr>
<td width="10"> </td>
<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>
- <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"><b>Create a GCI WebCenter ID</b> – use your ID to submit comments or new content. If you are already a GCI WebCenter user, please log-in.</font><br /><br /><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 />
+END_OF_BLOCK1
+ if ($domain eq 'gci') {
+ $r->print(<<"END_OF_BLOCK2");
+ <font class="bodyblue"><b>Create a GCI WebCenter ID</b> – 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"/>
<table class="LC_signup">
<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> </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>
<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>
- <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> </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>
</table>
</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>
</tr>
</table>
</td>
<td width="10"> </td>
<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">
<tr>
<td colspan="3" height="23" class="LC_loginbox_strip"> </td>
</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> </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>
<td width="10"> </td>
@@ -492,9 +519,9 @@
<tr>
<td align="right" class="bodywhite" height=50><br>
<span style="font-size: 15px; line-height: 17px; font-weight: bold;">
- Existing WebCenter user?</span>
+ $existing</span>
<br />Please log-in.<br>
- <hr size=1 noshade color="#FFFFBB"><br /><br />
+ <hr class="login"><br /><br />
</td>
</tr>
<tr>
@@ -506,7 +533,7 @@
</tr>
<tr>
<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><td> </td></tr>
<tr>
@@ -519,7 +546,7 @@
<td align="right" valign="top" class="bodywhite">
<br />
<br /><br />
- <hr size="1" noshade color="#FFFFBB" />
+ <hr class="login" />
<br />
<a href="/adm/resetpw" style="color: #ffffff">Forgot your password?</a><br>
<br />
@@ -530,16 +557,16 @@
<td width="9"> </td>
</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> </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>
<td colspan="3" height="10" class="LC_loginbox_strip"> </td>
</tr>
</table>
</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>
<td colspan="4">
@@ -557,9 +584,9 @@
</td>
</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"> </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>
</table>
</div>
@@ -574,7 +601,7 @@
<input type="hidden" name="fontenhance" value="" />
<input type="hidden" name="blackwhite" value="" />
<input type="hidden" name="remember" value="" />
-END_OF_BLOCK2
+END_OF_BLOCK3
} else {
$r->print(<<ENDACCESSOPTIONS);
<h1>The Learning<i>Online</i> Network with CAPA</h1>
@@ -608,7 +635,7 @@
.'</font></div></noscript></td>';
$r->print(<<ENDTEXTUAL);
<hr />
- <table border=0 cellspacing="0" cellpadding="0">
+ <table border="0" cellspacing="0" cellpadding="0">
<tr>$logintitle</tr>
<tr>$noscript_warning</tr>
<tr>
@@ -624,7 +651,7 @@
<td bgcolor="$mainbg" valign="bottom" align="center">
<br />
<input type="submit" value="$lt{'log'}" />
- <input type="hidden" name="udom" value="'gci'" />
+ <input type="hidden" name="udom" value="$domain" />
</td>
</tr>
<tr>
--gci1254534087--