--- loncom/interface/loncommon.pm 2006/04/13 19:07:11 1.333
+++ loncom/interface/loncommon.pm 2006/04/14 20:12:35 1.336
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.333 2006/04/13 19:07:11 albertel Exp $
+# $Id: loncommon.pm,v 1.336 2006/04/14 20:12:35 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -61,6 +61,8 @@ use POSIX qw(strftime mktime);
use Apache::lonmenu();
use Apache::lonlocal;
use HTML::Entities;
+use Apache::lonhtmlcommon();
+use Apache::loncoursedata();
my $readit;
@@ -2823,8 +2825,7 @@ END
} elsif ($env{'browser.interface'} eq 'textual') {
# Accessibility
- return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
- $forcereg).
+ return $bodytag.&Apache::lonmenu::menubuttons($forcereg,$forcereg).
'
LON-CAPA: '.$title.'
';
} elsif ($env{'environment.remote'} eq 'off') {
# No Remote
@@ -2882,13 +2883,13 @@ ENDROLE
if ($notopbar) {
$bodytag .= $titletable;
} else {
- $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg,$titletable);
+ $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg,$titletable);
}
} else {
if ($notopbar) {
$bodytag .= $titletable;
} else {
- $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg).
+ $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg).
$titletable;
}
}
@@ -3184,6 +3185,15 @@ sub end_page {
#&Apache::lonnet::logthis("end_page ".join(':',caller(0)));
$env{'internal.end_page'}++;
my $result;
+ if ($args->{'discussion'}) {
+ my ($target,$parser);
+ if (ref($args->{'discussion'})) {
+ ($target,$parser) =($args->{'discussion'}{'target'},
+ $args->{'discussion'}{'parser'});
+ }
+ $result .= &Apache::lonxml::xmlend($target,$parser);
+ }
+
if ($args->{'frameset'}) {
$result .= '';
} else {
@@ -3194,9 +3204,11 @@ sub end_page {
if ($args->{'js_ready'}) {
$result = &js_ready($result);
}
+
if ($args->{'html_encode'}) {
$result = &html_encode($result);
}
+
return $result;
}