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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 08 Apr 2005 19:21:52 -0000


albertel		Fri Apr  8 15:21:52 2005 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm essayresponse.pm 
  Log:
  - was ignore ing the 'INVALID_FILETYPE' award change
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.11 loncom/homework/bridgetask.pm:1.12
--- loncom/homework/bridgetask.pm:1.11	Thu Apr  7 02:56:21 2005
+++ loncom/homework/bridgetask.pm	Fri Apr  8 15:21:52 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.11 2005/04/07 06:56:21 albertel Exp $
+# $Id: bridgetask.pm,v 1.12 2005/04/08 19:21:52 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -188,7 +188,8 @@
 	    }
 	}
 	if ($target eq 'grade') {
-	    &Apache::essayresponse::file_submission('0','bridgetask','portfiles','SUBMITTED');
+	    my $award='SUBMITTED';
+	    &Apache::essayresponse::file_submission('0','bridgetask','portfiles',$award);
 	    if ($Apache::lonhomework::results{"resource.0.bridgetask.portfiles"}) {
 		$Apache::lonhomework::results{"resource.0.tries"}=
 		    1+$Apache::lonhomework::history{"resource.0.tries"};
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.62 loncom/homework/essayresponse.pm:1.63
--- loncom/homework/essayresponse.pm:1.62	Thu Apr  7 02:56:21 2005
+++ loncom/homework/essayresponse.pm	Fri Apr  8 15:21:52 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.62 2005/04/07 06:56:21 albertel Exp $
+# $Id: essayresponse.pm,v 1.63 2005/04/08 19:21:52 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -95,8 +95,8 @@
 		    $award='SUBMITTED';
 		}
                 my $uploadedflag=0;
-		&file_submission($part,$id,'filename',$award,\$uploadedflag);
-		&file_submission($part,$id,'portfiles',$award,\$uploadedflag);
+		&file_submission($part,$id,'filename',\$award,\$uploadedflag);
+		&file_submission($part,$id,'portfiles',\$award,\$uploadedflag);
 		$Apache::lonhomework::results{"resource.$part.$id.submission"}=$response;
 		$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$award;
 		my %previous=&Apache::response::check_for_previous($response,$part,$id);
@@ -164,19 +164,19 @@
 	foreach my $file (@submitted_files) {
 	    my ($extension)=($file=~/\.(\w+)$/);
 	    unless ($uploadedfiletypes=~/\,$extension\,/i) {
-		$award='INVALID_FILETYPE';
+		$$award='INVALID_FILETYPE';
 	    }
 	}
-	if ($award ne 'INVALID_FILETYPE' && ref($uploadedflag)) {
+	if ($$award ne 'INVALID_FILETYPE' && ref($uploadedflag)) {
 	    $$uploadedflag=1;
 	}
-	if ($award ne 'INVALID_FILETYPE' && $which eq 'portfiles') {
+	if ($$award ne 'INVALID_FILETYPE' && $which eq 'portfiles') {
 	    my ($symb,$crsid,$domain,$name)=&Apache::lonxml::whichuser();
 	    &Apache::lonnet::unmark_as_readonly($domain,$name,$symb.$crsid);
 	    &Apache::lonnet::mark_as_readonly($domain,$name,\@submitted_files,$symb.$crsid);
 	    &Apache::lonnet::clear_selected_files($name);
 	}
-	if ($award ne 'INVALID_FILETYPE' && $which eq 'filename') {
+	if ($$award ne 'INVALID_FILETYPE' && $which eq 'filename') {
 	    $Apache::lonhomework::results{"resource.$part.$id.uploadedfile"}=
 		$files;
 	    $Apache::lonhomework::results{"resource.$part.$id.uploadedurl"}=