[ww-devel] gateway issue

P. Gavin LaRose glarose at umich.edu
Fri Sep 11 15:17:30 EDT 2015


Hi all,

Follow-up: I believe this is in the following lines (c. 2170) in
GatewayQuiz.pm.
  foreach my $curr_field ( @curr_fields ) {
          print CGI::hidden({-name=>$curr_field,
			     -value=>$self->{formFields}->{$currField}});
  }

The value in $self->{formFields}->{$currField} is a "\0" joined string of
answers from the form.  Thus, I think the solution is to take
  foreach my $curr_field ( @curr_fields ) {
  	  foreach ( split(/\0/, $self->{formFields}->{$currField} ) {
                  print CGI::hidden({-name=>$curr_field,
			             -value=>$_});
	  }
  }

If anyone sees something conspicuously wrong about that, please let me
know.

Thanks,
Gavin

On Fri, Sep 11, 2015 at 01:50:46PM -0400, P. Gavin LaRose wrote:
> Hi all,
> 
> We've discovered an issue with gateway scoring on multiple-page gateways:
> with a checkbox_multiple_choice object, if one selects options and moves
> to another page, the selections are lost.  This appears to be because of
> the encoding of answers on the subsequent page (problem answers are stored
> as a hidden field, and the spacing characters are coming as special
> characters).
> 
> Does this ring a bell for anyone that indicates what is going on?
> 
> Thanks,
> Gavin
> 
> -- 
> P Gavin LaRose, PhD | glarose at umich.edu | 734.764.6454    ...you have to
> Program Manager, Instructional Tech.    | respect someone who can spell
> Mathematics Dept.,  Univ. of Michigan   | Tuesday, even if they can't
> http://www.math.lsa.umich.edu/~glarose/ | spell it right.   -Milne
> 
> _______________________________________________
> webwork-devel mailing list
> webwork-devel at webwork.maa.org
> http://webwork.maa.org/mailman/listinfo/webwork-devel

-- 
P Gavin LaRose, PhD | glarose at umich.edu | 734.764.6454    ...you have to
Program Manager, Instructional Tech.    | respect someone who can spell
Mathematics Dept.,  Univ. of Michigan   | Tuesday, even if they can't
http://www.math.lsa.umich.edu/~glarose/ | spell it right.   -Milne



More information about the webwork-devel mailing list