--- loncom/interface/spreadsheet/studentcalc.pm 2003/05/23 21:03:29 1.7 +++ loncom/interface/spreadsheet/studentcalc.pm 2003/05/29 13:39:38 1.8 @@ -1,5 +1,5 @@ # -# $Id: studentcalc.pm,v 1.7 2003/05/23 21:03:29 matthew Exp $ +# $Id: studentcalc.pm,v 1.8 2003/05/29 13:39:38 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -64,12 +64,24 @@ my %Exportrows = (); my $current_course; +sub initialize { + &initialize_sequence_cache(); +} + sub initialize_package { $current_course = $ENV{'request.course.id'}; &initialize_sequence_cache(); &load_cached_export_rows(); } +sub ensure_correct_sequence_data { + if ($current_course ne $ENV{'request.course.id'}) { + &initialize_sequence_cache(); + $current_course = $ENV{'request.course.id'}; + } + return; +} + sub initialize_sequence_cache { # # Set up the sequences and assessments