Forum archive 2000-2006

Lars Jensen - webwork with moodle 1.7 - error

Lars Jensen - webwork with moodle 1.7 - error

by Arnold Pizer -
Number of replies: 0
inactiveTopicwebwork with moodle 1.7 - error topic started 11/21/2006; 6:12:35 PM
last post 11/22/2006; 11:59:18 PM
userLars Jensen - webwork with moodle 1.7 - error  blueArrow
11/21/2006; 6:12:35 PM (reads: 89, responses: 3)
Dear Collegues,

When setting up webwork with moodle 1.7 I get errors. Everything seems to go OK with the installation until the point when the instructor sets up a webwork assignment in moodle and clicks the link "Administer the WeBWorK portion of this course." Then the following error pops up:

DBD::mysql::st execute failed: Table 'moodle.mdl_sessions' doesn't exist at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/Moodle/Key.pm line 76

The same error pops up when I try to access the course directly from the webwork interface.

When I look at the moodle database with phpmyadmin, I notice that a table named moodle.mdl_sessions2 exists, but no table named moodle.mdl_sessions exists.

Is this just a trivial change in the webwork-moodle setup? If so, where do I change the configuration so webwork uses the moodle.mdl_sessions2 table instead?

Another question:

The default setting in the moodle modules configuration of the "Webwork Problem Set" module is that

wwassignment_webworkcourses = /opt/webwork2/courses/

shouldn't this be /opt/webwork/courses/ ?

Lars.

<| Post or View Comments |>


userMichael Gage - Re: webwork with moodle 1.7 - error  blueArrow
11/22/2006; 9:35:26 PM (reads: 90, responses: 0)
Hi Lars,

I've had a chance to glance at the new moodle 1.7. There have been significant changes in the moodle database that will require some changes to the Authen/Moodle.pm module (which seem to be pretty trivial) and to the DB/Schema/Moodle modules (which are more extensive).

This is because the communication between WeBWorK and Moodle is currently through a shared database. When we get a chance to implement a webservice interface changes in one program will be fairly transparent to changes in the other.

So far I haven't seen anything very drastic. The main change is introduction of roles to Moodle and a complete change in the way this information is stored in the database. This actually puts moodle more in line with WeBWorK, but it requires some changes in the SQL statements that determine whether a user is a student, TA or instructor from WeBWorK's point of view. Once I have the new SQL statements worked out the modifications should be fairly easy.

-- Mike

<| Post or View Comments |>


userSam Hathaway - Re: webwork with moodle 1.7 - error  blueArrow
11/22/2006; 11:44:55 PM (reads: 77, responses: 0)
Now might be the right time to implement an RPC bridge between WW and Moodle, rather than chasing an evolving Moodle database format.

<| Post or View Comments |>


userMichael Gage - Re: webwork with moodle 1.7 - error  blueArrow
11/22/2006; 11:59:18 PM (reads: 86, responses: 0)
I've had that thought myself. I suspect we'll end up doing both. In order to implement the web interface I think we'll still need to figure out some of the database implementation.

I'm not sure how far along moodle's webservice is -- I know they are developing one.

Most of the problem is getting information out of moodle, i.e. the DB/Moodle module.

The key role for finding a user is mdl_role_assignments which has

user_id role_id context_id(which points to a course_or_other entity)

Here is a reference (which took me a while to find):

http://docs.moodle.org/en/Roles_development#Context

Happy Thanksgiving!

-- Mike

<| Post or View Comments |>