--- loncom/interface/loncommon.pm 2006/04/13 19:07:11 1.333 +++ loncom/interface/loncommon.pm 2006/04/14 20:16:02 1.337 @@ -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.337 2006/04/14 20:16:02 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; @@ -2764,7 +2766,7 @@ other decorations will be returned. sub bodytag { my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, - $notopbar,$bgcolor)=@_; + $notopbar,$bgcolor,$hidetitle)=@_; $title=&mt($title); $function = &get_users_function() if (!$function); my $img=&designparm($function.'.img',$domain); @@ -2823,9 +2825,11 @@ END } elsif ($env{'browser.interface'} eq 'textual') { # Accessibility - return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web', - $forcereg). - '

LON-CAPA: '.$title.'

'; + $bodytag.=&Apache::lonmenu::menubuttons($forcereg,$forcereg); + if (!$hidetitle) { + $bodytag.='

LON-CAPA: '.$title.'

'; + } + return $bodytag; } elsif ($env{'environment.remote'} eq 'off') { # No Remote my $roleinfo=(<'. ''. $titleinfo.''.$roleinfo.''; - if ($env{'request.state'} eq 'construct') { + } + if ($env{'request.state'} eq 'construct') { 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; } } @@ -2915,6 +2924,9 @@ ENDROLE # Explicit link to get inline menu my $menu='
 '.&mt('Switch to Inline Menu Mode').''; # + if ($hidetitle) { + return $bodytag; + } return(< @@ -3012,7 +3024,6 @@ Inputs: $title - optional title for the $args - optional arguments force_register - if is true call registerurl so the remote is informed - redirect - array ref of seconds before redirect occurs url to redirect to (side effect of setting @@ -3120,6 +3131,7 @@ Inputs: $title - optional title for the is not auto translated like the $title is frameset -> if true will start with a rather than + =back =cut @@ -3184,6 +3196,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 +3215,11 @@ sub end_page { if ($args->{'js_ready'}) { $result = &js_ready($result); } + if ($args->{'html_encode'}) { $result = &html_encode($result); } + return $result; }