--- loncom/interface/lonsyllabus.pm 2003/02/10 20:03:13 1.12
+++ loncom/interface/lonsyllabus.pm 2003/02/28 16:16:59 1.14
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.12 2003/02/10 20:03:13 www Exp $
+# $Id: lonsyllabus.pm,v 1.14 2003/02/28 16:16:59 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,7 +46,6 @@ sub handler {
The LearningOnline Network with CAPA
-
ENDDOCUMENT
my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri);
# Is this even a course?
@@ -73,16 +72,24 @@ ENDDOCUMENT
'kkk_textbook' => 'Textbook',
'lll_includeurl' => 'URLs To Include in Syllabus');
-# --------------------------------------------------------------- Force Student
+# ------------------------------------------------------------ Get query string
&Apache::loncommon::get_unprocessed_cgi
- ($ENV{'QUERY_STRING'},['forcestudent']);
+ ($ENV{'QUERY_STRING'},['forcestudent','register']);
+# ----------------------------------------------------- Force menu registration
+ my $addentries='';
+ if ($ENV{'form.register'}) {
+ $addentries=' onLoad="'.&Apache::lonmenu::loadevents().
+ '" onUnload="'.&Apache::lonmenu::unloadevents().'"';
+ $r->print(&Apache::lonmenu::registerurl(1));
+ }
+# --------------------------------------------------------------- Force Student
my $forcestudent='';
if ($ENV{'form.forcestudent'}) { $forcestudent='student'; };
# ------------------------------------- There is such a course, get environment
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
- $r->print(&Apache::loncommon::bodytag
- ("Syllabus",$forcestudent,'','',$cdom));
+ $r->print(''.&Apache::loncommon::bodytag
+ ("Syllabus",$forcestudent,$addentries,'',$cdom));
$r->print(''.$courseenv{'description'}.'
'.
$Apache::lonnet::domaindescription{$cdom}.'
');
my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum);
@@ -174,11 +181,7 @@ ENDDOCUMENT
my $embstyle=&Apache::loncommon::fileembstyle($curfext);
if (($embstyle eq 'ssi') || ($curfext=~/\/$/)) {
# make ssi call and remove everything but the body contents
- $output=
- ($filelink=~/^http\:/?&Apache::lonnet::externalssi($filelink):
- &Apache::lonnet::ssi($filelink));
- $output=~s/^.*\]*\>//si;
- $output=~s/\<\/body\s*\>.*$//si;
+ $output=&Apache::lonnet::ssi_body($filelink);
} elsif ($embstyle eq 'img') {
# embed as an image
$output='';