--- loncom/xml/londefdef.pm 2010/11/01 10:52:09 1.425
+++ loncom/xml/londefdef.pm 2014/05/15 20:19:06 1.451
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.425 2010/11/01 10:52:09 foxr Exp $
+# $Id: londefdef.pm,v 1.451 2014/05/15 20:19:06 raeburn Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -47,6 +47,7 @@ use Image::Magick;
use Apache::lonmenu();
use Apache::lonmeta();
use Apache::lonlocal;
+use Apache::loncommon();
use Apache::Constants qw(:common);
use File::Basename;
use LONCAPA();
@@ -54,7 +55,7 @@ use LONCAPA();
BEGIN {
- &Apache::lonxml::register('Apache::londefdef',('a','abbr','acronym','accessrule','address','allow','applet','area','b','base','basefont','bgo','bgsound','big','blink','blockquote','blankspace','body','br','button','caption','center','cite','code','col','colgroup','dd','del','dfn','dir','div','dl','dt','em','embed','externallink','fieldset','font','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','hr','html','i','iframe','img','input','ins','insert','isindex','kbd','keygen','label','layer','legend','li','link','m','map','marquee','menu','meta','multicol','nobr','noembed','noframes','nolayer','noscript','object','ol','optgroup','option','output','p','param','pre','q','s','samp','select','server','small','spacer','span','strike','strong','sub','sup','table','tbody','td','textarea','tfoot','th','thead','title','tr','tt','tthoption','u','ul','var','wbr','hideweboutput'));
+ &Apache::lonxml::register('Apache::londefdef',('a','abbr','acronym','accessrule','address','allow','applet','area','b','base','basefont','bgo','bgsound','big','blink','blockquote','blankspace','body','br','button','caption','center','cite','code','col','colgroup','dd','del','dfn','dir','div','dl','dt','em','embed','externallink','fieldset','font','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','hr','html','i','iframe','img','input','ins','insert','isindex','kbd','keygen','label','layer','legend','li','link','m','map','marquee','menu','meta','multicol','nobr','noembed','noframes','nolayer','noscript','object','ol','optgroup','option','output','p','param','pre','q','s','samp','select','server','small','spacer','span','strike','strong','style','sub','sup','table','tbody','td','textarea','tfoot','th','thead','title','tr','tt','tthoption','u','ul','var','wbr','hideweboutput'));
}
@@ -382,6 +383,9 @@ sub start_meta {
} else {
$currentstring = $token->[4];
}
+ if ($env{'form.grade_imsexport'}) {
+ $currentstring = '';
+ }
} elsif ($target eq 'meta') {
unless (&Apache::lonxml::get_param
('http-equiv',$parstack,$safeeval,undef,1)) {
@@ -454,6 +458,32 @@ sub insert_meta {
';
}
+#-- tag
+sub start_style {
+ my ($target, $token, $tagstack, $parstack, $parser, $safeeval, $style) = @_;
+ my $currentstring = '';
+
+ if ($target eq 'tex') {
+ Apache::lonxml::startredirection();
+ } else {
+ $currentstring = $token->[4];
+ }
+
+ return $currentstring;
+}
+
+sub end_style {
+ my ($target, $token, $tagstack, $parstack, $parser, $safeeval) = @_;
+ my $currentstring = '';
+
+ if ($target eq 'tex') {
+ Apache::lonxml::endredirection();
+ } else {
+ $currentstring = $token->[2];
+ }
+ return $currentstring;
+}
+
# accessrule
sub start_accessrule {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
@@ -540,9 +570,10 @@ sub start_body {
# Breadcrumbs
&Apache::lonhtmlcommon::clear_breadcrumbs();
if ($env{'request.state'} eq 'construct') {
+ my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});
&Apache::lonhtmlcommon::add_breadcrumb({
- 'text' => 'Construction Space',
- 'href' => &Apache::loncommon::authorspace(),
+ 'text' => 'Authoring Space',
+ 'href' => &Apache::loncommon::authorspace($url),
});
&Apache::lonhtmlcommon::add_breadcrumb({
'text' => 'HTML Editor',
@@ -554,26 +585,31 @@ sub start_body {
# FIXME Where are we?
}
+ my $args = {'add_entries' => $token->[2],
+ 'force_register' => 1,};
+ if ($target eq 'web') {
+ $args->{'print_suppress'} = 1;
+ }
$currentstring =
&Apache::loncommon::start_page($Apache::londefdef::title,
$Apache::londefdef::head
- .$extra_head,
- {'add_entries' => $token->[2],
-# 'no_title' => 1,
- 'force_register' => 1});
-
+ .$extra_head,$args);
my $header = '';
if ($env{'request.state'} ne 'published' &&
$env{'request.state'} ne 'construct') {
$header=&Apache::lonmenu::constspaceform();
}
if ($env{'request.state'} ne 'published') {
- $header.=&Apache::londefdef::edit_controls();
+ unless ($env{'form.inhibitmenu'} eq 'yes') {
+ $header.=&edit_controls();
+ }
}
if ($env{'request.state'} eq 'construct') {
- $currentstring.=&Apache::loncommon::head_subbox(
- &Apache::loncommon::CSTR_pageheader()
- .$header);
+ unless ($env{'form.inhibitmenu'} eq 'yes') {
+ $currentstring.=&Apache::loncommon::head_subbox(
+ &Apache::loncommon::CSTR_pageheader()
+ .$header);
+ }
} elsif ($env{'request.state'} eq 'edit') {
$currentstring.=&Apache::loncommon::head_subbox($header);
}
@@ -588,7 +624,7 @@ sub start_body {
sub edit_controls {
my ($nochgview) = @_;
my $result .= '
-