--- loncom/interface/lonmsgdisplay.pm 2020/01/10 05:16:30 1.181.2.5
+++ loncom/interface/lonmsgdisplay.pm 2020/11/11 22:04:25 1.181.2.7
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.181.2.5 2020/01/10 05:16:30 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.181.2.7 2020/11/11 22:04:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -782,11 +782,14 @@ sub groupmail_header {
if ($grouppagelink) {
&Apache::lonhtmlcommon::add_breadcrumb
({href=>$grouppagelink,
- text=>"Group: $description",
- title=>"Go to group's home page"},);
+ text=>&mt('Group').": $description",
+ title=>&mt("Go to group's home page"),
+ no_mt=>1,
+ },);
} else {
&Apache::lonhtmlcommon::add_breadcrumb
- ({text=>"Group: $description",});
+ ({text=>&mt('Group').": $description",
+ no_mt=>1,});
}
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"/adm/email?compose=group&group=".
@@ -799,8 +802,9 @@ sub groupmail_header {
title=>"E-mails sent"},);
}
my $groupheader = &Apache::loncommon::start_page('Group Message');
- $groupheader .= &Apache::lonhtmlcommon::breadcrumbs
- ('Group - '.$env{'form.group'}.' Email');
+ $groupheader .= &Apache::lonhtmlcommon::breadcrumbs(
+ &mt('Group messages - [_1]',$description),
+ undef,undef,undef,undef,1);
return $groupheader;
}
@@ -2143,8 +2147,28 @@ sub displaymessage {
my $number_of_messages = scalar(@messages); #subtract 1 for last index
+ my $head_extra;
+
+# if student's view of resource will be included
+# get tag(s) for css file(s) in use, and pass to &header to include
+# in call to loncommon::start_page()
+
+ if (($env{'request.course.id'} eq $content{'courseid'}) &&
+ (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) {
+ my $symb;
+ if (defined($content{'symb'})) {
+ $symb = $content{'symb'};
+ } elsif (defined($content{'baseurl'})) {
+ $symb=&Apache::lonnet::symbread($content{'baseurl'});
+ }
+ if ($symb) {
+ $head_extra = &Apache::loncommon::css_links($symb);
+ }
+ }
+
# start output
- &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'});
+ &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',
+ $content{'baseurl'},$head_extra);
# Prepare available functions
my @functionlist;
@@ -2678,13 +2702,16 @@ sub displayresource {
# ================================================================== The Header
sub header {
- my ($r,$title,$baseurl)=@_;
+ my ($r,$title,$baseurl,$head_extra)=@_;
my $extra = &Apache::loncommon::studentbrowser_javascript();
if ($baseurl) {
$extra .= "";
}
$extra .= '';
+ if ($head_extra) {
+ $extra .= "\n$head_extra";
+ }
$r->print(&Apache::loncommon::start_page('Messages',
$extra));
$r->print(&Apache::lonhtmlcommon::breadcrumbs
@@ -2694,11 +2721,11 @@ sub header {
# ---------------------------------------------------------------- Print header
sub printheader {
- my ($r,$url,$desc,$title,$baseurl)=@_;
+ my ($r,$url,$desc,$title,$baseurl,$head_extra)=@_;
&Apache::lonhtmlcommon::add_breadcrumb
({href=>$url,
text=>$desc});
- &header($r,$title,$baseurl);
+ &header($r,$title,$baseurl,$head_extra);
}
# ------------------------------------------------------------ Store the comment