[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm lonbulletin.pm lonchatfetch.pm lonmenu.pm lonmsg.pm lonpreferences.pm lonsimplepage.pm lonsyllabus.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 06 Jun 2005 02:29:48 -0000
This is a MIME encoded message
--albertel1118024988
Content-Type: text/plain
albertel Sun Jun 5 22:29:48 2005 EDT
Modified files:
/loncom/interface lonaboutme.pm lonbulletin.pm lonchatfetch.pm
lonmenu.pm lonmsg.pm lonpreferences.pm
lonsimplepage.pm lonsyllabus.pm
Log:
- more bug#2667 fix up all of the other paces doing the blind \n to <br /> tranlation
--albertel1118024988
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20050605222948.txt"
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.37 loncom/interface/lonaboutme.pm:1.38
--- loncom/interface/lonaboutme.pm:1.37 Thu Apr 7 02:56:22 2005
+++ loncom/interface/lonaboutme.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "About Me" Personal Information
#
-# $Id: lonaboutme.pm,v 1.37 2005/04/07 06:56:22 albertel Exp $
+# $Id: lonaboutme.pm,v 1.38 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -181,7 +181,7 @@
foreach (sort keys %syllabusfields) {
if (($syllabus{$_}) || ($allowed)) {
my $message=$syllabus{$_};
- $message=~s/\n/\<br \/\>/g;
+ &Apache::lonfeedback::newline_to_br(\$message);
$message
=~s/(http\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
if ($allowed) {
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.29 loncom/interface/lonbulletin.pm:1.30
--- loncom/interface/lonbulletin.pm:1.29 Thu Apr 7 02:56:22 2005
+++ loncom/interface/lonbulletin.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Bulletin Board Handler
#
-# $Id: lonbulletin.pm,v 1.29 2005/04/07 06:56:22 albertel Exp $
+# $Id: lonbulletin.pm,v 1.30 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -169,8 +169,8 @@
foreach (sort keys %syllabusfields) {
if (($syllabus{$_}) || ($allowed)) {
my $message=$syllabus{$_};
- $message=~s/\n/\<br \/\>/g;
- $message
+ &Apache::lonfeedback::newline_to_br(\$message);
+ $message
=~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
$message=&Apache::lontexconvert::msgtexconverted($message);
if ($allowed) {
Index: loncom/interface/lonchatfetch.pm
diff -u loncom/interface/lonchatfetch.pm:1.17 loncom/interface/lonchatfetch.pm:1.18
--- loncom/interface/lonchatfetch.pm:1.17 Thu Apr 7 02:56:22 2005
+++ loncom/interface/lonchatfetch.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Chat Fetching
#
-# $Id: lonchatfetch.pm,v 1.17 2005/04/07 06:56:22 albertel Exp $
+# $Id: lonchatfetch.pm,v 1.18 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -103,7 +103,7 @@
my ($sdom,$snum,$anon,$contrib)=split(/\:/,
&Apache::lonnet::unescape($msg));
$contrib=&Apache::lonnet::unescape($contrib);
- $contrib=~s/\n/\<br \/\>/g;
+ &Apache::lonfeedback::newline_to_br(\$contrib);
($contrib,my $errors)=&Apache::lontexconvert::msgtexconverted($contrib);
if ($errors) { $contrib.="[Message not fully displayed due to incorrect embedded TeX]"; }
if ($errors && $snum eq $env{'user.name'} &&
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.152 loncom/interface/lonmenu.pm:1.153
--- loncom/interface/lonmenu.pm:1.152 Thu Apr 7 02:56:23 2005
+++ loncom/interface/lonmenu.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.152 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonmenu.pm,v 1.153 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -304,10 +304,11 @@
$newmail='<font face="Arial,Helvetica,sans-serif"><table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td bgcolor="'.$tabbg.'">';
}
if (($textual) && ($env{'request.symb'}) && ($env{'request.course.id'})) {
- my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($env{'request.symb'});
+ my ($mapurl,$rid,$resurl)=
+ &Apache::lonnet::decode_symb(&Apache::lonnet::symbread());
$newmail.=$env{'course.'.$env{'request.course.id'}.'.description'};
my $maptitle=&Apache::lonnet::gettitle($mapurl);
- my $restitle=&Apache::lonnet::gettitle($resurl);
+ my $restitle=&Apache::lonnet::gettitle(&Apache::lonnet::symbread());
if ($maptitle && $maptitle ne 'default.sequence') {
$newmail.=', '.$maptitle;
}
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.144 loncom/interface/lonmsg.pm:1.145
--- loncom/interface/lonmsg.pm:1.144 Sat Jun 4 17:11:30 2005
+++ loncom/interface/lonmsg.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.144 2005/06/04 21:11:30 albertel Exp $
+# $Id: lonmsg.pm,v 1.145 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1236,8 +1236,8 @@
my %content=&unpackagemsg($records{$_});
next if ($content{'senderdomain'} eq '');
next if ($content{'subject'} !~ /^Record/);
- # $content{'message'}=~s/\n/\<br\>/g;
- $result.='Recorded by '.
+ # &Apache::lonfeedback::newline_to_br(\$content{'message'});
+ $result.='Recorded by '.
$content{'sendername'}.'@'.$content{'senderdomain'}."\n";
$result.=
&Apache::lontexconvert::msgtexconverted($content{'message'})."\n";
@@ -1260,7 +1260,7 @@
foreach (sort keys %records) {
my %content=&unpackagemsg($records{$_});
next if ($content{'senderdomain'} eq '');
- $content{'message'}=~s/\n/\<br\>/g;
+ &Apache::lonfeedback::newline_to_br(\$content{'message'});
if ($content{'subject'}=~/^Record/) {
$result.='<h3>'.&mt('Record').'</h3>';
} elsif ($content{'subject'}=~/^Broadcast/) {
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.59 loncom/interface/lonpreferences.pm:1.60
--- loncom/interface/lonpreferences.pm:1.59 Thu Apr 7 02:56:23 2005
+++ loncom/interface/lonpreferences.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.59 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonpreferences.pm,v 1.60 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1155,7 +1155,7 @@
}));
- if ($env{'user.name'} =~ /^(albertel|fox|foxr|koretemey|korte|hallmat3|turtle)$/) {
+ if ($env{'user.name'} =~ /^(megan|albertel|fox|foxr|koretemey|korte|hallmat3|turtle)$/) {
push (@Options,({ action => 'debugtoggle',
printmenu => 'yes',
subroutine => \&toggle_debug,
@@ -1191,7 +1191,7 @@
if (($printmenu eq 'yes') && (!$env{'form.returnurl'})) {
my $optionlist = '<table cellpadding="5">';
if ($env{'user.name'} =~
- /^(albertel|kortemey|fox|foxr|korte|hallmat3|turtle)$/
+ /^(megan|albertel|kortemey|fox|foxr|korte|hallmat3|turtle)$/
) {
push (@Options,({ action => 'debugtoggle',
linktext => 'Toggle Debug Messages',
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.25 loncom/interface/lonsimplepage.pm:1.26
--- loncom/interface/lonsimplepage.pm:1.25 Thu Apr 7 02:56:23 2005
+++ loncom/interface/lonsimplepage.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Simple Page Editor
#
-# $Id: lonsimplepage.pm,v 1.25 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonsimplepage.pm,v 1.26 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -176,7 +176,7 @@
foreach (sort keys %syllabusfields) {
if (($syllabus{$_}) || ($allowed)) {
my $message=$syllabus{$_};
- $message=~s/\n/\<br \/\>/g;
+ &Apache::lonfeedback::newline_to_br(\$message);
$message
=~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
$message=&Apache::lontexconvert::msgtexconverted($message);
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.40 loncom/interface/lonsyllabus.pm:1.41
--- loncom/interface/lonsyllabus.pm:1.40 Thu Apr 7 02:56:23 2005
+++ loncom/interface/lonsyllabus.pm Sun Jun 5 22:29:46 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.40 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonsyllabus.pm,v 1.41 2005/06/06 02:29:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -285,7 +285,7 @@
$r->print($message);
}
} else {
- $message=~s/\n/\<br \/\>/g;
+ &Apache::lonfeedback::newline_to_br(\$message);
$message
=~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
if ($allowed) {
--albertel1118024988--