[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm lonmsg.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 17 Feb 2005 04:39:59 -0000
albertel Wed Feb 16 23:39:59 2005 EDT
Modified files:
/loncom/interface lonfeedback.pm lonmsg.pm
Log:
- Fixes the WYSIWIG problems, the problem is since we are setting the encoding to UTF-8 on the homewor page, adn we _aren't_ setting it on the feed back generation page, when the WYSIWIG editor generates a it becoms what ever rthe local encoding that was randomlypicked represents as a non-breaking space. Which muck things up to hell and back. So the fix is set the encoding to UTF-8 everywhere.
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.151 loncom/interface/lonfeedback.pm:1.152
--- loncom/interface/lonfeedback.pm:1.151 Wed Feb 16 23:11:20 2005
+++ loncom/interface/lonfeedback.pm Wed Feb 16 23:39:58 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.151 2005/02/17 04:11:20 albertel Exp $
+# $Id: lonfeedback.pm,v 1.152 2005/02/17 04:39:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1436,9 +1436,12 @@
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
my $send=&mt('Send');
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print(<<END);
-<html>
+$html
<head>
+$encoding
<title>The LearningOnline Network with CAPA</title>
<meta http-equiv="pragma" content="no-cache"></meta>
$htmlheader
@@ -1661,9 +1664,12 @@
$currtogg = $lt{'toggon'};
$disctogg = 'toggon';
}
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print(<<END);
-<html>
+$html
<head>
+$encoding
<title>$lt{'dido'}</title>
<meta http-equiv="pragma" content="no-cache" />
<script>
@@ -1843,10 +1849,12 @@
my %role_types = ();
my %status_types = ();
&sort_filter_names(\%sort_types,\%role_types,\%status_types);
-
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print(<<END);
-<html>
+$html
<head>
+$encoding
<title>$lt{'diso'}</title>
<meta http-equiv="pragma" content="no-cache" />
<script type="text/javascript">
@@ -1996,9 +2004,12 @@
}
}
}
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print(<<END);
-<html>
+$html
<head>
+$encoding
<title>$lt{'diso'}</title>
<meta http-equiv="pragma" content="no-cache" />
</head>
@@ -2109,9 +2120,13 @@
my ($r,$feedurl) = @_;
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' };
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print (<<ENDFAILREDIR);
-<html>
-<head><title>Feedback not sent</title>
+$html
+<head>
+$encoding
+<title>Feedback not sent</title>
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />
</head>
@@ -2195,9 +2210,12 @@
}
$feedurl=&Apache::lonenc::check_encrypt($feedurl);
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print (<<ENDREDIR);
-<html>
+$html
<head>
+$encoding
<title>Feedback sent</title>
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />
@@ -2225,9 +2243,13 @@
my ($r,$feedurl) = @_;
my $nofeed=&mt('Sorry, no feedback possible on this resource ...');
my $continue=&mt('Continue');
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print (<<ENDNOREDIR);
-<html>
-<head><title>Feedback not sent</title>
+$html
+<head>
+$encoding
+<title>Feedback not sent</title>
<meta http-equiv="pragma" content="no-cache" />
ENDNOREDIR
@@ -2606,9 +2628,12 @@
&extract_attachments($attachmenturls,$idx,$numoldver,\$msg,\%attachments,\%currattach,$currdelold);
}
&Apache::lonenc::check_encrypt(\$symb);
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print(<<END);
-<html>
+$html
<head>
+$encoding
<title>Managing Attachments</title>
<script>
function setAction () {
@@ -2957,10 +2982,13 @@
if ($ENV{'form.allversions'}) {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
my $bodytag=&Apache::loncommon::bodytag('Discussion Post Versions');
$r->print(<<END);
-<html>
+$html
<head>
+$encoding
<title>Post Versions</title>
<meta http-equiv="pragma" content="no-cache" />
</head>
@@ -3060,9 +3088,12 @@
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
+ my $html=&Apache::lonxml::xmlbegin();
+ my $encoding=&Apache::lonxml::fontsettings();
$r->print (<<ENDREDIR);
-<html>
+$html
<head>
+$encoding
<title>New posts marked as read</title>
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.136 loncom/interface/lonmsg.pm:1.137
--- loncom/interface/lonmsg.pm:1.136 Wed Feb 16 23:11:21 2005
+++ loncom/interface/lonmsg.pm Wed Feb 16 23:39:58 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.136 2005/02/17 04:11:21 albertel Exp $
+# $Id: lonmsg.pm,v 1.137 2005/02/17 04:39:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1847,7 +1847,9 @@
sub header {
my ($r,$title,$baseurl)=@_;
- $r->print('<html><head><title>Communication and Messages</title>');
+ $r->print(&Apache::lonxml::xmlbegin().
+ '<head>'.&Apache::lonxml::fontsettings().
+ '<title>Communication and Messages</title>');
if ($baseurl) {
$r->print("<base href=\"http://$ENV{'SERVER_NAME'}/$baseurl\" />");
}
@@ -1887,7 +1889,8 @@
my ($r)=@_;
my %msgs=&Apache::lonnet::dump('nohist_stored_comments',undef,undef,
'^'.&Apache::lonnet::escape(&Apache::lonnet::escape($ENV{'form.showcommentbaseurl'})));
- $r->print('<html><body>');
+ $r->print(&Apache::lonxml::xmlbegin().'<head>'.
+ &Apache::lonxml::fontsettings().'</head><body>');
if ((keys %msgs)[0]=~/^error\:/) {
$r->print(&mt('No stored comments yet.'));
} else {