--- loncom/xml/lonxml.pm 2001/06/27 18:52:34 1.98 +++ loncom/xml/lonxml.pm 2001/07/05 15:53:09 1.100 @@ -70,9 +70,12 @@ $evaluate = 1; # data structure for eidt mode, determines what tags can go into what other tags %insertlist=(); -#stores the list of active tag namespaces +# stores the list of active tag namespaces @namespace=(); +# has the dynamic menu been updated to know about this resource +$Apache::lonxml::registered=0; + sub xmlbegin { my $output=''; if ($ENV{'browser.mathml'}) { @@ -102,7 +105,9 @@ sub fontsettings() { } sub registerurl { - if ($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) { + my $forcereg=shift; + if ($Apache::lonxml::registered) { return ''; } + if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) { my $hwkadd=''; if ($ENV{'REQUEST_URI'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { if (&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) { @@ -464,6 +469,7 @@ sub callsub { sub setup_globals { my ($target)=@_; + $Apache::lonxml::registered = 0; if ($target eq 'meta') { $Apache::lonxml::redirection = 0; $Apache::lonxml::metamode = 1;