--- loncom/homework/structuretags.pm 2009/05/11 16:51:22 1.444
+++ loncom/homework/structuretags.pm 2010/07/29 21:16:40 1.471
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.444 2009/05/11 16:51:22 bisitz Exp $
+# $Id: structuretags.pm,v 1.471 2010/07/29 21:16:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -66,7 +66,7 @@ use lib '/home/httpd/lib/perl/';
use LONCAPA;
BEGIN {
- &Apache::lonxml::register('Apache::structuretags',('block','languageblock','translated','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startouttext','endouttext','simpleeditbutton','definetag'));
+ &Apache::lonxml::register('Apache::structuretags',('block','languageblock','translated','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startpartmarker','startouttext','endpartmarker','endouttext','simpleeditbutton','definetag'));
}
sub start_web {
@@ -203,14 +203,28 @@ sub page_start {
}
}
+ my $pageheader = '';
if (defined($found{'body'})) {
$body_args{'skip_phases'}{'body'}=1;
} elsif (!defined($found{'body'})
&& $env{'request.state'} eq 'construct') {
if ($target eq 'web' || $target eq 'edit') {
- if ($env{'environment.remote'} ne 'off') {
- $body_args{'only_body'} = 1;
- }
+ # Breadcrumbs for Construction Space
+ &Apache::lonhtmlcommon::clear_breadcrumbs();
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ 'text' => 'Construction Space',
+ 'href' => &Apache::loncommon::authorspace(),
+ });
+ # breadcrumbs (and tools) will be created
+ # in start_page->bodytag->innerregister
+
+# FIXME Where are we?
+# &Apache::lonhtmlcommon::add_breadcrumb({
+# 'text' => 'Problem Editing', # 'Problem Testing'
+# 'href' => '',
+# });
+ $pageheader =&Apache::loncommon::head_subbox(
+ &Apache::loncommon::CSTR_pageheader());
}
} elsif (!defined($found{'body'})) {
my %add_entries;
@@ -222,31 +236,30 @@ sub page_start {
my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack,
$safeeval);
- if ($bgcolor eq '' ) { $bgcolor = '#FFFFFF'; }
+ if ($bgcolor eq '' ) { $bgcolor = '#FFFFFF'; }
- $body_args{'bgcolor'} = $bgcolor;
- $body_args{'no_title'} = 1;
- $body_args{'force_register'} = 1;
- $body_args{'add_entries'} = \%add_entries;
- if ($env{'environment.remote'} eq 'off'
- && $env{'request.state'} eq 'construct') {
- $body_args{'only_body'} = 1;
- }
+ $body_args{'bgcolor'} = $bgcolor;
+ # $body_args{'no_title'} = 1;
+ $body_args{'force_register'} = 1;
+ $body_args{'add_entries'} = \%add_entries;
+ if ( $env{'request.state'} eq 'construct') {
+ $body_args{'only_body'} = 1;
+ }
}
$body_args{'no_auto_mt_title'} = 1;
my $page_start = &Apache::loncommon::start_page($name,$extra_head,
\%body_args);
-
+ $page_start .= $pageheader;
if (!defined($found{'body'})
&& $env{'request.state'} ne 'construct'
&& ($target eq 'web' || $target eq 'webgrade')) {
my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser();
- if ($symb eq '' && !$publicuser) {
- my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference");
- $help=&mt("Browsing resource, all submissions are temporary.")."
";
- $page_start .= $help;
- }
+ if ($symb eq '' && !$publicuser) {
+ $page_start .= '
' + .&mt('Browsing resource, all submissions are temporary.') + .'
'; + } } if (!defined($found{'body'}) && $env{'request.state'} ne 'construct') { @@ -256,7 +269,9 @@ sub page_start { my $form_tag_start; if (!defined($found{'form'})) { $form_tag_start='