Installation

Moodle wwlink/wwassignment error

Moodle wwlink/wwassignment error

by Bernd Sing -
Number of replies: 5

Hi!

After upgrading to WebWork 2.16, I seem no longer to be able to use WeBWorK via the Moodle Assignment module (wwlink/wwassignment, from the openwebwork github).

When I click on existing "WeBWorK Problem Set" activity in Moodle, a new page opens with the error message

Exception - Function ("get_user") is not a valid method for this service

I get the same error message when I try to add a new "WeBWorK Problem Set" activity.

When I try to configure an existing "WeBWorK Link" block inside a Moodle course, I get the error message

Exception - Function ("list_courses") is not a valid method for this service

Trying to add a "WeBWorK Link" block to a Moodle course, gives the same error message.

Any help or hints would be greatly appreciated.

In reply to Bernd Sing

Re: Moodle wwlink/wwassignment error

by Julie Tremblay -

Hello!

I have a similar problem with my WeBWorK server 2.16 and Moodle. Did you find a solution to your problem?

The xml file shows without errors when I run webwork2_wsdl in a web browser , but the file is really smaller then before. I don’t know if it’s normal for the version 2.16 of WeBWorK.

I didn’t find any error in the apache error log of webwork, but I dont’ have access to the Moodle server, so I don’t know if there are errors.

I know that the wwassignment module has not been updated. But I have Moodle version 3.10, and it was working correctly with a webwork server version 2.13. So i’m assuming that the problem is with the 2.16 version. 

Thank you for any feedback!

Julie Tremblay

In reply to Julie Tremblay

Re: Moodle wwlink/wwassignment error

by Julie Tremblay -
Hello!

I found the source and a solution to the problem. The xml file webwork2_wsdl is not complete because of this commit 

https://github.com/openwebwork/webwork2/commit/f76b5791c6926857d07a5a690649075a979c29ac#diff-fff16078c1ccde3ae6451d364f1009f1f98712318e7be3da0eb43c348931aa4b

All the POD wsdl were deleted from the file WebworkSOAP.pm and the files in the Classes also. I think the WSDL file is created with those deleted POD, so that is why the soap connexion didn’t work. I put back all the POD that was deleted in the soap files only, and my Moodle wwassignment now works. Well almost  There is still some problems but it’s with the wwassigment module, not webwork  

I think this is an issue that must be corrected in Github. I’m sure they will find a better solution than what I did. Those POD were deleted for a reason, but this broke the WebworkSOAP also.

If anyone read this post, please keep me inform of the outcome. Thank you!

Julie

In reply to Julie Tremblay

Re: Moodle wwlink/wwassignment error

by Andy Fuchs -
We recently switched machines, also moving to webwork 2.16--breaking our webwork/moodle connection. Sadly, I don't have direct access to the moodle configuration--making diagnosis tricky. Already configured moodle/webwork assignments fail with moodle error 'No WeBWorK user is mapped to the current Moodle user' (which is the print_error in function login_user in locallib.php in wwassignment). The moodle admin says she is unable to bring up a list of courses to choose from when she tries to add a webwork link block. The strange thing, though, is that I am able to make a connection through an already existing course-level 'external tool'--where I enter the settings myself.

For the record, restoring the older WebworkSOAP.pm doesn't make any difference (I suppose the added Pod/WSDL output in webwork2_wsdl was suppressed by design).

Again, sadly, I don't have access to the moodle configuration, and I don't know where the admin should be checking. Where, for instance, does moodle store the 'consumer secret' or key, $LTIBasicConsumerSecret? Does this come up in the site-wide configuration of wwassignment or wwlink, or is it stored on a per-course basis within the link block itself?
 
Many thanks for whatever thoughts or guidance.
In reply to Andy Fuchs

Re: Moodle wwlink/wwassignment error

by Julie Tremblay -

Hello Andy,

The $LTIBasicConsumerSecret is for an LTI connection from Moodle to webwork. It is not the same connection with the wwassigment/wwlink plugin, which use the Soap. Actually, since the plugin has not been updated for a couple of years, they suggest that we use the LTI connection which is updated regularly. You can find the documentation in the webwork.maa.org website. 

For the wwassigment/wwlink, if you still want to use that connection, I posted an issu on Github about the problem we are having and they made a correction already. You can see the discussions and a link to the commits you have to pull to your webwork2 repository. 

https://github.com/openwebwork/webwork2/issues/1544

Maybe the changes you made to your WebworkSOAP file wasn’t enought. You had to change also the files in the WebworkSOAP Classes. There is two commits you have to pull. The one that put back the POD lines and the one that comment the line with the default SoapKey.

You can read the exchange I had in my post issu with Glen Rice that explain the second commit. He told me it is a security issu. You can put your SoapKey in your webwork_apache2.4.conf, that is what I did. You need to give this key to your Moodle admin. 

Hope this work for you,

Julie

In reply to Julie Tremblay

Re: Moodle wwlink/wwassignment error

by Andy Fuchs -
Brilliant! Thanks so much!

I'm curious, are wwassignment and wwlink meant to respect the $strip_address_from_email parameter in authen_LTI.conf? Also, is it unusual that webwork fails to log connections using wwassignment? I believe it used to.

Again, very many thanks!