--- loncom/xml/lonxml.pm 2007/10/10 14:39:49 1.464 +++ loncom/xml/lonxml.pm 2007/10/16 23:20:05 1.465 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.464 2007/10/10 14:39:49 albertel Exp $ +# $Id: lonxml.pm,v 1.465 2007/10/16 23:20:05 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -631,6 +631,24 @@ sub callsub { return $currentstring; } +{ + my %state; + + sub init_state { + undef(%state); + } + + sub set_state { + my ($key,$value) = @_; + $state{$key} = $value; + return $value; + } + sub get_state { + my ($key) = @_; + return $state{$key}; + } +} + sub setup_globals { my ($request,$target)=@_; $Apache::lonxml::request=$request; @@ -640,6 +658,7 @@ sub setup_globals { $Apache::lonxml::usestyle=1; &init_counter(); &clear_bubble_lines_for_part(); + &init_state(); @Apache::lonxml::pwd=(); @Apache::lonxml::extlinks=(); @script_var_displays=();