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

kruse kruse at source.lon-capa.org
Thu Aug 22 09:58:21 EDT 2013


kruse		Thu Aug 22 13:58:21 2013 EDT

  Modified files:              
    /loncom/homework	externalresponse.pm 
  Log:
  WORK IN PROGRESS, correct links to uploaded files are sent to external grader now.
  
  
Index: loncom/homework/externalresponse.pm
diff -u loncom/homework/externalresponse.pm:1.22 loncom/homework/externalresponse.pm:1.23
--- loncom/homework/externalresponse.pm:1.22	Thu Aug 22 11:13:43 2013
+++ loncom/homework/externalresponse.pm	Thu Aug 22 13:58:21 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # external style responses
 #
-# $Id: externalresponse.pm,v 1.22 2013/08/22 11:13:43 www Exp $
+# $Id: externalresponse.pm,v 1.23 2013/08/22 13:58:21 kruse Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -177,12 +177,6 @@
     my $id = $Apache::inputtags::response['-1'];
     my $increment     = 1;
     if ($target eq 'grade') {
-        my $collaborators = $env{'form.HWCOL'.$part.'_'.$id};
-        my $previous_list= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"},'<>&"');
-        if ($collaborators ne $previous_list) {
-#          &Apache::lonnet::logthis("New collaborators [$collaborators] [$previous_list]");
-           $Apache::lonhomework::results{"resource.$part.$id.collaborators"}=$collaborators;
-        }
 	if (  &Apache::response::submitted('scantron') ) {
 	    my $increment=&Apache::response::scored_response($part,$id);
 	} elsif ( &Apache::response::submitted() ) {
@@ -257,14 +251,14 @@
             }
 # Currently turned in files
             my %currently_turned_in=();
-            foreach my $file (split(/\,/,$Apache::lonhomework::results{"resource.$part.$id.portfiles"}.','.
+           foreach my $file (split(/\,/,$Apache::lonhomework::results{"resource.$part.$id.portfiles"}.','.
                                          $Apache::lonhomework::results{"resource.$part.$id.uploadedurl"})) {
-               if ($file=~/\S/) {
+              if ($file=~/\S/) {
                   $filesresults=1;
                   $currently_turned_in{'/uploaded/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/portfolio'.$file}=1;
                }
             }
-            my $filelinks=join(',',map{&escape($_)}(keys(%currently_turned_in)));
+            my $filelinks=join(',',map{$_}(keys(%currently_turned_in)));
             &Apache::lonnet::logthis("Previously: ".join("\n",sort(keys(%previously_turned_in))));
             &Apache::lonnet::logthis("Currently: ".join("\n",sort(keys(%currently_turned_in))));
             &Apache::lonnet::logthis("File flag: ".$filesresults);
@@ -286,8 +280,6 @@
                 my %record = &Apache::lonnet::restore($symb,$env{'request.course.id'},$udom,$uname);
 		my $ua = LWP::UserAgent->new;
 		my $res = $ua->request(POST $url, \%form);
-		my %previous = &Apache::response::check_for_previous($response,
-								     $part,$id);
 		%Apache::loncapagrade::results=();
 		$Apache::lonhomework::results{"resource.$part.$id.submission"}=$response;
 		if ($res->is_error()) {
@@ -304,8 +296,6 @@
 			$Apache::loncapagrade::results{$key};
 		}
                 $Apache::externalresponse::message=$Apache::loncapagrade::results{'message'};
-		&Apache::response::handle_previous(\%previous,
-						   $Apache::loncapagrade::results{'awarddetail'});
                 if ($Apache::loncapagrade::results{'awarddetail'} eq 'ASSIGNED_SCORE') {
                    $Apache::lonhomework::results{"resource.$part.$id.awarded"}=
                         1.*$Apache::loncapagrade::results{"awarded"};




More information about the LON-CAPA-cvs mailing list