Installation

WW assignment 4 & Moodle Integration

WW assignment 4 & Moodle Integration

by Fuzzy Rogers -
Number of replies: 5
We're getting the following error on Moodle integration in apache error_log:
The LENGTH argument can't be negative at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP2.pm line 103.\n

Anyone seen this before and know of a fix? We've followed
http://webwork.maa.org/wiki/Moodle_Assignment
pretty closely, but are not seeing WebWork on the Moodle end (Communication error between the Moodle client and WeBWorK server) .

Get the same LENGTH argument error when testing from Moodle and when trying to get
http://webwork3.math.ucsb.edu/webwork2_rpc

Pod::WSDL (via CPAN) installed
perl-Apache2-SOAP-0.73-1.el5 rpm installed
CentOS release 5.4
Apache/2.2.3
WW 2.4.7

Rebooted several times.

Thanks for any help!
Fuzzy
In reply to Fuzzy Rogers

Re: WW assignment 4 & Moodle Integration

by Fuzzy Rogers -
Concerning this line in
http://webwork.maa.org/wiki/Moodle_Assignment:
"The other problems that I had were with broken Perl modules. I don't remember all the details, but I think that if the webwork2_rpc test fails (even though things are actually working) this triggers an attempt to produce an error report that breaks one of the perl modules (SOAP?) because of an undefined constant."

Should I use different rpms of perl-Apache2-SOAP or some other perl module?

Thanks-
Fuzzy
In reply to Fuzzy Rogers

Re: WW assignment 4 & Moodle Integration

by Michael Gage -
Hi,

For

https://math.webwork.rochester.edu/webwork2_rp

on our system I get an internal system error -- which -- when you inspect the log -- is really


Can't locate auto/Apache2/Const/HTTP_BAD_RE.al in @INC (@INC contains: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /usr/local/lib/perl5/5.8.9/BSDPAN /usr/local/lib/perl5/site_perl/5.8.9/mach /usr/local/lib/perl5/site_perl/5.8.9 /usr/local/lib/perl5/5.8.9/mach /usr/local/lib/perl5/5.8.9 . /usr/local) at /usr/local/lib/perl5/site_perl/5.8.9/SOAP/Transport/HTTP.pm line 707\n

With no content I expect the command to fail.

However make sure that the analog of
https://math.webwork.rochester.edu/webwork2_wsdl

is working -- you should get an xml file in return.

You can set your moodle to the above address for testing if you wish -- it will probably work although I can't guarantee it.

The version number in SOAP/Lite.pm is
use version; $VERSION = qv('0.710.08');

You should be able to view the request, even from moodle, in the apache error log which may give you more information.

-- Mike
In reply to Fuzzy Rogers

Re: WW assignment 4 & Moodle Integration

by Michael Gage -
An internet search suggests that the error message should read "The LENGTH argument can't be negative or zero" .....

I suspect it refers to the fact that you are calling
http://webwork3.math.ucsb.edu/webwork2_rpc

with an empty body in the request.

http://webwork3.math.ucsb.edu/webwork2_wsdl works fine
for me so I suspect the webwork installation of your set up is ok.

I was able to trigger an error message when trying to reach
https://math.webwork.rochester.edu/webwork2_rpc
from moodle

[Wed May 05 21:36:07 2010] [error] [client 127.0.0.1] wsdl error: HTTP ERROR: cURL ERROR: 1: Protocol https not supported or disabled in libcurl
url: https://math.webwork.rochester.edu:443/webwork2_wsdl
http_code: 0
header_size: 0
request_size: 0
filetime: -1
ssl_verify_result: 0
redirect_count: 0
total_time: 0
namelookup_time: 0
connect_time: 0
pretransfer_time: 0
size_upload: 0
size_download: 0
speed_download: 0
speed_upload: 0
download_content_length: 0
upload_content_length: 0
starttransfer_time: 0
redirect_time: 0
, referer: http://localhost/moodle/course/view.php?id=7
[Wed May 05 21:36:07 2010] [error] [client 127.0.0.1] https://math.webwork.rochester.edu/webwork2_wsdl, referer: http://localhost/moodle/course/view.php?id=7


so check the error messages in your apache log on the moodle machine to see if something similar is happening.

Hope this helps.

-- Mike
In reply to Michael Gage

Re: WW assignment 4 & Moodle Integration

by Fuzzy Rogers -
Quick question: in moodle,

wwassignment_webworkurl: url of webwork course:
Should that equal
http://webwork3.math.ucsb.edu/webwork2/coursename
or
http://webwork3.math.ucsb.edu/webwork2

Thanks-
Fuzzy
In reply to Fuzzy Rogers

Re: WW assignment 4 & Moodle Integration

by Michael Gage -
The url is


http://webwork3.math.ucsb.edu/webwork2


you attach the course when you open the wwlink block in the course itself. You need to do this before you can create any webwork assignments. (Choose turn edit on, then add block on any course home page.) Each moodle course can be matched with a different webwork course.

I tried to attach to your webwork last night from the moodle here and everything seemed to work except that I didn't have your security code.

If you haven't attached a course with the wwlink block then you will get (unhelpful) error messages when you try to create an assignment. The moodle end of the setup still needs work in terms of error reporting.



Attachment screenshot_01.png