[LON-CAPA-cvs] cvs: loncom /homework edit.pm insertlist.tab

bowersj2 lon-capa-cvs@mail.lon-capa.org
Tue, 29 Jul 2003 15:05:53 -0000


bowersj2		Tue Jul 29 11:05:53 2003 EDT

  Modified files:              
    /loncom/homework	edit.pm insertlist.tab 
  Log:
  Adding help files to XML tags, specifically, adding script help.
  
  
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.57 loncom/homework/edit.pm:1.58
--- loncom/homework/edit.pm:1.57	Mon Jun 30 16:41:35 2003
+++ loncom/homework/edit.pm	Tue Jul 29 11:05:53 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.57 2003/06/30 20:41:35 albertel Exp $
+# $Id: edit.pm,v 1.58 2003/07/29 15:05:53 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,10 +63,17 @@
   &deletelist($target,$token)
   ."</td>
 <td>".
-    &insertlist($target,$token).&end_row().&start_spanning_row();
+    &insertlist($target,$token);
 #<td>". 
 #  &movebuttons($target,$token).
 #    "</tr><tr><td colspan=\"3\">\n";
+    my @help = Apache::lonxml::helpinfo($token);
+    if ($help[0]) {
+	$result .= '<td align="right" valign="top">' .
+	    Apache::loncommon::help_open_topic(@help) .
+	    '</td>';
+    } else { $result .= "<td>&nbsp;</td>"; }
+    $result .= &end_row().&start_spanning_row();
   }
   return $result;
 }
@@ -119,7 +126,7 @@
   return $result;
 }
 
-sub start_spanning_row { return '<tr><td colspan="3" bgcolor="#DDDDDD">';}
+sub start_spanning_row { return '<tr><td colspan="4" bgcolor="#DDDDDD">';}
 sub start_row          { return '<tr><td bgcolor="#DDDDDD">';            }
 sub end_row            { return '</td></tr>';          }
 
Index: loncom/homework/insertlist.tab
diff -u loncom/homework/insertlist.tab:1.40 loncom/homework/insertlist.tab:1.41
--- loncom/homework/insertlist.tab:1.40	Tue Jul 22 11:14:10 2003
+++ loncom/homework/insertlist.tab	Tue Jul 29 11:05:53 2003
@@ -1,5 +1,6 @@
 #the order of tags at the top _MUST_ be the same as in the table
-#tag, description, color, function to call, show as option
+#tag, description, color, function to call, show as option (default
+#  "yes"), help file, help description
 numericalresponse,Response: Numerical,#00cc22,insert_numericalresponse
 stringresponse,Response: String,#00cc55,insert_stringresponse
 formularesponse,Response: Formula,#22cc55,insert_formularesponse
@@ -45,7 +46,7 @@
 display,Display Script Result Block,#ccaacc,default,no
 import,Import a File,#ccaacc,default
 parserlib,Import Tag Definitions,#ccaacc,default,no
-script,Perl Script Block,#ccccaa,insert_script
+script,Perl Script Block,#ccccaa,insert_script,yes,Script_Functions:Greek_Symbols:Other_Symbols,Script Functions
 scriptlib,Import Script Library,#ccaacc,default
 window,Text In Seperate Window,#aacccc,default
 block,Conditional Block,#FF3311,default