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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 15 Sep 2004 06:17:11 -0000


albertel		Wed Sep 15 02:17:11 2004 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  - eliminate the get call on disc prefs, already in $ENV
  
  -  elimintate the screnname/plainname calls already have them in the message
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.125 loncom/interface/lonfeedback.pm:1.126
--- loncom/interface/lonfeedback.pm:1.125	Mon Sep 13 08:49:42 2004
+++ loncom/interface/lonfeedback.pm	Wed Sep 15 02:17:11 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.125 2004/09/13 12:49:42 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.126 2004/09/15 06:17:11 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -165,13 +165,10 @@
     }
 
 # Get discussion display default settings for user
-    my %userenv = &Apache::lonnet::get('environment',['discdisplay','discmarkread'],$ENV{'user.domain'},$ENV{'user.name'});
-    my $discdisplay=$userenv{'discdisplay'};
-    if ($discdisplay eq 'unread') {
+    if ($ENV{'environment.discdisplay'} eq 'unread') {
         $showonlyunread = 1;
     }
-    my $discmarkread=$userenv{'discmarkread'};
-    if ($discmarkread eq 'ondisp') {
+    if ($ENV{'environment.discmarkread'} eq 'ondisp') {
         $markondisp = 1;
     }
 
@@ -1054,12 +1051,14 @@
            return $discussion;
        } 
     }
-    $$screenname=&Apache::loncommon::screenname(
-                                        $$contrib{$idx.':sendername'},
-                                        $$contrib{$idx.':senderdomain'});
-    $$plainname=&Apache::loncommon::nickname(
-                                        $$contrib{$idx.':sendername'},
-                                        $$contrib{$idx.':senderdomain'});
+#    $$screenname=&Apache::loncommon::screenname(
+#                                        $$contrib{$idx.':sendername'},
+#                                        $$contrib{$idx.':senderdomain'});
+#    $$plainname=&Apache::loncommon::nickname(
+#                                        $$contrib{$idx.':sendername'},
+#                                        $$contrib{$idx.':senderdomain'});
+    ($$screenname,$$plainname)=($$contrib{$idx.':screenname'},
+				$$contrib{$idx.':plainname'});
     my $sender=&Apache::loncommon::aboutmewrapper(
                                  $$plainname,
                                  $$contrib{$idx.':sendername'},