[LON-CAPA-cvs] cvs: loncom(version_0_6) /interface lonspreadsheet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 14 Mar 2003 21:36:42 -0000
albertel Fri Mar 14 16:36:42 2003 EDT
Modified files: (Branch: version_0_6)
/loncom/interface lonspreadsheet.pm
Log:
- matthews fix for sections info being dropped
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.160.2.1 loncom/interface/lonspreadsheet.pm:1.160.2.2
--- loncom/interface/lonspreadsheet.pm:1.160.2.1 Fri Mar 14 16:34:04 2003
+++ loncom/interface/lonspreadsheet.pm Fri Mar 14 16:36:42 2003
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.160.2.1 2003/03/14 21:34:04 albertel Exp $
+# $Id: lonspreadsheet.pm,v 1.160.2.2 2003/03/14 21:36:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1882,6 +1882,14 @@
$sheet->{'mapid'} = $ENV{'form.mapid'};
$sheet->{'resid'} = $ENV{'form.resid'};
$sheet->{'cid'} = $ENV{'request.course.id'};
+ if (! exists($Section{$uname.':'.$udom})) {
+ my $classlist = &Apache::loncoursedata::get_classlist();
+ foreach my $student (keys(%$classlist)) {
+ my ($studentDomain,$studentName,undef,undef,undef,$studentSection,
+ undef,undef) = @{$classlist->{$student}};
+ $Section{$studentName.':'.$studentDomain} = $studentSection;
+ }
+ }
$sheet->{'csec'} = $Section{$uname.':'.$udom};
$sheet->{'coursefilename'} = $ENV{'request.course.fn'};
$sheet->{'cnum'} = $ENV{'course.'.$ENV{'request.course.id'}.'.num'};
@@ -3231,6 +3239,7 @@
$oldsheets{'course'} ne $sheet->{'cid'}) {
undef %oldsheets;
undef %loadedcaches;
+ undef %Section;
}
$oldsheets{'course'} = $sheet->{'cid'};
#