Diff for /loncom/homework/inputtags.pm between versions 1.316 and 1.317

version 1.316, 2013/04/26 18:08:48 version 1.317, 2013/04/30 03:03:34
Line 216  sub start_textfield { Line 216  sub start_textfield {
             }              }
         }          }
         unless ($newvariation) {          unless ($newvariation) {
     $oldresponse = $Apache::lonhomework::history{"resource.$partid.$resid.submission"};              if ((($env{'form.grade_username'} eq '') && ($env{'form.grade_domain'} eq '')) ||
                   (($env{'form.grade_username'} eq $env{'user.name'}) &&
                    ($env{'form.grade_domain'} eq $env{'user.domain'}))) {
                   $oldresponse = $Apache::lonhomework::history{"resource.$partid.$resid.submission"};
               } elsif (($Apache::lonhomework::history{"resource.$partid.type"} eq 'anonsurvey') ||
                       ($Apache::lonhomework::history{"resource.$partid.type"} eq 'anonsurveycred')) {
                   $oldresponse = '* '.&mt('only shown to submitter').' *';
               } else {
                   $oldresponse = $Apache::lonhomework::history{"resource.$partid.$resid.submission"};
               }
         }          }
  if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {   if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
     my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval);      my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval);
Line 407  sub start_textline { Line 416  sub start_textline {
                 }                  }
             }              }
             unless ($newvariation) {              unless ($newvariation) {
         $oldresponse = $Apache::lonhomework::history{"resource.$partid.$id.submission"};                  if ((($env{'form.grade_username'} eq '') && ($env{'form.grade_domain'} eq '')) ||
                       (($env{'form.grade_username'} eq $env{'user.name'}) &&
                        ($env{'form.grade_domain'} eq $env{'user.domain'}))) {
                       $oldresponse = $Apache::lonhomework::history{"resource.$partid.$id.submission"};
                   } elsif (($Apache::lonhomework::history{"resource.$partid.type"} eq 'anonsurvey') ||
                           ($Apache::lonhomework::history{"resource.$partid.type"} eq 'anonsurveycred') ||
                           ($Apache::lonhomework::type eq 'anonsurvey') ||
                           ($Apache::lonhomework::type eq 'anonsurveycred')) {
                           $oldresponse = '* '.&mt('only shown to submitter').' *';
                   } else {
                       $oldresponse = $Apache::lonhomework::history{"resource.$partid.$id.submission"};
                   }
         &Apache::lonxml::debug("oldresponse $oldresponse is ".ref($oldresponse));          &Apache::lonxml::debug("oldresponse $oldresponse is ".ref($oldresponse));
         if (ref($oldresponse) eq 'ARRAY') {          if (ref($oldresponse) eq 'ARRAY') {
     $oldresponse = $oldresponse->[$#Apache::inputtags::inputlist];      $oldresponse = $oldresponse->[$#Apache::inputtags::inputlist];

Removed from v.1.316  
changed lines
  Added in v.1.317


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