[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 11 Apr 2002 16:02:32 -0000


albertel		Thu Apr 11 12:02:32 2002 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - Perl 5.005 doesn't like defined(@{ 'not an array ref' }) (BUG#277)
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.76 loncom/homework/lonhomework.pm:1.77
--- loncom/homework/lonhomework.pm:1.76	Tue Apr  9 00:46:33 2002
+++ loncom/homework/lonhomework.pm	Thu Apr 11 12:02:32 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.76 2002/04/09 04:46:33 albertel Exp $
+# $Id: lonhomework.pm,v 1.77 2002/04/11 16:02:32 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -472,7 +472,7 @@
   # some times multiple problemmodes are submitted, need to select
   # the last one
   if ( defined($ENV{'form.problemmode'}) &&
-       defined(@{ $ENV{'form.problemmode'} })) {
+       ref($ENV{'form.problemmode'}) ) {
     my $mode=$ENV{'form.problemmode'}->[-1];
     undef $ENV{'form.problemmode'};
     $ENV{'form.problemmode'}=$mode;