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

sakharuk lon-capa-cvs@mail.lon-capa.org
Fri, 11 Jun 2004 16:28:14 -0000


sakharuk		Fri Jun 11 12:28:14 2004 EDT

  Modified files:              
    /loncom/interface	lonsyllabus.pm 
  Log:
  Bug 3102 (Destroy course syllabus doesn't print) is fixed. Now all information is parsed by xml parser for 'tex' target output. I still have to work with some adjustment of the table cells size (doing this right now). 
  
  
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.35 loncom/interface/lonsyllabus.pm:1.36
--- loncom/interface/lonsyllabus.pm:1.35	Fri Jun 11 11:41:36 2004
+++ loncom/interface/lonsyllabus.pm	Fri Jun 11 12:28:14 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.35 2004/06/11 15:41:36 sakharuk Exp $
+# $Id: lonsyllabus.pm,v 1.36 2004/06/11 16:28:14 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -124,13 +124,13 @@
     } else {
 	$r->print('\begin{tabular}{|c|c|}\hline');
     }
-    foreach (sort keys %coursepersonnel) {
+    foreach my $element (sort keys %coursepersonnel) {
 	if ($target ne 'tex') {
-	    $r->print('<tr><td>'.$_.'</td><td>');
+	    $r->print('<tr><td>'.$element.'</td><td>');
 	} else {
-	    $r->print(' '.$_.'\\\\  '); 
+	    $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & '); 
 	}
-        foreach (split(/\,/,$coursepersonnel{$_})) {
+        foreach (split(/\,/,$coursepersonnel{$element})) {
 	    my ($puname,$pudom)=split(/\:/,$_);
 	    if ($target ne 'tex') {
 		$r->print(' '.&Apache::loncommon::aboutmewrapper(
@@ -310,7 +310,9 @@
        }
        if ($target ne 'tex') {$r->print('</p>');} else {$r->print('\\\\');}
     } else {
-       $r->print('<p>No syllabus information provided.</p>');
+	if ($target ne 'tex') {$r->print('<p>');} else {$r->print('\par ');} 
+	$r->print('No syllabus information provided.');
+	if ($target ne 'tex') {$r->print('</p>');}
     }
     if ($target ne 'tex') {$r->print('</body></html>');} else {$r->print('\end{document}');}
     return OK;