Moodle 2.4 and wwassignment5

Moodle 2.4 and wwassignment5

by Björn Bergstrand -
Number of replies: 4
I didn't want to drag up this old thread:
But my issue is the same. I've not been able to get Moodle 2.4 to work with wwassignment5.

Has anyone looked at this since then?

These are the error outputs:
The wwlink seems to work, but making a link to an actual problem set fails in two different ways:
if wwlink is set to "Any type of course main page" it fails with error message

The module wwassignment does not define the standard capability mod/wwassignment:addinstance
  • line 3450 of /course/lib.php: call to debugging()
  • line 65 of /course/modedit.php: call to course_allowed_module()
Fatal error: Call to undefined method MoodleQuickForm::setHelpButton() in /var/www/moodle/mod/wwassignment/mod_form.php on line 56

with wwlink set to "Any page" or "Any course page" it generates:
Debug info:
Error code: generalexceptionmessage
Stack trace:
  • line 407 of /mod/wwassignment/locallib.php: SoapFault thrown
  • line 407 of /mod/wwassignment/locallib.php: call to SoapClient->__soapCall()
  • line 428 of /mod/wwassignment/locallib.php: call to wwassignment_client->handler()
  • line 188 of /mod/wwassignment/locallib.php: call to wwassignment_client->mapped_user()
  • line 18 of /mod/wwassignment/mod_form.php: call to _wwassignment_mapcreate_user()
  • line 191 of /lib/formslib.php: call to mod_wwassignment_mod_form->definition()
  • line 71 of /course/moodleform_mod.php: call to moodleform->moodleform()
  • line 261 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Output buffer: <div class="notifytiny">The module wwassignment does not define the standard capability mod/wwassignment:addinstance<ul style="text-align: left"><li>line 3450 of /course/lib.php: call to debugging()</li><li>line 65 of /course/modedit.php: call to course_allowed_module()</li></ul></div> Notice: Trying to get property of non-object in /var/www/moodle/mod/wwassignment/locallib.php on line 253

In reply to Björn Bergstrand

Re: Moodle 2.4 and wwassignment5

by Peter Baxter -
We just upgraded to Moodle 2.5 and are curious as to whether anyone has started to look at what the issues might be with wwassignment5 and Moodle 2.4+?
In reply to Peter Baxter

Re: Moodle 2.4 and wwassignment5

by Michael Gage -
I have been able to get wwassignment5 to work with moodle 2.5 stable.

There were reports that it did not work with moodle 2.3 and 2.4 but I have not tested them myself.

Bryan O'Shea submitted a minor patch to 
a few days ago that should make it compatible with 2.4 as well but I haven't
tested it.

I just pulled the patch today so you can update from github and see how it works for you.

I suspect that the moodle people put in a small tweak for 2.5 that helped keep older modules from breaking.

In reply to Michael Gage

Re: Moodle 2.4 and wwassignment5

by Peter Baxter -
I pulled the patch but we are still having issues.

However, it doesn't seem to be related to the moodle version, the code seems to be written with the assumption the database used is MySQL, or a database that will implicitly perform type conversion.

In our instance of PostgreSQL a query like:

SELECT * FROM mdl_wwassignment WHERE id=''

will fail because an integer is being compared to a string (while MySQL appears to perform an implicit type conversion which makes it work)

As a result code like:

$DB->get_record('wwassignment', array('id'=>$wwassignmentid ));

fails when $wwassignmentid is set to '' (such as when a new WeBWorK Problem Set is added to a course).