[LON-CAPA-cvs] cvs: loncom /interface lonspreadsheet.pm /lonnet/perl lonnet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Thu, 13 Feb 2003 19:07:46 -0000
matthew Thu Feb 13 14:07:46 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
/loncom/interface lonspreadsheet.pm
Log:
Changed &Apache::lonnet::currentdump parameters to make a little more sense.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.325 loncom/lonnet/perl/lonnet.pm:1.326
--- loncom/lonnet/perl/lonnet.pm:1.325 Tue Feb 11 11:42:27 2003
+++ loncom/lonnet/perl/lonnet.pm Thu Feb 13 14:07:46 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.325 2003/02/11 16:42:27 www Exp $
+# $Id: lonnet.pm,v 1.326 2003/02/13 19:07:46 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1755,11 +1755,12 @@
# --------------------------------------------------------------- currentdump
sub currentdump {
- my ($namespace,$udomain,$uname)=@_;
- if (!$udomain) { $udomain = $ENV{'user.domain'}; }
- if (!$uname) { $uname = $ENV{'user.name'}; }
- my $uhome = &homeserver($uname,$udomain);
- my $rep=reply("currentdump:$udomain:$uname:$namespace",$uhome);
+ my ($sname,$sdom,$courseid)=@_;
+ $courseid = $ENV{'request.course.id'} if (! defined($courseid));
+ $sdom = $ENV{'user.domain'} if (! defined($sdom));
+ $sname = $ENV{'user.name'} if (! defined($sname));
+ my $uhome = &homeserver($sname,$sdom);
+ my $rep=reply('currentdump:'.$sdom.':'.$sname.':'.$courseid,$uhome);
return if ($rep =~ /^(error:|no_such_host)/);
#
my %returnhash=();
@@ -1767,7 +1768,7 @@
if ($rep eq "unknown_cmd") {
# an old lond will not know currentdump
# Do a dump and make it look like a currentdump
- my @tmp = &dump($namespace,$udomain,$uname,'.');
+ my @tmp = &dump($courseid,$sdom,$sname,'.');
return if ($tmp[0] =~ /^(error:|no_such_host)/);
my %hash = @tmp;
@tmp=();
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.167 loncom/interface/lonspreadsheet.pm:1.168
--- loncom/interface/lonspreadsheet.pm:1.167 Thu Jan 30 16:35:13 2003
+++ loncom/interface/lonspreadsheet.pm Thu Feb 13 14:07:46 2003
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.167 2003/01/30 21:35:13 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.168 2003/02/13 19:07:46 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1744,6 +1744,7 @@
$self->sett();
my $result = $self->{'safe'}->reval('&calc();');
%{$self->{'values'}} = %{$self->{'safe'}->varglob('sheet_values')};
+# $self->logthis($self->get_errorlog());
return $result;
}
@@ -2540,6 +2541,7 @@
}
next if ($row_is_empty);
}
+ $worksheet->write($rows_output,$cols_output++,$rownum);
$worksheet->write($rows_output,$cols_output++,$label);
if (ref($label)) {
$cols_output = (scalar(@$label));
@@ -3131,9 +3133,9 @@
my %formulas = $self->formulas();
$cachedassess = $self->{'uname'}.':'.$self->{'udom'};
# Get ALL the student preformance data
- my @tmp = &Apache::lonnet::currentdump($self->{'cid'},
+ my @tmp = &Apache::lonnet::currentdump($self->{'uname'},
$self->{'udom'},
- $self->{'uname'});
+ $self->{'cid'});
if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) {
%cachedstores = @tmp;
}