[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm

onken lon-capa-cvs-allow@mail.lon-capa.org
Fri, 05 Sep 2008 11:16:15 -0000


onken		Fri Sep  5 07:16:15 2008 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Adds a new combobox to print-options to choose printing PDF-formfields in PDF-documents
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.538 loncom/interface/lonprintout.pm:1.539
--- loncom/interface/lonprintout.pm:1.538	Fri Sep  5 05:09:38 2008
+++ loncom/interface/lonprintout.pm	Fri Sep  5 07:16:13 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.538 2008/09/05 09:09:38 onken Exp $
+# $Id: lonprintout.pm,v 1.539 2008/09/05 11:16:13 onken Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1481,7 +1481,7 @@
     my ($result,$selectionmade) = ('','');
     my $number_of_columns = 1; #used only for pages to determine the width of the cell
     my @temporary_array=split /\|/,$format_from_helper;
-    my ($laystyle,$numberofcolumns,$papersize)=@temporary_array;
+    my ($laystyle,$numberofcolumns,$papersize,$pdfFormFields)=@temporary_array;
     if ($laystyle eq 'L') {
 	$laystyle='album';
     } else {
@@ -1502,6 +1502,7 @@
     my %form;
     $form{'grade_target'} = 'tex';
     $form{'textwidth'}    = &get_textwidth($helper, $LaTeXwidth);
+    $form{'pdfFormFields'} = $pdfFormFields;
 
     # If form.showallfoils is set, then request all foils be shown:
     # privilege will be enforced both by not allowing the 
@@ -3393,6 +3394,9 @@
     my $PaperType=&mt('Paper type');
     my $landscape=&mt('Landscape');
     my $portrait=&mt('Portrait');
+    my $pdfFormLabel=&mt('PDF-Formfields');
+    my $with=&mt('with Formfields');
+    my $without=&mt('without Formfields');
     $result .= <<STATEHTML;
 
 <hr width="33%" />
@@ -3401,6 +3405,7 @@
     <td align="center"><b>$PageLayout</b></td>
     <td align="center"><b>$NumberOfColumns</b></td>
     <td align="center"><b>$PaperType</b></td>
+    <td align="center"><b>$pdfFormLabel</b></td>
   </tr>
   <tr>
     <td>
@@ -3438,7 +3443,18 @@
         }
         $i++;
     }
-    $result .= "</select></td></tr></table>";
+    $result .= <<HTML;
+        </select>
+    </td>
+    <td align='center'>
+        <select name='${var}.pdfFormFields'>
+            <option selected value='no'>$without</option>
+            <option value='yes'>$with</option>
+        </select>
+    </td>
+  </tr></table>
+HTML
+
     return $result;
 }
 
@@ -3449,7 +3465,7 @@
     my $helper = Apache::lonhelper->getHelper();
     $helper->{VARS}->{$var} = 
         $env{"form.$var.layout"} . '|' . $env{"form.$var.cols"} . '|' .
-        $env{"form.$var.paper"};
+        $env{"form.$var.paper"} . '|' . $env{"form.$var.pdfFormFields"};
     return 1;
 }