--- loncom/interface/lonsyllabus.pm 2006/03/21 21:25:33 1.49 +++ loncom/interface/lonsyllabus.pm 2007/07/27 00:21:39 1.61 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.49 2006/03/21 21:25:33 albertel Exp $ +# $Id: lonsyllabus.pm,v 1.61 2007/07/27 00:21:39 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,7 @@ use Apache::lonannounce; use Apache::lonlocal; use Apache::lonhtmlcommon; use Apache::lonspeller(); +use HTML::Entities(); sub handler { my $r = shift; @@ -65,65 +66,21 @@ sub handler { # ------------------------------------------------------------ Print the screen - my $rss_link = - &Apache::lonrss::rss_link('http://'.$ENV{'HTTP_HOST'}.'/public/'.$cdom.'/'.$cnum.'/Course_Announcements.rss'); - if ($target eq 'tex') { $r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'})); } -# ----------------------------------------------------- Force menu registration - my $addentries=''; - if ($env{'form.register'}) { - $addentries=' onLoad="'.&Apache::lonmenu::loadevents(). - '" onUnload="'.&Apache::lonmenu::unloadevents().'"'; - $r->print(&Apache::lonmenu::registerurl(1)); - } # -------------------------------------------------- Let's see who handles this my $externalsyllabus=$courseenv{'externalsyllabus'}; if ($externalsyllabus=~/\w/) { - $r->print(&Apache::loncommon::endheadtag()); + if ($env{'form.wrapperdisplay'} eq 'menu') { -# -# Producing the menu buttons -# - $r->print('
'. - &Apache::lonmenu::menubuttons(1,'web',1). - &Apache::loncommon::end_page()); - } else { - if ($env{'browser.interface'} eq 'textual') { -# -# ssi-based rendering for text-based interface -# - $r->print(''. - &Apache::lonmenu::menubuttons(1). - &Apache::lonnet::ssi_body($externalsyllabus). - &Apache::loncommon::end_page()); - } elsif ($env{'environment.remote'} eq 'off') { -# -# This is inline remote -# - $r->print(<'. &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'
'.&mt('This syllabus can be publicly viewed at') .' http://'. - $Apache::lonnet::hostname{$homeserver}.$r->uri.''. + &Apache::lonnet::hostname($homeserver).$r->uri.''. &Apache::loncommon::help_open_topic('Syllabus_ExtLink').'
'. ''.&mt('You can specify an external URL as Syllabus in the [_1].',''.&mt('Course Parameters').'').'
'. '