[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /xml lonxml.pm

raeburn raeburn@source.lon-capa.org
Sun, 30 May 2010 02:57:01 -0000


raeburn		Sun May 30 02:57:01 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/xml	lonxml.pm 
  Log:
  - Backport 1.508.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.505 loncom/xml/lonxml.pm:1.505.2.1
--- loncom/xml/lonxml.pm:1.505	Mon Feb  8 00:35:06 2010
+++ loncom/xml/lonxml.pm	Sun May 30 02:57:01 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.505 2010/02/08 00:35:06 raeburn Exp $
+# $Id: lonxml.pm,v 1.505.2.1 2010/05/30 02:57:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2291,24 +2291,20 @@
 
 =pod
 
-=item &print_pdf_radiobutton(fieldname, value,  text)
+=item &print_pdf_radiobutton(fieldname, value)
 
-Returns a latexline to generate a PDF-Form-Radiobutton with Text.
+Returns a latexline to generate a PDF-Form-Radiobutton.
+Note: Radiobuttons with equal names are automaticly grouped
+      in a selection-group.
 
-$fieldname: PDF internalname of the radiobutton
-$value:     Value of radiobutton (read when dumping the PDF data)
-$text:      Text on the rightside of the radiobutton
+$fieldname: PDF internalname of the radiobutton(group)
+$value:     Value of radiobutton
 
 =cut
 sub print_pdf_radiobutton {
-    my $result = '';
-    my ($fieldName, $value, $text) = @_;
-    $result .= '\begin{tabularx}{\textwidth}{p{0cm}X}'."\n";
-    $result .= '\radioButton[\symbolchoice{circle}]{'. 
-               $fieldName.'}{10bp}{10bp}{'.$value.'}&'.$text."\n";
-    $result .= '\end{tabularx}' . "\n";
-    $result .= '\hspace{2mm}' . "\n";
-    return $result;
+    my ($fieldname, $value) = @_;
+    return '\radioButton[\symbolchoice{circle}]{'
+           .$fieldname.'}{10bp}{10bp}{'.$value.'}';
 }