--- loncom/interface/lonsyllabus.pm 2004/06/11 15:41:36 1.35 +++ loncom/interface/lonsyllabus.pm 2005/02/17 08:29:43 1.39 @@ -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.39 2005/02/17 08:29:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,6 +37,7 @@ use Apache::lonfeedback; use Apache::lonannounce; use Apache::lonlocal; use Apache::lonhtmlcommon; +use Apache::lonspeller(); sub handler { my $r = shift; @@ -47,8 +48,9 @@ sub handler { # ------------------------------------------------------------ Print the screen my $target=$ENV{'form.grade_target'}; if ($target ne 'tex') { + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html The LearningOnline Network with CAPA ENDDOCUMENT @@ -122,15 +124,15 @@ ENDDOCUMENT if ($target ne 'tex') { $r->print(''); } else { - $r->print('\begin{tabular}{|c|c|}\hline'); + $r->print('\begin{tabular}{|p{0.45\textwidth}|p{0.45\textwidth}|}\hline'); } - foreach (sort keys %coursepersonnel) { + foreach my $element (sort keys %coursepersonnel) { if ($target ne 'tex') { - $r->print('
'.$_.''); + $r->print('
'.$element.''); } 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( @@ -286,6 +288,9 @@ ENDDOCUMENT $message=~s/\n/\
/g; $message =~s/(https*\:\/\/[^\s]+)/\\$1\<\/tt\>\<\/a\>/g; + if ($allowed) { + $message=&Apache::lonspeller::markeduptext($message); + } $message=&Apache::lontexconvert::msgtexconverted($message); if ($target ne 'tex') { $r->print('

'.$syllabusfields{$_}.'

'. @@ -310,7 +315,9 @@ ENDDOCUMENT } if ($target ne 'tex') {$r->print('

');} else {$r->print('\\\\');} } else { - $r->print('

No syllabus information provided.

'); + if ($target ne 'tex') {$r->print('

');} else {$r->print('\par ');} + $r->print('No syllabus information provided.'); + if ($target ne 'tex') {$r->print('

');} } if ($target ne 'tex') {$r->print('');} else {$r->print('\end{document}');} return OK;