WeBWorK Main Forum

Library paths for opaque server

Library paths for opaque server

by Sean Fitzpatrick -
Number of replies: 2

We're testing the opaque server method for injecting WeBWorK problems into Moodle quizzes.

I think I have things set up correctly on the WeBWorK side. (I run the WeBWorK server but I don't have admin access to Moodle. So I have to get things set up and then hand off to the Moodle people.)

The one thing I wasn't sure about was setting paths to non-OPL questions. The instructions indicated that if a question is at

Library/foo-bar.pg

this should convert to library__foo___bar.pg (with library lower case).

We have a local question bank on our server. The symlink into courses is ULmath so a question path might be

ULmath/Calculus/foo-bar.pg

Do I need to make ULmath lower case?

In reply to Sean Fitzpatrick

Re: Library paths for opaque server

by Michael Gage -

I think you will although I don't remember for sure.  The Opaque Moodle module had some unusual constraints on what was allowed in the identifier strings. I believe it required the initial character to be a lower case letter, but at this point that's just a guess.

http://michaelgage.blogspot.com/2017/05/p.html#more

look at section 3  "create Moodle quiz

also

https://docs.moodle.org/dev/Open_protocol_for_accessing_question_engines

"Identifying questions".

question id This is a string conatining only the characters [_a-z0-9.], and also matching the syntactic rules for Java package names. That is, it is one or more 'words' separated by '.'s, each word matching the regexp [_a-z][_a-z0-9]*. This identifies the question withing the question bank. For example calculus.diff01a or _12345.

I wonder if could have used the period .   somehow in addition to make it work more smoothly.

What version of moodle are you using?  I've had several questions over the last year which bring up things that could be improved about this Opaque server feature.  Most of these involve updating the php code in the opaque client which does not appear to be maintained at the moment by Moodle central.  I've been considering whether this connection should be replaced by an LTI solution of some sort which would probably be easier to maintain.  The same is true for the wwassignment moodle module which is used to connect a Moodle assignment to a homework set WeBWorK. That can be replaced, minus a few features, by LTI. It's possible that with LTI 1.3 any missing features from wwassignment could be provided as well.

In reply to Michael Gage

Re: Library paths for opaque server

by Sean Fitzpatrick -

We're currently on Moodle 3.8.2+.

LTI is set up and has been working great for a few years now.

A couple people (including me) are considering using WeBWorK with LTI for homework, but we'd like quizzes graded separately. I could set up a second course that uses LTI with homework grade mode for grade passback. Or I could try setting up opaque.

If it works for us (a big if - we have heavily customized Moodle distributed across multiple VMs with a load balancer) I can work with interested faculty to create set definition files over the summer and then export them to Moodle as detailed in your blog.

First step is to make sure we can pull problems from locally developed libraries as well as OPL.