version 1.208, 2024/09/18 15:11:31
|
version 1.209, 2025/02/09 22:42:12
|
Line 248 sub handler {
|
Line 248 sub handler {
|
}
|
}
|
}
|
}
|
|
|
|
(undef,undef,undef,my $clientmathml,my $clientunicode,undef,my $clientmobile) =
|
|
&Apache::loncommon::decode_user_agent($r);
|
|
|
#
|
#
|
# If browser sent an old cookie for which the session file had been removed
|
# If browser sent an old cookie for which the session file had been removed
|
# check if configuration for user's domain has a portal URL set. If so
|
# check if configuration for user's domain has a portal URL set. If so
|
Line 268 sub handler {
|
Line 271 sub handler {
|
# -------------------------------- Prevent users from attempting to login twice
|
# -------------------------------- Prevent users from attempting to login twice
|
if ($handle ne '') {
|
if ($handle ne '') {
|
&Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle);
|
&Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle);
|
|
my $args = {};
|
|
if ($clientunicode && !$clientmathml) {
|
|
$args->{'browser.unicode'} = 1;
|
|
}
|
my $start_page =
|
my $start_page =
|
&Apache::loncommon::start_page('Already logged in');
|
&Apache::loncommon::start_page('Already logged in','',$args);
|
my $end_page =
|
my $end_page =
|
&Apache::loncommon::end_page();
|
&Apache::loncommon::end_page();
|
my $dest = '/adm/roles';
|
my $dest = '/adm/roles';
|
Line 380 sub handler {
|
Line 387 sub handler {
|
}
|
}
|
$r->print(
|
$r->print(
|
$start_page
|
$start_page
|
|
.'<div role="main">'
|
.'<p class="LC_warning">'.&mt('You are already logged in!').'</p>'
|
.'<p class="LC_warning">'.&mt('You are already logged in!').'</p>'
|
.'<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="'.$dest.'">','</a>','<a href="/adm/logout">','</a>').'</p>'
|
'<a href="'.$dest.'">','</a>','<a href="/adm/logout">','</a>').'</p>'
|
|
.'</div>'
|
.$end_page
|
.$end_page
|
);
|
);
|
return OK;
|
return OK;
|
Line 408 sub handler {
|
Line 417 sub handler {
|
# ----------------------------------------------------------- Process Interface
|
# ----------------------------------------------------------- Process Interface
|
$env{'form.interface'}=~s/\W//g;
|
$env{'form.interface'}=~s/\W//g;
|
|
|
(undef,undef,undef,undef,undef,undef,my $clientmobile) =
|
|
&Apache::loncommon::decode_user_agent($r);
|
|
|
|
my $iconpath=
|
my $iconpath=
|
&Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));
|
&Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));
|
|
|
Line 618 sub handler {
|
Line 624 sub handler {
|
.'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'
|
.'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'
|
.'<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>'
|
.'<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>'
|
.&mt('The LearningOnline Network with CAPA')
|
.&mt('The LearningOnline Network with CAPA')
|
.'</title></head>'
|
.'</title>'
|
|
.'<style type="text/css">
|
|
body {
|
|
background-color:"#FFFFFF";
|
|
}
|
|
h2 {
|
|
display: block;
|
|
font-size: 1.17em;
|
|
margin-top: 1em;
|
|
margin-bottom: 1em;
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
font-weight: bold;
|
|
}
|
|
</style></head>'
|
.'<body bgcolor="#FFFFFF">'
|
.'<body bgcolor="#FFFFFF">'
|
|
.'<div role="banner">'
|
.'<h1>'.&mt('The LearningOnline Network with CAPA').'</h1>'
|
.'<h1>'.&mt('The LearningOnline Network with CAPA').'</h1>'
|
.'<img src="/adm/lonKaputt/lonlogo_broken.gif" alt="broken icon" align="right" />'
|
.'<img src="/adm/lonKaputt/lonlogo_broken.gif" alt="broken icon" align="right" />'
|
.'<h3>'.&mt('This LON-CAPA server is temporarily not available for login.').'</h3>');
|
.'</div>'
|
|
.'<div role="main">'
|
|
.'<h2>'.&mt('This LON-CAPA server is temporarily not available for login.').'</h2>');
|
if ($spares) {
|
if ($spares) {
|
$r->print('<p>'.&mt('Please attempt to login to one of the following servers:')
|
$r->print('<p>'.&mt('Please attempt to login to one of the following servers:')
|
.'</p>'
|
.'</p>'
|
.$spares);
|
.$spares);
|
}
|
}
|
$r->print('</body>'
|
$r->print('</div></body>'
|
.'</html>'
|
.'</html>'
|
);
|
);
|
return OK;
|
return OK;
|
Line 812 ENDSAMLJS
|
Line 835 ENDSAMLJS
|
}
|
}
|
}
|
}
|
|
|
$r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',$js,
|
my $args = {
|
{ 'redirect' => [$expire,'/adm/roles'],
|
'redirect' => [$expire,'/adm/roles'],
|
'add_entries' => \%add_entries,
|
'add_entries' => \%add_entries,
|
'only_body' => 1,}));
|
'only_body' => 1,
|
|
};
|
|
if ($clientunicode && !$clientmathml) {
|
|
$args->{'browser.unicode'} = 1;
|
|
}
|
|
$r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',
|
|
$js,$args));
|
|
|
# ----------------------------------------------------------------------- Texts
|
# ----------------------------------------------------------------------- Texts
|
|
|
Line 925 LFORM
|
Line 954 LFORM
|
}
|
}
|
$r->print(<<HEADER);
|
$r->print(<<HEADER);
|
<!-- The LON-CAPA Header -->
|
<!-- The LON-CAPA Header -->
|
<div style="background:$pgbg;margin:0;width:100%;">
|
<div style="background:$pgbg;margin:0;width:100%;" role="banner">
|
|
<h1 style="padding:0;margin:0">
|
<img src="$img" border="0" alt="$alttext" class="LC_maxwidth" id="lcloginbanner" />
|
<img src="$img" border="0" alt="$alttext" class="LC_maxwidth" id="lcloginbanner" />
|
|
</h1>
|
</div>
|
</div>
|
HEADER
|
HEADER
|
|
} else {
|
|
$r->print('<div role="banner" class="LC_visually_hidden" tabindex="-1">'.
|
|
'<h1>'.&mt('LON-CAPA Login Page').'</h1></div>');
|
}
|
}
|
|
|
my $stdauthformstyle = 'inline-block';
|
my $stdauthformstyle = 'inline-block';
|
my $ssoauthstyle = 'none';
|
my $ssoauthstyle = 'none';
|
my $sso_onclick;
|
my $sso_onclick;
|
my $logintype;
|
my $logintype;
|
$r->print('<div style="float:left;margin-top:0;">');
|
$r->print('<div style="float:left;margin-top:0;" role="main">');
|
if ($saml_landing) {
|
if ($saml_landing) {
|
$ssoauthstyle = 'inline-block';
|
$ssoauthstyle = 'inline-block';
|
$stdauthformstyle = 'none';
|
$stdauthformstyle = 'none';
|
Line 1104 $announcements
|
Line 1138 $announcements
|
</div>
|
</div>
|
<hr style="clear:both;" />
|
<hr style="clear:both;" />
|
ENDTOP
|
ENDTOP
|
my ($domainrow,$serverrow,$loadrow,$userloadrow,$versionrow);
|
my ($domainrow,$serverrow,$loadrow,$userloadrow,$versioninfo);
|
$domainrow = <<"END";
|
$domainrow = <<"END";
|
<tr>
|
<tr>
|
<td align="left" valign="top">
|
<th align="left" valign="top">
|
<small><b>$lt{'dom'}: </b></small>
|
<small><b>$lt{'dom'}: </b></small>
|
</td>
|
</th>
|
<td align="left" valign="top">
|
<th align="left" valign="top">
|
<small><tt> $domain</tt></small>
|
<small><tt> $domain</tt></small>
|
</td>
|
</td>
|
</tr>
|
</tr>
|
END
|
END
|
$serverrow = <<"END";
|
$serverrow = <<"END";
|
<tr>
|
<tr>
|
<td align="left" valign="top">
|
<th align="left" valign="top">
|
<small><b>$lt{'serv'}: </b></small>
|
<small><b>$lt{'serv'}: </b></small>
|
</td>
|
</th>
|
<td align="left" valign="top">
|
<td align="left" valign="top">
|
<small><tt> $lonhost ($role)</tt></small>
|
<small><tt> $lonhost ($role)</tt></small>
|
</td>
|
</td>
|
Line 1128 END
|
Line 1162 END
|
if ($loadlim) {
|
if ($loadlim) {
|
$loadrow = <<"END";
|
$loadrow = <<"END";
|
<tr>
|
<tr>
|
<td align="left" valign="top">
|
<th align="left" valign="top">
|
<small><b>$lt{'load'}: </b></small>
|
<small><b>$lt{'load'}: </b></small>
|
</td>
|
</th>
|
<td align="left" valign="top">
|
<td align="left" valign="top">
|
<small><tt> $loadpercent $lt{'perc'}</tt></small>
|
<small><tt> $loadpercent $lt{'perc'}</tt></small>
|
</td>
|
</td>
|
Line 1140 END
|
Line 1174 END
|
if ($uloadlim) {
|
if ($uloadlim) {
|
$userloadrow = <<"END";
|
$userloadrow = <<"END";
|
<tr>
|
<tr>
|
<td align="left" valign="top">
|
<th align="left" valign="top">
|
<small><b>$lt{'userload'}: </b></small>
|
<small><b>$lt{'userload'}: </b></small>
|
</td>
|
</th>
|
<td align="left" valign="top">
|
<td align="left" valign="top">
|
<small><tt> $userloadpercent $lt{'perc'}</tt></small>
|
<small><tt> $userloadpercent $lt{'perc'}</tt></small>
|
</td>
|
</td>
|
Line 1150 END
|
Line 1184 END
|
END
|
END
|
}
|
}
|
if (($version ne '') && ($version ne '<!-- VERSION -->')) {
|
if (($version ne '') && ($version ne '<!-- VERSION -->')) {
|
$versionrow = <<"END";
|
$versioninfo = "<small>$version</small>";
|
<tr>
|
|
<td colspan="2" align="left">
|
|
<small>$version</small>
|
|
</td>
|
|
</tr>
|
|
END
|
|
}
|
}
|
|
|
$r->print(<<ENDDOCUMENT);
|
$r->print(<<ENDDOCUMENT);
|
|
<div role="contentinfo" style="padding:0;clear:both;margin:0;border:0">
|
<div style="float: left;">
|
<div style="float: left;">
|
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
$domainrow
|
$domainrow
|
$serverrow
|
$serverrow
|
$loadrow
|
$loadrow
|
$userloadrow
|
$userloadrow
|
$versionrow
|
|
</table>
|
</table>
|
|
$versioninfo
|
</div>
|
</div>
|
<div style="float: right;">
|
<div style="float: right;">
|
$domainlogo
|
$domainlogo
|
</div>
|
</div>
|
|
</div>
|
<br style="clear:both;" />
|
<br style="clear:both;" />
|
</div>
|
</div>
|
|
|