version 1.1, 2003/04/02 20:28:27
|
version 1.3, 2003/04/02 22:02:19
|
Line 42 use Apache::lonnet();
|
Line 42 use Apache::lonnet();
|
use Apache::lonmenu(); |
use Apache::lonmenu(); |
|
|
sub launchremote { |
sub launchremote { |
my ($r,$clientos,$lowerurl)=@_; |
my ($r,$lowerurl)=@_; |
|
&Apache::lonnet::put('environment',{'remote' => 'on'}); |
|
&Apache::lonnet::appenv('environment.remote' => 'on'); |
# -------------------------------------------------------- Menu script and info |
# -------------------------------------------------------- Menu script and info |
my $windowinfo=&Apache::lonmenu::open($clientos); |
# my $windowinfo=&Apache::lonmenu::open($clientos); |
my $startupremote=&Apache::lonmenu::startupremote($lowerurl); |
# my $startupremote=&Apache::lonmenu::startupremote($lowerurl); |
my $setflags=&Apache::lonmenu::setflags(); |
# my $setflags=&Apache::lonmenu::setflags(); |
my $maincall=&Apache::lonmenu::maincall(); |
# my $maincall=&Apache::lonmenu::maincall(); |
my $bodytag=&Apache::loncommon::bodytag('Successful Login'); |
my $bodytag=&Apache::loncommon::bodytag('Launch Remote Control'); |
# ------------------------------------------------- Output for successful login |
$r->print(<<ENDLAUNCH); |
$r->print(<<ENDSUCCESS); |
|
<html> |
<html> |
<head> |
<head> |
<title>Successful Login to the LearningOnline Network with CAPA</title> |
<title>The LearningOnline Network with CAPA</title> |
$startupremote |
|
</head> |
</head> |
$bodytag |
$bodytag |
$setflags |
|
$windowinfo |
|
<h1>Welcome!</h1> |
|
Welcome to the Learning<i>Online</i> Network with CAPA. |
|
Please wait while your session |
|
is being set up.<p> |
|
<a href="/adm/loginproblems.html">Problems?</a></p> |
|
$maincall |
|
</body> |
</body> |
</html> |
</html> |
ENDSUCCESS |
ENDLAUNCH |
|
} |
|
|
|
sub collapseremote { |
|
my ($r,$lowerurl)=@_; |
|
# -------------------------------------------------------- Menu script and info |
|
my $bodytag=&Apache::loncommon::bodytag('Collapse Remote Control'); |
|
$r->print(<<ENDCOLLAPSE); |
|
<html> |
|
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
</head> |
|
$bodytag |
|
</body> |
|
</html> |
|
ENDCOLLAPSE |
|
&Apache::lonnet::put('environment',{'remote' => 'off'}); |
|
&Apache::lonnet::appenv('environment.remote' => 'off'); |
} |
} |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['action']); |
|
unless ($ENV{'form.action'}) { |
|
if ($ENV{'environment.remote'} eq 'on') { |
|
$ENV{'form.action'}='collapse'; |
|
} else { |
|
$ENV{'form.action'}='launch'; |
|
} |
|
} |
|
if ($ENV{'form.action'} eq 'launch') { |
|
&launchremote($r); |
|
} else { |
|
&collapseremote($r); |
|
} |
return OK; |
return OK; |
} |
} |
|
|