Diff for /loncom/interface/Attic/lonremote.pm between versions 1.18 and 1.30

version 1.18, 2005/04/07 06:56:23 version 1.30, 2009/03/29 22:14:12
Line 39  use Apache::lonlocal; Line 39  use Apache::lonlocal;
 sub launchremote {  sub launchremote {
     my ($r,$lowerurl)=@_;      my ($r,$lowerurl)=@_;
     &Apache::lonnet::put('environment',{'remote' => 'on'});      &Apache::lonnet::put('environment',{'remote' => 'on'});
     &Apache::lonnet::appenv('environment.remote' => 'on');      &Apache::lonnet::appenv({'environment.remote' => 'on'});
 # -------------------------------------------------------- Menu script and info  # -------------------------------------------------------- Menu script and info
     my $windowinfo=&Apache::lonmenu::open($env{'browser.os'});      my $windowinfo=&Apache::lonmenu::open($env{'browser.os'});
     my $html=&Apache::lonxml::xmlbegin();  
     my $startupremote=&Apache::lonmenu::startupremote($lowerurl);      my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
       my $start_page = &Apache::loncommon::start_page('Page Display Settings',
       $startupremote);
       my $end_page   = &Apache::loncommon::end_page();
     my $remoteinfo=&Apache::lonmenu::load_remote_msg($lowerurl);      my $remoteinfo=&Apache::lonmenu::load_remote_msg($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('Launch Remote Control');  
     my $message=&mt("Launching of the Remote Control menu will fail if pop-up window filters are active. To use the Remote Control, disable the filter for this site.");      my $message=&mt("Launching of the Remote Control menu will fail if pop-up window filters are active. To use the Remote Control, disable the filter for this site.");
     $r->print(<<ENDLAUNCH);      $r->print(<<ENDLAUNCH);
 $html  $start_page
 <head>  
 <title>The LearningOnline Network with CAPA</title>  
 $startupremote  
 </head>  
 $bodytag  
 $setflags  $setflags
 $windowinfo  $windowinfo
 $message  $message
 $remoteinfo  $remoteinfo
 $maincall  $maincall
 </body>  $end_page
 </html>  
 ENDLAUNCH  ENDLAUNCH
 }  }
   
 sub collapseremote {  sub collapseremote {
     my ($r,$lowerurl)=@_;      my ($r,$lowerurl)=@_;
 # -------------------------------------------------------- Menu script and info  # -------------------------------------------------------- Menu script and info
     my $html=&Apache::lonxml::xmlbegin();      my $brcrum = [{href=>"/adm/preferences",text=>"Set User Preferences"},
     my $bodytag=&Apache::loncommon::bodytag('Collapse Remote Control');                    {href=>"/adm/remote?url=/adm/preferences&action=collapse",text=>"Collapse Remote Control"}];
       my $start_page = 
           &Apache::loncommon::start_page('Collapse Remote Control',
                                          undef,
                                          {'bread_crumbs' => $brcrum,
                                           'no_inline_link' => 1,});
       my $end_page  =  &Apache::loncommon::end_page();
     my $windowinfo=&Apache::lonmenu::close();      my $windowinfo=&Apache::lonmenu::close();
 #    my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$lowerurl.'">';  #    my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$lowerurl.'" />';
     my $message='<p>'.&mt("The external menu (Remote Control) has been disabled, and you will be working with the smaller inline menu.\nYou may have either closed the Remote Control window, or it was blocked by a pop-up window filter in your browser.\nTo use the Remote Control, disable the filter for this site, and re-launch the Remote Control from the inline menu.").'</p>';       my $message='<div class="LC_warning"><b>'.&mt('The external menu (Remote Control) has been disabled, and you will be working with the smaller inline menu.').'</b></div>'."\n".
                   '<p>'.&mt('You may have either closed the Remote Control window, or it was blocked by a pop-up window filter in your browser.').'<br />'."\n".
                   &mt('To use the Remote Control, disable the filter for this site, and re-launch the Remote Control.').'</p>'."\n".
                   '<table><tr><td><fieldset><legend><b>'.&mt('Actions').'</b></legend><table><tr>'."\n".
                   '<td class="LC_menubuttons_text" align="left">'.
                   '<a class="LC_menubuttons_link" href="/adm/remote?action=launch"><img alt="Launch Remote Control" src="/res/adm/pages/network-wireless.png" class="LC_noBorder" />'.
                   &mt('Re-launch Remote Control').'</a></td><td>'.('&nbsp;'x3).'</td>'.
                   '<td class="LC_menubuttons_link" align="right">'.
                   '<a class="LC_menubuttons_link" href="'.$lowerurl.'"><img alt="Launch Remote Control" src="/res/adm/pages/forw.png" class="LC_noBorder" />'.
                   &mt('Continue without Remote Control').'</a></td></tr></table>'.
                   '</fieldset></td></tr></table>'."\n".
                   '<p>'.&mt('Assuming no pop-up blocking, the Remote Control can be launched at any time from the [_1]Set User Preferences[_2] page, linked to in the [_3]Main Menu[_2].','<a href="/adm/preferences">','</a>','<a href="/adm/menu">').'</span></p>';
     $r->print(<<ENDCOLLAPSE);      $r->print(<<ENDCOLLAPSE);
 $html  $start_page
 <head>  
 <title>The LearningOnline Network with CAPA</title>  
 </head>  
 $bodytag  
 $windowinfo  $windowinfo
 <p>  
 $message  $message
 </p>  $end_page
 <a href="$lowerurl">Continue</a>  
 </body>  
 </html>  
 ENDCOLLAPSE  ENDCOLLAPSE
    &Apache::lonnet::put('environment',{'remote' => 'off'});      &Apache::lonnet::put('environment',{'remote' => 'off'});
    &Apache::lonnet::appenv('environment.remote' => 'off');      &Apache::lonnet::appenv({'environment.remote' => 'off'});
 }  }
   
 sub handler {  sub handler {

Removed from v.1.18  
changed lines
  Added in v.1.30


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