[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm /xml londefdef.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 14 Oct 2003 00:21:12 -0000
albertel Mon Oct 13 20:21:12 2003 EDT
Modified files:
/loncom/homework structuretags.pm
/loncom/xml londefdef.pm
Log:
- BUG#2280 resources attempt to register whil in CSTR
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.216 loncom/homework/structuretags.pm:1.217
--- loncom/homework/structuretags.pm:1.216 Mon Oct 13 17:09:47 2003
+++ loncom/homework/structuretags.pm Mon Oct 13 20:21:12 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.216 2003/10/13 21:09:47 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 @@
if (!defined($found{'html'})) {
$result=&Apache::londefdef::start_html($target,$token,$tagstack,
$parstack,$parser,$safeeval);
- $head_tag_start='<head>'.&Apache::lonmenu::registerurl(undef,$target);
+ $head_tag_start='<head>';
+ if ($ENV{'request.state'} eq 'published') {
+ $head_tag_start.=&Apache::lonmenu::registerurl(undef,$target);
+ }
}
my $body_tag_start;
if (!defined($found{'body'})) {
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.179 loncom/xml/londefdef.pm:1.180
--- loncom/xml/londefdef.pm:1.179 Fri Oct 10 15:05:31 2003
+++ loncom/xml/londefdef.pm Mon Oct 13 20:21:12 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.179 2003/10/10 19:05:31 sakharuk Exp $
+# $Id: londefdef.pm,v 1.180 2003/10/14 00:21:12 albertel Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -201,7 +201,7 @@
sub end_head {
my ($target,$token) = @_;
my $currentstring = '';
- if ($target eq 'web') {
+ if ($target eq 'web' && $ENV{'request.state'} eq 'published') {
$currentstring = &Apache::lonmenu::registerurl(undef,$target).
$token->[2];
}
@@ -476,7 +476,8 @@
&Apache::lonxml::warning("<body> tag found inside of <problem> tag this can cause problems.");
return '';
}
- if (!$Apache::lonxml::registered) {
+ if (!$Apache::lonxml::registered &&
+ $ENV{'request.state'} eq 'published') {
$currentstring.='<head>'.
&Apache::lonmenu::registerurl(undef,$target).'</head>';
}
@@ -2324,7 +2325,8 @@
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
- if (!$Apache::lonxml::registered) {
+ if (!$Apache::lonxml::registered &&
+ $ENV{'request.state'} eq 'published') {
$currentstring.='<head>'.
&Apache::lonmenu::registerurl(undef,$target).'</head>';
}