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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 22 Feb 2005 16:08:11 -0000


albertel		Tue Feb 22 11:08:11 2005 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - no need to return a reference if what you really want is just the hash
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.363 loncom/interface/lonprintout.pm:1.364
--- loncom/interface/lonprintout.pm:1.363	Tue Feb 22 06:43:05 2005
+++ loncom/interface/lonprintout.pm	Tue Feb 22 11:08:11 2005
@@ -1,7 +1,7 @@
 #  The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.363 2005/02/22 11:43:05 foxr Exp $
+# $Id: lonprintout.pm,v 1.364 2005/02/22 16:08:11 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -794,14 +794,12 @@
 sub get_page_breaks  {
     my ($helper) = @_;
     my %page_breaks;
-
-
     
     foreach my $break (split /\|\|\|/, $helper->{'VARS'}->{'FINISHPAGE'}) {
 	$page_breaks{$break} = 1;
     }
     
-    return \%page_breaks;
+    return %page_breaks;
 }
 
 sub output_data {
@@ -851,10 +849,7 @@
     &Apache::loncommon::store_course_settings('print',
 					      {'pagebreaks' => 'scalar'});
 
-    my $page_hashref = &get_page_breaks($helper);
-    my %page_breaks  = %$page_hashref;
-
-
+    my %page_breaks  = &get_page_breaks($helper);
 
     my $format_from_helper = $helper->{'VARS'}->{'FORMAT'};
     my ($result,$selectionmade) = ('','');
@@ -1466,8 +1461,7 @@
     &Apache::lonnet::delenv('form.counter');
     &Apache::lonxml::init_counter();
 
-    my $page_hashref = &get_page_breaks($helper);
-    my %page_breaks  = %$page_hashref;
+    my %page_breaks  = &get_page_breaks($helper);
 
     foreach my $curresline (@{$master_seq})  {
 	if (defined $page_breaks{$curresline}) {