--- loncom/homework/structuretags.pm 2008/11/25 13:16:17 1.435 +++ loncom/homework/structuretags.pm 2009/07/06 17:48:30 1.455 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.435 2008/11/25 13:16:17 jms Exp $ +# $Id: structuretags.pm,v 1.455 2009/07/06 17:48:30 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -203,6 +203,7 @@ sub page_start { } } + my $pageheader = ''; if (defined($found{'body'})) { $body_args{'skip_phases'}{'body'}=1; } elsif (!defined($found{'body'}) @@ -211,6 +212,20 @@ sub page_start { 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(), + }); +# FIXME Where are we? +# &Apache::lonhtmlcommon::add_breadcrumb({ +# 'text' => 'Problem Editing', # 'Problem Testing' +# 'href' => '', +# }); + $pageheader = &Apache::lonhtmlcommon::breadcrumbs() + .&Apache::loncommon::head_subbox( + &Apache::loncommon::CSTR_pageheader()); } } elsif (!defined($found{'body'})) { my %add_entries; @@ -222,21 +237,21 @@ 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{'environment.remote'} eq 'off' + && $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')) { @@ -244,7 +259,8 @@ sub page_start { 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.")."
"; + $help="

".&mt("Browsing resource, all submissions + are temporary.")."

"; $page_start .= $help; } } @@ -256,7 +272,8 @@ sub page_start { my $form_tag_start; if (!defined($found{'form'})) { $form_tag_start='
'. &problem_edit_buttons().' -
+
'.&Apache::lonxml::message_location().' '. @@ -381,9 +398,9 @@ sub problem_edit_header { sub problem_edit_footer { return '
'. @@ -420,12 +437,14 @@ sub problem_web_to_edit_header { my $show_all_foils_text = ($Apache::lonhomework::parsing_a_task) ? - &mt(' Show All Instances') - : &mt(' Show All Foils'); + &mt('Show All Instances') + : &mt('Show All Foils'); - my $show_all= ''; + my $show_all= ''; @@ -498,7 +517,7 @@ $show_all -
+
@@ -522,7 +541,8 @@ $show_all $result.='
-
'; +
+
'; $result.=''; $result .= ''; @@ -530,6 +550,7 @@ $show_all 'onclick="javascript:setmode(this.form,'."'editxml'".')" />'; $result.='
+
'.&Apache::lonxml::message_location().'
'; return $result; @@ -674,10 +695,8 @@ sub checkout_msg { return (<$lt{'resource'}

$lt{'id_expln'}

- -

$lt{'warning'}

-
- +

$lt{'warning'}

+ @@ -711,7 +730,7 @@ sub firstaccess_msg { my $buttontext = &mt('Show Resource'); my $timertext = &mt('Start Timer?'); $result .= (< +
@@ -904,9 +923,9 @@ sub start_problem { } if ($env{'request.role.adv'}) { $form_tag_start.= - '