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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 17 Nov 2005 20:04:19 -0000


albertel		Thu Nov 17 15:04:19 2005 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
    /loncom/xml	lonxml.pm 
  Log:
  - increasing use of plainname
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.266 loncom/interface/lonparmset.pm:1.267
--- loncom/interface/lonparmset.pm:1.266	Mon Nov 14 09:01:52 2005
+++ loncom/interface/lonparmset.pm	Thu Nov 17 15:04:05 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.266 2005/11/14 14:01:52 www Exp $
+# $Id: lonparmset.pm,v 1.267 2005/11/17 20:04:05 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1573,10 +1573,7 @@
 Specifically for
 ENDMAPONE
                 if ($uname) {
-                    my %name=&Apache::lonnet::userenvironment($udom,$uname,
-                      ('firstname','middlename','lastname','generation', 'id'));
-                    my $person=$name{'firstname'}.' '.$name{'middlename'}.' '
-                           .$name{'lastname'}.' '.$name{'generation'};
+		    my $person=&Apache::loncommon::plainname($uname,$udom);
                     $r->print(&mt("User")." <font color=\"red\"><i>$uname \($person\) </i></font> ".
                         &mt('in')." \n");
                 } else {
@@ -1654,10 +1651,7 @@
 <font color="red"><i>$coursename</i></font><br />
 ENDMAPONE
             if ($uname) {
-                my %name=&Apache::lonnet::userenvironment($udom,$uname,
-                  ('firstname','middlename','lastname','generation', 'id'));
-                my $person=$name{'firstname'}.' '.$name{'middlename'}.' '
-                       .$name{'lastname'}.' '.$name{'generation'};
+		my $person=&Apache::loncommon::plainname($uname,$udom);
                 $r->print(" ".&mt("User")."<font color=\"red\"> <i>$uname \($person\) </i></font> \n");
             } else {
                 $r->print("<i><font color=\"red\"> ".&mt("ALL")."</i> ".&mt("USERS")."</font> \n");
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.389 loncom/xml/lonxml.pm:1.390
--- loncom/xml/lonxml.pm:1.389	Tue Nov 15 11:38:12 2005
+++ loncom/xml/lonxml.pm	Thu Nov 17 15:04:19 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.389 2005/11/15 16:38:12 albertel Exp $
+# $Id: lonxml.pm,v 1.390 2005/11/17 20:04:19 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -272,13 +272,7 @@
         $tcrsid=$courseid;
     }
 
-    my %reply=&Apache::lonnet::get('environment',
-              ['firstname','middlename','lastname','generation'],
-              $tudom,$tuname);
-    my $plainname=$reply{'firstname'}.' '. 
-                  $reply{'middlename'}.' '.
-                  $reply{'lastname'}.' '.
-		  $reply{'generation'};
+    my $plainname=&Apache::loncommon::plainname($tuname,$tudom);
 
     if ($target eq 'web') {
         my %idhash=&Apache::lonnet::idrget($tudom,($tuname));