[LON-CAPA-cvs] cvs: loncom /interface lonbulletin.pm lonfeedback.pm
www
www@source.lon-capa.org
Sat, 05 Jun 2010 22:07:05 -0000
www Sat Jun 5 22:07:05 2010 EDT
Modified files:
/loncom/interface lonbulletin.pm lonfeedback.pm
Log:
Bug #6162: some unused phrases in printouts of discussions
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.59 loncom/interface/lonbulletin.pm:1.60
--- loncom/interface/lonbulletin.pm:1.59 Mon Mar 29 13:34:40 2010
+++ loncom/interface/lonbulletin.pm Sat Jun 5 22:07:05 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Bulletin Board Handler
#
-# $Id: lonbulletin.pm,v 1.59 2010/03/29 13:34:40 raeburn Exp $
+# $Id: lonbulletin.pm,v 1.60 2010/06/05 22:07:05 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -298,7 +298,9 @@
$r->print(&Apache::lonxml::xmlparse($r,'tex','<br/><br/><hr/><br/>'));
}
} else {
- $r->print('<p>'.&mt('No page information provided.').'</p>');
+ if ($target ne 'tex') {
+ $r->print('<p>'.&mt('No page information provided.').'</p>');
+ }
}
#Lists discussion posts and box for a new discussion post.
if ($target ne 'tex') {
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.294 loncom/interface/lonfeedback.pm:1.295
--- loncom/interface/lonfeedback.pm:1.294 Wed Jun 2 14:11:15 2010
+++ loncom/interface/lonfeedback.pm Sat Jun 5 22:07:05 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.294 2010/06/02 14:11:15 www Exp $
+# $Id: lonfeedback.pm,v 1.295 2010/06/05 22:07:05 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -322,6 +322,7 @@
'dpwn' => 'Deleted posts will no longer be visible to you and other students',
'bwco' => 'but will continue to be visible to your instructor',
'depo' => 'Deleted posts will no longer be visible to you or anyone else.',
+ 'discussions' => 'DISCUSSIONS'
);
my $currdisp = $lt{'allposts'};
@@ -373,8 +374,7 @@
# Print the discusssion
if ($outputtarget eq 'tex') {
$discussion.='<tex>{\tiny \vskip 0 mm\noindent\makebox[2 cm][b]{\hrulefill}'.
- '\textbf{DISCUSSIONS}\makebox[2 cm][b]{\hrulefill}'.
- '\vskip 0 mm\noindent\textbf{'.$lt{'cuse'}.'}:\vskip 0 mm'.
+ '\textbf{'.$lt{'discussions'}.'}\makebox[2 cm][b]{\hrulefill}\vskip 0 mm'.
'\noindent\textbf{'.$lt{'disa'}.'}: \textit{'.$currdisp.'}\vskip 0 mm'.
'\noindent\textbf{'.$lt{'npce'}.'}: \textit{'.$currmark.'}}</tex>';
} elsif ($outputtarget eq 'export') {
@@ -836,6 +836,7 @@
sub postingform_display {
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum,
$currnewattach,$currdelold,$group,$crstype) = @_;
+ if ($outputtarget eq 'tex') { return ''; }
my $newattachmsg;
my %lt = &Apache::lonlocal::texthash(
'note' => 'Note: in anonymous discussion, your name is visible only to course faculty',
@@ -877,28 +878,26 @@
$postingform .= &add_blog_checkbox($crstype);
}
$postingform .= "</form>\n";
- if ($outputtarget ne 'tex') {
- $postingform .= &generate_attachments_button('',$attachnum,$ressymb,
+ $postingform .= &generate_attachments_button('',$attachnum,$ressymb,
$now,$currnewattach,
$currdelold,'',$mode,
$blockblog);
- if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
- $newattachmsg = '<br /><b>'.$lt{'newa'}.'</b><br />';
- if (@{$currnewattach} > 1) {
- $newattachmsg .= '<ol>';
- foreach my $item (@{$currnewattach}) {
- $item =~ m#.*/([^/]+)$#;
- $newattachmsg .= '<li><a href="'.$item.'">'.$1.'</a></li>'."\n";
- }
- $newattachmsg .= '</ol>'."\n";
- } else {
- $$currnewattach[0] =~ m#.*/([^/]+)$#;
- $newattachmsg .= '<a href="'.$$currnewattach[0].'">'.$1.'</a><br />'."\n";
- }
- }
- $postingform .= $newattachmsg;
- $postingform .= &generate_preview_button();
+ if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
+ $newattachmsg = '<br /><b>'.$lt{'newa'}.'</b><br />';
+ if (@{$currnewattach} > 1) {
+ $newattachmsg .= '<ol>';
+ foreach my $item (@{$currnewattach}) {
+ $item =~ m#.*/([^/]+)$#;
+ $newattachmsg .= '<li><a href="'.$item.'">'.$1.'</a></li>'."\n";
+ }
+ $newattachmsg .= '</ol>'."\n";
+ } else {
+ $$currnewattach[0] =~ m#.*/([^/]+)$#;
+ $newattachmsg .= '<a href="'.$$currnewattach[0].'">'.$1.'</a><br />'."\n";
+ }
}
+ $postingform .= $newattachmsg;
+ $postingform .= &generate_preview_button();
return $postingform;
}
@@ -1255,7 +1254,7 @@
$$newitem{$idx} = 1;
$$discussionitems[$idx] .= '
<table border="0" width="100%">
- <tr><td align="left"><font color="#FF0000"><b>'.&mt('NEW').'</b></font></td>';
+ <tr><td align="left"><font color="#FF0000"><b>'.&mt('NEW').' </b></font></td>';
} else {
$$newitem{$idx} = 0;
$$discussionitems[$idx] .= '