[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet Spreadsheet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Mon, 19 May 2003 13:58:05 -0000
matthew Mon May 19 09:58:05 2003 EDT
Modified files:
/loncom/interface/spreadsheet Spreadsheet.pm
Log:
$spreadsheet->othersheets() returns ('Default') if it is unable to find any
other spreadsheets.
Index: loncom/interface/spreadsheet/Spreadsheet.pm
diff -u loncom/interface/spreadsheet/Spreadsheet.pm:1.1 loncom/interface/spreadsheet/Spreadsheet.pm:1.2
--- loncom/interface/spreadsheet/Spreadsheet.pm:1.1 Fri May 16 16:55:11 2003
+++ loncom/interface/spreadsheet/Spreadsheet.pm Mon May 19 09:58:05 2003
@@ -1,5 +1,5 @@
#
-# $Id: Spreadsheet.pm,v 1.1 2003/05/16 20:55:11 matthew Exp $
+# $Id: Spreadsheet.pm,v 1.2 2003/05/19 13:58:05 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1500,7 +1500,9 @@
my %results=&Apache::lonnet::dump($stype.'_spreadsheets',
$self->{'cdom'}, $self->{'cnum'});
my ($tmp) = keys(%results);
- unless ($tmp =~ /^(con_lost|error|no_such_host)/i ) {
+ if ($tmp =~ /^(con_lost|error|no_such_host)/i ) {
+ @alternatives = ('Default');
+ } else {
@alternatives = sort (keys(%results));
}
return @alternatives;