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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Mon, 10 Sep 2007 19:50:21 -0000


albertel		Mon Sep 10 15:50:21 2007 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - adding cstr headers on to .sty file when editing in CSTR
  
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.375 loncom/xml/londefdef.pm:1.376
--- loncom/xml/londefdef.pm:1.375	Fri Aug 10 07:21:00 2007
+++ loncom/xml/londefdef.pm	Mon Sep 10 15:50:20 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.375 2007/08/10 11:21:00 foxr Exp $
+# $Id: londefdef.pm,v 1.376 2007/09/10 19:50:20 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -578,21 +578,27 @@
 					    'force_register' => 1});
 
 	if ($env{'request.state'} ne 'published') {
-	    $currentstring.=&Apache::lonmenu::constspaceform();
-	    $currentstring.=(<<EDITBUTTON);
-<form method="post">
-<input type="submit" name="editmode" accesskey="e" value="Edit" />
-</form>
-<br />
-EDITBUTTON
+
 	}
 	$currentstring.=&Apache::lonxml::message_location();
+	$currentstring.=&Apache::londefdef::edit_controls();
     } elsif ($target eq 'tex') {
 	$currentstring = '\begin{document}';  
     } 
     return $currentstring;
 }
 
+sub edit_controls {
+    my $result = &Apache::lonmenu::constspaceform();
+    $result .= (<<EDITBUTTON);
+<form method="post">
+<input type="submit" name="editmode" accesskey="e" value="Edit" />
+</form>
+<br />
+EDITBUTTON
+    return $result;
+}
+
 sub end_body {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off unclosed <p>