--- loncom/interface/Attic/lonspreadsheet.pm 2003/03/11 15:00:47 1.177 +++ loncom/interface/Attic/lonspreadsheet.pm 2003/03/20 19:10:27 1.178 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.177 2003/03/11 15:00:47 albertel Exp $ +# $Id: lonspreadsheet.pm,v 1.178 2003/03/20 19:10:27 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -152,9 +152,9 @@ sub handler { $ENV{'form.ufn'} eq 'default')) { $ENV{'form.ufn'}='default_'.$1; } - if (!$ENV{'form.ufn'} || $ENV{'form.ufn'} eq 'default') { - $ENV{'form.ufn'}='course_default_'.$sheettype; - } +# if (!$ENV{'form.ufn'} || $ENV{'form.ufn'} eq 'default') { +# $ENV{'form.ufn'}='course_default_'.$sheettype; +# } # # Interactive loading of specific sheet? # @@ -352,6 +352,7 @@ ENDSCRIPT $oldsheets{'course'} ne $sheet->{'cid'}) { undef %oldsheets; undef %loadedcaches; + &Apache::lonspreadsheet::Spreadsheet::clear_package_variables(); } $oldsheets{'course'} = $sheet->{'cid'}; # @@ -534,6 +535,25 @@ my %defaultsheets; my %rowlabel_cache; #my %oldsheets; +sub clear_package_variables { + undef %courseopt; + undef %useropt; + undef %parmhash; + undef %Section; + undef %expiredates; + undef $cachedassess; + undef %cachedstores; + undef %starttimes; + undef %usedtimes; + undef %numbertimes; + undef $includedir; + undef %spreadsheets; + undef %courserdatas; + undef %userrdatas; + undef %defaultsheets; + undef %rowlabel_cache; +} + sub complete_recalc { my $self = shift; undef %spreadsheets; @@ -751,6 +771,15 @@ sub new { # my ($uname,$udom,$stype,$usymb)=@_; # + 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; + } + } my $self = { uname => $uname, udom => $udom,