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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 25 Mar 2003 22:51:48 -0000


albertel		Tue Mar 25 17:51:48 2003 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
    /loncom/xml	lonxml.pm 
  Log:
  - better as str compare
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.115 loncom/homework/lonhomework.pm:1.116
--- loncom/homework/lonhomework.pm:1.115	Tue Mar 11 13:43:08 2003
+++ loncom/homework/lonhomework.pm	Tue Mar 25 17:51:48 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.115 2003/03/11 18:43:08 www Exp $
+# $Id: lonhomework.pm,v 1.116 2003/03/25 22:51:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -422,7 +422,7 @@
   my ($request,$file) = @_;
   my $result;
   my $problem=&Apache::lonnet::getfile($file);
-  if ($problem == -1) {
+  if ($problem eq -1) {
     &Apache::lonxml::error("<b> Unable to find <i>$file</i></b>");
     $problem='';
   }
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.240 loncom/xml/lonxml.pm:1.241
--- loncom/xml/lonxml.pm:1.240	Wed Feb 26 12:52:14 2003
+++ loncom/xml/lonxml.pm	Tue Mar 25 17:51:48 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.240 2003/02/26 17:52:14 albertel Exp $
+# $Id: lonxml.pm,v 1.241 2003/03/25 22:51:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -795,7 +795,7 @@
     my ($safeeval)=@_;
     &Apache::lonxml::debug('Loading default_homework');
     my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm');
-    if ($default == -1) {
+    if ($default eq -1) {
 	&Apache::lonxml::error("<b>Unable to find <i>default_homework.lcpm</i></b>");
     } else {
 	&Apache::run::run($default,$safeeval);
@@ -1187,7 +1187,7 @@
   my %mystyle;
   my $result = '';
   my $filecontents=&Apache::lonnet::getfile($file);
-  if ($filecontents == -1) {
+  if ($filecontents eq -1) {
     $result=(<<ENDNOTFOUND);
 <html>
 <head>