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

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 06 May 2003 20:50:04 -0000


This is a MIME encoded message

--sakharuk1052254204
Content-Type: text/plain

sakharuk		Tue May  6 16:50:04 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
   I've changed some text in wizard to make it more obvious.
  
  
--sakharuk1052254204
Content-Type: text/plain
Content-Disposition: attachment; filename="sakharuk-20030506165004.txt"

Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.154 loncom/interface/lonprintout.pm:1.155
--- loncom/interface/lonprintout.pm:1.154	Tue May  6 16:09:49 2003
+++ loncom/interface/lonprintout.pm	Tue May  6 16:50:04 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.154 2003/05/06 20:09:49 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.155 2003/05/06 20:50:04 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1350,24 +1350,6 @@
     }
     my ($textwidth,$textheight,$oddoffset,$evenoffset) = &page_format_new($papersize,$laystyle,$numberofcolumns);
     my $assignment =  $ENV{'form.assignment'};
-#    if ($choice eq 'Subdirectory print') {
-#	if ($ENV{'form.layout'} eq '') {$layout = 'CAPA';}
-#	if ($ENV{'form.papersize'} eq '') {$papersize = 'Letter [8 1/2x11 in]';}
-#	if ($ENV{'form.numberofcolumns'} eq '') {$numberofcolumns = 2;}
-#    }
-#    if (($choice eq 'Standard LaTeX output for current document') &&
-#	($ENV{'form.url'}=~m|^/~|)) {
-#	if ($ENV{'form.layout'} eq '') {$layout = 'CAPA';}
-#	if ($ENV{'form.papersize'} eq '') {$papersize = 'Letter [8 1/2x11 in]';}
-#	if ($ENV{'form.numberofcolumns'} eq '') {$numberofcolumns = 2;}
-#    }
-
-    
-#    my ($textwidth,$textheight,$oddoffset,$evenoffset) = &page_format($papersize,$layout,$numberofcolumns);
-#    if ($numberofcolumns == 1) {
-#	$textwidth=$ENV{'form.width'};
-#	$textheight=$ENV{'form.height'};
-#    }
     my $LaTeXwidth; 
     if ($textwidth=~/(\d+)\s*cm/) {
 	$LaTeXwidth = $1*10;
@@ -1378,7 +1360,6 @@
     }
     $LaTeXwidth.=' mm';
     
-    
     if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'current_document') {
       #-- single document - problem, page, html, xml, ...
 	my $currentURL;
@@ -1771,22 +1752,22 @@
     my $paramHash;
     # We can always print the current screen.
 
-    push @{$printChoices}, ["<b>$resourceTitle</b> (exactly what was on the screen)", 'current_document', 'PAGESIZE'];
+    push @{$printChoices}, ["Current resource <b>$resourceTitle</b> (prints what you just saw on the screen)", 'current_document', 'PAGESIZE'];
 
     # If we're in a sequence...
     if (not defined $helper->{'VARS'}->{'construction'}) {
         # Allow problems from sequence
-        push @{$printChoices}, ["Problems from <b>$sequenceTitle</b>", 'map_problems', 'CHOOSE_PROBLEMS'];
+        push @{$printChoices}, ["Problem(s) from <b>$sequenceTitle</b>", 'map_problems', 'CHOOSE_PROBLEMS'];
         # Allow all resources from sequence
-        push @{$printChoices}, ["Problems and pages from <b>$sequenceTitle</b>", 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML'];
+        push @{$printChoices}, ["Everything (problem(s), page(s), html/xml file(s)) from <b>$sequenceTitle</b>", 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML'];
 
         my $isProblem = '$res->is_problem();';
         my $isProblemOrMap = '$res->is_problem() || $res->is_map()';
         my $isNotMap = '!$res->is_map();';
         my $symb = '$res->symb();';
         my $helperFragment = <<HELPERFRAGMENT;
-  <state name="CHOOSE_PROBLEMS" title="Select Problems">
-    <message>Select problems to print:</message>
+  <state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print">
+    <message>(mark them then click "next" button) <br /></message>
     <resource variable="RESOURCES" multichoice="1" toponly='1'>
       <nextstate>PAGESIZE</nextstate>
       <filterfunc>return $isProblem</filterfunc>
@@ -1795,8 +1776,8 @@
       </resource>
     </state>
 
-  <state name="CHOOSE_PROBLEMS_HTML" title="Select Resources">
-    <message>Select resources to print:</message>
+  <state name="CHOOSE_PROBLEMS_HTML" title="Select Resource(s) to print">
+    <message>(mark them then click "next" button) <br /></message>
     <resource variable="RESOURCES" multichoice="1" toponly='1'>
       <nextstate>PAGESIZE</nextstate>
       <filterfunc>return $isNotMap;</filterfunc>
@@ -1812,15 +1793,15 @@
     # If the user is priviledged, allow them to print all 
     # problems in the course, optionally for selected students
     if (($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) and ($helper->{VARS}->{'postdata'}=~/\/res\//)) { 
-        push @{$printChoices}, ['<b>All problems</b> in course (may take a lot of time)', 'all_problems', 'ALL_PROBLEMS'];
+        push @{$printChoices}, ['<b>Problems</b> in this course', 'all_problems', 'ALL_PROBLEMS'];
         push @{$printChoices}, ["Problems from <b>$sequenceTitle</b> for selected students", 'problems_for_students', 'CHOOSE_STUDENTS'];
 
         my $isProblem = '$res->is_problem();';
         my $isProblemOrMap = '$res->is_problem() || $res->is_map()';
         my $symb = '$res->symb();';
         &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS);
-  <state name="ALL_PROBLEMS" title="Select Problems">
-    <message>Select problems to print:</message>
+  <state name="ALL_PROBLEMS" title="Select Problem(s) to print">
+    <message>(mark them then click "next" button) <br /></message>
     <resource variable="RESOURCES" multichoice="1">
       <nextstate>PAGESIZE</nextstate>
       <filterfunc>return $isProblemOrMap</filterfunc>
@@ -1829,15 +1810,16 @@
       </resource>
     </state>
 
-  <state name="CHOOSE_STUDENTS" title="Choose Students">
-    <message>Select the students you wish to print the problems for:</message>
+  <state name="CHOOSE_STUDENTS" title="Choose Students whose assignments you want to print">
+    <message>(do not forget to select assignment itself - make another selection below) <br /></message>
     <student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" />
+    <message><br /><big><i><b>Select resources for the assignment</b></i></big><br /></message>
     <resource variable="RESOURCES" multichoice="1">
       <filterfunc>return $isProblem</filterfunc>
       <mapurl>$map</mapurl>
       <valuefunc>return $symb</valuefunc>
       </resource>
-    <message>How should the results be printed?</message>
+    <message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message>
     <choices variable="EMPTY_PAGES">
       <choice computer='0'>Print students assignments without separations (as uniform flow)</choice>
       <choice computer='1'>Start student assignment from new page (add pagefeed after each student)</choice>
@@ -1850,12 +1832,12 @@
 
     # FIXME: That RE should come from a library somewhere.
     if (((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and ($helper->{VARS}->{'postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) or defined $helper->{'VARS'}->{'construction'}) {    
-        push @{$printChoices}, ["Problems from <b>$subdir</b>", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
+        push @{$printChoices}, ["Problems from current subdirectory <b>$subdir</b>", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
         
         my $f = '$filename';
         my $xmlfrag = <<CHOOSE_FROM_SUBDIR;
-  <state name="CHOOSE_FROM_SUBDIR" title="Select Files">
-    <message>Select problems you wish to print from <b>$subdir</b></message>
+  <state name="CHOOSE_FROM_SUBDIR" title="Select File(s) from <b><small>$subdir</small></b> to print">
+    <message>(mark them then click "next" button) <br /></message>
     <files variable="FILES" multichoice='1'>
       <nextstate>PAGESIZE</nextstate>
       <filechoice>return '$subdir';</filechoice>
@@ -1872,9 +1854,9 @@
     }
 
     # Generate the first state, to select which resources get printed.
-    Apache::lonhelper::state->new("START", "Selecting Resources to Print");
+    Apache::lonhelper::state->new("START", "What do you want to print? Make a choice.");
     $paramHash = Apache::lonhelper::getParamHash();
-    $paramHash->{MESSAGE_TEXT} = "What do you want to print?";
+    $paramHash->{MESSAGE_TEXT} = "";
     Apache::lonhelper::message->new();
     $paramHash = Apache::lonhelper::getParamHash();
     $paramHash->{'variable'} = 'PRINT_TYPE';
@@ -1969,19 +1951,19 @@
 
     $result .= <<STATEHTML;
 
-<p>How should the printing be formatted?</p>
+<p><big><i><b>What page format do you prefer?</b></i></big></p>
 <table cellpadding="3">
   <tr>
-    <td align="center"><b>Layout</b></td>
-    <td align="center"><b>Columns</b></td>
+    <td align="center"><b>Page layout</b></td>
+    <td align="center"><b>Number of columns</b></td>
     <td align="center"><b>Paper type</b></td>
   </tr>
   <tr>
     <td>
-      <input type="radio" name="${var}.layout" value="L" checked='1' /> Landscape<br />
-      <input type="radio" name="${var}.layout" value="P" /> Portrait
+      <input type="radio" name="${var}.layout" value="L" /> Landscape<br />
+      <input type="radio" name="${var}.layout" value="P" checked='1'  /> Portrait
     </td>
-    <td>
+    <td align="center">
       <select name="${var}.cols">
 STATEHTML
 

--sakharuk1052254204--