Diff for /loncom/interface/Attic/lonremote.pm between versions 1.1 and 1.4

version 1.1, 2003/04/02 20:28:27 version 1.4, 2003/04/03 03:08:12
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($ENV{'browser.os'});
     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  $startupremote
 </head>  </head>
 $bodytag  $bodytag
 $setflags  $setflags
 $windowinfo  $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');
       my $windowinfo=&Apache::lonmenu::close();
       $r->print(<<ENDCOLLAPSE);
   <html>
   <head>
   <title>The LearningOnline Network with CAPA</title>
   </head>
   $bodytag
   $windowinfo
   </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';
           }
       }
   # FIXME - testurl
       my $lowerurl='/adm/roles';
   ###
       if ($ENV{'form.action'} eq 'launch') {
    &launchremote($r,$lowerurl);
       } else {
           &collapseremote($r,$lowerurl);
       }
     return OK;      return OK;
 }  }
   

Removed from v.1.1  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>