--- loncom/homework/structuretags.pm 2010/01/29 15:33:02 1.444.4.4
+++ loncom/homework/structuretags.pm 2009/06/09 12:56:27 1.449
@@ -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.4 2010/01/29 15:33:02 raeburn Exp $
+# $Id: structuretags.pm,v 1.449 2009/06/09 12:56:27 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,31 +226,31 @@ 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')) {
my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser();
if ($symb eq '' && !$publicuser) {
- $page_start .= '
'
- .&mt('Browsing resource, all submissions are temporary.')
- .'
';
- }
+ 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') {
@@ -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.='
- ';
return $result;
@@ -902,16 +906,14 @@ sub start_problem {
'';
}
- if ($env{'request.role.adv'}) {
- $form_tag_start.= ' '
- .' '
- .&mt('Show All Foils')
- .'';
-
+ if ($env{'request.role.adv'}) {
+ $form_tag_start.=
+ ' '.&mt(' Show All Foils').
+ '';
}
if ($Apache::lonhomework::type eq 'practice') {
$form_tag_start.=&practice_problem_header();
@@ -1068,7 +1070,7 @@ sub end_problem {
# it in the problem header. We have been logging the
# last due date written to file.
- my $duetime = &Apache::lonnet::EXT("resource.$id.duedate");
+ my $duetime = &Apache::lonnet::EXT("resource.$id.duedate");
my $duedate = POSIX::strftime("%c",localtime($duetime));
my $duedate_text = &mt('Due date: [_1]'
,&Apache::lonlocal::locallocaltime($duetime));
@@ -1106,9 +1108,7 @@ sub end_problem {
'\textit{'.$duedate_text.'} '.$toc_line;
} else {
$frontmatter.= $begin_doc.$toc_line;
- if ($Apache::lonhomework::type eq 'exam' and $allow_print_points==1) {
- $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';
- }
+ if ($Apache::lonhomework::type eq 'exam' and $allow_print_points==1) { $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';}
}
} else {
$frontmatter .= '\vskip 1mm\textit{'.$duedate_text.'} \\\\\\\\'.$startminipage;
@@ -1116,9 +1116,7 @@ sub end_problem {
} else {
if (not $env{'request.symb'} =~ m/\.page_/) {
$frontmatter .= $begin_doc.$toc_line;
- if (($Apache::lonhomework::type eq 'exam') and ($allow_print_points==1)) {
- $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';
- }
+ if (($Apache::lonhomework::type eq 'exam') and ($allow_print_points==1)) { $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';}
} else {
$frontmatter .= '\vskip 1mm \\\\\\\\'.$startminipage;
}
@@ -1760,9 +1758,7 @@ sub start_part {
'.disableexampointprint'}) eq 'yes') {
$allow_print_points=0;
}
- if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) {
- $result .= '\vskip 10mm\fbox{\textit{'.$weight.' pt}}';
- }
+ if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}
} elsif ($target eq 'web') {
$result.='';
}
@@ -2049,9 +2045,10 @@ sub start_simpleeditbutton {
# .&mt('Note: it can take up to 10 minutes for changes to take effect for all users.')
# .&Apache::loncommon::help_open_topic('Caching')
# .'';
- $result .= '
';
+ $result.=&Apache::lontemplate::start_functionslist()
+ .&Apache::lontemplate::item_functionslist(
+ ''.&mt('Edit').'')
+ .&Apache::lontemplate::end_functionslist();
}
return $result;