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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 14 Sep 2004 14:13:09 -0000


albertel		Tue Sep 14 10:13:09 2004 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - undoing some aspects of the last commit
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.209 loncom/homework/grades.pm:1.210
--- loncom/homework/grades.pm:1.209	Tue Sep 14 09:30:09 2004
+++ loncom/homework/grades.pm	Tue Sep 14 10:13:08 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.209 2004/09/14 13:30:09 ng Exp $
+# $Id: grades.pm,v 1.210 2004/09/14 14:13:08 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4719,7 +4719,7 @@
 	}
 	return '';
     }
-#    $r->print("Doing upload to ".$ENV{'form.courseid'}." <br />");
+    $r->print("Doing upload to ".$ENV{'form.courseid'}." <br />");
     my $home=&Apache::lonnet::homeserver($ENV{'form.courseid'},
 					 $ENV{'form.domainid'});
     my $fname=$ENV{'form.upfile.filename'};
@@ -4742,17 +4742,14 @@
 	$r->print("<font color='red'>Error:</font> The file you attempted to upload, <tt>".&HTML::Entities::encode($ENV{'form.upfile.filename'},'<>&"')."</tt>, contained no information. Please check that you entered the correct filename.");
     } else {
 	my $result=&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'},$ENV{'form.domainid'},$home,'upfile',$fname);
-#	if ($result =~ m|^/uploaded/|) {
-	if ($result !~ m|^/uploaded/|) {
-#	    $r->print("<font color='green'>Success:</font> Successfully uploaded ".(length($ENV{'form.upfile'})-1)." bytes of data into location <tt>".$result."</tt>");
-#	} else {
+	if ($result =~ m|^/uploaded/|) {
+	    $r->print("<font color='green'>Success:</font> Successfully uploaded ".(length($ENV{'form.upfile'})-1)." bytes of data into location <tt>".$result."</tt>");
+	} else {
 	    $r->print("<font color='red'>Error:</font> An error (".$result.") occurred when attempting to upload the file, <tt>".&HTML::Entities::encode($ENV{'form.upfile.filename'},'<>&"')."</tt>");
 	}
     }
     if ($symb) {
-#	$r->print(&show_grading_menu_form($symb,$url));
 	$r->print(&scantron_selectphase($r,$uploadedfile));
-
     } else {
 	$r->print($doanotherupload);
     }