Diff for /loncom/homework/lonhomework.pm between versions 1.335 and 1.336

version 1.335, 2011/12/21 21:25:36 version 1.336, 2012/12/18 16:48:19
Line 790  sub analyze { Line 790  sub analyze {
  (my $garbage,$subresult)=split(/_HASH_REF__/,$subresult,2);   (my $garbage,$subresult)=split(/_HASH_REF__/,$subresult,2);
  my %analyze=&Apache::lonnet::str2hash($subresult);   my %analyze=&Apache::lonnet::str2hash($subresult);
  my @parts;   my @parts;
  if (defined(@{ $analyze{'parts'} })) {          if (ref($analyze{'parts'}) eq 'ARRAY') {
     @parts=@{ $analyze{'parts'} };      @parts=@{ $analyze{'parts'} };
  }   }
  foreach my $part (@parts) {   foreach my $part (@parts) {
Line 830  sub analyze { Line 830  sub analyze {
                    .'</h3>'                     .'</h3>'
     );      );
     foreach my $part (sort(keys(%allparts))) {      foreach my $part (sort(keys(%allparts))) {
  if (defined(@{ $overall{$part.'.answer'} })) {          if ((ref($overall{$part.'.answer'}) eq 'ARRAY') &&
               (@{$overall{$part.'.answer'}} > 0)) {
     for (my $i=0;$i<scalar(@{ $overall{$part.'.answer'} });$i++) {      for (my $i=0;$i<scalar(@{ $overall{$part.'.answer'} });$i++) {
  my $num_cols=scalar(@{ $overall{$part.'.answer'}[$i][0] });   my $num_cols=scalar(@{ $overall{$part.'.answer'}[$i][0] });
                 $request->print(&Apache::loncommon::start_data_table()                  $request->print(&Apache::loncommon::start_data_table()

Removed from v.1.335  
changed lines
  Added in v.1.336


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