[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 19 Nov 2004 22:16:33 -0000


albertel		Fri Nov 19 17:16:33 2004 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - editing html pages without the remote control now works
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.246 loncom/xml/londefdef.pm:1.247
--- loncom/xml/londefdef.pm:1.246	Fri Nov 19 16:17:56 2004
+++ loncom/xml/londefdef.pm	Fri Nov 19 17:16:33 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.246 2004/11/19 21:17:56 albertel Exp $
+# $Id: londefdef.pm,v 1.247 2004/11/19 22:16:33 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -531,12 +531,19 @@
 	$token->[2]->{'onunload'}=&Apache::lonmenu::unloadevents().
 	    ';'.$onUnload;
 	
-	$currentstring .= '<'.$token->[1];
+	if ($ENV{'request.state'} ne 'construct') {
+	    $currentstring .= '<'.$token->[1];
+	}
 	foreach (keys %{$token->[2]}) {
 	    $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"';
 	}
-	$currentstring.='>';
+	if ($ENV{'request.state'} ne 'construct') {
+	    $currentstring.='>';
+	}
 	if ($ENV{'request.state'} ne 'published') {
+	    my $remote=($ENV{'environment.remote'} ne 'off');
+	    $currentstring=&Apache::loncommon::bodytag(undef,undef,
+						       $currentstring,$remote);
 	    $currentstring.=(<<EDITBUTTON);
 		<form method="post">
 		<input type="submit" name="editmode" accesskey="e" value="Edit" />