[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet Spreadsheet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 23 Jun 2005 17:55:03 -0000
albertel Thu Jun 23 13:55:03 2005 EDT
Modified files:
/loncom/interface/spreadsheet Spreadsheet.pm
Log:
- BUG#4151 - spread on brand new course would fail to work
Index: loncom/interface/spreadsheet/Spreadsheet.pm
diff -u loncom/interface/spreadsheet/Spreadsheet.pm:1.51 loncom/interface/spreadsheet/Spreadsheet.pm:1.52
--- loncom/interface/spreadsheet/Spreadsheet.pm:1.51 Tue May 17 16:17:03 2005
+++ loncom/interface/spreadsheet/Spreadsheet.pm Thu Jun 23 13:55:01 2005
@@ -1,5 +1,5 @@
#
-# $Id: Spreadsheet.pm,v 1.51 2005/05/17 20:17:03 albertel Exp $
+# $Id: Spreadsheet.pm,v 1.52 2005/06/23 17:55:01 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1658,8 +1658,14 @@
$self->formulas($formulas);
$self->set_row_sources();
$self->set_row_numbers();
- %{$spreadsheets{$cachekey}->{'row_source'}} = %{$self->{'row_source'}};
- %{$spreadsheets{$cachekey}->{'row_numbers'}} = %{$self->{'row_numbers'}};
+ if (ref($self->{'row_source'})) {
+ %{$spreadsheets{$cachekey}->{'row_source'}} =
+ %{$self->{'row_source'}};
+ }
+ if (ref($self->{'row_numbers'})) {
+ %{$spreadsheets{$cachekey}->{'row_numbers'}} =
+ %{$self->{'row_numbers'}};
+ }
$spreadsheets{$cachekey}->{'maxrow'} = $self->{'maxrow'};
}
}