version 1.1, 2018/01/12 13:33:38
|
version 1.3, 2018/05/10 03:49:51
|
Line 132 sub handler {
|
Line 132 sub handler {
|
|
|
sub do_redirect { |
sub do_redirect { |
my ($r,$destination) = @_; |
my ($r,$destination) = @_; |
my $windowinfo = Apache::lonhtmlcommon::scripttag('self.name="loncapaclient";'); |
my $windowname = 'loncapaclient'; |
|
if ($env{'request.lti.login'}) { |
|
$windowname .= 'lti'; |
|
} |
my $header = '<meta HTTP-EQUIV="Refresh" CONTENT="0; url='.$destination.'" />'; |
my $header = '<meta HTTP-EQUIV="Refresh" CONTENT="0; url='.$destination.'" />'; |
my $args = {'bread_crumbs' => [{'href' => '','text' => 'Role initialization'},],}; |
my $args = {'bread_crumbs' => [{'href' => '','text' => 'Role initialization'},],}; |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
$r->print(&Apache::loncommon::start_page('Valid link',$header,$args). |
$r->print(&Apache::loncommon::start_page('Valid link',$header,$args). |
&Apache::lonhtmlcommon::scripttag('self.name="loncapaclient";'). |
&Apache::lonhtmlcommon::scripttag('self.name="'.$windowname.'";'). |
'<h1>'.&mt('Welcome').'</h1>'. |
'<h1>'.&mt('Welcome').'</h1>'. |
'<p>'.&mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','<i>','</i>').'</p><p>'. |
'<p>'.&mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','<i>','</i>').'</p><p>'. |
'<a href="'.$destination.'">'.&mt('Continue').'</a></p>'. |
'<a href="'.$destination.'">'.&mt('Continue').'</a></p>'. |
Line 273 ENDJS
|
Line 276 ENDJS
|
|
|
sub generic_error { |
sub generic_error { |
my ($r) = @_; |
my ($r) = @_; |
my $linktext; |
my $continuelink; |
if ($env{'user.adv'}) { |
unless ($env{'request.lti.login'}) { |
$linktext = &mt('Continue to your roles page'); |
my $linktext; |
} else { |
if ($env{'user.adv'}) { |
$linktext = &mt('Continue to your courses page'); |
$linktext = &mt('Continue to your roles page'); |
|
} else { |
|
$linktext = &mt('Continue to your courses page'); |
|
} |
|
$continuelink='<a href="/adm/roles">'.$linktext.'</a>'; |
} |
} |
my $continuelink='<a href="/adm/roles">'.$linktext.'</a>'; |
|
my $msg = &mt('The page you requested does not exist.'); |
my $msg = &mt('The page you requested does not exist.'); |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |