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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 10 Jun 2003 18:17:03 -0000


matthew		Tue Jun 10 14:17:03 2003 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  Fixes to whichuser to pass in symb.  Guy.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.261 loncom/xml/lonxml.pm:1.262
--- loncom/xml/lonxml.pm:1.261	Tue Jun 10 10:33:32 2003
+++ loncom/xml/lonxml.pm	Tue Jun 10 14:17:03 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.261 2003/06/10 14:33:32 albertel Exp $
+# $Id: lonxml.pm,v 1.262 2003/06/10 18:17:03 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1438,6 +1438,7 @@
 # calls to lonnet functions for this setup.
 # - looks for form.grade_ parameters
 sub whichuser {
+  my ($passedsymb)=@_;
   my ($symb,$courseid,$domain,$name,$publicuser);
   if (defined($ENV{'form.grade_symb'})) {
     my $tmp_courseid=$ENV{'form.grade_courseid'};
@@ -1449,7 +1450,11 @@
       $name=$ENV{'form.grade_username'};
     }
   } else {
-      $symb=&Apache::lonnet::symbread();
+      if (!$passedsymb) {
+          $symb=&Apache::lonnet::symbread();
+      } else {
+          $symb=$passedsymb;
+      }
       $courseid=$ENV{'request.course.id'};
       $domain=$ENV{'user.domain'};
       $name=$ENV{'user.name'};