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

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Fri, 07 Nov 2008 18:06:19 -0000


bisitz		Fri Nov  7 18:06:19 2008 EDT

  Modified files:              
    /loncom/interface	lonsyllabus.pm 
  Log:
  Optimized course personnel pick box closure
  -> lonsyllabus.pm 1.68
  
  
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.68 loncom/interface/lonsyllabus.pm:1.69
--- loncom/interface/lonsyllabus.pm:1.68	Wed Oct 22 08:56:35 2008
+++ loncom/interface/lonsyllabus.pm	Fri Nov  7 18:06:19 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.68 2008/10/22 08:56:35 bisitz Exp $
+# $Id: lonsyllabus.pm,v 1.69 2008/11/07 18:06:19 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -183,7 +183,9 @@
     } else {
 	$r->print('\begin{tabular}{|p{0.45\textwidth}|p{0.45\textwidth}|}\hline');
     }
-    foreach my $element (sort keys %coursepersonnel) {
+    my @personnel=sort keys %coursepersonnel;
+    my $lastpers=$personnel[$#personnel];
+    foreach my $element (@personnel) {
 	if ($target ne 'tex') {
 	    $r->print(&Apache::lonhtmlcommon::row_title($element));
 	} else {
@@ -206,7 +208,8 @@
 	    }
 	}
 	if ($target ne 'tex') {
-	    $r->print(&Apache::lonhtmlcommon::row_closure());
+            my $lastclose=$element eq $lastpers?1:0;
+            $r->print(&Apache::lonhtmlcommon::row_closure($lastclose));
 	} else {
 	    $r->print('\\\\ \hline');
 	}