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

www lon-capa-cvs@mail.lon-capa.org
Wed, 03 Apr 2002 18:47:39 -0000


www		Wed Apr  3 13:47:39 2002 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm lonpreferences.pm 
    /loncom/xml	lonxml.pm 
  Log:
  Screennames
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.25 loncom/interface/lonfeedback.pm:1.26
--- loncom/interface/lonfeedback.pm:1.25	Tue Mar 26 11:15:34 2002
+++ loncom/interface/lonfeedback.pm	Wed Apr  3 13:47:39 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.25 2002/03/26 16:15:34 www Exp $
+# $Id: lonfeedback.pm,v 1.26 2002/04/03 18:47:39 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -323,7 +323,12 @@
 
     my %contrib=('message'      => $email,
                  'sendername'   => $ENV{'user.name'},
-                 'senderdomain' => $ENV{'user.domain'});
+                 'senderdomain' => $ENV{'user.domain'},
+                 'screenname'   => $ENV{'environment.screenname'},
+                 'plainname'    => $ENV{'environment.firstname'}.' '.
+		                   $ENV{'environment.middlename'}.' '.
+                                   $ENV{'environment.lastname'}.' '.
+                                   $ENV{'enrironment.generation'});
     if ($anon) {
 	$contrib{'anonymous'}='true';
     }
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.6 loncom/interface/lonpreferences.pm:1.7
--- loncom/interface/lonpreferences.pm:1.6	Sat Mar 30 18:27:00 2002
+++ loncom/interface/lonpreferences.pm	Wed Apr  3 13:47:39 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.6 2002/03/30 23:27:00 www Exp $
+# $Id: lonpreferences.pm,v 1.7 2002/04/03 18:47:39 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -137,12 +137,12 @@
     $newscreen=~s/\W//g;
     my $message='';
     if ($newscreen) {
-	my %tmp;
-        $tmp{'screenname'}=$newscreen;
-        &Apache::lonnet::put('environment',\%tmp);
+        &Apache::lonnet::put('environment',{'screenname' => $newscreen});
+        &Apache::lonnet::appenv('environment.screenname' => $newscreen);
         $message='Set new screenname to '.$newscreen;
     } else {
         &Apache::lonnet::del('environment',['screenname']);
+        &Apache::lonnet::delenv('environment\.screenname');
         $message='Reset screenname';
     }
     $r->print(<<ENDVCSCREEN);
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.163 loncom/xml/lonxml.pm:1.164
--- loncom/xml/lonxml.pm:1.163	Fri Mar 29 13:32:46 2002
+++ loncom/xml/lonxml.pm	Wed Apr  3 13:47:39 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.163 2002/03/29 18:32:46 albertel Exp $
+# $Id: lonxml.pm,v 1.164 2002/04/03 18:47:39 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -176,10 +176,12 @@
                   }
                   my $sender='Anonymous';
                   if ((!$contrib{$idx.':anonymous'}) || ($seeid)) {
-                      $sender=$contrib{$idx.':sendername'}.' at '.
-		      $contrib{$idx.':senderdomain'};
+                      $sender=$contrib{$idx.':plainname'}.' ('.
+                              $contrib{$idx.':sendername'}.' at '.
+		      $contrib{$idx.':senderdomain'}.')';
                       if ($contrib{$idx.':anonymous'}) {
-			  $sender.=' (anonymous)';
+			  $sender.=' [anonymous] '.
+                                     $contrib{$idx.':screenname'};
                       }
                       if ($seeid) {
 			  if ($hidden) {
@@ -190,6 +192,10 @@
 				 $symb.':::'.$idx.'">Hide</a>';
 			  }
                       }                   
+                  } else {
+                      if ($contrib{$idx.':screenname'}) {
+			  $sender='<i>'.$contrib{$idx.':screenname'}.'</i>';
+                      }
                   }
 		  $discussion.='<p><b>'.$sender.'</b> ('.
                       localtime($contrib{$idx.':timestamp'}).