[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 21 Nov 2003 21:31:34 -0000
albertel Fri Nov 21 16:31:34 2003 EDT
Modified files:
/loncom/homework grades.pm
Log:
- some times I am getting multiple commands to grades.pm But I am not sure why yet, log these in hopes of figuruing it out
- BUG#2370, strip ws from username/domain from csv uploaded grades
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.159 loncom/homework/grades.pm:1.160
--- loncom/homework/grades.pm:1.159 Wed Nov 12 16:37:07 2003
+++ loncom/homework/grades.pm Fri Nov 21 16:31:34 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.159 2003/11/12 21:37:07 albertel Exp $
+# $Id: grades.pm,v 1.160 2003/11/21 21:31:34 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2840,7 +2840,9 @@
foreach my $grade (@gradedata) {
my %entries=&Apache::loncommon::record_sep($grade);
my $username=$entries{$fields{'username'}};
+ $username=~s/\s//g;
my $domain=$entries{$fields{'domain'}};
+ $domain=~s/\s//g;
if (!exists($$classlist{"$username:$domain"})) {
push(@skipped,"$username:$domain");
next;
@@ -4405,7 +4407,11 @@
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
my $url=$ENV{'form.url'};
my $symb=$ENV{'form.symb'};
- my $command=$ENV{'form.command'};
+ my @commands=&Apache::loncommon::get_env_multiple('form.command');
+ my $command=$commands[0];
+ if ($#commands > 0) {
+ &Apache::lonnet::logthis("grades got multiple commands ".join(':',@commands));
+ }
if (!$url) {
my ($temp1,$temp2);
($temp1,$temp2,$ENV{'form.url'})=&Apache::lonnet::decode_symb($symb);