[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm

www www@source.lon-capa.org
Tue, 08 Jun 2010 16:56:58 -0000


www		Tue Jun  8 16:56:58 2010 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Bug #6162: Internationalizable removal of function links during printout
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.295 loncom/interface/lonfeedback.pm:1.296
--- loncom/interface/lonfeedback.pm:1.295	Sat Jun  5 22:07:05 2010
+++ loncom/interface/lonfeedback.pm	Tue Jun  8 16:56:57 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.295 2010/06/05 22:07:05 www Exp $
+# $Id: lonfeedback.pm,v 1.296 2010/06/08 16:56:57 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -518,7 +518,6 @@
 			$threadinsert='<br /><strong>Reply: '.$thisdepth.'</strong>';
 		    }
 		    $discussionitems[$alldiscussion{$post}]=~s/<\/td><td([^>]*)>/$threadinsert<\/td><td TeXwidth="65 mm" align="left">/;
-		    $discussionitems[$alldiscussion{$post}]=~s/<a([^>]+)>(Edit|Hide|Delete|Reply|Submissions)<\/a>//g;
                     $discussionitems[$alldiscussion{$post}]=~s/(<b>|<\/b>|<\/a>|<a([^>]+)>)//g;
 
 		    $discussionitems[$alldiscussion{$post}]='<tex>\vskip 0 mm\noindent\makebox[2 cm][b]{\hrulefill}</tex>'.$discussionitems[$alldiscussion{$post}];
@@ -1059,7 +1058,7 @@
                             } 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.=' <a href="/adm/feedback?editdisc='.
                                          $escsymb.':::'.$idx;
@@ -1076,7 +1075,7 @@
                                     }
                                 }
                             } 
-			    if ($seeid) {
+			    if (($seeid) && ($outputtarget ne 'tex')) {
 			        if ($hidden) {
                                     unless ($studenthidden) {
 			                $sender.=' <a href="/adm/feedback?unhide='.
@@ -1126,7 +1125,7 @@
                                 @{$$namesort{'__anon'}{'__anon'}} = ("$idx");
                             }
 		        }
-		        if (&discussion_open($status)) {
+		        if ((&discussion_open($status)) && ($outputtarget ne 'tex')) {
                             if (($group ne '') && 
                                 (&check_group_priv($group,'pgd') eq 'ok')) {
                                  $sender.=' <a href="/adm/feedback?replydisc='.
@@ -1148,11 +1147,11 @@
                                 $sender .= '" '.$target.'>'.&mt('Reply').'</a>';
                             }
                         }
-		        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 = '<label><b>'.&mt('Mark unread').'?</b>&nbsp;<input type="checkbox" name="postunread_'.$idx.'" /></label>';
                         } else {
                             $ctlink = '<label><b>'.&mt('Mark read').'?</b>&nbsp;<input type="checkbox" name="postread_'.$idx.'" /></label>';