--- loncom/interface/lonfeedback.pm 2010/06/02 14:11:15 1.294
+++ loncom/interface/lonfeedback.pm 2010/06/08 16:56:57 1.296
@@ -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.296 2010/06/08 16:56:57 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -322,6 +322,7 @@ sub list_discussion {
'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 @@ sub list_discussion {
# Print the discusssion
if ($outputtarget eq 'tex') {
$discussion.='{\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.'}}';
} elsif ($outputtarget eq 'export') {
@@ -518,7 +518,6 @@ imscp_v1p1.xsd http://www.imsglobal.org/
$threadinsert='
Reply: '.$thisdepth.'';
}
$discussionitems[$alldiscussion{$post}]=~s/<\/td>
]*)>/$threadinsert<\/td> | /;
- $discussionitems[$alldiscussion{$post}]=~s/]+)>(Edit|Hide|Delete|Reply|Submissions)<\/a>//g;
$discussionitems[$alldiscussion{$post}]=~s/(|<\/b>|<\/a>|]+)>)//g;
$discussionitems[$alldiscussion{$post}]='\vskip 0 mm\noindent\makebox[2 cm][b]{\hrulefill}'.$discussionitems[$alldiscussion{$post}];
@@ -836,6 +835,7 @@ sub action_links_bar {
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 +877,26 @@ ENDDISCUSS
$postingform .= &add_blog_checkbox($crstype);
}
$postingform .= "\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 = ' '.$lt{'newa'}.' ';
- if (@{$currnewattach} > 1) {
- $newattachmsg .= '';
- foreach my $item (@{$currnewattach}) {
- $item =~ m#.*/([^/]+)$#;
- $newattachmsg .= '- '.$1.'
'."\n";
- }
- $newattachmsg .= ' '."\n";
- } else {
- $$currnewattach[0] =~ m#.*/([^/]+)$#;
- $newattachmsg .= ''.$1.' '."\n";
- }
- }
- $postingform .= $newattachmsg;
- $postingform .= &generate_preview_button();
+ if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
+ $newattachmsg = ' '.$lt{'newa'}.' ';
+ if (@{$currnewattach} > 1) {
+ $newattachmsg .= '';
+ foreach my $item (@{$currnewattach}) {
+ $item =~ m#.*/([^/]+)$#;
+ $newattachmsg .= '- '.$1.'
'."\n";
+ }
+ $newattachmsg .= ' '."\n";
+ } else {
+ $$currnewattach[0] =~ m#.*/([^/]+)$#;
+ $newattachmsg .= ''.$1.' '."\n";
+ }
}
+ $postingform .= $newattachmsg;
+ $postingform .= &generate_preview_button();
return $postingform;
}
@@ -1060,7 +1058,7 @@ sub build_posting_display {
} else {
@{$$namesort{$lastname}{$firstname}} = ("$idx");
}
- if (&editing_allowed($escsymb.':::'.$idx,$group)) {
+ if ((&editing_allowed($escsymb.':::'.$idx,$group)) && ($outputtarget ne 'tex')) {
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {
$sender.=' '.&mt('Reply').'';
}
}
- if ($viewgrades) {
+ if (($viewgrades) && ($outputtarget ne 'tex')) {
$vgrlink=&Apache::loncommon::submlink(&mt('Submissions'),
$contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$ressymb);
}
- if ($$dischash{$readkey}=~/\.$idx\./) {
+ if (($$dischash{$readkey}=~/\.$idx\./) && ($outputtarget ne 'tex')) {
$ctlink = '';
} else {
$ctlink = '';
@@ -1255,7 +1253,7 @@ sub build_posting_display {
$$newitem{$idx} = 1;
$$discussionitems[$idx] .= '
- '.&mt('NEW').' | ';
+ '.&mt('NEW').' | ';
} else {
$$newitem{$idx} = 0;
$$discussionitems[$idx] .= '
|