--- loncom/xml/lonxml.pm 2002/05/23 21:12:44 1.172 +++ loncom/xml/lonxml.pm 2002/06/03 21:07:20 1.176 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.172 2002/05/23 21:12:44 albertel Exp $ +# $Id: lonxml.pm,v 1.176 2002/06/03 21:07:20 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -331,8 +331,9 @@ sub registerurl { my $forcereg=shift; my $target = shift; my $result = ''; - if (($ENV{'request.publicaccess'}) || - ($ENV{'REQUEST_URI'} eq '/res/adm/pages/menu.html')) { + if ((($ENV{'request.publicaccess'}) || + (!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) && + (!$forcereg)) { return ''; } @@ -340,6 +341,7 @@ sub registerurl { $Apache::lonxml::registered=1; my $nothing=''; if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; } + my $timesync='menu.clock.setTime(1000*'.time.');'; if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) { my $hwkadd=''; if ($ENV{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { @@ -367,7 +369,9 @@ ENDPARM function LONCAPAreg() { menu=window.open("$nothing","LONCAPAmenu","",false); menu.clearTimeout(menu.menucltim); + $timesync menu.currentURL=window.location.pathname; + menu.reloadURL=window.location.pathname; menu.currentStale=0; menu.clearbut(3,1); menu.switchbutton @@ -394,8 +398,10 @@ ENDPARM function LONCAPAstale() { menu=window.open("$nothing","LONCAPAmenu","",false); menu.currentStale=1; - menu.switchbutton - (3,1,'reload.gif','return','location','go(currentURL)'); + if (menu.reloadURL!='' && menu.reloadURL!= null) { + menu.switchbutton + (3,1,'reload.gif','return','location','go(reloadURL)'); + } menu.clearbut(7,1); menu.clearbut(7,2); menu.clearbut(7,3); @@ -418,6 +424,7 @@ ENDREGTHIS function LONCAPAreg() { menu=window.open("$nothing","LONCAPAmenu","",false); + $timesync menu.currentStale=1; menu.clearbut(2,1); menu.clearbut(2,3);