WeBWorK Problems

chemistry lewis structure drawing problem broken since 2.20 upgrade

chemistry lewis structure drawing problem broken since 2.20 upgrade

by Stephanie Bryan -
Number of replies: 3

I am curious if anyone has had a chance to look at this.  Given the error that shows up, the problem seems to be in how the JSON.pm module is accessed.  

Thanks!

In reply to Stephanie Bryan

chemistry lewis structure drawing problem broken since 2.20 upgrade

by Glenn Rice -
That macro will have a problem with PG 2.20. The JSON module is no longer used by webwork or PG. Instead the Mojo::JSON module is used. So the parserLewisStructureTool.pl macro will need to have line 281 deleted. That is the line that reads my $json = JSON->new->allow_nonref;.  Then the lines that call $json->decode need to be changed to call Mojo:JSON::decode_json instead.
In reply to Glenn Rice

chemistry lewis structure drawing problem broken since 2.20 upgrade

by Stephanie Bryan -

Thanks so much Glenn! This worked. I really appreciate it. 

I used a double colon after Mojo for anyone reading but followed these directions otherwise exactly.

In reply to Stephanie Bryan

chemistry lewis structure drawing problem broken since 2.20 upgrade

by Glenn Rice -
Yes, that should have been Mojo::JSON::decode_json. That was a mistake.