[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
raeburn
raeburn@source.lon-capa.org
Thu, 15 Oct 2009 21:12:52 -0000
raeburn Thu Oct 15 21:12:52 2009 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
When editing an HTML document uploaded directly to a course:
- Only include Math Rendering switcher in edit_tools.
- Do not generate CSTR breadcrumbs.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.499 loncom/xml/lonxml.pm:1.500
--- loncom/xml/lonxml.pm:1.499 Sun Oct 4 03:36:08 2009
+++ loncom/xml/lonxml.pm Thu Oct 15 21:12:51 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.499 2009/10/04 03:36:08 raeburn Exp $
+# $Id: lonxml.pm,v 1.500 2009/10/15 21:12:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1546,12 +1546,16 @@
= &Apache::loncommon::plainlanguagedescription($_);
}
}
- return
- '<span class="LC_nobreak">'.
- &mt('Language:').' '.
- &Apache::loncommon::select_form($env{'form.languages'},'languages',
- %langchoices).'
- </span>
+ my $output;
+ unless ($env{'form.forceedit'}) {
+ $output .= '
+ <span class="LC_nobreak">'.
+ &mt('Language:').' '.
+ &Apache::loncommon::select_form($env{'form.languages'},'languages',
+ %langchoices).'
+ </span>';
+ }
+ $output .= '
<span class="LC_nobreak">'.
&mt('Math Rendering:').' '.
&Apache::loncommon::select_form($env{'form.texengine'},'texengine',
@@ -1560,6 +1564,7 @@
'jsMath' => 'jsMath',
'mimetex' => 'mimetex (Convert to Images)')).'
</span>';
+ return $output;
}
sub inserteditinfo {
@@ -1852,13 +1857,16 @@
('add_entries' =>
{'onresize' => $add_to_onresize,
'onload' => $add_to_onload, });
-
- $options{'bread_crumbs'} = [{
- 'href' => &Apache::loncommon::authorspace(),
- 'text' => 'Construction Space'},
- {'href' => '',
- 'text' => 'HTML Editor'}];
-
+ my $header;
+ if ($env{'request.state'} eq 'construct') {
+ $options{'bread_crumbs'} = [{
+ 'href' => &Apache::loncommon::authorspace(),
+ 'text' => 'Construction Space'},
+ {'href' => '',
+ 'text' => 'HTML Editor'}];
+ $header = &Apache::loncommon::head_subbox(
+ &Apache::loncommon::CSTR_pageheader());
+ }
if ($env{'environment.remote'} ne 'off') {
$options{'bgcolor'} = '#FFFFFF';
$options{'only_body'} = 1;
@@ -1869,8 +1877,7 @@
my $start_page = &Apache::loncommon::start_page(undef,$js,
\%options);
$result = $start_page
- .&Apache::loncommon::head_subbox(
- &Apache::loncommon::CSTR_pageheader())
+ .$header
.&Apache::lonxml::message_location()
.$edit_info
.&Apache::loncommon::end_page();