[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet Spreadsheet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 01 Sep 2005 21:52:58 -0000


albertel		Thu Sep  1 17:52:58 2005 EDT

  Modified files:              
    /loncom/interface/spreadsheet	Spreadsheet.pm 
  Log:
  - no need to make the round trip since the env is no correct
  
  
Index: loncom/interface/spreadsheet/Spreadsheet.pm
diff -u loncom/interface/spreadsheet/Spreadsheet.pm:1.55 loncom/interface/spreadsheet/Spreadsheet.pm:1.56
--- loncom/interface/spreadsheet/Spreadsheet.pm:1.55	Thu Sep  1 17:47:14 2005
+++ loncom/interface/spreadsheet/Spreadsheet.pm	Thu Sep  1 17:52:56 2005
@@ -1,5 +1,5 @@
 #
-# $Id: Spreadsheet.pm,v 1.55 2005/09/01 21:47:14 albertel Exp $
+# $Id: Spreadsheet.pm,v 1.56 2005/09/01 21:52:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -213,16 +213,8 @@
 sub is_default {
     my $self = shift;
     # Check to find out if we are the default spreadsheet (filenames match)
-    my $default_filename = '';
-    my %tmphash = &Apache::lonnet::get('environment',
-                                       ['spreadsheet_default_'.
-                                        $self->{'type'}],
-                                       $self->{'cdom'},
-                                       $self->{'cnum'});
-    my ($tmp) = keys(%tmphash);
-    if ($tmp !~ /^(con_lost|error|no_such_host)/i) {
-        $default_filename = $tmphash{'spreadsheet_default_'.$self->{'type'}};
-    }
+    my $default_filename = $env{'course.'.$self->{'cid'}.
+				    '.spreadsheet_default_'.$self->{'type'}};
     if ($default_filename =~ /^\s*$/) {
         $default_filename = 'default_'.$self->{'type'};
     }