[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm loncommon.pm /xml lonxml.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 13 Sep 2002 20:46:09 -0000


www		Fri Sep 13 16:46:09 2002 EDT

  Modified files:              
    /loncom/interface	lonaboutme.pm loncommon.pm 
    /loncom/xml	lonxml.pm 
  Log:
  Bug 770
  
  
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.5 loncom/interface/lonaboutme.pm:1.6
--- loncom/interface/lonaboutme.pm:1.5	Fri Sep 13 15:40:48 2002
+++ loncom/interface/lonaboutme.pm	Fri Sep 13 16:46:09 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "About Me" Personal Information
 #
-# $Id: lonaboutme.pm,v 1.5 2002/09/13 19:40:48 www Exp $
+# $Id: lonaboutme.pm,v 1.6 2002/09/13 20:46:09 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -69,8 +69,13 @@
     my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
     $r->print(&Apache::loncommon::bodytag
                            ("Personal Information",$forcestudent,'','',$cdom));
-    $r->print('<h1>'.&Apache::loncommon::plainname($cnum,$cdom).'</h1><h3>'.
-              $Apache::lonnet::domaindescription{$cdom}.'</h3>'.
+    $r->print('<h1>'.&Apache::loncommon::plainname($cnum,$cdom).'</h1>');
+    if ($courseenv{'nickname'}) {
+       $r->print(
+         '<h2>&quot;'.&Apache::lonnet::unescape($courseenv{'nickname'}).
+         '&quot;</h2>');
+    }
+    $r->print('<h3>'.$Apache::lonnet::domaindescription{$cdom}.'</h3>'.
     '<p>'.&Apache::loncommon::messagewrapper('Send me a message',$cnum,$cdom).
     '</p>');
     my %syllabus=&Apache::lonnet::dump('aboutme',$cdom,$cnum);
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.66 loncom/interface/loncommon.pm:1.67
--- loncom/interface/loncommon.pm:1.66	Fri Sep 13 15:32:09 2002
+++ loncom/interface/loncommon.pm	Fri Sep 13 16:46:09 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.66 2002/09/13 19:32:09 www Exp $
+# $Id: loncommon.pm,v 1.67 2002/09/13 20:46:09 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -981,7 +981,7 @@
     my ($uname,$udom)=@_;
     my %names=&Apache::lonnet::get('environment',
   ['nickname','firstname','middlename','lastname','generation'],$udom,$uname);
-    my $name=$names{'nickname'};
+    my $name=&Apache::lonnet::unescape($names{'nickname'});
     if ($name) {
        $name='&quot;'.$name.'&quot;'; 
     } else {
@@ -1000,7 +1000,7 @@
     my ($uname,$udom)=@_;
     my %names=
  &Apache::lonnet::get('environment',['screenname'],$udom,$uname);
-    return $names{'screenname'};
+    return &Apache::lonnet::unescape($names{'screenname'});
 }
 
 # ------------------------------------------------------------- Message Wrapper
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.195 loncom/xml/lonxml.pm:1.196
--- loncom/xml/lonxml.pm:1.195	Wed Sep 11 09:36:50 2002
+++ loncom/xml/lonxml.pm	Fri Sep 13 16:46:09 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.195 2002/09/11 13:36:50 www Exp $
+# $Id: lonxml.pm,v 1.196 2002/09/13 20:46:09 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -186,17 +186,24 @@
                   if ($hidden) {
 		      $message='<font color="#888888">'.$message.'</font>';
                   }
+                  my $screenname=&Apache::loncommon::screenname(
+                               $contrib{$idx.':sendername'},
+			       $contrib{$idx.':senderdomain'});
+                  my $plainname=&Apache::loncommon::nickname(
+                               $contrib{$idx.':sendername'},
+			       $contrib{$idx.':senderdomain'});
+
                   my $sender='Anonymous';
                   if ((!$contrib{$idx.':anonymous'}) || ($seeid)) {
                       $sender=&Apache::loncommon::aboutmewrapper(
-                               $contrib{$idx.':plainname'},
+                               $plainname,
                                $contrib{$idx.':sendername'},
                                $contrib{$idx.':senderdomain'}).' ('.
                               $contrib{$idx.':sendername'}.' at '.
 		      $contrib{$idx.':senderdomain'}.')';
                       if ($contrib{$idx.':anonymous'}) {
 			  $sender.=' [anonymous] '.
-                                     $contrib{$idx.':screenname'};
+                                     $screenname;
                       }
                       if ($seeid) {
 			  if ($hidden) {
@@ -208,8 +215,8 @@
 			  }
                       }                   
                   } else {
-                      if ($contrib{$idx.':screenname'}) {
-			  $sender='<i>'.$contrib{$idx.':screenname'}.'</i>';
+                      if ($screenname) {
+			  $sender='<i>'.$screenname.'</i>';
                       }
                   }
 		  $discussion.='<p><b>'.$sender.'</b> ('.