Diff for /loncom/homework/essayresponse.pm between versions 1.105 and 1.106

version 1.105, 2010/04/20 23:59:53 version 1.106, 2010/04/22 13:00:24
Line 105  sub start_essayresponse { Line 105  sub start_essayresponse {
  my @msgs;   my @msgs;
  if ($Apache::lonhomework::history{"resource.$part.$id.collaborators"} =~ /\S/) {   if ($Apache::lonhomework::history{"resource.$part.$id.collaborators"} =~ /\S/) {
     my $coll= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"},'<>&"');      my $coll= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"},'<>&"');
     $result .= '<td>'.&mt('Collaborated with [_1]',$coll).'</td>';      $result .= '<td><i>'.&mt('Collaborated with [_1]',$coll).'</i></td>';
  }   }
   
  my $file_submission =    my $file_submission = 
Line 136  sub end_essayresponse { Line 136  sub end_essayresponse {
     my $increment     = &Apache::response::repetition();      my $increment     = &Apache::response::repetition();
     my $result;      my $result;
     if ( $target eq 'grade' ) {      if ( $target eq 'grade' ) {
  my $collaborators = $env{'form.HWCOL'.$part.'_'.$id};  # Deal with collaborators
  if ($collaborators =~ /[^\s]/) {   my $collaborators = $env{'form.HWCOL'.$part.'_'.$id};
     my $previous_list= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"},'<>&"');   my $previous_list= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"},'<>&"');
     $Apache::lonhomework::results{"resource.$part.$id.collaborators"}=$collaborators   if ($collaborators ne $previous_list) { 
  if ($collaborators ne $previous_list);  #           &Apache::lonnet::logthis("New collaborators [$collaborators] [$previous_list]");
  }             $Apache::lonhomework::results{"resource.$part.$id.collaborators"}=$collaborators; 
           }
   # Scantron
  if (  &Apache::response::submitted('scantron') ) {   if (  &Apache::response::submitted('scantron') ) {
     $increment=&Apache::response::scored_response($part,$id);      $increment=&Apache::response::scored_response($part,$id);
  } elsif ( &Apache::response::submitted() ) {   } elsif ( &Apache::response::submitted() ) {
Line 419  sub check_collaborators { Line 421  sub check_collaborators {
  $env{'course.'.$env{'request.course.id'}.'.num'});   $env{'course.'.$env{'request.course.id'}.'.num'});
     my (@badcollaborators,$result);      my (@badcollaborators,$result);
       
     my (@collaborators) = split(/,?\s+/,$coll);      my (@collaborators) = split(/[,;\s]+/,$coll);
     foreach my $entry (@collaborators) {      foreach my $entry (@collaborators) {
         my $collaborator;          my $collaborator;
  if ($entry =~ /:/) {   if ($entry =~ /:/) {
Line 467  __END__ Line 469  __END__
   
 =head1 NAME  =head1 NAME
   
 Apache::easyresponse  Apache::essayresponse
   
 =head1 SYNOPSIS  =head1 SYNOPSIS
   

Removed from v.1.105  
changed lines
  Added in v.1.106


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>