Installation

Adding moodle database to webwork

Re: Adding moodle database to webwork

by Michael Gage -
Number of replies: 0
That's correct. With this scheme the webwork course has no idea that it is connected to a moodle course. You can connect a moodle course to any existing webwork course.

As an instructor you should first enter yourself in the webwork course, giving yourself professor privileges, before connecting to that course from moodle. Use the same user name as you use for the moodle course.

Students will always log into the webwork course from moodle. When they click on a webwork assignment, then if they are not in the webwork course a user with the moodle login name will be created. The new user is given a random, hidden password -- which is never used. WeBWorK authenticates the user because it has been given a session key by the moodle installation (which it trusts). (If a user with that name already exists then no user record is created. This is why you want to establish yourself in the webwork course first as a professor -- so that you will know your webwork password.)

This means that students cannot login to the webwork site directly since they won't know their password. If their session expires they have to go back to moodle and re-enter from there with a fresh session key. For the most part this is a feature not a bug.

As an instructor you will create webwork homework assignment templates as usual and then link to them from the moodle side using the "WeBWorK assignment" activity.
If no webwork assignment has been created specifically for this user when the click on the moodle "WeBWorK assignment" button than a version of that homework assignment is automatically created and assigned to that user.

Homework grades are automatically transferred back to the moodle gradebook whenever the cron job is run or when the moodle link to the webwork assignment is edited and saved.

Essentially everything works with a pull or push from moodle -- webwork simply responds -- and much of the creation is done "just in time".

Hope this helps.

-- Mike