--- loncom/homework/structuretags.pm 2009/11/27 21:20:44 1.444.4.2.2.1 +++ loncom/homework/structuretags.pm 2009/05/28 12:39:17 1.447 @@ -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.4.2.2.1 2009/11/27 21:20:44 www Exp $ +# $Id: structuretags.pm,v 1.447 2009/05/28 12:39:17 bisitz 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,9 @@ sub page_start { if ($env{'environment.remote'} ne 'off') { $body_args{'only_body'} = 1; } + $pageheader = &Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs + .&Apache::loncommon::head_subbox( + &Apache::loncommon::CSTR_pageheader()); } } elsif (!defined($found{'body'})) { my %add_entries; @@ -222,32 +226,32 @@ 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); - -# 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) { -# $page_start .= '

' -# .&mt('Browsing resource, all submissions are temporary.') -# .'

'; -# } -# } + $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 (!defined($found{'body'}) && $env{'request.state'} ne 'construct') { $page_start .= &Apache::lonxml::message_location(); @@ -418,16 +422,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'); + my $show_all_foils_text = + ($Apache::lonhomework::parsing_a_task) ? + &mt(' Show All Instances') + : &mt(' Show All Foils'); - my $show_all= ''; + $show_all.= ' />'.$show_all_foils_text.''; @@ -524,7 +526,8 @@ $show_all $result.=' -
'; +
+
'; $result.=''; $result .= ''; @@ -532,6 +535,7 @@ $show_all 'onclick="javascript:setmode(this.form,'."'editxml'".')" />'; $result.='
+
'.&Apache::lonxml::message_location().'
'; return $result; @@ -676,7 +680,9 @@ sub checkout_msg { return (<$lt{'resource'}

$lt{'id_expln'}

-

$lt{'warning'}

+ +

$lt{'warning'}

+
@@ -894,26 +900,23 @@ sub start_problem { if ($env{'request.state'} ne "construct" && ($symb eq '' || $Apache::lonhomework::type eq 'practice')) { $form_tag_start.=''; -#. -# ''; + $rndseed.'" />'. + ''; if (exists($env{'form.username'})) { $form_tag_start.= ''; } -# if ($env{'request.role.adv'}) { -# $form_tag_start.= '