[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface loncommon.pm

raeburn raeburn@source.lon-capa.org
Mon, 12 Jan 2009 04:39:30 -0000


raeburn		Mon Jan 12 04:39:30 2009 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/interface	loncommon.pm 
  Log:
  - Backport 1.732.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.692.2.11 loncom/interface/loncommon.pm:1.692.2.12
--- loncom/interface/loncommon.pm:1.692.2.11	Thu Jan  8 19:51:28 2009
+++ loncom/interface/loncommon.pm	Mon Jan 12 04:39:30 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.692.2.11 2009/01/08 19:51:28 raeburn Exp $
+# $Id: loncommon.pm,v 1.692.2.12 2009/01/12 04:39:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -943,24 +943,30 @@
 # This is a quicky function for Latex cheatsheet editing, since it 
 # appears in at least four places
 sub helpLatexCheatsheet {
-    my $other = shift;
+    my ($topic,$text,$not_author) = @_;
+    my $out;
     my $addOther = '';
-    if ($other) {
-	$addOther = Apache::loncommon::help_open_topic($other, shift,
-						       undef, undef, 600) .
-							   '</td><td>';
-    }
-    return '<table><tr><td>'.
-	$addOther .
-	&Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'),
-					    undef,undef,600)
-	.'</td><td>'.
-	&Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'),
-					    undef,undef,600)
-	.'</td><td>'.
-	&Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'),
-	                                    undef,undef,600)
-	.'</td></tr></table>';
+    if ($topic) {
+	$addOther = Apache::loncommon::help_open_topic($topic,$text,
+						       undef, undef, 600).
+							'</td><td>';
+    }
+    $out = '<table><tr><td>'.
+	   $addOther.
+	   &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'),
+					       undef,undef,600).
+	   '</td><td>'.
+	   &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'),
+					       undef,undef,600).
+	   '</td>';
+    unless ($not_author) {
+        $out .= '<td>'.
+	        &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'),
+	                                            undef,undef,600).
+	        '</td>';
+    }
+    $out .= '</tr></table>';
+    return $out;
 }
 
 sub general_help {