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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 14 Nov 2002 15:39:36 -0000


sakharuk		Thu Nov 14 10:39:36 2002 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Menu for printing was changed to remove some options (printing for the 
  whole course or for the group of students) if you print from the construction
  space after direct transition from the resource space (for the cc who are at 
  the same time au or ca). In the process I've removed some lines where I used
  user roles.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.86 loncom/interface/lonprintout.pm:1.87
--- loncom/interface/lonprintout.pm:1.86	Thu Nov 14 09:47:53 2002
+++ loncom/interface/lonprintout.pm	Thu Nov 14 10:39:35 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.86 2002/11/14 14:47:53 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.87 2002/11/14 15:39:35 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -92,13 +92,13 @@
 <input type="radio" name="choice" value="Standard LaTeX output for current document" checked>  Current document <b>$title_for_single_resource</b>
 (prints what you just saw on the screen)<br />
 ENDMENUOUT1
-    if ((not $ENV{'request.role'}=~m/^au\./) and (not $ENV{'request.role'}=~m/^ca\./)) {
+    if ($ENV{'form.postdata'}=~/\/res\//) {
 	$r->print(<<ENDMENUOUT2);
 <input type="radio" name="choice" value="Standard LaTeX output for the primary sequence">  All problems from <b>$title_for_sequence</b><br />
 <input type="radio" name="choice" value="Standard LaTeX output for whole primary sequence">  All problems plus any pages or html/xml files from <b>$title_for_sequence</b><br />
 ENDMENUOUT2
     }
-    if ($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) { 
+    if (($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) and ($ENV{'form.postdata'}=~/\/res\//)) { 
 	$r->print(<<ENDMENUOUT6);
 <input type="radio" name="choice" value="Standard LaTeX output for the top level sequence">  All problems in this course (<b>warning:</b> this may be time consuming) <br />
 <br />