--- loncom/interface/lonsyllabus.pm 2008/07/17 12:01:46 1.66 +++ loncom/interface/lonsyllabus.pm 2009/10/23 16:14:43 1.100 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.66 2008/07/17 12:01:46 raeburn Exp $ +# $Id: lonsyllabus.pm,v 1.100 2009/10/23 16:14:43 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,6 +29,7 @@ package Apache::lonsyllabus; use strict; +use Apache::lontemplate; use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonnet; @@ -57,8 +58,8 @@ sub handler { if ($homeserver eq 'no_host') { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; - &Apache::loncommon::simple_error_page($r,'No syllabus available', - 'No syllabus available'); + &Apache::loncommon::simple_error_page($r,'No syllabus available', + 'No syllabus available'); return OK; } # ------------------------------------- There is such a course, get environment @@ -67,21 +68,21 @@ sub handler { # ------------------------------------------------------------ Print the screen if ($target eq 'tex') { - $r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'})); - } + $r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'})); + } # -------------------------------------------------- Let's see who handles this my $externalsyllabus=$courseenv{'externalsyllabus'}; if ($externalsyllabus=~/\w/) { - + if ($env{'form.wrapperdisplay'} eq 'menu') { - $r->print(&Apache::lonwrapper::simple_menu()); - } else { - $r->print(&Apache::lonwrapper::wrapper("/public/$cdom/$cnum/syllabus?wrapperdisplay=menu", - $externalsyllabus)); + $r->print(&Apache::lonwrapper::simple_menu()); + } else { + $r->print(&Apache::lonwrapper::wrapper("/public/$cdom/$cnum/syllabus?wrapperdisplay=menu", + $externalsyllabus)); } return OK; - } + } # ------------------------------ The buck stops here: internal syllabus display # --------------------------------------------------------- The syllabus fields @@ -106,10 +107,10 @@ sub handler { if ($env{'form.forcestudent'}) { $forcestudent='student'; }; my $forceedit=''; if ($env{'form.forceedit'}) { $forceedit='edit'; } - -# ----------------------------------------------------------------- Make header + +# ----------------------------------------------------------------- Make header if ($target ne 'tex') { - my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom); + my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom); my $js; if ($env{'form.backto'} eq 'coursecatalog') { $js .= <<"ENDSCRIPT"; @@ -117,11 +118,11 @@ sub handler {