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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 10 Nov 2005 20:43:00 -0000


albertel		Thu Nov 10 15:43:00 2005 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - shouldn't be spewing these errors at authors
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.221 loncom/homework/lonhomework.pm:1.222
--- loncom/homework/lonhomework.pm:1.221	Tue Nov  8 16:09:08 2005
+++ loncom/homework/lonhomework.pm	Thu Nov 10 15:43:00 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.221 2005/11/08 21:09:08 albertel Exp $
+# $Id: lonhomework.pm,v 1.222 2005/11/10 20:43:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -766,8 +766,10 @@
 	    $target = 'web'; $output=0;
 	}
 	my $problem=&Apache::lonnet::getfile($file);
+	my $result;
 	if ($problem eq -1) {
-	    &Apache::lonxml::error("<b> ".&mt('Unable to find')." <i>$file</i></b>");
+	    my $filename=(split('/',$file))[-1];
+	    $result.="<b> ".&mt('Unable to find')." <i>$filename</i></b>";
 	    $problem='';
 	}
 
@@ -777,8 +779,8 @@
 	if ($target eq 'web') {&Apache::lonhomework::showhashsubset(\%env,'^form');}
 
 	&Apache::lonxml::debug("Should be parsing now");
-	my $result = &Apache::lonxml::xmlparse($request, $target, $problem,
-					       &setup_vars($target),%mystyle);
+	$result .= &Apache::lonxml::xmlparse($request, $target, $problem,
+					     &setup_vars($target),%mystyle);
 	undef($Apache::lonhomework::parsing_a_problem);
 	if (!$output) { $result = ''; }
 	#$request->print("Result follows:");