--- loncom/homework/structuretags.pm 2003/09/19 21:38:15 1.211 +++ loncom/homework/structuretags.pm 2003/10/14 00:21:12 1.217 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.211 2003/09/19 21:38:15 albertel Exp $ +# $Id: structuretags.pm,v 1.217 2003/10/14 00:21:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -84,7 +84,10 @@ sub page_start { if (!defined($found{'html'})) { $result=&Apache::londefdef::start_html($target,$token,$tagstack, $parstack,$parser,$safeeval); - $head_tag_start='
'.&Apache::lonmenu::registerurl(undef,$target); + $head_tag_start=''; + if ($ENV{'request.state'} eq 'published') { + $head_tag_start.=&Apache::lonmenu::registerurl(undef,$target); + } } my $body_tag_start; if (!defined($found{'body'})) { @@ -355,7 +358,7 @@ sub start_problem { } #added vars to the scripting enviroment - my $expression='$external::part='.$Apache::inputtags::part.';'; + my $expression='$external::part=\''.$Apache::inputtags::part.'\';'; &Apache::run::run($expression,$safeeval); my $status; my $accessmsg; @@ -400,7 +403,8 @@ sub start_problem { if (( $status eq 'CLOSED' ) || ( $status eq 'UNCHECKEDOUT') || ( $status eq 'BANNED') || - ( $status eq 'UNAVAILABLE')) { + ( $status eq 'UNAVAILABLE') || + ( $status eq 'INVALID_ACCESS')) { my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser); if ( $target eq "web" ) { $result.= $head_tag_start.''; @@ -410,7 +414,7 @@ sub start_problem { } else { $result.='